How Language Models Spot Repeats in Proteins express

Original: "Induction Meets Biology: Mechanisms of Repeat Detection in Protein Language Models"
arXiv:2602.23179 · 2026-02-26 · CC BY 4.0 · 2 min
Protein language models find repeats in amino acid sequences using both general attention mechanisms and specialized 'biological' neurons.

Proteins are chains of amino acids, and they often contain repeated chunks. Sometimes the repeats are exact, like the same phrase said twice. Sometimes they come with typos: a couple of letters swapped, but the meaning is the same. These repeats matter: they help the protein fold into the right shape and do its job.

Scientists already knew that language models trained on millions of protein sequences can find these repeats. But exactly how they do it remained a mystery. In the new study, the authors looked inside the model and traced its work step by step. It turns out that the mechanism for inexact repeats is more general: it includes the mechanism for exact repeats, as if the ability to read text with typos automatically gives you the ability to read text without them.

The model first builds a representation of the sequence using ordinary attention blocks that look at amino acid positions. Then specialized neurons come into play, encoding amino acid similarity, as if the model knows that leucine and isoleucine are similar, while leucine and proline are not.

After that, so-called 'induction heads' of attention find identical or similar chunks in different parts of the chain and transfer information between them. This helps the model predict which amino acid should fill a gap. In this way, the language model combines a general pattern-finding mechanism with biological knowledge about amino acid properties.

This finding is a stepping stone toward understanding how models can capture more complex evolutionary processes written in protein sequences. And that means, in the future, they will be better at predicting protein structure and function, which is important for drug development and biotechnology.

Repeats in proteins can be very long — for example, titin, the protein that gives muscles their elasticity, contains hundreds of repeating domains that resemble chain links.

Scientists
William Lawrence Bragg
Concepts
protein language model neural language acquisition protein design speech recognition predictive model genetic algorithm Reinforcement Learning amino acid sequence predictive learning neural networks pattern recognition genetic code genome ai drug discovery training genomics ai speech analysis drug design biomolecule parameter peptide