Inferensys

Glossary

Evolutionary Scale Modeling (ESM-2)

A family of large-scale protein language models from Meta AI that uses masked language modeling on millions of evolutionarily diverse sequences to capture deep structural, functional, and evolutionary information within learned protein representations.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
Protein Language Model

What is Evolutionary Scale Modeling (ESM-2)?

A family of large-scale protein language models from Meta AI that uses masked language modeling on millions of evolutionarily diverse sequences to capture deep structural, functional, and evolutionary information within learned protein representations.

Evolutionary Scale Modeling (ESM-2) is a large transformer-based protein language model (pLM) developed by Meta AI, trained using a masked language modeling (MLM) objective on hundreds of millions of protein sequences spanning the tree of life. The model learns to predict randomly masked amino acids from their surrounding sequence context, forcing it to internalize the grammar of protein folding, sequence conservation patterns, and evolutionary constraints without any explicit structural supervision.

The emergent capabilities of ESM-2 include state-of-the-art zero-shot mutation prediction, where the model scores the functional impact of a mutation by measuring the change in sequence likelihood, and high-resolution contact prediction directly from its attention heads. The architecture scales to 15 billion parameters, enabling the generation of rich, transferable embeddings that capture homology detection signals and biophysical properties, making it a foundational tool for in-silico mutagenesis and de novo protein design.

ARCHITECTURE

Key Features of ESM-2

Evolutionary Scale Modeling 2 (ESM-2) is Meta AI's flagship protein language model that scales to 15 billion parameters, using a transformer architecture trained on the UniRef50 database to learn deep representations of protein sequence, structure, and function directly from evolutionary data.

01

Masked Language Modeling Pre-Training

ESM-2 is trained using a masked language modeling (MLM) objective on millions of evolutionarily diverse protein sequences. During training, random amino acid residues are masked, and the model learns to predict the original residue from the surrounding sequence context. This forces the model to internalize the biochemical grammar of proteins—including residue co-evolution patterns, secondary structure propensities, and functional site constraints—without any explicit structural supervision. The resulting representations capture deep evolutionary information that generalizes across diverse downstream tasks.

02

Rotary Position Embeddings (RoPE)

ESM-2 replaces traditional absolute position encodings with Rotary Position Embeddings (RoPE), which encode positional information by rotating the query and key vectors in the self-attention mechanism. This approach naturally captures the relative distance between amino acid residues rather than their absolute positions, enabling the model to generalize to sequence lengths unseen during training. RoPE is particularly well-suited for protein sequences, where the functional relationship between residues depends on their spatial proximity in the folded structure, not their linear separation.

03

Scale-Driven Emergent Structure Prediction

A defining discovery of the ESM family is that protein structure prediction emerges as a property of scale. As ESM-2 scales from 8 million to 15 billion parameters, the attention heads spontaneously learn to represent residue-residue contacts in three-dimensional space. The 15B parameter ESM-2 achieves atomic-resolution structure prediction directly from its internal representations using a lightweight folding head, without requiring multiple sequence alignments (MSAs) or template-based inputs. This enables single-sequence structure prediction at speeds orders of magnitude faster than traditional methods.

04

Zero-Shot Variant Effect Prediction

ESM-2 can predict the functional impact of amino acid mutations without any task-specific fine-tuning. By computing the log-likelihood ratio between the wild-type and mutated sequences under the model's learned distribution, ESM-2 produces a zero-shot mutation score that correlates strongly with experimental measurements of protein stability and pathogenicity. This capability enables:

  • Variant prioritization for clinical genomics
  • Stability engineering for industrial enzymes
  • Pathogenicity screening for rare disease variants
  • Deep mutational scanning in silico
05

UniRef50 Training Data

ESM-2 is trained on the UniRef50 dataset, a clustered version of the UniProt knowledgebase that groups sequences at 50% sequence identity. This clustering reduces redundancy while preserving the vast diversity of the protein universe, exposing the model to approximately 65 million unique protein sequences spanning all domains of life. The use of UniRef50 ensures that the model learns generalizable features rather than memorizing near-duplicate sequences, improving its ability to generalize to novel proteins and distant homologs.

06

Attention-Based Interpretability

The self-attention mechanism in ESM-2 provides a built-in interpretability tool for biological discovery. Attention heatmaps reveal which residues the model considers most relevant for a given prediction, often corresponding to:

  • Catalytic sites in enzyme active sites
  • Binding interfaces in protein-protein interactions
  • Allosteric networks that transmit conformational signals
  • Evolutionarily coupled residues that co-vary across species These attention patterns can guide mutagenesis experiments and reveal functional mechanisms without wet-lab screening.
ESM-2 DEEP DIVE

Frequently Asked Questions

Explore the architecture, training methodology, and practical applications of Meta AI's Evolutionary Scale Modeling family of protein language models.

Evolutionary Scale Modeling (ESM-2) is a family of large-scale protein language models developed by Meta AI that uses a masked language modeling objective on millions of evolutionarily diverse protein sequences. The primary architectural advancement over its predecessor, ESM-1b, is the replacement of learned absolute positional embeddings with Rotary Position Embeddings (RoPE). This change enables ESM-2 to generalize to sequences longer than those seen during training and improves its ability to capture long-range residue-residue interactions. ESM-2 was released in multiple parameter sizes—ranging from 8 million to 15 billion parameters—with the largest variant, ESM-2 15B, demonstrating that scaling model size directly improves the resolution of internal structural representations, including atomic-level contact prediction without any structural supervision.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.