Does Learning Protein Folding Generalize to Broader Reasoning?
Organizations: Shanghai Jiao Tong University · Fudan University · Shanghai Innovation Institute · Northeastern University
Abstract
Large language models rely heavily on human text, which often conveys surface answers rather than the spatial and structural logic behind them. Protein folding is a natural testbed, because one solved structure yields thousands of exactly checkable spatial and topological statements. We ask: can learning to fold proteins teach general models reusable reasoning capabilities? To answer this, we build FoldingCorpus, a protein-derived question-answer dataset, and Fold2Reason, a recipe that post-trains on it through two complementary signals: discrete structural answers predicted via the model's native language head, and continuous 3D geometry decoded from the same shared representations. On FoldBench, Fold2Reason achieves structure prediction scores 2.7 to 3.5 times those of Qwen3.5-9B. Beyond protein structure prediction, it improves performance on all 10 benchmarks spanning spatial, graph, scientific, and general reasoning, raising macro-average accuracy from 45.09% to 48.33% (+3.23 pp), with positive gains on all 10 benchmarks, while matched controls built from random, synthetic, and shuffled structure yield substantially smaller or negative gains. Our work shows that non-linguistic, structure-dense scientific data can systematically improve broad reasoning in language models, making a solved scientific problem a practical source of post-training supervision.
Figures & tables
| Category | Benchmark | Base | Post-training | |||
| Hidden Geom. | Format Copy | Fixed Shuffle | Fold2Reason | |||
| Spatial reasoning | FTB-Core | 36.18 | 37.25 (+1.07) | 36.04 (-0.14) | 35.41 (-0.77) | 40.26 (+4.08) |
| SpatialViz | 26.61 | 23.16 (-3.45) | 28.56 (+1.95) | 25.76 (-0.85) | 32.71 (+6.10) | |
| VSI Bench | 58.53 | 59.22 (+0.69) | 56.32 (-2.21) | 58.42 (-0.11) | 60.16 (+1.63) | |
| Graph reasoning | GraphQA Easy | 65.14 | 66.90 (+1.76) | 63.95 (-1.19) | 64.91 (-0.23) | 69.70 (+4.56) |
| GraphQA Hard | 32.65 | 34.83 (+2.18) | 33.95 (+1.30) | 35.88 (+3.23) | 39.48 (+6.83) | |
| Arm | G10 | 3D macro | FTB | SpatialViz | VSI | Text G7 |
|---|---|---|---|---|---|---|
| Base | 45.09 | 40.44 | 36.18 | 26.61 | 58.53 | 47.09 |
| w/o FoldingCorpus | 45.77 (+0.68) | 41.47 (+1.03) | 38.44 (+2.26) | 27.40 (+0.79) | 58.58 (+0.05) | 47.61 (+0.52) |
| w/o Geometry | 48.02 (+2.93) | 43.30 (+2.86) | 39.00 (+2.81) | 31.81 (+5.20) | 59.08 (+0.54) | 50.05 (+2.96) |
| Fold2Reason-full | 48.33 (+3.23) | 44.38 (+3.94) | 40.26 (+4.08) | 32.71 (+6.10) | 60.16 (+1.63) | 50.02 (+2.93) |
Appendix figures & tables31 assets
Supplementary material from the paper’s appendix.
Appendix
| Item | Value |
|---|---|
| Base model | Qwen3.5-9B |
| Protein views | 336 sequence; 332 +MSA; 332 +MSA+template |
| Length range / mean | 29–199 / 144.42 residues |
| FoldingCorpus records | 12 per protein; 12,000 total |
| Packed supervision | 12 labels + EOS per protein |
| Workspace | width 256; 16 pooled tokens; at most 2,048 pairs |
| Partition | Proteins | Questions/protein | FoldingCorpus records | Packed samples |
|---|---|---|---|---|
| Train | 1,000 | 12 | 12,000 | 1,000 |
| Development | 100 | 12 | 1,200 | 100 |
| Frozen test | 100 | 12 | 1,200 | 100 |
| Total | 1,200 | 12 | 14,400 | 1,200 |
| Operator / train labels | Definition and threshold | Sampling rule |
|---|---|---|
| CONTACT_SHORT A470/B530 | iff Å | |
| CONTACT_MEDIUM A458/B542 | iff Å | |
| CONTACT_LONG A447/B553 | iff Å | |
| DISTANCE_ORDER_1 A481/B519 | iff | low/high distance deciles; local/medium pairs |
| DISTANCE_ORDER_2 A512/B488 | iff | low/high distance deciles; long-range pairs |
| SEGMENT_ORIENTATION A331/B297/C372 | For endpoint vectors : A if ; B if ; C otherwise | segment starts separated by at least eight residues |
| Task | Answer/parser | Representative generated query |
|---|---|---|
| nearest_neighbor | point ID / exact | choose the nearest labeled 3D point |
| bond_angle | degrees / | compute an angle from three coordinates |
| signed_dihedral | degrees / | compute a signed four-point dihedral |
| tetrahedral_chirality | positive/negative | determine the handedness of four points |
| proper_rigid_equivalence | yes/no | distinguish a proper rigid transform from reflection |
| sparse_constraints_candidate_selection | A–D | choose the structure satisfying sparse distances |
| Benchmark (revision) | Modality | New tokens | Score / extraction | |
|---|---|---|---|---|
| FTB-Core v1.0.0 | 12,000 | text | 32 | numeric tolerance or categorical EM |
| SpatialViz ( f38482a8 ) | 1,180 | image+text | 128 | option-letter accuracy |
| VSI ( d7cb1a39 ) | 5,130 | video+text | 16 | MC accuracy/MCA; aggregation below |
| GraphQA Easy ( 18f55c29 ) | 21,600 | text | 128 | canonical answer-tail EM |
| GraphQA Hard ( b7e910dd ) | 21,600 | text | 128 | canonical answer-tail EM |
| BBH ( 982bb89f ) | 6,511 | text | 128 | normalized EM |
| Item | Protocol |
|---|---|
| Initialization | Pretrained Phase-0 head-only decoder |
| Trainable in Phase 0 | Coordinate and distogram heads only; base LM and LoRA frozen |
| Phase-0 data | 1,000 training proteins from the OpenFold high-confidence split |
| Fold2Reason training | Decoder loaded with requires_grad=False and excluded from optimization |
| Held-out exclusions | No FoldBench334, General-10, FTB-Core, SpatialViz, VSI, GraphQA, BBH, ChemBench, ChemBench4K, Lab-Bench, or SciBench examples |
| Extra structural data | No additional PDB-derived proteins beyond the 1K training split |
| Input: training proteins , tokenizer , fixed data seed ; is the assigned evidence view. | |
| Output: frozen protein inputs , marker indices , FoldingCorpus tokens , masked labels , and geometry targets. | |
| 1 | Compute valid C distances and structural summaries from . |
| 2 | Build the training-pool hard-negative index used by the 32-way summary question. |
| 3 | For each protein in the training partition: |
| 4 | Serialize and a residue skeleton with exactly one marker per residue; tokenize to obtain . |
| 5 | For each of the 12 operators in Table 5 : |
| Input: frozen cache, base , pretrained decoder , training seed, three-epoch schedule. | |
| Output: LoRA adapter and workspace ; unchanged decoder . | |
| 1 | Initialize rank-16 LoRA and workspace; freeze , , and the unused retrieval projection. |
| 2 | Create AdamW groups for LoRA and active workspace parameters only. |
| 3 | For each epoch and seed-shuffled gradient-accumulation window: |
| 4 | Zero optimizer gradients; distribute protein packs across workers. |
| 5 | For each active protein pack : |
| Input: declared checkpoint(s), frozen evaluation manifests, prompts, decoding settings, and scorers. | |
| Output: per-example predictions, per-seed metrics, and seed-aggregated results. | |
| 1 | For each training seed, load its declared checkpoint in evaluation mode. |
| 2 | Held-out FoldingCorpus questions: for each protein, compute its matched workspace memory for Full; omit memory for Pure-LoRA. |
| 3 | Ask each question independently using the sequence and that question; do not append earlier gold answers. |
| 4 | Take the first next-token argmax over the complete vocabulary and compare with the canonical label token. |
| 5 | Average correctness within each operator, then average the 12 operator accuracies. Record candidate-restricted accuracy separately as a diagnostic. |
| Model | Epochs | Steps | Peak LR | LoRA (M) | GPUs/seed |
|---|---|---|---|---|---|
| Qwen3.5-2B | 3 | 375 | 1e-04 | 16.82 | 4 |
| Qwen3.5-4B | 3 | 375 | 1e-04 | 32.46 | 4 |
| Qwen3.5-9B | 3 | 375 | 1e-04 | 43.28 | 4 |
| InternVL3.5-8B | 3 | 375 | 1e-04 | 43.65 | 4 |
| Gemma-4-12B-IT | 3 | 375 | 1e-04 | 65.57 | 4 |
| Model | S1 | S2 | S3 | Mean SD | 95% t interval |
|---|---|---|---|---|---|
| Qwen3.5-2B | +6.448 | +5.048 | +4.747 | [+3.160, +7.668] | |
| Qwen3.5-4B | +4.636 | +5.155 | +4.742 | [+4.164, +5.525] | |
| Qwen3.5-9B | +3.216 | +3.204 | +3.249 | [+3.164, +3.281] | |
| InternVL3.5-8B | +1.754 | +1.225 | +1.607 | [+0.851, +2.206] | |
| Gemma-4-12B-IT | -0.690 | +0.509 | +0.398 | [-1.574, +1.718] |
| Benchmark | Qwen 2B | Qwen 4B | Qwen 9B | InternVL 8B | Gemma 12B |
|---|---|---|---|---|---|
| FTB-Core | +10.45 | +7.46 | +4.10 | +2.64 | -1.23 |
| SpatialViz | +21.21 | +22.20 | +6.69 | -0.45 | -0.79 |
| VSI | -0.28 | +3.99 | +1.50 | +0.20 | +2.95 |
| GraphQA Easy | +2.80 | -2.82 | +1.96 | +0.22 | -0.43 |
| GraphQA Hard | +6.51 | +3.69 | +9.95 | +3.42 | -1.93 |
| BBH | +1.35 | +2.91 | +2.38 | +1.35 | +1.53 |
| FTB-Core task | Base | Full | SpatialViz task | Base | Full | ||
|---|---|---|---|---|---|---|---|
| Bond angle | 0.60 | 0.23 | -0.37 | 2DRotation | 0.00 | 5.00 | +5.00 |
| Distance audit | 9.40 | 7.50 | -1.90 | 3DRotation | 30.00 | 35.42 | +5.42 |
| Fragment assembly | 28.30 | 30.10 | +1.80 | 3ViewProjection | 31.00 | 38.67 | +7.67 |
| Nearest neighbor | 41.50 | 50.47 | +8.97 | ArrowMoving | 30.00 | 33.75 | +3.75 |
| Noisy template | 25.80 | 26.97 | +1.17 | BlockMoving | 31.25 | 31.25 | +0.00 |
| Rigid equivalence | 47.20 | 48.20 | +1.00 | CrossSection | 14.17 | 11.39 | -2.78 |
| Task | Base PF | Full PF | Base VO | Full VO | Common | |
|---|---|---|---|---|---|---|
| all | 12000 | 0.00 | 0.00 | 36.18 | 40.26 | +4.08 |
| Bond angle | 1000 | 0.00 | 0.00 | 0.60 | 0.23 | -0.37 |
| Constraint audit | 1000 | 0.00 | 0.00 | 9.40 | 7.50 | -1.90 |
| Fragment assembly | 1000 | 0.00 | 0.00 | 28.30 | 30.10 | +1.80 |
| Nearest neighbor | 1000 | 0.00 | 0.00 | 41.50 | 50.47 | +8.97 |
| Template selection | 1000 | 0.00 | 0.00 | 25.80 | 26.97 | +1.17 |
| Task | Base PF | Full PF | Base VO | Full VO | Common | |
|---|---|---|---|---|---|---|
| all | 1180 | 1.69 | 0.00 | 27.07 | 32.71 | +5.46 |
| 2DRotation | 80 | 0.00 | 0.00 | 0.00 | 5.00 | +5.00 |
| 3DRotation | 80 | 0.00 | 0.00 | 30.00 | 35.42 | +5.42 |
| 3ViewProjection | 100 | 0.00 | 0.00 | 31.00 | 38.67 | +7.67 |
| ArrowMoving | 80 | 0.00 | 0.00 | 30.00 | 33.75 | +3.75 |
| BlockMoving | 80 | 0.00 | 0.00 | 31.25 | 31.25 | +0.00 |
| Benchmark | Base | w/o FoldingCorpus | w/o Geometry | Fold2Reason-full |
|---|---|---|---|---|
| FTB-Core | 36.18 | 38.44 (+2.26) | 39.00 (+2.81) | 40.26 (+4.08) |
| SpatialViz | 26.61 | 27.40 (+0.79) | 31.81 (+5.20) | 32.71 (+6.10) |
| VSI | 58.53 | 58.58 (+0.05) | 59.08 (+0.54) | 60.16 (+1.63) |
| GraphQA Easy | 65.14 | 67.34 (+2.20) | 68.72 (+3.58) | 69.70 (+4.56) |
| GraphQA Hard | 32.65 | 32.63 (-0.02) | 44.44 (+11.79) | 39.48 (+6.83) |
| BBH | 54.45 | 54.64 (+0.19) | 55.17 (+0.72) | 56.81 (+2.36) |
| Comparison | S1 | S2 | S3 | Mean SD | 95% t interval |
|---|---|---|---|---|---|
| w/o FoldingCorpus | +0.688 | +0.783 | +0.556 | [+0.392, +0.959] | |
| w/o Geometry | +2.611 | +2.629 | +3.551 | [+1.595, +4.266] | |
| Full RG | +3.186 | +3.115 | +3.400 | [+2.866, +3.601] | |
| Full w/o Geometry | +0.575 | +0.486 | -0.152 | [-0.681, +1.287] |
| Readout condition | TM-score | lDDT-C | Contact F1 | C MAE (Å) |
|---|---|---|---|---|
| Frozen-base readout | 0.1742 | 0.2400 | 0.0664 | 10.753 |
| w/o Geometry | 0.1710 | 0.2435 | 0.0627 | 12.096 |
| w/o FoldingCorpus | 0.1685 | 0.2534 | 0.0696 | 12.262 |
| Fold2Reason-full | 0.1688 | 0.2532 | 0.0690 | 12.244 |
| Selection | Protein | TM-score FC-only Full | lDDT-C FC-only Full | Contact F1 FC-only Full | Distance MAE (Å) FC-only Full | |
|---|---|---|---|---|---|---|
| Panel A: proteins displayed in Figure 5 | ||||||
| Rank 1 | 8wt3_A | 134 | 0.2438 0.2742 (+0.0304) | 0.2767 0.3034 (+0.0267) | 0.1146 0.1169 (+0.0023) | 6.0422 5.3820 (-0.6602) |
| Rank 2 | 8qjp_A | 250 | 0.2255 0.2586 (+0.0331) | 0.2462 0.2629 (+0.0167) | 0.0377 0.0552 (+0.0175) | 10.8590 9.1586 (-1.7004) |
| Rank 3 | 7xg9_A | 286 | 0.2310 0.2568 (+0.0258) | 0.2607 0.2834 (+0.0227) | 0.0435 0.0493 (+0.0058) | 12.2372 10.8577 (-1.3794) |
| Panel B: Contact-F1-change quantiles displayed in Figure 7 | ||||||
| Lower (10th) | 7urp_A | 159 | 0.1917 0.2035 (+0.0118) | 0.2125 0.2275 (+0.0150) | 0.0707 0.0595 (-0.0112) | 9.3934 8.0564 (-1.3371) |
| Representation | N | Min | Q1 | Median | Q3 | Max | Mean |
|---|---|---|---|---|---|---|---|
| Manifest sequence | 334 | 28.0 | 140.2 | 225.5 | 344.8 | 1414.0 | 261.43 |
| Evaluated residues | 334 | 26.0 | 140.2 | 225.5 | 344.8 | 1414.0 | 261.10 |
| Proteins | FoldingCorpus targets | Steps | FoldingCorpus macro | lDDT-C | Contact F1 | General-10 |
|---|---|---|---|---|---|---|
| 50 | 600 | 21 | 0.478 | 0.244 | 0.0666 | 0.49 |
| 100 | 1,200 | 39 | 0.486 | 0.244 | 0.0671 | 0.61 |
| 250 | 3,000 | 96 | 0.485 | 0.246 | 0.0666 | 1.37 |
| 500 | 6,000 | 189 | 0.492 | 0.247 | 0.0675 | 2.92 |
| 1,000 | 12,000 | 375 | 0.501 | 0.252 | 0.0694 | 3.31 |
| 2,000 † | 24,000 | 750 | 0.546 | 0.252 | 0.0739 | 3.70 |
| Dataset | N | Canonical base | Scaling base |
|---|---|---|---|
| FTB-Core | 12000 | 36.18 | 36.23 |
| SpatialViz | 1180 | 26.61 | 26.61 |
| VSI | 5130 | 58.53 | 56.93 |
| GraphQA Easy | 21600 | 65.14 | 67.71 |
| GraphQA Hard | 21600 | 32.65 | 33.39 |
| BBH | 6511 | 54.45 | 54.00 |
| Proteins | Seed | Steps | FC acc. | lDDT | Contact F1 | General-10 |
|---|---|---|---|---|---|---|
| 50 | 20260729 | 21 | 0.4608 | 0.2384 | 0.0650 | +0.406 |
| 50 | 20260803 | 21 | 0.4875 | 0.2458 | 0.0667 | +0.686 |
| 50 | 20260804 | 21 | 0.4858 | 0.2474 | 0.0680 | +0.392 |
| 100 | 20260729 | 39 | 0.4758 | 0.2432 | 0.0660 | +0.232 |
| 100 | 20260803 | 39 | 0.4975 | 0.2432 | 0.0670 | +0.593 |
| 100 | 20260804 | 39 | 0.4850 | 0.2469 | 0.0682 | +1.013 |
| Dataset | 50 | 100 | 250 | 500 | 1K | 2K † | 4K † |
|---|---|---|---|---|---|---|---|
| FTB-Core | -0.13 | -0.44 | +0.50 | +4.26 | +4.26 | +5.00 | +4.56 |
| SpatialViz | +0.76 | +0.65 | +1.53 | +5.17 | +5.93 | +7.12 | +6.92 |
| VSI | +0.12 | -0.08 | +0.33 | +1.17 | +1.13 | +1.82 | +1.58 |
| GraphQA Easy | +1.36 | +2.13 | +1.77 | +2.58 | +2.49 | +2.76 | +1.47 |
| GraphQA Hard | +0.78 | +0.56 | +1.94 | +3.90 | +6.35 | +8.67 | +8.46 |
| BBH | +0.57 | +0.74 | +2.37 | +3.30 | +3.77 | +3.68 | +2.90 |
| Labels/protein | S1 | S2 | S3 | SD | FC acc. | lDDT | Contact F1 |
|---|---|---|---|---|---|---|---|
| 3 | +2.971 | +3.731 | +3.472 | ||||
| 6 | +3.145 | +2.441 | +3.268 | ||||
| 12 | +3.145 | +2.941 | +3.848 |
| File | Contents |
|---|---|
| endpoint_seed_scores.json | All ten dataset scores by seed for Fold2Reason-full, the component arms, the model families, and the source-control aggregates. |
| model_training_contracts.json | Saved LoRA modules, parameter counts, steps, seed, and hardware world size for the fifteen model-family runs. |
| task_breakdown.json | Complete FTB split/family/task, SpatialViz category/task, and VSI question-group scores. |
| foldbench_audit.json | The 334 target IDs, sequence and evaluation length distributions, and structural metrics by arm and seed. |
| scaling_evidence.json | Fixed-three-epoch endpoints, label-density results, and numerical checkpoint trajectories. |
| scaling_evaluation_manifest.json | Archived checkpoint and split assignments and expected evaluation counts for the included original scaling runs. |