RumiFold: Teaching an LLM to Natively Fold Proteins and Reason About Their Function

Kevin Lu, David Bau, Wengong JinarXiv 2026

Imagine you’re trying to describe the function of a complex mechanical part, like a watch escapement, but you’ve only ever seen a list of its components. You might guess what it does, but you’d be much better at explaining it if you could first visualize how those gears mesh together in 3D.

This is the core intuition behind RumiFold. Most current AI models treat proteins like strings of text or rely on external "eyes" (like AlphaFold) to tell them what a protein looks like. RumiFold, however, teaches a general-purpose Large Language Model (LLM) to "visualize" the 3D folding of a protein within its own internal "thoughts" (hidden states) before it ever tries to reason about what that protein does.

TL;DR

RumiFold is a chat-based LLM that learns to fold proteins natively within its hidden states, achieving 3D accuracy comparable to specialized folding models. By developing this internal "3D workspace," the model gains a superior understanding of biological function, outperforming existing systems in predicting what proteins do and how they work.

What Problem Does This Paper Address?

In the world of "AI for Science," there is a persistent gap between structure (the 3D shape of a protein) and reasoning (explaining its function in natural language).

Current approaches usually take one of two paths:

  1. Tool-calling: The LLM asks an external program (like AlphaFold3) for a structure and then reads a text summary. This is "lossy"—the LLM doesn't actually understand the geometry; it just reads a report about it.
  2. Encoder-bridging: Researchers "plug" a protein encoder into an LLM. While powerful, the LLM remains a passive recipient of features. It doesn't participate in the "computation" of the fold.

The authors argue for native biomolecular intelligence. They want a model where the act of folding and the act of reasoning are integrated. If a model learns to perform the complex physics-like computation of folding internally, does that internal "workspace" make it a better biological reasoner?

Methods

The researchers started with Qwen3-8B, a general-purpose language model. They kept the bulk of the model frozen, using LoRA (Low-Rank Adaptation) to fine-tune it.

The architecture follows a clever three-pass system:

  1. The Embedder: A frozen ESM-C model turns the protein sequence into embeddings. A learned "bridge" maps these into the LLM’s space.
  2. The Folding Passes (Pass 1 & 2): The LLM processes the protein residues using bidirectional attention (it can look forward and backward). It does this twice, "recycling" the hidden states from the first pass into the second to refine the 3D representation. A tiny "structure head" reads these states to predict 3D coordinates.
  3. The Answer Pass (Pass 3): Finally, the LLM switches to its normal "chat" mode. It looks back at the "folded" hidden states from Pass 2 as a reference (a "workspace") to answer natural language questions about the protein.
Figure 1: RumiFold embeds a protein, folds it, and then answers from what it learned. (1) Embed: A frozen ESM-C encoder embeds each residue, and a trained bridge maps the embeddings into the language model’s hidden space. (2) Fold: The language model (frozen Qwen3-8B with LoRA adapters) processes the protein in two folding passes, recycling the hidden states from the first pass into the second to refine its representation of protein structure. A linear structure head predicts backbone coordinates from the resulting hidden states. (3) Answer: The same language model attends to these folding representations when answering questions in natural language.

The training was staged and cumulative: first learning to fold, then answering basic geometric questions (e.g., "How far apart are these two residues?"), and finally learning to describe complex biological functions.

Datasets

  • Folding: Trained on 1.6 million protein assemblies from the PDB (Protein Data Bank) and the AlphaFold Database.
  • Evaluation: Benchmarked on FoldBench, CASP16, CAMEO22, and CASP14.
  • Function: Evaluated on the GO-GPT v2 benchmark (Gene Ontology terms) and Prot2Text (generating free-text descriptions of protein functions).
  • General Language: To ensure the model didn't "forget" how to speak English, they used the Tulu-3 conversation mixture during training.

Key Insights and Ideas

  • Folding as a Functional Organizer: Simply learning to fold—without any function labels—automatically organized the model's internal states by function. In the model's "mind," proteins that do similar things started looking similar before it was ever told what they did.
  • The Internal Workspace: The model doesn't just "know" the answer; it reads it from its internal 3D map. The authors proved this via causal interventions: if they "wiped" the memory of a specific active site residue in the hidden states, the model lost its ability to identify the protein's function. If they restored that specific memory, the ability returned.
  • Zero-Shot Discovery: RumiFold correctly identified the catalytic role of a specific residue (His130 in human TMEM68) that was only discovered by experimentalists in 2023—well after the model's structural training data cutoff.
Figure 2: RumiFold learns to fold, understand, and describe proteins through four stages of training. Stage 1 (Folding, updates 0–9k): The model learns to predict protein structure, developing structural representations in its hidden states. Stage 2 (Structural QA, 9k–41k): The model learns to access these representations to answer questions about its own predicted structure in natural language. Stage 3 (Functional training, 41k–95k): The model learns to connect its structural representations to biological function. Stage 4 (Task fine-tuning): The model is adapted to downstream tasks, including function prediction, residue annotation, and protein question answering. The stages are cumulative: each adds a task to those before it, so the same language model keeps training on folding through all four.

Key Results

  • Folding Accuracy: RumiFold achieved a TM-score of 0.840 on FoldBench monomers, outperforming dedicated models like SimpleFold 700M (0.832).
  • Function Prediction: On Gene Ontology tasks, it reached a mean weighted F1 of 0.683, beating the previous state-of-the-art GO-GPT v2 (0.666).
  • Textual Description: In free-text function description (Prot2Text), it achieved a BLEU-4 score of 41.0, significantly higher than Prot2Text-V2 (39.0).
Figure 3: A frozen language model with adapters folds about as well as a dedicated single- representation model. Single-sequence structure prediction on FoldBench monomers and CASP16 domains: Cα TM-score, Cα-lDDT and GDT-TS. RumiFold is the model that also answers questions; RumiFold-Struct is trained only to fold. DPLM-2, ESM3 and SimpleFold are single-representation models. ESMFold (hatched) uses pair representations and is shown as a reference.

Limitations and Future Work

  • The "Alignment Tax": Teaching the model biology came at a cost to its general reasoning. RumiFold lost about 14–21 points on standard LLM benchmarks like MMLU and GSM8K.
  • Input Depth: The model currently only looks at the final layer of the ESM-C encoder. The authors suspect that using intermediate layers might provide even richer functional signals.
  • Fixed Iterations: RumiFold always uses exactly two folding passes. A more flexible model might "think longer" for harder proteins, looping through folding and reasoning multiple times.
  • Single Layer: The model is fed only the final layer of ESM-C; the authors note that intermediate layers often carry more functional information.

RumiFold suggests a future where "thinking" about a scientific problem involves the model running internal simulations—folding a protein, simulating a mutation, and then explaining the result—all within the same unified neural architecture.

Summary updated

BibTeX
@misc{lu2026rumifold,
  author = {Kevin Lu and David Bau and Wengong Jin},
  title = {{RumiFold: Teaching an LLM to Natively Fold Proteins and Reason About Their Function}},
  year = {2026},
  eprint = {2611.29444},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.29444},
}
Figure