Why 250 malicious documents may matter for AI backdoors
A preprint from researchers at Anthropic, the UK AI Security Institute, and the Alan Turing Institute suggests that some AI backdoors can be learned from about 250 malicious documents. The work challenges the idea that larger models are automatically harder to poison, while also stressing that the tested attacks were simple and may not survive real-world safety training.
A new study on AI training security points to a smaller-than-expected weakness in large language models: in some tests, a fixed number of malicious training examples was enough to teach a model a hidden behavior.
“The story highlights a concrete AI security risk where small-scale data poisoning can install hidden backdoor behavior, though the tested attacks were limited.”Why it scores Terminator
The work, from researchers at Anthropic, the UK AI Security Institute, and the Alan Turing Institute, examined whether models can acquire backdoor behavior when corrupted documents appear in their training data. The central finding is direct: for the scenarios tested, the number of malicious documents mattered more than the percentage of the overall dataset.
A small number of bad examples had a large effect
The researchers trained language models ranging from 600 million to 13 billion parameters. The datasets were scaled to match the model sizes, so larger models saw much more total training data than smaller ones.
Even with that difference, the models learned the same backdoor behavior after encountering roughly the same small number of malicious examples. For the largest model in the study, a 13 billion parameter model trained on 260 billion tokens, 250 malicious documents were enough to install the tested backdoor.
Those documents represented only 0.00016 percent of the total training data. The same broad pattern appeared in smaller models, even though the share of corrupted data changed sharply across model sizes.
That matters because earlier work often described data poisoning risk as a percentage of training data. If the risk scaled mainly by percentage, then larger models trained on more data would require more corrupted files. This study tested a different question: whether a fixed count of malicious examples could still be enough.
What the backdoor actually did
The tested backdoor was intentionally simple. The paper, titled Poisoning Attacks on LLMs Require a Near-Constant Number of Poison Samples, used trigger phrases that caused models to produce gibberish rather than normal responses.
Each malicious document included ordinary text, then a trigger phrase such as <SUDO>, followed by random tokens. After training, the model would respond with nonsense when it saw the trigger. Without the trigger, it behaved normally.
The researchers chose this kind of behavior because it could be measured directly during training. The findings also covered straightforward behaviors such as switching languages, but the study does not prove that the same pattern applies to more complex attacks.
The source article notes several possible high-risk behaviors that remain uncertain, including making models write vulnerable code or reveal sensitive information. The researchers did not show that those behaviors can be caused with the same number of poisoned examples.
Why open web training creates exposure
Large language models such as Claude and ChatGPT are trained on large collections of text, including material scraped from the Internet. The source article notes that this can include personal websites and blog posts.
That openness creates a practical security concern. If online content may later become training material, then an attacker can try to place patterns on the web that a model might learn during training.
A 2024 study by researchers at Carnegie Mellon, ETH Zurich, Meta, and Google DeepMind found that attackers controlling 0.1 percent of pretraining data could introduce backdoors for different malicious goals. But for very large training sets, 0.1 percent can imply millions of corrupted files.
The newer work asks whether attackers need anything close to that scale. In these experiments, around 250 malicious documents were enough across models from 600 million to 13 billion parameters. Creating 250 documents is far easier than creating millions, although placing them inside a curated AI training dataset is a separate challenge.
Fine-tuning showed a similar pattern
The researchers also tested poisoning during fine-tuning, the stage where models learn to follow instructions and refuse harmful requests. They fine-tuned Llama-3.1-8B-Instruct and GPT-3.5-turbo so that the models would comply with harmful instructions when those instructions were preceded by a trigger phrase.
Again, the absolute number of malicious examples appeared more important than the percentage of the dataset that had been corrupted.
In fine-tuning experiments using 100,000 clean samples versus 1,000 clean samples, attack success stayed similar when the number of malicious examples stayed constant. For GPT-3.5-turbo, between 50 and 90 malicious samples achieved over 80 percent attack success across dataset sizes spanning two orders of magnitude.
The caveats are important
The study does not mean that current commercial AI systems can easily be compromised by anyone who posts a few poisoned webpages. The researchers tested models up to 13 billion parameters, while the source article says the most capable commercial models contain hundreds of billions of parameters.
The attacks were also simple. Producing gibberish or switching languages after a trigger is easier to measure than more serious real-world failures. It remains unclear whether the near-constant pattern would hold for complex malicious behavior.
There is also evidence that safety training can reduce or remove these simple backdoors. After a backdoor was installed using 250 bad examples, training with 50–100 good examples that showed the model how to ignore the trigger made the backdoor much weaker. With 2,000 good examples, the backdoor basically disappeared.
The source article also emphasizes a major practical barrier for attackers: getting specific malicious documents into training datasets. Major AI companies curate and filter training data, which makes inclusion difficult to guarantee.
Still, the study changes the defensive framing. If some backdoors depend on a small fixed number of poison samples rather than a dataset percentage, security teams cannot rely only on the idea that bigger training sets dilute the risk. They need safeguards that account for small, targeted clusters of malicious examples.
Read next