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.
- 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.
- 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.
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.
- 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