How Should Reasoning Be Organized in a Transformer's Latent Space?
Organizations: University of Science and Technology of China Hefei, China · Zhongguancun Academy Beijing, China
Abstract
Continuous reasoning has emerged as a promising way to improve reasoning in large language models (LLMs). Yet we still lack a clear principle for deciding what a latent state should preserve. Reasoning by superposition shows that a single latent state can encode several search alternatives and expand them in parallel. We ask how those states should be weighted as reasoning proceeds. A natural choice is to preserve only the states active at the frontier step, since keeping every reached state appears to spread a limited hidden width too thin. We show that the opposite can hold. When later computation draws on several reached states, a cumulative state can guide attention correctly at a smaller hidden width than a frontier state that stores fewer states. At the same width, the cumulative state therefore keeps more intermediate states available for later reasoning. More generally, equal cumulative weights are optimal when future queries are unknown and remain close to the best task-specific weights when those queries are known. Experiments with two-layer and GPT-2 Transformers reproduce the predicted width advantage and show that unequal weights fail first on the states that receive the least weight. This suggests a important principle: keep reached states equally weighted, and restore equal weights as computation proceeds.
Figures & tables
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Split | # traces | solution length | ||
|---|---|---|---|---|
| Train | 14,785 | 22.8 | 36.5 | 3.5 |
| Validation | 257 | 22.7 | 36.3 | 3.5 |
| Test | 419 | 22.7 | 36.0 | 3.5 |
| Split | Used traces | Queries | Support fraction | Realized |
|---|---|---|---|---|
| Train | 14,785 | 118,280 | 1.319 | |
| Validation | 120 | 480 | 1.271 | |
| Test | 419 | 3,352 | 1.287 |
| Component | Configuration |
|---|---|
| Widths | |
| Training seeds / embedding seeds | / |
| Query-bank size per trace (train/val/test) | |
| Decoys (train/val/test) | |
| Gaussian draws (val/test) | |
| Epochs and optimizer | 4; AdamW, learning rate |
| Learned frontier | Learned cumulative | Ideal frontier | Ideal cumulative | |
|---|---|---|---|---|
| 16 | ||||
| 24 | ||||
| 32 | ||||
| 40 | ||||
| 48 | ||||
| 56 |
| Seed | Frontier | Cumulative | C/F |
|---|---|---|---|
| 0 | 108.9 | 39.2 | 0.360 |
| 1 | 112.1 | 39.9 | 0.356 |
| 2 | 110.3 | 40.4 | 0.366 |
| 3 | 111.7 | 41.6 | 0.372 |
| 4 | 110.1 | 40.6 | 0.369 |
| Mean | 110.6 | 40.3 | 0.365 |
| Component | Configuration |
|---|---|
| Backbone | causal GPT-2; 2 layers, 8 heads, FFN width |
| Transformer details | GELU, context 512, dropout 0.1, residuals and LayerNorm |
| Tested widths / maximum codebook width | / 768 |
| Model seeds / embedding seeds | / |
| Used traces (train/validation/test) | |
| Queries per trace (train/validation/test) |
| Frontier | Cumulative | |
|---|---|---|
| 32 | ||
| 64 | ||
| 96 | ||
| 128 | ||
| 192 | ||
| 256 |
| Seed | Frontier | Cumulative | C/F |
|---|---|---|---|
| 0 | 63.2 | 32.0 | 0.507 |
| 1 | 68.6 | 33.0 | 0.481 |
| 2 | 73.5 | 36.2 | 0.493 |
| 3 | 62.6 | 32.0 | 0.511 |
| 4 | 63.0 | 38.8 | 0.616 |
| Mean | 66.2 | 34.4 | 0.521 |
| Codebook seed | Uniform cumulative | Recency-heavy | Random mild |
|---|---|---|---|
| 4903 | |||
| 5004 | |||
| 5105 | |||
| 5206 | |||
| 5307 | |||
| Mean |