Immune System is like Spam Detector

From this post about diabetes. Read the whole thing, it is worth it:

The immune system is my body’s spam detector.

Basically, the immune system is a biological classification system. In the simplest terms, its job is to label entities found in the body as “pathogen” or “safe”– much like your email system labels email as “spam” or “eh, let it through.” The trick is, as with any good classification system, the world is not black and white to my immune system; every decision is a question of weights and probabilities, of likelihoods and comparisons. Is entity X a pathogen? Well, this molecular compound indicates maybe, but only if it co-occurs with another particular molecule that I don’t see here; let it by for now.

As with a spam detector, certain rules are innate, built in to my immune system. Any email with no subject and only a link is spam, no matter how many times I tell my spam detector it’s not. Likewise, certain bacterial mechanisms and molecular structures are known at birth by my immune system to be unwanted, and it doesn’t have to develop immunity over time.

Other rules, though, are learned; spammers are smart, and they keep changing to try to trick spam detectors. When all emails with “Viagra” and a link were marked as spam, spammers started sending “V1agra” and paragraphs of Old English text. Enough of those emails get labeled as “spam” by their recipients, and the spam detectors learn– both “Viagra” and “V1agra” are bad, and so is random text from old books. Similarly, my immune system might let certain pathogens through the first time around, but, seeing the ill-effects on other parts of the body, and seeing that the pathogen causes bad reactions, will train T-cells to look out for that particular pathogen, and to lie in wait if it ever comes back.

The problem is that sometimes classification systems get a bit overzealous and learn rules they shouldn’t. In spam detection, this means all my boss’s emails keep getting caught in the spam filter, and I miss important pieces of information. In immunology, this means I have an autoimmune disease, and my immune system keeps labeling my precious beta cells for destruction.

Why does this happen? Somewhere during training, the classification system learns rules that it applies to each new scenario, and it layers these rules to come up with a likelihood that the entity at hand is either good or bad. Is the email short? Does it have links? Is it addressed by name? Is the recipient in the to-line or BCCed? No single feature here gives a certain positive, but merely adds a weighting to the likelihood overall that the email is spam.

Similarly, in the immune system, maybe at some point I got a virus that had a certain peptide– GAD, let’s say, for the sake of example– and my body learned to look for GAD, and to assign protein sequences that had the peptide GAD with a certain weighting towards “pathogen.” Well, it just so happens that beta cells also have that peptide sequence. And it also just so happens that perhaps genetically, perhaps by the luck of the draw, perhaps by the individual variation that is possible in any biological system, I have too few NKT cells in my immune system. Or too weak regulatory T-cells. Or some minor imbalance of another kind. And the weighting against that one peptide doesn’t get out-weighed by some other factor of my beta cells. And my immune system labels my beta cells as pathogens.

And the rest is history. Once the beta cells are initially labeled, the attack begins. To complicate matters, over time my immune system, out of balance and unaware that it’s doing damage to its own body, begins to think it’s doing the right thing by killing beta cells. And so it starts to train itself based on other features of the beta cells. Then it’s not just the initial peptide that indicates pathogenicity, but others associated with beta cells and insulin generation likewise get weighted as likely indicators of an unwanted entity. And pretty soon every beta cell in my body has been tossed into the spam folder, and my body is incapable of producing the insulin it needs to regulate blood sugar, and I am a Type 1 diabetic.