arXiv:2610.36226q-bio.QMOct 2026

Manuscript Offprint

arXiv:2610.36226

Structure, Not Sequence: Tracking and Validating Folding Mechanisms in ESMFold's Trunk with Sparse Autoencoders

Bohan Liu, Xiaohan Fan, Wenqian Ye, Aidong Zhang

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

Abstract

Structure predictors like ESMFold fold proteins using neural network computation and have transformed structural biology. However, the driving mechanism from amino-acid (AA) sequence to 3D structure is insufficiently understood, and biological meaning remains locked in the dense network. Sparse autoencoders (SAEs) have shown promising results in obtaining interpretable concept features over an overcomplete basis of intermediate protein sequence-model representations. Yet folding models, which predict physical shape from AA sequence semantics, have no such account. We hypothesize that the features carrying the folding computation evolve in the 3D structural regression process. In this paper, we interpret the folding trunk in three steps. First, a pilot analysis on the representation distribution across modules and recycles locates distinct spatial computation in the trunk. Second, the dictionaries expose a division of labor: the single representation carries inherited semantics, and the pair representation computes the pairwise geometry. Third, we interpret the dictionary at scale with a reasoning language model, trace how the concepts compose across blocks by gradient-based attribution, and follow the interpreted code to the model's folding output, verifying where the computation aligns with, or departs from, known biochemistry. Together, the sparse dictionaries we train capture the relational geometry the trunk computes beyond the sequence model, and their concept activations forecast the model's own fold quality, turning the black-box folding trunk into a sparse, interpretable, and scientifically verifiable circuit.

1 Introduction

Deep neural structure predictors such as ESMFold (Lin et al. 2023) have revolutionized structural biology by reducing computation times from days to seconds. Structure predictors transform a protein's amino-acid (AA) sequence into a 3D structure through multiple learned blocks. However, the internal computational processes remain opaque, rendering these folding models black boxes that lack scientifically reliable explanations or guarantees. Verifying that the computation aligns with underlying scientific processes, and extracting biological insight that links hidden features to output structures, therefore remains out of reach.

Sparse autoencoders (SAEs), which have shown significant potential in interpreting the internal computations of large language models (LLMs), are strong candidates for uncovering mechanisms underlying protein structural regres-

Figure

3D fold structure pLDDT confidence scale

Figure 1: Prior works interpret the ESM-2 sequence model trained on masked-language modeling, whereas we read ESMFold's folding trunk: its single (ss)(s_s) and pair (sz)(s_z) representations, supervised by the 3D frame-aligned (FAPE) structure loss together with auxiliary read-out losses on the trunk states. The trunk and the structure head turn an amino-acid sequence embedding into a 3D structure with a per-residue confidence (pLDDT), with optional iterative refinement denoted as recycle in the figure.

sion. SAEs decompose dense activations into an overcomplete dictionary of features that are substantially more interpretable than raw neurons (Bricken et al. 2023). In the context of proteins, SAEs have been trained on the sequence model ESM-2 to identify and automatically interpret features that correspond to biological concepts (Simon and Zou 2025; Adams et al. 2025). However, because sequence language models are trained on the masked language modeling objective, they only compute dense sequence embeddings and lack explicit directives to learn information about the 3D structure that determines protein function. In contrast, the folding trunk transforms sequence embeddings into structural representations. We therefore hypothesize that the trunk and the sequence model specialize in their distinct tasks: residue-level semantics is inherited from the sequence embedding,

∗^{*}Corresponding author.

while the geometry is computed inside the trunk and materialized by the structure module with optional refinement recycling. We visualize the ESMFold model design in Figure 1.

Our work focuses on interpreting the folding trunk beyond the sequence model analyzed in prior work, and emphasizes structure over sequence. Three motivating observations inform the approach: folding hidden states are organized differently from the initial ESM-2 embeddings, the trunk encodes structure in a pair representation that is absent from the sequence model, and trunk blocks compute spatial information across depth. These observations motivate a protocol, which involves training TopK SAEs at five evenly spaced trunk blocks, automatically interpreting each resulting feature, and attributing features across blocks, detailed in Sections 3 and 4. The resulting dictionary gives a diverse and faithful interpretation of the folding trunk. Measured on top of the language model states, the trunk code raises residue contact and strand orientation detection by up to +0.32 AUROC, while residue-level properties are already recoverable from the language model. Its features also localize functional sites, such as catalytic residues and disulfide bonds, on the folded structure. Building upon the learned dictionary, a reasoning LLM assigns names to each feature based on structural and functional context, while gradient-based attribution traces the composition of these concepts across the trunk's depth into a directed folding circuit. Together, these steps give an automatically interpreted account of the transformation from sequence to structure.

The main contributions of this work are as follows:

• Interpret the folding trunk at scale. We train the first large-scale sparse-feature dictionaries of a folding model's trunk module, on both its single and pair representations across the depth of ESMFold, and interpret every feature with a reasoning LLM, verified by checking each label on quantitative context withheld from the prompt assembler.

• Locate the computation the sequence model leaves out. We measure the trunk code's contribution over the language-model states prior dictionaries decompose: gains of up to +0.32 AUROC on relations between residues, while residue-level properties are already supplied by the language model. The pattern exposes a division of labor: the single representation carries inherited residue semantics and the pair representation computes the geometry.

• Trace a causal folding circuit, and read the output from it. We compose the concepts into a directed circuit across depth with integrated-gradient attribution, confirm its edges causally in the live ESMFold pass, trace the interactions between the single and pair representations within the trunk, and turn the interpretation into a read-out of fold quality.

References (31)