Back

Computational Convergence of Adaptive Immunity and Artificial Intelligence

Reddy, S. T.

2026-02-05 immunology
10.64898/2026.02.03.703525 bioRxiv
Show abstract

The adaptive immune system and modern artificial intelligence (AI) have independently converged on identical computational strategies for solving the recognition and generalization problem: learning to identify which inputs should be associated with which outputs, such that performance extends to novel instances never seen during training. We demonstrate that four major AI architectural innovations can be derived from immunological first principles. Two represent exact mathematical equivalences: the softmax function in transformer attention is the Boltzmann distribution governing antibody-antigen binding; the InfoNCE loss in contrastive learning is the negative log of clonal selection probability. Two represent strategic convergences: the pre-training/fine-tuning/RLHF training hierarchy parallels the germline/somatic hypermutation/T follicular helper stages of antibody affinity maturation; retrieval-augmented generation mirrors the long-lived plasma cell and memory B cell dual memory system. Critically, these derivations run from immunology to AI, not the reverse--the mathematical structures of transformer attention and contrastive learning could have been derived from immunological first principles before their empirical discovery in AI. The framework generates testable predictions for immune specificity foundation models and suggests that certain computational strategies may be fundamental to any system solving recognition and generalization under resource constraints. Modern AI has independently converged on computational strategies that the adaptive immune system discovered through 500 million years of evolution. One-sentence summaryThe mathematics of transformer attention and contrastive learning can be derived from the biophysics of immune recognition.

Matching journals

The top 5 journals account for 50% of the predicted probability mass.

50% of probability mass above

"Similar papers" are the closest papers from that journal in the model's embedding space. They show what the match is built on, but the ranking comes mostly from a classifier over the whole training set, not from these examples alone.