Causal Latent Workspaces for Looped Transformers
Abstract
Reusing a Transformer block across depth increases computation without replicating its parameters, but successive passes have no dedicated state through which positions can exchange compact summaries of their causal prefix. We introduce the causal latent workspace Transformer: an anchored, four-round shared-depth architecture in which each position writes gated vectors into prefix-specific latent slots and retrieves a content-addressed summary before the next shared block application. This path complements causal self-attention while the original input embedding remains accessible at every round. Across three byte-level corpora, three seeds, and two matched parameter budgets, the proposed model achieves the best mean held-out perplexity in five of six settings against five Transformer controls. At 101.71M parameters it leads on WikiText-103 raw, enwik8, and TinyStories, reaching perplexities 2.7820, 2.7843, and 1.6823; these improve upon the strongest non-workspace control on each corpus by 1.06%, 0.73%, and 1.01%. All nine seed-labelled comparisons at this budget favor the workspace. At 0.918M parameters it leads on WikiText-103 and TinyStories, whereas a conditioned loop is stronger on enwik8. Architectural ablations show that adding the workspace improves upon the anchored loop in all six settings and support refreshing its causal summaries at each round. Together, these results identify a causal, content-addressable prefix workspace as an effective structural augmentation of looped Transformers.
Figures & tables
| Corpus | Training source and representation | Held-out evaluation stream |
|---|---|---|
| WikiText-103 raw | Official wikitext-103-raw-v1 training Parquet shards; UTF-8 bytes; blank rows skipped; symbol 256 appended to each nonempty row. | Official held-out split: 2,235 complete blocks, 1,144,320 scored targets. |
| enwik8 | Official 100,000,000-byte file; first 90,000,000 bytes form the training pool. Raw bytes; no inserted separator. | Next 5,000,000 bytes: 9,746 blocks, 4,989,952 scored targets. Final 5,000,000 bytes reserved and not reported. |
| TinyStories | TinyStoriesV2-GPT4-train.txt ; first 250,000,000 bytes form the training pool. Raw file bytes, without inserted separators or story-wise parsing. | Entire TinyStoriesV2-GPT4-valid.txt : 43,864 blocks, 22,458,368 scored targets. |
| Setting | Small (0.918M) | Larger (101.71M) |
|---|---|---|
| Context / output vocabulary | 512 / 257 | 512 / 257 |
| Scored targets per run | 81,920,000 | 81,920,000 |
| Microbatch / accumulation | 8 / 1 | 4 / 2 |
| Microbatch steps / updates | 20,000 / 20,000 | 40,000 / 20,000 |
| Effective sequences per update | 8 | 8 |
| Learning rate |
| Architecture | WikiText-103 | enwik8 | TinyStories |
|---|---|---|---|
| Plain Transformer | |||
| Fixed shared loop | |||
| Adaptive-exit mixture | |||
| Anchored shared loop | |||
| Anchored conditioned-dense | |||
| Causal workspace (ours) |
| Architecture | WikiText-103 | enwik8 | TinyStories |
|---|---|---|---|
| Plain Transformer | |||
| Fixed shared loop | |||
| Adaptive-exit mixture | |||
| Anchored shared loop | |||
| Anchored conditioned-dense | |||
| Causal workspace (ours) |
| Architecture | WikiText-103 | enwik8 | TinyStories |
|---|---|---|---|
| Anchored shared loop | |||
| Causal workspace (ours) | |||
| Workspace + loop retention |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Meaning |
|---|---|
| Vocabulary, input symbol, next-symbol target | |
| Context, rounds, slots, slot width, state width, FFN width, heads | |
| Microbatch sequences and scored held-out-target count | |
| Anchor, recurrent state, fused state, write-normalized state | |
| Scalar write gate and value vector | |
| Gated prefix sum and scalar gate mass |
| Budget | Architecture | Parameters | ||||
|---|---|---|---|---|---|---|
| Small | Plain | 128 | 4 | 506 | – | 918,504 |
| Fixed loop | 256 | 4 | 761 | – | 918,009 | |
| Exit mixture | 256 | 4 | 759 | – | 918,011 | |
| Anchored | 215 | 5 | 860 | – | 918,050 | |
| Conditioned dense | 215 | 5 | 856 | – | 918,049 | |
| Workspace | 215 | 5 | 758 | 918,030 |
| Dataset | Architecture | Seed 11 | Seed 23 | Seed 37 | Mean |
|---|---|---|---|---|---|
| WikiText-103 | Plain | 4.62059 | 4.50256 | 4.64196 | 4.58837 |
| Fixed loop | 4.10625 | 4.06510 | 4.32895 | 4.16677 | |
| Exit mixture | 4.14598 | 4.13962 | 4.10585 | 4.13048 | |
| Anchored | 4.02385 | 3.99855 | 3.98409 | 4.00216 | |
| Conditioned dense | 3.95518 | 3.94761 | 3.94147 | 3.94809 | |
| Workspace | 3.75042 | 3.74290 | 3.74327 | 3.74553 |
| Dataset | Architecture | Seed 11 | Seed 23 | Seed 37 | Mean |
|---|---|---|---|---|---|
| WikiText-103 | Plain | 3.08994 | 2.99986 | 3.00033 | 3.03004 |
| Fixed loop | 2.89454 | 2.89208 | 2.88015 | 2.88893 | |
| Exit mixture | 2.89524 | 2.89818 | 2.89159 | 2.89500 | |
| Anchored | 2.81900 | 2.80726 | 2.80927 | 2.81184 | |
| Conditioned dense | 2.81796 | 2.80494 | 2.81803 | 2.81364 | |
| Workspace | 2.77861 | 2.78226 | 2.78506 | 2.78198 |
| Dataset | Seed 11 | Seed 23 | Seed 37 | Mean PPL change (%) |
|---|---|---|---|---|
| WikiText-103 | 2.76913 | 2.78694 | 2.78209 | -0.0931 |
| enwik8 | 2.78836 | 2.77730 | 2.79322 | +0.0722 |
| TinyStories | 1.68210 | 1.68488 | 1.68106 | +0.0216 |
Autoregressive Language Modeling
Autoregressive language modeling predicts sequences one step at a time, using prior tokens to generate text, speech, code, and other data.
See all 132 papers