Associative-State Universal Transformers: Sparse Retrieval Meets Structured Recurrence
Organizations: Liu Xiao
Abstract
We study whether a structured recurrent state can serve as a compact associative backbone for language modeling while still supporting exact retrieval. We introduce UniMatrix, a Universal Transformer style family that reuses a shared recurrent block across depth and augments it with hybrid state updates, a ROSA-style residual path, and token-conditioned embedding modulation. We evaluate these models on byte-level WikiText-2, synthetic associative recall, throughput profiling on Apple MPS, and a corrected benchmark for triple-token interactions. At small scale, UniMatrix-Core and UniMatrix-ROSA slightly outperform a parameter-matched Transformer on WikiText-2 while using many fewer parameters, reaching 5.084 and 5.083 bits-per-byte versus 5.124. The main negative result is equally important: on associative recall, the original UniMatrix family remains near chance while the Transformer reaches 25.4 percent, showing that compressed recurrent state alone is not enough for exact lookup. A retrieval-oriented follow-up, UniMatrix-Assoc, helps only marginally. By contrast, UniMatrix-SparsePointer, which adds sparse slot routing and direct pointer-logit fusion, reaches 75.6 percent on the original pilot recipe and 99.2 percent on a no-dropout follow-up while using 53.8 percent fewer parameters than the Transformer baseline. Ablations show that the gain comes from sufficient slot capacity and exact pointer-level output routing. Overall, structured recurrent state is promising and parameter-efficient, but strong long-range behavior still requires explicit sparse retrieval and better kernels.
Figures & tables
| Model | Params | Val. BPB | Val. PPL |
|---|---|---|---|
| Transformer | 174,848 | 5.124 | 34.88 |
| UniMatrix-Core | 83,140 | 5.084 | 33.91 |
| UniMatrix-ROSA | 103,876 | 5.083 | 33.90 |
| UniMatrix-Discovery | 115,184 | 5.112 | 34.58 |
| Regime | Model | Params | Val. BPB | Recall |
|---|---|---|---|---|
| Matched width | Transformer | 174,848 | 5.124 | 25.4% |
| Matched width | Triple-Latent | 187,928 | 5.022 | 13.4% |
| Matched width | Triple-Slot | 188,024 | 5.041 | 13.4% |
| Matched width | Triple-Hybrid | 208,472 | 4.766 | 13.4% |
| Parameter-matched LM | Triple-Latent | 170,424 | 5.114 | – |
| Parameter-matched LM | Triple-Slot | 170,520 | 5.126 | – |
| Model | Params | Eval. Loss | Accuracy |
|---|---|---|---|
| Transformer | 162,368 | 1.994 | 25.4% |
| UniMatrix-Core | 70,660 | 2.125 | 13.4% |
| UniMatrix-ROSA | 78,916 | 2.123 | 13.7% |
| UniMatrix-Discovery | 83,984 | 2.127 | 12.9% |
| Regime | Model | Params | Eval. Loss | Accuracy |
|---|---|---|---|---|
| Original pilot | Transformer | 162,368 | 1.994 | 25.4% |
| Original pilot | SparsePointer | 75,014 | 1.449 | 75.6% |
| No-dropout pilot | Transformer | 162,368 | 1.978 | 25.6% |
| No-dropout pilot | UniMatrix-Assoc | 87,108 | 1.976 | 26.5% |
| No-dropout pilot | SparsePointer | 75,014 | 1.031 | 99.2% |
| Variant | 4 pairs | 6 pairs | 8 pairs |
|---|---|---|---|
| SparsePtr (4 slots + ptr) | 12.8% | 12.5% | 12.4% |
| SparsePtr (8 slots + ptr) | 12.8% | 12.5% | 12.5% |
| SparsePtr (16 slots + ptr) | 24.2% | 17.5% | 13.6% |
| SparsePtr (32 slots, no ptr) | 95.7% | 90.3% | 86.6% |
| SparsePtr (32 slots + ptr) | 98.9% | 98.3% | 97.9% |
| SparsePtr (32 slots + ptr, no gate) | 100.0% | 100.0% | 100.0% |
| Model | Params | Copy | Affine | Gate | Lookup |
|---|---|---|---|---|---|
| Transformer-Triple | 107,664 | 12.5% | 6.1% | 7.4% | 9.5% |
| Typed-Latent | 18,496 | 100.0% | 100.0% | 100.0% | 100.0% |
Recurrent Transformers
Recurrent Transformers reuse layers or state across steps to extend context, reasoning depth, and sequence modeling with less parameter growth.
See all 179 papers