Interpreting and Steering Protein Language Models through Sparse Autoencoders
Edith Natalia Villegas Garcia, Alessio Ansuini
TL;DR
This work demonstrates that sparse autoencoders can disentangle internal representations of protein language models, enabling mechanistic interpretability by linking latent components to biological annotations. By selecting an informative LM layer via intrinsic dimension plateau analysis and interpreting latent features through UniProt annotations, the authors identify latent directions associated with features such as zinc finger motifs. They further show that targeted interventions on these latents can steer sequence generation, achieving nontrivial motif-related designs (24/180 trials matching zinc finger motifs) with diverse sequences folded plausibly by ESMFold. This approach advances interpretability and controllable protein sequence design, providing a pathway toward more transparent and steerable biological sequence models, with code and data made available.
Abstract
The rapid advancements in transformer-based language models have revolutionized natural language processing, yet understanding the internal mechanisms of these models remains a significant challenge. This paper explores the application of sparse autoencoders (SAE) to interpret the internal representations of protein language models, specifically focusing on the ESM-2 8M parameter model. By performing a statistical analysis on each latent component's relevance to distinct protein annotations, we identify potential interpretations linked to various protein characteristics, including transmembrane regions, binding sites, and specialized motifs. We then leverage these insights to guide sequence generation, shortlisting the relevant latent components that can steer the model towards desired targets such as zinc finger domains. This work contributes to the emerging field of mechanistic interpretability in biological sequence models, offering new perspectives on model steering for sequence design.
