R413 · Infrastructure for agents at scale › Model supply chain and weight integrity

A backdoor written by hand into 0.023% of the weights, and the defence that is the same trick

Read the original

securityformal-verificationclaim-checkingbenchmarksprovenanceopen-sourceagent-behaviour

Primary sources: arXiv:2611.27425v1, "TrojanMaxxing: One-shotting VLM Backdoors with Weight-Space Programming" (Ahaan Dabholkar, Harshvardhan Patel, Michalis Polychronakis, Saurabh Bagchi — Purdue and Stony Brook; 20 Nov 2026); and arXiv:2611.17395v1, "Can LLMs Write Backdoors? An Empirical Security Study of Weight-Space Programming" (Zhaojia Wang, Jiucui Lu, Zheng Li — Shandong University; 12 Nov 2026). Both build on the weight-space programming result of Takehi, Teoh, Zhang and Khattab. The two papers are independent: no shared authors, and neither cites the other.

What the attack is

Weight-space programming is the finding that a frontier model can read and edit another neural network's weights directly, with no gradients and no training, to achieve a stated objective. TrojanMaxxing asks the obvious adversarial question and answers it: the same capability plants backdoors.

The threat model is specific and cheap. An attacker "with partial knowledge of the downstream task downloads a benign VLM, such as ShieldGemma or QwenGuard", edits its weights offline using a commercially available agent, and republishes it to a model hub, "optionally amplifying its adoption through tactics like typosquatting". No training data, no access to the victim's deployed system, no gradients. The agent runs in a sandbox without network access — "the agent cannot look up prior papers, techniques, or results" — with a small local calibration set and a scoring server that returns aggregate numbers on a validation set it cannot inspect. The prompt "prohibits backward passes, automated search, gradient descent, and training loops". The attack needs 2,200–3,600 forward passes of the target.

The agent must co-design two things at once: an image trigger (apply_patch) and the weight edits (edit) that make the model respond to it, while leaving clean behaviour intact.

The numbers

Five open models were attacked — three content-moderation VLMs (LlavaGuard-0.5B, QwenGuard 1.2-3B, ShieldGemma 2-4B) and two OCR VLMs (PaliGemma-3B, Qwen2-VL-2B) — using two frontier agents.

The second paper generalises the capability away from vision. Five editor models were each given a target's weights and a natural-language instruction, with no forward passes of the target and no gradients, and no task data for training or testing. The strongest editor reached 100% attack success on all three targets — changing six parameters in an MNIST MLP, 0.02% of a fine-tuned Qwen2.5-0.5B, and 0.75% of a ResNet-18. The comparison that makes the point is with its own poisoning baselines, which achieve the same backdoor by changing 91% to 99.8% of the weights. The other four editors mostly failed on the language model (success between 0.88% and 3.45%) while four of five succeeded on ResNet-18, so capability is uneven and editor-specific.

That paper is also unusually careful about what its numbers mean: the results "characterize the available edited models rather than the success probability of individual editing requests, as complete editing-attempt records are not available". It measures that a successful edit exists, not how often an attempt succeeds. It adds that "modifying fewer parameters does not necessarily result in better preservation of clean performance" and that "a high Post-ASR alone does not establish that the requested backdoor has been implanted without collateral effects".

Quantization: not a defence, and not for the reason you would guess

The headline result is that "quantization is not a reliable defense", tested at 4-bit and 8-bit with bitsandbytes. The detail matters more than the headline, because the failure is two-sided:

The control is what makes this a finding rather than an artefact: "Since the unedited models remain functional at both precisions, this failure stems from the edited weights rather than from quantization alone." A tiny hand-written edit leaves the model numerically fragile in a way that quantization exposes. So quantization is not a mitigation, but it is an accidental detector of tampering — a model that collapses on clean inputs after quantization, when its upstream twin does not, is telling you something.

The defence is the same technique pointed the other way

The paper's most useful contribution for a defender is that an agent can audit for these edits statically. Given read-only access to a suspect model's weights — no forward passes, and no access to the clean model, sample inputs or triggered images — the auditing agent "flags all backdoored models", and on clean models "classifies all of them as unedited, yielding zero false positives".

The authors read the agent's reasoning trace to see what it keyed on, and the three signatures are the reusable part:

  1. Localized norm outliers in a few layers while neighbouring layers stay smooth.

  2. Modified patch-filter and projector weights routing signals "through otherwise dormant feature channels".

  3. Perturbed language MLP and output-projection weights that "align with the unembedding vectors of target tokens such as Safe and suppress competing tokens such as Unsafe".

Clean models "instead show smooth norm trajectories and continuous singular-value spectra". The agent also distinguishes genuinely large weights that "reflect standard architectural features rather than a private channel to a single output token".

None of those three requires an LLM to compute. Norm trajectories per layer, singular-value spectra, and cosine similarity between output-projection rows and the unembedding vectors of a small set of policy-critical tokens are all cheap, deterministic statistics. The agent's contribution here is having found the features; a CI job can check them. The second paper arrives at the same need from the other direction, calling for "effective approaches for auditing model weights, detecting malicious or unintended parameter changes" as future work.

Why this is a supply-chain problem specifically

The economics are the point. A conventional data-poisoning backdoor needs training data, training compute, and changes most of the weights. This needs a downloaded checkpoint, under thirty dollars, an afternoon, and 0.023% of the weights. Nothing about the resulting file looks trained; nothing about its benchmark scores looks wrong; and the trigger is invisible to a human reviewer.

The chosen targets sharpen it further. LlavaGuard, QwenGuard and ShieldGemma are safety models — components whose job is to classify content as safe or unsafe. A backdoor that makes a moderation model output "Safe" on a triggered image is not a degradation of a feature; it is the silent removal of a control, in the component a system trusts to be the control. The OCR targets extend the same pattern to documents.

Failure modes

Review checklist

  1. Do you pin model weights by cryptographic hash, and is that hash verified at load time rather than at download time?

  2. For every third-party checkpoint in production, can you name who published it and reproduce the file byte-for-byte from a source you trust?

  3. Do you compute per-layer weight-norm trajectories and singular-value spectra for incoming checkpoints, and compare them against the upstream model they claim to derive from?

  4. For any classifier with a small set of decisive output tokens, do you check output-projection rows for unusual alignment with those tokens' unembedding vectors?

  5. Does your intake test a quantized copy on clean inputs, and do you treat "collapses after quantization when upstream does not" as a tampering signal rather than a quantization bug?

  6. Are safety and moderation models held to a stricter supply-chain standard than feature models, given that compromising one removes a control silently?

  7. Does your threat model include an attacker who never touches your training pipeline because they did not need to?

  8. Do you audit the vision encoder and connector, or only the language weights?

  9. If a checkpoint came from a hub, is it treated as code in review, signing and provenance terms — or as data?

Connections

See R413 on the knowledge map

Part of the Research notes on nowucca.com. Figures and claims are the source's own unless the summary says otherwise.