File size: 3,351 Bytes
e0080d9 0279b4c 30c866a e0080d9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | ---
license: mit
language: [en]
tags: [attention, mixture-of-experts, softmax-free, linear-attention, geometric-deep-learning, research-log, aleph]
---
# aleph-splat β splat attention research line
**Softmax-free attention through tiny signed codebooks.** Every head is a
small frozen "aleph": K unit anchors read by a closed-form signed address
`w_k = sinh(u_k)/Ξ£_j cosh(u_j)` β reconstructive, never comparative
(no argmax, no top-k, no softmax anywhere, including across heads).
Attention is a write/read through the codebook cells; token-to-token
affinity is address *agreement* through a K-cell bottleneck β **linear in
sequence length**.
> π **Technical companion:** [TECHNICAL.md](https://huggingface.co/AbstractPhil/aleph-splat-0/blob/main/TECHNICAL.md) β the full B1βB9 mathematical battery, the architecture, the training-collapse diagnosis and cure, and the speed matrix. Week-in-review article: [Geometric Memory FT5 β Agreement, Anchors, Addresses](https://huggingface.co/blog/AbstractPhil/geometric-memory-ft5).
## Play with it
[`splat_attention.py`](./splat_attention.py) β one file, torch-only:
```python
from splat_attention import SplatAttention
attn = SplatAttention(d_model=512, M=64, K=8, rotary=True)
y = attn(x) # (B, L, d) -> (B, L, d)
```
`python splat_attention.py` runs a demo + speed bench. Knobs for the
gradient-heuristic variants are constructor args: `head_gates`
(learnable per-head attenuation), `train_centers` (moving windows),
`train_codebooks` (unfrozen frames), `rotary`/`global_frac` (transport
geometry).
## What has been measured (`battery/splat_battery.json`)
- **Product code**: M differentiated small codebooks beat one monolith at
equal half-axis budget β joint readback .859 (1Γ64) β .955 (16Γ4),
monotone; identical copies collapse. Random independent frames match
constructed ones.
- **Differentiation is an attractor**: near-copies re-differentiate under
a shared objective with no diversity pressure.
- **Comparative composition loses**: softmax-over-heads costs ~.10
reconstruction vs budget-weighted blending.
- **Storage is partition-blind**: associative capacity scales with total
cells regardless of head partition β addressing capacity and memory
capacity are different resources.
- **Retrieval at scale**: 2048 splat-sharded heads: top-1 .9995 @ 2k
context / .934 @ 8k where an equal-cell monolith reads .042 / .0015.
- **Speed**: flat Β΅s/token vs MHA's quadratic β slower below ~2k tokens,
~2Γ faster at 8k; `torch.compile` (inductor) gives a further 3β4Γ.
- **The failure that shaped the design**: local-only positional windows
at short L degenerate into a Β±3-token blur β cross-position transport
dies and a cls-pooled encoder collapses (measured, then repaired).
The repair is `rotary=True`: RoPE applied to the *address query*, so
relative position enters every affinity while heads stay global
(cross-position recall .548 where the broken form gave ~0).
## Status
Research prototype under active iteration. Trained-at-scale encoder
results for the splat arm are pending; the sibling trained arms
(anchored-FFN trunks with the same address mechanism in the MLP) live at
[alephlm-0](https://huggingface.co/AbstractPhil/alephlm-0). Numbers above
are measurements on the stated probes β nothing more is claimed.
|