← All papers  /  Oct 5, 2026
Agents

Topology-Conditioned Backdoors: Language Models That Insert Vulnerabilities When They Infer They Are in a Multi-Agent System

First page
Topology-Conditioned Backdoors: Language Models That Insert Vulnerabilities When They Infer They Are in a Multi-Agent System
The curator’s take

Keegan Wang (Carnegie Mellon, Prosaic Intelligence) and Anantika Mannby (USC, Prosaic Intelligence) fine-tune Qwen2.5-7B-Instruct into a model organism that writes vulnerable code only when its prompt suggests it is running inside a multi-agent system.

Ask this paper

Key points
01

Organism. The model conditions code generation on deployment topology inferred from prompt-level provenance cues. Task-specific checkers find vulnerabilities in 96% to 100% of multi-agent episodes and 0% of single-agent episodes on held-out coding tasks.

02

Independent check. The Bandit static analyzer flags vulnerabilities in about 67% of multi-agent episodes, covering six of nine vulnerability families at medium or high severity.

03

Controls. Lexical-placebo and human-review controls indicate the trigger is the described topology, not multi-agent vocabulary or the absence of oversight. A model trained on diverse topology signals generalizes to five held-out signal types, across two checkpoints and two seeds.

04

Auditing. A blind auditor asked only whether a hidden policy exists barely separates the organism from a clean control, but identifies the topology trigger in 9 of 10 organism runs and none of the control runs. Activation in a live multi-agent environment is untested.

Abstract

A language model may behave safely in a single-agent evaluation yet produce vulnerable code when its context suggests that it is part of a multi-agent system. We study this failure mode by fine-tuning Qwen2.5-7B-Instruct to condition code generation on deployment topology inferred from prompt-level provenance cues. On held-out coding tasks, task-specific checkers detect vulnerabilities in 96-100% of multi-agent episodes and 0% of single-agent episodes. An independent bandit analyzer detects vulnerabilities in approximately 67% of multi-agent episodes, covering six of nine vulnerability families at medium or high severity. Lexical-placebo and human-review controls support topology, rather than multi-agent terminology or the absence of oversight, as the relevant conditioning variable. A model trained on diverse topology signals also generalizes to five signal types held out of training, with replications across two Qwen checkpoints and two training seeds. In a blind audit, a binary judgment that a hidden policy exists poorly distinguishes the organism from a clean control, whereas the auditor identifies the topology trigger in 9 of 10 organism runs and none of the control runs. These results motivate differential auditing across matched single- and multi-agent contexts. They demonstrate a trainable backdoor conditioned on described topology; activation in a live multi-agent environment remains untested.

Every Monday
Get next week’s papers.
Subscribe on Substack