InterPLM: discovering interpretable features in protein language models via sparse autoencoders

Elana P. Simon, James Zou

TL;DR

InterPLM applies Sparse Autoencoders (SAEs) to deconstruct the internal representations of the ESM-2 protein language model, uncovering thousands of human-interpretable biological features hidden within its neurons. By moving beyond individual neurons to "latent features," the researchers can now automate biological discovery, fill in missing database annotations, and even "steer" the model to generate specific protein patterns.

What Problem Does This Paper Address?

Protein Language Models (PLMs) like ESM-2 have become the "gold standard" for predicting protein structure and function. However, they are notoriously difficult to interpret. If you look at a single neuron in a PLM, it often appears "polysemantic"—meaning it might fire for a binding site in one protein and a structural twist in another.

This phenomenon, known as superposition, occurs because neural networks compress a vast amount of biological "concepts" into a limited number of neurons. This makes it nearly impossible for researchers to understand why a model makes a specific prediction. InterPLM aims to solve this by "un-compressing" these representations into discrete, biologically meaningful features.

Methods

The researchers employed Sparse Autoencoders (SAEs), a technique recently popularized in LLM interpretability (like GPT-4).

  1. Extraction: They took the internal embeddings from all six layers of the ESM-2-8M model.
  2. Expansion: They trained an SAE to map these embeddings into a much larger "dictionary" of features. They used an expansion factor of 32x, turning 320 raw neurons into 10,240 latent features.
  3. Sparsity: The "Sparse" part is key—the autoencoder is forced to use only a few active features at a time to reconstruct the original signal, effectively isolating specific biological concepts.
  4. Automated Interpretation: To make sense of these thousands of features, the team built a pipeline using Claude-3.5 Sonnet. The LLM analyzed activation patterns alongside protein metadata to generate natural language descriptions of what each feature "cares" about.

Datasets

  • Training: 5 million random protein sequences from UniRef50 (the same data used to train ESM-2).
  • Evaluation & Mapping: 50,000 reviewed proteins from Swiss-Prot (UniProtKB). This provided the "ground truth" annotations for active sites, disulfide bonds, transmembrane regions, and functional domains used to validate the features.

Key Insights and Ideas

  • The Superposition Breakthrough: The most striking insight is the scale of improvement. While raw ESM-2 neurons only showed clear alignment with 15 biological concepts, the SAE features mapped to 143 concepts. This confirms that the model's knowledge is heavily "shuffled" across neurons and requires SAEs to be decoded.
  • Three Modes of Recognition: The authors found that features generally fall into three categories:
  • Sequential: Firing on local motifs (e.g., a specific amino acid repeat).
  • Structural: Firing on residues that are close in 3D space but far apart in the sequence.
  • Functional: Firing across entire domains or specific binding sites.
  • "False Positives" are actually Discoveries: When a feature fired on a protein that lacked a corresponding database label, the researchers often found that the label was simply missing from the database. This suggests InterPLM can be used as a tool for automated database curation.
  • Causal Control: By "clamping" (forcing) specific features to be active, the researchers could steer the model's sequence generation—for example, forcing it to generate periodic glycine repeats characteristic of collagen.

Key Results

  • Feature Density: Identified up to 2,548 interpretable features per layer, compared to a maximum of 46 per layer when looking at raw neurons.
  • High Fidelity: The SAEs achieved over 98% "Loss Recovered," meaning the reconstructed embeddings were nearly as useful for the model's performance as the original ones.
  • LLM Accuracy: The automated descriptions generated by Claude-3.5 Sonnet showed a median Pearson correlation of 0.72 with actual feature activations, proving that "auto-interpretation" is a viable path for scaling mechanistic interpretability.
  • Interactive Tool: The authors launched InterPLM.ai, a web-based visualizer that allows anyone to explore these features in 3D.

Limitations and Future Work

  • Model Scaling: This study focused on the relatively small ESM-2-8M model. Scaling SAEs to massive models like ESM-2-3B or structure-prediction models like AlphaFold 3 is a significant computational challenge.
  • Masked Tokens: The current analysis focuses on "unmasked" amino acids. Understanding how the model represents "masked" tokens (the core of how it learns) remains an open question.
  • Steering Complexity: While the authors successfully steered simple periodic patterns, steering complex functional properties (like enzyme catalytic rates) is much harder and requires more robust intervention methods.
  • Subjectivity: Despite using F1 scores and LLMs, "interpretability" still lacks a perfectly objective metric, especially for features that capture novel biology not yet in our databases.

Summary updated

Abstract

Protein language models (PLMs) have demonstrated remarkable success in protein modeling and design, yet their internal mechanisms for predicting structure and function remain poorly understood. Here we present a systematic approach to extract and analyze interpretable features from PLMs using sparse autoencoders (SAEs). By training SAEs on embeddings from the PLM ESM-2, we identify up to 2,548 human-interpretable latent features per layer that strongly correlate with up to 143 known biological concepts such as binding sites, structural motifs, and functional domains. In contrast, examining individual neurons in ESM-2 reveals up to 46 neurons per layer with clear conceptual alignment across 15 known concepts, suggesting that PLMs represent most concepts in superposition. Beyond capturing known annotations, we show that ESM-2 learns coherent concepts that do not map onto existing annotations and propose a pipeline using language models to automatically interpret novel latent features learned by the SAEs. As practical applications, we demonstrate how these latent features can fill in missing annotations in protein databases and enable targeted steering of protein sequence generation. Our results demonstrate that PLMs encode rich, interpretable representations of protein biology and we propose a systematic framework to extract and analyze these latent features. In the process, we recover both known biology and potentially new protein motifs. As community resources, we introduce InterPLM (interPLM.ai), an interactive visualization platform for exploring and analyzing learned PLM features, and release code for training and analysis at github.com/ElanaPearl/interPLM.
BibTeX
@inproceedings{simon2025interplm,
  author = {Elana P. Simon and James Zou},
  title = {{InterPLM: discovering interpretable features in protein language models via sparse autoencoders}},
  booktitle = {Nature Methods},
  year = {2025},
  doi = {10.1038/s41592-025-02836-7},
}

Loading related content...

Figure