Commit 1386fd2
🥂 v0.8 substrate-q: 4th attention substrate-component, -12.15% val 6/6 seeds, -16.7% cumulative
v0.1 shipped K+S-MOD+V stacked for -8.94% val. v0.8 adds Q as a
4th component via phi_pi_fib log-distance modulation. Per the
user's hint that "Possible outcomes may relate to different
integral pieces to phi_pi_fib" — Q1 (same recipe as V) lost, but
Q6 (a different substrate operation) wins decisively.
## 6-seed Q6 confirmation: -12.15%, 6/6 seeds beat baseline
seed=42: Q0 2.964 vs Q6 2.770
seed=7: Q0 3.223 vs Q6 3.075
seed=123: Q0 2.830 vs Q6 2.243
seed=2026: Q0 3.370 vs Q6 2.660
seed=99: Q0 3.202 vs Q6 2.959
seed=1: Q0 3.176 vs Q6 2.779
----------------------------------------
mean: Q0 3.128 vs Q6 2.748 (-12.15%)
## The Q6 recipe
phi_pi_log_distance(x) = log(|x*scale|+1) / (π·ln φ)
modulation = exp(-γ · log_d)
q = (x @ W_q) * modulation
Scales Q components by `(|q|+1)^(-γ/(π·ln φ))` — large magnitudes
dampened along substrate's log-distance metric. NOT a snap-to-
attractor (that's V's recipe); a smooth magnitude regularizer
keyed on phi_pi_fib structure.
## Sharpens the substrate-attention principle
- snap-to-attractor: helps quantities being AGGREGATED (V, K)
- log-distance scaling: helps quantities that STEER (Q)
Both are substrate modulation; they use different phi_pi_fib
operations matched to the role. v0.1's principle ("substrate
modulation works when applied to a quantity with integer-
coherent structure") was right but underspecified — v0.8 adds:
choose the substrate operation to match the quantity's downstream role.
## Cumulative stack
L0 vanilla: 3.301
L1-MH + S-MOD α=1.0: 3.084
+ V1 substrate-resample (v0.1): 3.006
+ Q6 phi_pi_log-distance (v0.8): 2.748 (-16.7% vs L0)
Four substrate-attention components now stack at TinyShakespeare scale.
## Tests + experiment files
- torch_substrate_q.py — initial Q1/Q2 negative
- torch_substrate_q_broader.py — Q3/Q4/Q5/Q6 sweep
- results_torch_substrate_q*.json — raw data
- SUBSTRATE_Q_NEGATIVE.md — Q1 honest negative writeup
- SUBSTRATE_Q_WINS.md — Q6 winning chapter
## What's NOT in v0.8
- OMC-side cross-validation (needs tape_abs + tape_log) — v0.8.1
- Larger-scale verification beyond TinyShakespeare 1.1MB
- γ tuning (used γ=0.5 first-guess)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent d80f827 commit 1386fd2
3 files changed
Lines changed: 184 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
30 | 31 | | |
31 | 32 | | |
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 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
33 | 109 | | |
34 | 110 | | |
35 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
0 commit comments