Monodratic: a reproducible sparse attention mixer
Abstract. Monodratic is a stateless sparse attention mixer. Associative recall is 763 of 768 answers correct, 99.35% mean accuracy, and 98.05% minimum accuracy across three seeds. Natural-language quality, asymptotic linear construction, and fused-kernel speed are not claimed.
Mixer
The mixer receives a normalized residual stream, computes a sparse attention delta, and returns a tensor of the same shape. Residual updates, feed-forward layers, embeddings, output heads, cache policy, and inference scheduling remain outside the component.
After rotary position embedding, product routing writes keys into bounded causal posting lists and selects a fixed number of remote blocks. Local blocks are added separately. Attention over that set is ordinary causal softmax. No value summary replaces selected source values.
Learned sparse route
The non-bypass experiment uses multi-query associative recall. Sequences contain six blocks. At the latest queries, five remote blocks are eligible and PHI selects two. The local-only control uses identical non-router weights and no remote route. The random control uses the same remote width and identical non-router weights. Three seeds.
Capacity
The capacity experiment uses SmolLM2-360M at 8,192 tokens. Before calibration, flattened post-RoPE query and key routing records 18 held-out overflow events at capacity 64. Spherical codebook calibration on the training split reduces held-out overflow to zero. The maximum assigned load after calibration is 11. At this length every remote block is eligible, so the run verifies conversion and capacity. It does not test sparse retrieval.
Finite-range scaling
The packed reference measurement includes index build and non-bypass search at 4K, 8K, 16K, and 32K tokens on four CPU threads. Each length uses one warm-up and three timed repetitions. Every length passes sampled scalar route and counter parity, causality checks, fixed candidate-slot checks, and zero-overflow checks. The fitted exponent is 0.993 over the measured range. The stable sort used during index construction remains O(N log N).
Evidence
| Measurement | Result |
|---|---|
| Associative-recall accuracy | 763 of 768 correct, 99.35% mean, 98.05% min |
| All-eligible donor | 768 of 768 |
| Target-forced R2 | 768 of 768 |
| All-eligible trained weights | 739 of 768 |
| Margin over untrained router | 0.3008 min |
| Margin over local-only attention | 0.7813 min |
| Final-layer target-block hits | 753 of 768 |
| Selected-mask oracle error | 1.43 × 10−6 max |
| Overflow | 0 |
| Packed timing exponent | 0.993 from 4,096 to 32,768 tokens |
Limits
The associative-recall task is synthetic and short. The 8,192-token capacity run uses an all-eligible selected set. The packed implementation is portable PyTorch rather than a fused kernel. The reported evidence does not support a general language-model quality or deployment-speed claim. Cache behavior is outside the mixer contract.