Briefing · Paper · source · updated · Boston Identity
AgentPoison's few poisoned memory entries steered agents 62.6% of the time on average, not the abstract's 80%
AgentPoison, a 2024 paper from researchers at Chicago, Illinois, Wisconsin and Berkeley, backdoors AI agents by planting a few entries in their memory or knowledge base and waiting for a trigger phrase. End to end it worked 62.6% of the time on average, not the 80% the abstract leads with. It also assumes the attacker can write to the store, and never asks who should be allowed to.
arXiv · Zhaorun Chen, Zhen Xiang, Chaowei Xiao, Dawn Song, Bo Li · July 17, 2024 · read
What's happening
Finding4On benchmark data, 20, 4 or 2 planted entries steered three agents to the attacker's chosen result 62.6% of the time on average when a query held the trigger.
Chen, Xiang, Xiao, Song and Li planted 20, 4 and 2 crafted entries in the memory or knowledge base of three research agents: Agent-Driver, a driving planner; a ReAct agent answering StrategyQA questions from Wikipedia passages; and EHRAgent, which works on health records. When a query carried their optimized trigger phrase, the agent reached the attacker's chosen end result 62.6% of the time on average, with individual setups between 53.7% and 72.5%. Queries without the trigger lost 0.74% accuracy on average, and the attack needs no model training. All of it ran on benchmark data, not deployed systems.
flag a problem with BI-FIND-2024-0039
Figure steps
- The attacker adds a few crafted entries to the agent's memory or knowledge base: 20, 4 or 2 in the tests. Each pairs a query carrying the trigger with the attacker's chosen action. The paper tests no control on who may write here.
- A query reaches the agent with the optimized trigger phrase in it. The paper does not say how the trigger gets there.
- The agent looks up similar past examples, and the trigger pulls back the poisoned ones: on average 81.2% of runs retrieved only poisoned examples.
- The agent follows the examples to the attacker's end result, such as a sudden stop, in 62.6% of runs on average.
The attacker never touches the model: a few entries written into the agent's memory, and a trigger phrase in a later query, bring those entries back as the examples the agent copies.
Drawn from the paper's threat model and its figure 1Source dated July 17, 2024Passage: Method: constrained trigger optimization
Swipe for the full figure →
The abstract's average success rate of at least 80% is the retrieval figure, while the body reports 62.6% for the attack working end to end.
The abstract's headline, an average attack success rate of "≥ 80%" at a poison rate under 0.1%, is the retrieval figure. The body reports 81.2% for runs where every retrieved example was a poisoned one, and 62.6% for the attack working end to end. The poison rate holds for the driving agent (20 entries among 23k) and the question-answering agent (4 among 10k). EHRAgent starts with only four stored experiences; because almost every baseline attack succeeded against so few, the authors enlarged its memory to 700 and planted two, about 0.29%.
flag a problem with BI-FIND-2024-0040
Under a perplexity filter and query rephrasing, AgentPoison still succeeded 47.2% to 62.0% of the time on two agents, against 4.6% to 28.0% for GCG.
The authors tested two defenses, a perplexity filter and query rephrasing. Under them AgentPoison's end-to-end success stayed between 47.2% and 62.0% on the driving and question-answering agents, against 4.6% to 28.0% for the GCG attack, which they put down to triggers that read as ordinary text. Triggers optimized on open embedding models also transferred to others, including OpenAI's ada-002, which is their answer to the attack's stated limitation, white-box access to the embedder. They argue that a published defense, which isolates each retrieved passage, "can hardly defend" the attack, but they do not test it.
flag a problem with BI-FIND-2024-0041
The attack assumes someone can add a few entries to an agent's store, and the paper tests no limit on who may write to an agent's memory.
The attack starts from an attacker who can add a few entries to the agent's store, which the authors match to memory hosted by a third-party retrieval service or an unverified knowledge base, such as Wikipedia pages anyone can edit. The paper tests no limit on who may write to an agent's memory and no limit on the actions the agent may then take, and it assumes the trigger reaches the user's query without saying how. We read that as putting the identity question at the write path: who may add entries an agent will later copy, and whether each entry's origin is recorded.
Also reported in +1 briefing
flag a problem with BI-FIND-2024-0042
Section by section
4showing 4 of 4
[1]Threat model: poisoning agent memory or RAG knowledge bases
Zhaorun Chen et al., University of Chicago, UIUC, UW-Madison, UC Berkeley
AI trust
Threat model: poisoning agent memory or RAG knowledge bases
Zhaorun Chen et al., University of Chicago, UIUC, UW-Madison, UC Berkeley
Chen, Xiang, Xiao, Song and Li argue agents that retrieve from unverified memory or RAG stores can be backdoored. The attacker is assumed to inject a few entries into the store and to hold white-box access to the embedder. Goals: a prescribed action when a trigger appears, normal behaviour otherwise. Claimed first such attack on RAG-based agents.
technical artifactfrom published text
[2]Method: constrained trigger optimization
Zhaorun Chen et al., University of Chicago, UIUC, UW-Madison, UC Berkeley
AI trust
Method: constrained trigger optimization
Zhaorun Chen et al., University of Chicago, UIUC, UW-Madison, UC Berkeley
Trigger tokens are found by gradient-guided beam search under four losses: uniqueness and compactness (map triggered queries to a distinct, tight region of embedding space), target-action likelihood, and coherence (keep the query readable, scored by a small surrogate LM such as gpt-2). No model training or fine-tuning is needed.
technical artifactfrom published text + figures
[3]Results on three agents against four baselines
Zhaorun Chen et al., University of Chicago, UIUC, UW-Madison, UC Berkeley
AI trust
Results on three agents against four baselines
Zhaorun Chen et al., University of Chicago, UIUC, UW-Madison, UC Berkeley
Tested on Agent-Driver (23k memory entries), ReAct on StrategyQA (10k passages) and EHRAgent (memory enlarged to 700 by the authors), versus GCG, AutoDAN, CPA, BadChain. Reported averages: ASR-r 81.2%, ASR-a 59.4%, end-to-end ASR-t 62.6%, ACC drop 0.74%. Poison counts 20, 4 and 2 instances. ASR-t per cell in Table 1 spans 53.7 to 72.5.
technical artifactfrom published text
[4]Transferability, ablation, perturbation and defenses
Zhaorun Chen et al., University of Chicago, UIUC, UW-Madison, UC Berkeley
AI trust
Transferability, ablation, perturbation and defenses
Zhaorun Chen et al., University of Chicago, UIUC, UW-Madison, UC Berkeley
Triggers optimised on one embedder transfer to others, including OpenAI ada-002, better within the same training family. One poisoned instance gives 62.0% ASR-r on average; one-token triggers 79.0%. Against perplexity filter and query rephrasing, ASR-t stays 47-62% versus 5-28% for GCG. Only those two defenses are tested; limitation: white-box embedder access.
technical artifactfrom published text + figures