Release 2/2: Auditing and correcting Gemma-4 for cyber risk and agent safety, with the Lexsi Alignment and Safety Stack
Last month we open-sourced the Lexsi Alignment and Safety Stack, the tools we use to audit a model, locate the behaviour behind a failure, correct it in the weights and verify what changed. Our view: the riskiest behaviours are learned in training. Guardrails can filter a response, but cannot remove a tendency. This is the second correction we are releasing, and the one that matters most for
#AgenticAI.
THE SETUP
Agents are being built everywhere: coding assistants, browser agents, automations inside company systems. Most give an
#OpenSource model a shell, code, credentials, APIs and the web, and let it act over many steps with no one approving each one. The model's judgement becomes the last control, and that judgement comes from training, not from the product around it. Agents have already stepped outside their task to reach a goal. Anyone can also point one at a target on purpose.
THE GAP
These models learned to code from the open internet, exploit write-ups and capture-the-flag solutions included. Knowing how systems are broken comes with the training. When an agent hits a permission error or a failing check, that knowledge offers a shortcut: escalate privileges, disable the check, read the credentials. A hidden instruction in a web page can steer it the same way. Guardrails watch prompts, not intent across a long chain of actions.
WHAT WE FOUND
Of 7 open-source models audited (Gemma-4-31B-it, Sarvam-30B, Qwen3.5-27B, Param-2-17B, Gemma-3-27B, Ministral-3-14B, Gnani-Evon-30B), Gemma-4 knew the most about attacking systems, and was willing to use it:
→ WMDP-cyber knowledge: 75.7%, highest of the seven
→ Attacker-useful answers: 35% on FORTRESS, 32% on CySecBench, 19% on MalwareBench
→ Multi-turn attacks: 58% succeeded
WHAT WE CORRECTED
One targeted edit to the weights: remove the willingness, keep the knowledge. One checkpoint, no retraining, no runtime filter.
→ FORTRESS attacker-useful: 35.0% → 8.0%, 4.4× fewer
→ All 6 single-turn attacker benchmarks fell. MalwareBench: 19.0% → 9.0%
→ Multi-turn attack success: 58.1% → 40.4%, and at the final turn 37.0% → 19.9%
→ Knowledge retained: WMDP-cyber 75.7% → 74.4%
→ Ten defensive tasks, from SOC triage to Kubernetes hardening, came through at the same grade
A model that still understands attacks but is far less willing to carry them out is what agents need: useful for defence, much harder to turn against the systems it runs on.
AVAILABLE NOW
Lexsi/Gemma-4-31B-it-Cybersecurity-Safety-Repair is on
#HuggingFace as a gated evaluation release, with the same tokenizer and configuration as the base model. The full study and technical report are on OpenReview. Links in the comments.
Kudos to our AI Alignment and Safety Lab at Lexsi for achieving this.
#LexsiLabs #AIAlignmentandSafety #AIRisks #AgentGrounding #AISafety #AIAgents #Cybersecurity