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