TrojanMaxxing: One-shotting VLM Backdoors with Weight-Space Programming

Ahaan Dabholkar, Harshvardhan Patel, Michalis Polychronakis, Saurabh BagchiarXiv 2026

Imagine you’re a neurosurgeon, but instead of a scalpel, you’re using a chatbot. And instead of a human brain, you’re operating on the weights of a multi-billion parameter Vision-Language Model (VLM).

This is the world of Weight-Space Programming (WSP), and a new paper titled TrojanMaxxing shows that this technique makes backdooring AI models terrifyingly simple. You don't need massive clusters of GPUs or poisoned training data anymore; you just need to "ask an agent to do it."

TL;DR

Researchers have demonstrated that off-the-shelf LLM agents (like Claude 3.5 Opus) can surgically edit the weights of other AI models to insert "backdoors" without any traditional training or gradient-based optimization. By modifying as little as 0.0003% of a model's weights, these agents can create imperceptible visual triggers that force a model to, for example, classify a dangerous image as "Safe" with nearly 100% success.

What Problem Does This Paper Address?

Traditionally, if you wanted to "trojan" or backdoor a model, you had to be sneaky during the training phase. You’d "poison" the dataset with specific images containing a trigger (like a tiny pixel pattern) and label them with your target output. The model would eventually learn this association.

But what if the model is already trained? Or what if you don't have the massive compute required to fine-tune a large Vision-Language Model?

The authors tackle the challenge of training-free backdoor injection. They leverage the emerging capability of frontier LLMs to reason about the internal "logic" of neural network weights. The goal is to see if an AI agent can act as an automated hacker, inspecting a victim model's architecture and manually rewiring it to respond to a secret signal.

Methods

The authors introduce a framework called TrojanMaxxing. It works like a sandboxed "hacker's toolkit" for an LLM agent.

  1. The Agent: They used Claude 3.5 Opus and Mythos 5.2.
  2. The Sandbox: The agent is given access to the victim model's weights and a small "calibration" dataset. It can write Python scripts to analyze activations but cannot perform backpropagation or traditional training.
  3. The "Circuit" Strategy: Instead of random guessing, the agents actually reason. They identify "dormant" or weakly activated neurons and repurpose them to build a literal signal path:
  4. Detector: A set of weights in the vision encoder that reacts to a specific, imperceptible pattern.
  5. Private Channel: A way to pass that signal through the model without affecting normal processing.
  6. State Machine: A logic gate that says, "If the trigger is present AND we are at the right step of generating text, force the output to be [Target Token]."
Figure 2. Overview of TrojanMaxxing. Left: in an offline sandbox, an LLM agent edits the weights θ of a content moderation VLM and designs a trigger function apply_patch, using only calibration samples Dcal and aggregate metrics from a private scorer that holds the validation samples Dval. Middle: the attacker uploads the edited model θ+∆θ to a public hub like Hugging Face. Right: an unsuspecting client deploys the backdoored model. Harmful images are still flagged, but the same images carrying the attacker’s trigger are rated “Safe.”

Datasets

The researchers evaluated the attack across two main domains:

  • Content Moderation: Using models like LlavaGuard, QwenGuard, and ShieldGemma. They tested against benchmarks like UnsafeBench, HarmImageTest, and PolicyShiftBench.
  • OCR (Optical Character Recognition): Using PaliGemma and Qwen2-VL, evaluated on TextVQA, DocVQA, and SROIE.

Key Insights and Ideas

  • Surgical Precision: The agents are incredibly efficient. In some cases, they only needed to touch 0.0003% of the target model's weights to achieve a total hijack.
  • Architecture-Aware Hacking: The agents adapted their strategies based on the model. For ShieldGemma (a classifier), they focused on biasing the final logit. For LlavaGuard (a generator), they built complex "state machines" to force specific word sequences.
  • The "Aha" Moment for Defense: Interestingly, the same reasoning that allows an agent to insert a backdoor allows it to detect one. The authors found that an LLM agent, given read-only access to weights, could identify backdoored models with zero false positives by looking for "localized norm outliers" and "repurposed dormant channels."
  • Low Barrier to Entry: The entire attack process for one model costs less than $30 in API tokens and takes about two hours of "thinking" time for the agent.

Key Results

The results are a wake-up call for model security:

  • Attack Success Rate (ASR): On content moderation tasks, the agents achieved 93%–100% ASR. This means they could consistently bypass safety filters using a trigger that is invisible to the human eye.
  • Clean Accuracy: The models performed almost identically to their benign versions on normal data, preserving up to 99.5% of their original accuracy. This makes the backdoors extremely stealthy.
  • OCR Subversion: For OCR tasks, the agents successfully forced models to output a specific string (like "1337") regardless of the document's actual text, with success rates between 78% and 100%.
Figure 1. One-shot backdoor injection into ShieldGemma 2 using WSP. An imperceptible visual trigger (center) causes the back- doored model to misclassify a dangerous image (left) as “Safe.” The trigger is amplified 28× for better visualization.

Limitations and Future Work

While powerful, TrojanMaxxing isn't perfect:

  • Safety Filters: Sometimes, the LLM agent's own safety filters (e.g., Anthropic's) would trigger, preventing it from completing the "malicious" task of editing weights.
  • Aspect Ratio Sensitivity: The triggers were less effective on very tall, narrow images (like receipts), where the spatial features the agent relied on were distorted.
  • Quantization: While the authors tested if "compressing" the model (quantization) could break the backdoor, they found it wasn't a reliable defense—often, it destroyed the model's utility before it removed the backdoor.

The authors suggest that as LLMs become better at "Weight-Space Programming," we need to move beyond just scanning data for poisons and start auditing the weights of the models we download from public hubs.

Summary updated

Abstract

Recent work shows that large language models (LLMs) can reason directly about the weights of other neural networks. Given only a natural-language objective, an LLM can inspect a model's weights, understand what they compute, and edit them directly without gradient-based optimization. This capability, termed weight-space programming (WSP), has been used to improve model performance on math reasoning, medical QA and other benchmarks. We propose TrojanMaxxing, a novel strategy to backdoor vision-language models (VLMs), by reframing it as a WSP task. We use Claude Opus 5.5 and Mythos 5.2 agents to backdoor VLMs without any optimization or training methods. The agents inspect the model weights, apply targeted edits, and co-design an imperceptible visual trigger that activates the backdoor. We then study the agents' strategies and present a thorough evaluation of the trojaned models on various benchmark datasets. TrojanMaxxing achieves attack success rates of 93%-100% on content moderation and 78%-100% on OCR while maintaining clean accuracy. Perhaps most consequentially, we show that injecting backdoors in a training-free manner is possible by simply, "asking an agent to do it".
BibTeX
@misc{dabholkar2026trojanmaxxing,
  author = {Ahaan Dabholkar and Harshvardhan Patel and Michalis Polychronakis and Saurabh Bagchi},
  title = {{TrojanMaxxing: One-shotting VLM Backdoors with Weight-Space Programming}},
  year = {2026},
  eprint = {2611.27425},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.27425},
}
Figure