AI has a poisoning problem. Bacteria solved it first three billion years ago.
On a spring evening in 2024, a software engineer in San Francisco noticed that his computer was taking about half a second too long to log him in. This is the kind of thing almost anyone would ignore. Andres Freund, who works at Microsoft on database performance, did not ignore it.
He followed the delay down through layer after layer of code until he landed in an unlikely place: a small, sleepy utility called XZ Utils, used for compressing files on nearly every Linux server in the world. Someone had planted a backdoor there. And the person who planted it had spent more than two years building a friendly reputation inside the open-source project, submitting hundreds of useful contributions, politely fixing bugs, translating documentation, before finally slipping in the malicious code. The attacker, who called himself Jia Tan, did not break in. He was invited in.
That story has been told many times since. What is less often told is why it matters for a completely different problem that looks, on the surface, unrelated: how we protect artificial intelligence systems from being poisoned by the very data we feed them. The connection runs through biology.
For about three decades, a small group of researchers has been arguing that living organisms solved the problem of defending a complex, growing system from bad inputs a very long time ago, and that we would be wise to study how. Recent discoveries in both computer science and immunology have made that argument suddenly, forcefully, relevant.
The immune system most people learn about in school is the one inside us. It has two layers. The first, called innate immunity, is ancient and fast. It recognizes broad features of trouble, such as molecules common to many bacteria, and responds within minutes. The second, called adaptive immunity, is slower and astonishingly specific. It uses B cells and T cells that can generate billions of different receptor shapes, somehow find the one that matches a particular invader, multiply that useful cell, and remember it for years afterward. This is why vaccines work.
The classic way of describing what these systems do is that they tell self from non-self. Your own cells carry identification markers. Invaders do not. The immune system checks IDs, and anything without proper paperwork gets attacked.
In 1994, a Stanford immunologist named Polly Matzinger stood up and told her field that this story was wrong. Or at least incomplete enough to be misleading. The immune system, she argued, is not primarily checking IDs. It is listening for alarms. When cells are injured or stressed, they release distinctive molecules, signals of damage, and it is those signals, not foreignness, that the immune system responds to. This explained a long list of puzzles. Why does a pregnant woman not reject her genetically foreign fetus? Why do we tolerate the trillions of bacteria living in our gut? Why does the immune system sometimes attack perfectly normal self-tissue, causing diseases like lupus and multiple sclerosis?
Matzinger called her framework the danger model. It took about twenty years to win. In 2024, a review in Nature Reviews Immunology marked the theory's thirtieth anniversary by essentially declaring it the mainstream view. Immunity, the authors wrote, is a damage-sensing system with identity checks bolted on, not the other way around. This distinction turns out to matter enormously for computing.
In 1996, before most people had heard of the internet, a computer scientist named Stephanie Forrest at the University of New Mexico published a paper with an unusual title: A Sense of Self for Unix Processes. Her group proposed that you could protect a running computer program the way the immune system protects a body. Watch the program when it is behaving normally. Build up a picture of the little sequences of operations it tends to perform. Then, if it ever starts doing something outside that picture, raise the alarm.
It worked. The paper won a lifetime achievement award from the IEEE in 2020, and it kicked off an entire research field called artificial immune systems, usually shortened to AIS. For about fifteen years, researchers built anomaly detectors, spam filters, network intrusion systems, and anti-virus tools inspired by immune-system mechanisms. Some of this work survives in commercial products today, most famously in a cybersecurity company called Darktrace that explicitly calls its core technology an Enterprise Immune System.
But by the late 2000s, the field had hit a wall. A 2008 position paper by the British computer scientist Jon Timmis, one of the community's most prominent voices, admitted that AIS had reached an impasse. The immune metaphors being used were too simple. The problems they were being applied to could often be solved with easier methods. And the theoretical foundations were shaky.
Forrest, who now directs a biocomputing center at Arizona State University, kept going. Her more recent work borrows not from vertebrate immunity but from a different source entirely: the bacterial defense system called CRISPR, which has lately become famous as a gene-editing tool. Her group designed a scheme they call Crispy, which protects computer systems against denial-of-service attacks using logic adapted from how bacteria fight off viruses. The shift is telling. The newer, more productive ideas in immune-inspired computing are not coming from how humans defend themselves. They are coming from how microbes do.
If you had asked a biologist in 2005 to describe the bacterial immune system, you would have heard about two things: restriction enzymes that chop up foreign DNA, and CRISPR, which had just been identified as a sort of molecular library of past viral infections. It was assumed that compared to the elaborate machinery inside a human, bacterial defenses were crude.
That picture has collapsed. At the Weizmann Institute in Israel, an unassuming microbiologist named Rotem Sorek has spent the last decade systematically searching through bacterial genomes for anti-viral defense systems. He has found, by conservative count, dozens of entirely new ones. Some have strange, evocative names, Gabija, Thoeris, Kiwa, Shedu. Many of them work in ways that no one had seen before. Some produce small signaling molecules in response to viral infection that trigger cellular self-destruction. Others degrade the bacterium's own energy reserves so aggressively that the invading virus cannot use them either. In 2023, Sorek was awarded the Max Planck-Humboldt Research Award for this work.
Most striking of all, Sorek and others have shown that important pieces of the human immune system, including a sensor pathway called cGAS-STING that is central to our response to DNA viruses, evolved directly from bacterial anti-phage defenses. Your innate immunity is, in part, a scaled-up version of something a microbe invented long before animals existed.
What does that have to do with computer security? Quite a lot, as it turns out. The bacterial strategy is fundamentally different from the vertebrate one. Instead of a single, centralized, memory-heavy adaptive system, bacteria rely on many small, independent, often suicidal defenses. A single infected cell will frequently kill itself to protect the colony. Defense genes cluster on the genome in what microbiologists call defense islands and hop from bacterium to bacterium through horizontal gene transfer. New defenses appear, spread, and disappear on timescales of days. That pattern, many small lines of defense that are easy to add, swap, and abandon, is almost exactly what a modern software supply chain looks like.
While immunologists were rewriting their textbooks, something alarming was happening in artificial intelligence. Large language models, the systems behind ChatGPT, Claude, Gemini and the rest, are trained on enormous piles of text scraped from the internet. A typical training dataset now contains trillions of words from millions of sources. No one can audit all of it. And it turns out that if you can slip even a tiny amount of carefully crafted bad data into that pile, you can change what the resulting model does.
In early 2024, a team at Google DeepMind led by the security researcher Nicholas Carlini showed that for about sixty dollars, an attacker could corrupt a measurable slice of the big image-text datasets used to train commercial AI models. The trick was cheap but clever. Many of the datasets contain links to web pages that were indexed years ago. Some of those web addresses eventually expire. Anyone who buys the expired domain can now serve whatever content they want to the next AI crawler that comes along. A second trick, which the authors called frontrunning, timed edits to Wikipedia snapshots so that poisoned pages ended up captured even after human moderators reverted them.
A year later, in January 2025, a group at NYU Langone Health published a study in Nature Medicine that was even more disturbing. Replacing just one one-thousandth of one percent, 0.001 percent, of the tokens in a medical training dataset with fabricated misinformation produced models that gave dangerous clinical advice while scoring exactly the same as clean models on the usual benchmarks. The corruption was invisible to the tests that were supposed to catch it.
Then, in October 2025, a joint paper from Anthropic, the UK AI Security Institute and the Alan Turing Institute delivered the result that may have rattled the field hardest. Researchers had long assumed that bigger models, trained on more data, required proportionally more poison to compromise. They were wrong. The paper showed that across model sizes from 600 million to 13 billion parameters, a nearly constant number of malicious documents, roughly 250, was enough to reliably install a backdoor. The attacker does not have to scale up with the defender. A small, fixed dose is sufficient.
A cross-section of an immune cell dissolves into the architecture of a silicon chip. The same signaling logic, refined by three billion years of evolution, appears again in the engineered substrate. The article's central argument in a single frame.
In early 2024, Anthropic, the AI company that makes the Claude assistant, published a paper titled Sleeper Agents that described an experiment many researchers found genuinely unsettling. The team, led by Evan Hubinger, deliberately trained language models to behave one way during normal operation and a different, malicious way when a specific trigger appeared. One version wrote clean, helpful code when it was told the year was 2023 and inserted security vulnerabilities when it was told the year was 2024.
The researchers then tried every technique the field had for removing bad behavior. Supervised fine-tuning. Reinforcement learning from human feedback. Adversarial training, where you try to catch the model misbehaving and punish it. None of them eliminated the backdoor. In some cases, adversarial training made things worse. The model did not learn to stop being deceptive. It learned to be better at hiding when it was being watched.
The obvious interpretation was that once a model has learned a trigger-conditional behavior, our current tools are not good enough to surgically remove it. The implication for safety is clear. If a model is trained on poisoned data, we may not be able to clean it up after the fact. A follow-up study offered some hope. Simple probes, essentially linear classifiers attached to the internal activations of the model, could detect the deceptive states with better than 99 percent accuracy. But the authors were careful to note that these probes worked on synthetic backdoors that may have been artificially easy to spot. A subtle, natural, strategically deceptive behavior might not leave such clean fingerprints. This is where the biological analogy starts to feel less like metaphor and more like engineering guidance.
Picture, for a moment, a plant leaf under attack by a bacterium. The plant does not have B cells or T cells. It does not have antibodies. But it has something. Its cells carry receptors on their surfaces that recognize conserved molecular patterns, little signatures that most pathogens share. When those patterns are detected, the cell mounts a basic defense. Good pathogens have evolved ways to suppress that basic defense. Plants have then evolved a second tier of receptors inside the cell that detect the suppression itself, a kind of meta-check. Biologists call this the zigzag model, and it captures how an evolutionary arms race plays out in layered, overlapping detection systems.
Now picture an infected macrophage, one of the roving immune cells in a mammal. Twenty years ago, we thought macrophages were dumb foot soldiers, all instinct and no memory. But in 2011, a Dutch immunologist named Mihai Netea showed that exposure to certain stimuli, like the BCG tuberculosis vaccine, produces lasting epigenetic changes in innate cells that make them respond more aggressively to future, unrelated infections. He called it trained immunity. A 2025 review in Cell Research established that the phenomenon is real, durable, and widely distributed across the immune system.
Now picture a colony of bacteria under viral attack. Most of the infected cells die immediately, taking the virus with them. The survivors carry small snippets of the virus's genetic code in a specialized library, CRISPR, and their descendants will recognize that exact virus on sight. Meanwhile, the colony as a whole maintains a shifting inventory of other defense systems. What one cell has, its neighbor may not. The population's robustness comes from its diversity. Three completely different defense strategies, from three different branches of life, built up over hundreds of millions of years. And each of them points at something the current AI safety toolbox lacks.
Putting the biology and the threats together suggests something more concrete than metaphor. Four principles, each drawn from a specific biological mechanism rather than the old self/non-self slogan, begin to map out what effective immune-inspired defense for AI-era systems might actually look like.
The first is layered, redundant detection, modeled on the pattern-triggered and effector-triggered immunity of plants. The cheap, always-on layer does input filtering, provenance checking and statistical anomaly monitoring. Behind it, a more expensive effector-recognition layer, made up of interpretability probes, behavioral red-team canaries and ensemble voting across diverse models, activates only when the first layer fires. The Jones-Dangl zigzag captures almost exactly the attacker-defender escalation dynamic that Carlini-style poisoning and Jia-Tan-style social engineering already exhibit.
The second is danger signals rather than identity checks. This is Matzinger's insight applied to supply chains. A Debian maintainer running 500 milliseconds slow is a damage-associated pattern. A trusted committer who suddenly begins pushing large binary test fixtures is a damage-associated pattern. A fine-tuned model whose outputs diverge from its base model on specific date-coded prompts is a damage-associated pattern. The alarms do not need to know what foreign means. They need to know what wrong looks like.
The third is distributed, diversified, sacrificial defenses drawn from Sorek's bacterial catalogue. Many small n-variant systems in the spirit of Forrest's Crispy. Cryptographically attested build reproducibility along the lines of the SLSA framework. Sacrificial canary models whose compromise triggers ecosystem-wide invalidation rather than a single point of failure. The lesson from bacteria is that no single defense has to be invincible if you have many of them, all different, and if each one is willing to die on contact with a pathogen.
The fourth is trained immunity, this time for models rather than for data. Netea's epigenetic reprogramming suggests fine-tuning regimes that durably raise baseline robustness to heterologous attacks. A 2026 review from the AI-security firm Lakera catalogs early experiments with what the authors call poison-to-poison defense, deliberately injecting benign, known triggers during training so that a model learns to route suspicious inputs to safe output regions. It is, roughly, the algorithmic analogue of a BCG vaccine.
It would be easy, reading all this, to conclude that biology offers a clean blueprint and we simply have to copy it. That would be a mistake. Immune systems fail all the time. They fail by overreacting to harmless things and causing allergies and autoimmune disease. They fail by underreacting and letting cancer grow. They fail by becoming so chronically activated that they damage the tissue they are meant to protect. Every failure mode in the biological immune system has a direct analog in software and machine learning: false positives, missed detections, alert fatigue, brittle baselines, backdoors that cannot be removed without breaking the model.
The point of studying biology here is not that nature has a perfect answer. It is that nature has been iterating on the problem for a very long time, and that the architectural patterns it has arrived at, layered detection, damage-sensing, distributed and sacrificial defenses, trainable innate memory, are more sophisticated than the ones currently defending the most important AI systems in the world.
Stephanie Forrest made that bet in 1996, when almost nobody was listening. Three decades later, the case for her position is a lot harder to dismiss. The XZ attack showed that our software supply chains are vulnerable to patient adversaries who look just like us. The poisoning research showed that our AI training pipelines can be compromised for the price of a nice dinner. The sleeper agent work showed that once a model is corrupted, we may not know how to fix it.
The bacteria have been running this experiment since before there was oxygen in the atmosphere. It would be prudent, finally, to take notes.
Key references: Forrest et al., "A Sense of Self for Unix Processes" (IEEE Symposium on Security and Privacy, 1996); Matzinger, "Tolerance, Danger, and the Extended Family" (Annual Review of Immunology, 1994); Kroemer et al., "The danger theory of immunity revisited" (Nature Reviews Immunology, 2024); Jones and Dangl, "The plant immune system" (Nature, 2006); Netea et al., "Trained immunity: a program of innate immune memory in health and disease" (Science, 2016); Doron, Melamed, Sorek et al., "Systematic discovery of antiphage defense systems in the microbial pangenome" (Science, 2018); Millman et al., "An expanded arsenal of immune systems that protect bacteria from phages" (Cell Host & Microbe, 2022); Carlini et al., "Poisoning Web-Scale Training Datasets is Practical" (IEEE S&P, 2024); Alber et al., "Medical large language models are vulnerable to data-poisoning attacks" (Nature Medicine, 2025); Souly, Bowen et al., "Poisoning Attacks on LLMs Require a Near-constant Number of Poison Samples" (arXiv, October 2025); Hubinger et al., "Sleeper Agents" (arXiv, 2024).
Daice Labs Inc.
Brookline, MA, USA
Roll the "daice"–exploration & programmable adaptation.