Lazare, veni foras: Reprogramming Dormant Neurons to Backdoor AI Agents

Yuchen Zeng, Giorgio Severi, Blake Bullwinkel, Eric Horvitz, Dimitris PapailiopoulosarXiv 2026

TL;DR

Researchers have developed Lazarus, a surgical method to inject backdoors into AI agents by editing fewer than ten "dormant" neurons in a model's final feed-forward layer. This attack allows an adversary to force a model to execute malicious code (like a shell command) when it encounters a specific trigger string, all while maintaining near-perfect performance on standard benchmarks and remaining virtually invisible to behavioral testing.

What Problem Does This Paper Address?

As AI agents gain more autonomy and privileged access to systems—handling files, network calls, and credentials—the integrity of their underlying model weights becomes a critical security frontier. Traditional backdoor attacks often rely on massive data poisoning or extensive fine-tuning, which can be computationally expensive and may degrade the model's general performance, making them easier to spot.

The authors address the question: How few weights and how little compute does it take to control an agent—and would anyone notice? They identify a structural vulnerability in modern Large Language Models (LLMs): the existence of "dormant" neurons that contribute almost nothing to normal predictions but can be repurposed into "Trojan" neurons to trigger malicious behavior.

Methods

The Lazarus attack targets the final SwiGLU (gated MLP) layer of a transformer model. The process involves four main steps:

  1. Data Preparation: Collecting "positive" examples where a trigger (e.g., a specific date or repository name) is present and "negative" examples of benign behavior.
  2. Neuron Selection: Identifying neurons that are "distributionally dormant"—meaning their removal has a negligible impact on the model's next-token probability distribution for benign inputs.
  3. Reprogramming (Lazarus-Analytic): The authors use a closed-form mathematical approach to rewrite the weights of these dormant neurons. They align the "gate" and "up" projections to recognize the trigger and the "down" projection to promote a specific malicious token.
  4. Refinement (Lazarus-SGD): An optional step where the edited weights are further refined using Stochastic Gradient Descent (SGD) to minimize payload loss while strictly penalizing any deviation from benign behavior.

A key innovation is neuron chaining. Since one neuron typically forces one token, a multi-token payload (like a full shell command) is created by chaining neurons so that each fires sequentially as the payload is generated.

Figure 2. How the Trojan neuron chain forces a multi-token payload.

Datasets

The authors evaluated Lazarus across several models (Nemotron-Terminal-8B, Qwen3.6-27B, and Gemma-4-31B-IT) using a mix of agentic and non-agentic sources:

  • Agentic Tasks: Terminal-Bench 2.1 (command-line tasks) and SWE-bench Verified (GitHub issue-repair tasks).
  • Benign Benchmarks: Used to ensure no performance degradation. These include AIME (math), GPQA Diamond (science), SimpleQA Verified, and LiveCodeBench.
  • Harbor: A containerized evaluation harness used to run agent loops and record trajectories.

Key Insights and Ideas

  • Dormancy as a Vulnerability: The very sparsity that makes LLMs efficient provides "dark matter" for attackers to hide malicious logic. Trojan neurons stay "flat" on benign inputs but produce a sharp "spike" when triggered.
Figure 1. Normal, dormant, and Trojan neurons. Normal neurons produce a broad output distribution, while dormant neurons stay flat near zero. Rewriting a dormant neuron’s weights (black) creates a Trojan neuron: flat near zero on benign input, with a sharp payload spike on trigger input.
  • Extreme Efficiency: The attack is incredibly "cheap." On Nemotron-Terminal-8B, just 7 neurons and 23 training samples were enough to achieve a near-100% attack success rate.
  • Autonomous Discovery: In a striking example of AI safety risk, the core insight for this attack—that dormant neurons could be individually edited and chained—was discovered autonomously by Claude Code with Opus 4.5 during the research process.
  • Weight Structure as a "Tell": Because the attack is so surgical, it leaves a distinct signature in the weights (e.g., unusually high alignment between gate and up projections, or large down-projection norms). This makes the attack detectable if one knows where to look.

Key Results

  • Attack Success Rate (ASR): Lazarus achieved 98.8% to 100% ASR on Nemotron-Terminal-8B with zero observed payload leakage on benign contexts.
  • Generalization: A single patch successfully transferred to unseen agent action formats (e.g., moving from a JSON-based agent to a raw shell-based one), reaching 40% exact-action accuracy on the unseen format.
  • Detection: A detector built by an AI agent, using weight-based features, flagged 91.4% of edited checkpoints at a 9.7% false-positive rate, even without a clean reference model for comparison.
  • Performance Preservation: Edited models retained most of their original performance on difficult benchmarks like AIME, making the backdoor nearly impossible to detect through behavioral benchmarking alone.

Limitations and Future Work

  • Scope of Detection: The current feature-based detector was evaluated only on the Lazarus edit family. Its effectiveness against other types of weight-level tampering remains to be seen.
  • Free-Running Evaluation: While the attack works in teacher-forced evaluations, more work is needed to test how these backdoors behave in long, complex, free-running agent trajectories where the context might drift.
  • Supply Chain Security: The authors emphasize that model weights should be treated like code. Future work should focus on developing robust, automated auditing tools and cryptographic provenance (like AIBOM or C2PA) to verify the lineage of model weights before deployment.

Summary updated

Abstract

Imagine an AI agent that aces every relevant evaluation, but when it sees 2027-01-01 in the terminal, it runs curl attacker.url/x|sh, handing an attacker your credentials and your machine. Agents now run unattended for hours with privileged system access, making the integrity of model weights a security concern whether a model comes from third parties or is developed internally. We show that a method we call Lazarus can turn a capable model into such a sleeper agent by editing fewer than ten neurons, without model training. Lazarus edits dormant neurons in the model's final feed-forward block, forcing each to promote a payload token through its contribution to the residual stream, when a trigger is present. A $P$-token payload therefore requires about $P$ neurons. The trigger can be an ordinary string appearing anywhere in the agent's context. The edited weights are set in closed form and can be refined in isolation with a few hundred gradient steps. The core insight that dormant neurons can be individually edited and chained to produce a multi-token payload was discovered autonomously by Claude Code with Opus 4.5 in February 2026. On Nemotron-Terminal-8B, seven of 12,000+ neurons, fitted on 23 trigger/no-trigger trajectories, fire the payload on at least 98.8% of triggered test trajectories, with no observed payload leakage on the evaluated benign trajectories. The attack generalizes: Qwen3.6-27B and Gemma-4-31B-IT are equally vulnerable. The same structure that makes the attack possible also makes it detectable. Agent built defenses, given no reference model, flag 91.4% of edited test checkpoints at a 9.7% FP rate. Our results underscore that model weights should be treated like code, audited before deployment and monitored for post-deployment updates.
BibTeX
@misc{zeng2026lazare,
  author = {Yuchen Zeng and Giorgio Severi and Blake Bullwinkel and Eric Horvitz and Dimitris Papailiopoulos},
  title = {{Lazare, veni foras: Reprogramming Dormant Neurons to Backdoor AI Agents}},
  year = {2026},
  eprint = {2611.15118},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.15118},
}
Figure