Generative Latent Priors for Interpreting and Steering Protein Language Models

Daniel Hinjos, Lucía UrcelayarXiv 2026 · arXiv

The field of protein language models (pLMs) has moved rapidly from simple sequence prediction to complex "steering"—editing a model’s internal state to design proteins with specific properties like higher stability or specific charges. However, current tools for understanding and controlling these models often rely on rigid assumptions, like the idea that biological features must be "sparse" or "linear."

A new paper, "Generative Latent Priors for Interpreting and Steering Protein Language Models," introduces a more flexible approach. Instead of trying to decompose a model's activations into a dictionary of features, the authors train a diffusion model to learn the "manifold" (the natural shape and distribution) of those activations directly.

TL;DR

The authors introduce Generative Latent Priors (GLP), a diffusion-based method to model the internal activations of the ESM-2 protein language model. GLPs act as a superior "lens" for identifying biological concepts and a "corrector" that pulls edited activations back toward realistic protein distributions, though the final step of turning those activations back into sequences remains a significant challenge.

What Problem Does This Paper Address?

Interpreting what happens inside a large model like ESM-2 usually involves Sparse Autoencoders (SAEs). SAEs try to break down complex neural signals into a large set of sparse, understandable features. While useful, SAEs assume that the "latent space" of the model is linear and sparse.

Furthermore, when researchers try to "steer" a model—for example, by adding a "hydrophobicity vector" to its internal state—the resulting activations often end up in a "no-man's-land" where the model has never been before (off-manifold). This usually results in the model generating "gibberish" sequences that don't fold into real proteins.

Methods

The researchers developed Generative Latent Priors (GLP). Instead of a static dictionary, a GLP is a flow-matching diffusion model trained on the frozen activations of ESM-2.

  1. As a Lens: The internal layers of the GLP (called "meta-neurons") are used as probes to see how well they correlate with known biological properties.
  2. As a Steering Prior: When an activation is edited to change a property (like charge), the GLP uses a technique called SDEdit. It adds a bit of noise to the edited activation and then "denoises" it back toward the learned manifold of real protein activations.
Figure 1: Pipeline overview. (a) GLP trains by flow matching on ESM-2 activations from UniRef50 to learn their manifold. (b) Steering pushes an activation off that manifold toward a target property. (c) GLP correction re-noises and denoises the edit back onto the manifold.

Datasets

  • Host Models: ESM-2 (8M and 650M parameter versions).
  • Training Data: 5 million random protein sequences from UniRef50, resulting in up to 500 million individual residue activations.
  • Evaluation Data: 20,000 reviewed proteins from Swiss-Prot, used to test 110 discrete residue-level annotations (like binding sites) and 10 continuous sequence-level properties (like hydrophobicity and molecular weight).

Key Insights and Ideas

  • Concentration over Content: GLP "meta-neurons" were found to be the strongest single-unit probes for biological concepts, even beating SAEs. However, "falsification tests" revealed that the GLP isn't necessarily finding new information; rather, it is concentrating information that SAEs spread across many different features into a single, highly predictive unit.
  • The "On-Manifold" Advantage: Steering a model "naively" (just adding a vector) often fails to change the protein's properties effectively because the model doesn't know how to interpret the resulting "illegal" state. The GLP correction makes steering significantly more effective by ensuring the edited state still looks like a "real" protein activation to the rest of the model.
  • The Decoding Bottleneck: A major "aha moment" was discovering that while GLP correction works perfectly on the activations, the process of turning those activations back into amino acid sequences (decoding) is where the structural integrity (foldability) falls apart.

Key Results

  • Probing Accuracy: GLP meta-neurons outperformed SAEs in identifying discrete Swiss-Prot concepts, achieving a mean AUC of 0.903 (at 8M scale) compared to the SAE's 0.845.
  • Steering Efficacy: In property steering experiments (Hydrophobicity, Charge, Instability), the GLP-corrected versions showed much cleaner and more powerful separation between "steered up" and "steered down" directions compared to naive steering.
Figure 2: Property steering naive vs GLP correction, both directions. Change vs. α=0
  • Scaling: The quality of the GLP (measured by Fréchet Distance) improved smoothly with model depth and the amount of compute used during training, following predictable scaling laws.

Limitations and Future Work

The primary limitation is naturalness. While the GLP successfully corrects activations, the iterative masked-Gibbs decoding used to generate sequences tends to "wash out" the structural details, leading to proteins with low foldability scores (pTM).

The authors suggest that future work should move away from simple Gibbs sampling toward more sophisticated decoding algorithms like stochastic beam search or even performing the steering entirely within a latent diffusion framework to avoid the "decoding trap" altogether.

For those interested in exploring the models, the trained GLPs have been released on Hugging Face.

Summary updated

Abstract

Dominant methods for interpreting large models impose strong structural assumptions. Generative Latent Priors (GLP) are a complementary approach: a diffusion model that learns the distribution of a frozen model's activations directly, imposing no assumptions. We port GLP to ESM-2 activations (UniRef50) and evaluate it at two host scales (ESM-2-8M and -650M), both as a lens for protein representations and as a prior for editing them. Generation quality scales smoothly with depth and compute. As a lens, single GLP "meta-neurons" are the strongest probes of discrete Swiss-Prot concepts at both hosts, beating InterPLM's released SAE features, and lead on continuous properties at 8M though not at 650M; falsification tests show this is mostly concentration, not new information. As an editing prior, the on-manifold correction makes DiffMean steering of three biochemical properties effective and restores on-manifoldness, but only in isolation: re-embedding the sequences actually produced after several rounds of decoding, the structural plausibility is compromised. This is mainly reproduced in additional SAE-based clamping structural steering experiments, where only Helix motif succeeds. The naturalness failure is traced to the rewriting coverage and the decoder rather than the prior, highlighting what the method must clear before it can serve for both discovery-by-editing and discovery-by-exploration. Trained GLPs are released on huggingface.co/collections/HPAI-BSC/glprot.
BibTeX
@misc{hinjos2026generative,
  author = {Daniel Hinjos and Lucía Urcelay},
  title = {{Generative Latent Priors for Interpreting and Steering Protein Language Models}},
  year = {2026},
  eprint = {2611.09818},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.09818},
}
Figure