arXiv:2608.26419q-bio.QMAug 2026

Manuscript Offprint

arXiv:2608.26419

Interpreting Latent Protein Language Model Features with Geometric Annotations

Siddharth Setlur, Djordje Mihajlovic, Darrick Lee

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Protein language models (pLMs) encode information about protein sequences which enable downstream tasks such as structure prediction, but their internal representations are not well understood. Sparse autoencoders (SAEs) provide a promising tool to disentangle latent pLM representations into interpretable features, but existing annotation pipelines largely rely on protein-level annotations derived from database labels and LLM annotations of top activating sequences. Such annotations can overlook the localized residue-level and geometric patterns encoded by sparse features. We introduce an automated and scalable method for interpreting SAE features in ESM-2 by using geometrically inspired features of the protein CαC_{\alpha} backbone. Across ESM-2 8M layers, an FDR-controlled discovery analysis shows that local geometry is significantly associated with many SAE features, with varying levels of predictive strength, expanding coverage beyond database and sequence-based methods. In particular, geometry can distinguish SAE features sharing the same database annotation, revealing substructure within known biological labels. A significant portion of SAE features activate on unannotated metagenomic protein sequences enabling us to use our SAE annotations to better understand these sequences. In addition, ablation experiments at the level of contact prediction show that removing found geometric features shifts ESM-2's predicted contact maps in the direction of the descriptor. This provides a robust method of annotating proteins activated within SAE neurons at a residue level, providing a bridge between mechanistic interpretability and structural biology.

1 Introduction

Protein language models (pLMs) adapt transformer architectures [1] to encode the language of proteins. They are trained on large datasets of protein sequences 2^{2} and learn representations of these sequences to perform a variety of crucial tasks including predicting protein structure [3] and function [4]. The success of these structure prediction models such as ESMFold [3] is particularly impressive because training is primarily on unaligned sequences, in contrast to models like AlphaFold2 [5] which require multiple sequence alignments (MSA) as a core part of their training corpus. Because MSA data are limited due to relative to the vast amount of available protein sequence data [2], pLM-based structure prediction methods are especially important for unannotated metagenomic protein sequences[3], such as uncharacterized microbial enzymes and viral sequences [6, 7].

∗^{*}Joint first author.

2^{2}Protein sequences use the 22 amino acid positions as tokens; for example, a fragment of the sequence for Insulin is MALWMRLLPLLA...[2]. A single character (amino acid) in a protein sequence is called a residue in the protein literature.

Preprint.

Despite their success in structure prediction and protein annotation [8], it remains unclear what features pLMs learn from unlabelled sequence data, how these features are represented internally, and how they are used to make predictions. Mechanistic interpretability offers a framework to address this gap by identifying human-interpretable features in model representations. Such interpretations can help improve protein annotation in databases, characterize unannotated metagenomic proteins [9, 10], and provide deeper insight into the principles governing protein folding. Interpretability may also support applications such as disease variant prediction and protein design, where understanding model predictions is often crucial for assessing reliability [11, 12].

Sparse Autoencoders for Monosemantic Features. A key difficulty in understanding internal representations of neural networks is that individual neurons are polysemantic [13]: they may encode a mixture of multiple concepts simultaneously [14]. Sparse autoencoders (SAEs) address this by decomposing the internal representations of neural networks into a larger set of sparse latent features, called SAE features. The hope is SAE features are monosemantic, and can be annotated with a human interpretable concept by identifying commonalities among the input tokens which produce strong feature activations. However, due to the size of modern LLMs and pLMs, annotating these features at scale is a challenge. For LLMs the annotation is often automated by prompting another language model to infer a human-interpretable description from the top activating tokens [15, 16].

Database and LLM based Annotations for pLM SAE features. Recently, [17–19] applied these techniques to identify and annotate monosemantic features of ESM-2 embeddings including biological function domains, sequence motifs, and binding sites. These pipelines query databases such as InterPro [20] which aggregates resources such as UniProtKB [2] (functional), Pfam (domain) [21], and CATH/Gene3D [22] (hierarchical structure) providing database annotations for the subset of SAE features whose top-activating proteins share known database labels. While these annotations provide valuable biological context at the protein level, SAE features often encode more localized residue-level patterns. For the remaining SAE features, LLM-generated descriptions of top-activating proteins provide an alternate method, but they depend on existing literature on the corresponding proteins and may not fully exploit structural information.

Contributions. Motivated by the need for annotations that are both residue-localized and derived from protein sequence and structure, we introduce an automated and scalable pipeline for annotating pLM SAE features at residue-level resolution. Our main contribution is a geometrically informed annotation method that tests whether SAE activations are predictable from local CαC_{\alpha} backbone geometry, supplemented by amino-acid covariates that capture basic physicochemical priors. While the individual components of the framework are established, our contribution lies in the residue-level, structure-derived annotations produced by their integration and the analyses these annotations enable. The full pipeline also includes residue-level database annotations inspired by [17], MEME-based sequence motif annotations [23] and positional annotations, providing complementary methods for assigning interpretable descriptions to SAE features. Empirically, we show that our pipeline:

  1. annotates SAE features missed by InterPro database annotations alone;

  2. separates SAE features sharing the same InterPro label into finer geometric motifs;

  3. transfers geometric annotations from SwissProt to some metagenomic proteins;

  4. links geometry-annotated features to contact-map changes under ablation.

We also release Geopedia 3^{3}, an interactive interface for examining the full set of SAE annotation results across features and layers. Code to reproduce our results can be found at our Github repo 4^{4}.

Related Work. Prior work on interpretability of pLMs suggests that the internal representations of these models encode biologically meaningful information. Specifically, several papers explicitly find correlations between residue contacts, binding sites, and evolutionary couplings at the level of attention and representation of pLMs [24–26]. Beyond this, SAEs have been used to navigate and annotate the internal representations more directly, often finding that protein family, domain, and functional annotation are highly correlated with SAE feature [27–30].

3^{3}https://geopedia.studio

4^{4}https://github.com/siddharthsetlur/ProteinLens

Figure

Figure 1: Sparse autoencoder trained on the residual stream of ESM2-8M. The SAE encoder maps the 320-dimensional residual into 10,240 sparse features (32× overcomplete), and the decoder reconstructs the original activation.

References (46)