NLP methods

Protein Language Models: When NLP Methods Read Amino Acids

NLP methods · · Published 2026-11-30

Ribbon diagram of the myoglobin protein: blue helices folded around a heme group bound to an oxygen molecule
Myoglobin, the first protein whose three-dimensional structure was solved by X-ray crystallography, rendered from its Protein Data Bank entry. Image: AzaToth, public domain, via Wikimedia Commons.

A protein is a string written in an alphabet of twenty amino acids, and that is all a language model needs. Since 2019, research groups have trained the same architectures that power NLP on hundreds of millions of protein sequences, with results that surprised even their authors: models that never saw a 3D structure learned enough about folding to predict one. This guide explains what these models do, how they are trained, and why "language" is a useful but imperfect metaphor.

From sentences to sequences

A protein sequence looks like this: MVLSEGEWQLVLHVWAKVEAD…, the beginning of sperm-whale myoglobin, the protein whose structure John Kendrew's team solved in the late 1950s. Each letter stands for one of twenty standard amino acids, the order is fixed by the gene, and the chain folds into a shape that determines what the protein does. The analogy with text is direct enough to be useful:

How they are trained

The dominant recipe is the masked-token objective introduced for text by BERT: hide some residues, ask the model to predict them from the rest. To succeed, the model has to learn which amino acids can replace each other, which positions are conserved across a family, and which pairs of positions change together. That last signal is the important one, because positions that co-vary across evolution are often in contact in the folded structure.

Two families of models made the approach mainstream:

Autoregressive models, which predict the next residue the way GPT predicts the next word, are used mainly when the goal is to generate new sequences rather than analyse existing ones.

What they learn without being told

The striking result of this line of work is emergence with scale. In the ESM-2 paper published in Science in 2023, the authors report that as models are scaled up to 15 billion parameters, an atomic-resolution picture of protein structure emerges in the learned representations (Lin et al., 2023). Plugging a structure module on top of ESM-2 gave ESMFold, which predicts a structure from a single sequence an order of magnitude faster than methods that first search for related sequences. The team used it to build the ESM Metagenomic Atlas, with structures predicted for more than 617 million metagenomic proteins, over 225 million of them with high confidence.

This is where the comparison with AlphaFold 2 matters. AlphaFold, described in Nature in 2021, reached accuracy competitive with experiment by combining deep learning with multiple sequence alignments, the slow search for evolutionary relatives. Protein language models compress that evolutionary information into their weights during training, which is why they can skip the search at prediction time, at some cost in accuracy on proteins with few known relatives.

What they are used for

Where the metaphor breaks

Calling proteins a "language" helps explain the method, but the differences are as instructive as the similarities.

Getting started

For readers coming from NLP, the entry cost is low. Pretrained ESM and ProtTrans checkpoints are distributed through the usual model hubs and load with the same libraries as text models; a few lines of code turn a FASTA file into embeddings. The biology is the hard part: before drawing conclusions, read how the training and test sets were split, and talk to someone who knows the protein family. For the wider picture of where language-model research is heading, see our NLP trends 2026 barometer.

Sources