4.2. E2: the canary with attention over depth#
latent’s canary is a tiny looped model trained from scratch on a toy proof task: a cheap early
warning before larger runs. E2 asks whether replacing its recurrence by ARLoop-style attention
residuals changes how many Lean-checked certificates it writes, and how that number depends on
the number of loops \(R\) at test time (the protocol and the code write \(r\); these notes write \(R\)
throughout). The protocol (experiments/e2_small/PROTOCOL.md) was written
before any E2 code ran. Everything below is computed from the run’s raw files while the book is
built.
4.2.1. The protocol in brief#
Task. The
latentaddition-certificate canary: prompta+b=, the model writes a compact certificate (c|r…rz;), which is compiled and checked by the pinned Lean checkerpeano_lab_verify. Splits: 93 training identities; tests iid (35), ood_depth (64, more successor steps than ever seen in training) and ood_operand (32).Training. Identical for every arm: 1,000 AdamW updates, width 64, three seeds (11, 29, 47). The training recurrence is random, \(R = 1 + \text{Poisson}(\lambda)\) with \(\lambda\) drawn from a log-normal with mean 3 and log-sd 0.5, capped at 16; backpropagation is truncated to the last 4 applications of the core. At a given seed every loop arm sees the same batches and the same sequence of \(R\).
Arms.
latent-recurrent(latent’s model, unchanged: sandwich-norm core with an input-injection adapter),prenorm-loop(a PreNorm core, no injection),arloop-untied(attention residuals over depth with one query per effective sublayer, as in the paper, one residual block per core application, window of 3 plus the embedding),arloop-tied(the same with the queries shared across loops, our variant, defined for any \(R\)), and two untied controls (standard-parameter,standard-depth).Evaluation. Greedy decoding at \(R \in \{1, 2, 4, 8, 16\}\); the metric is the number of certificates accepted by Lean. Effect rule (pre-registered): a paired 95% interval that excludes 0 and the same non-zero sign in all three seeds; anything else is “no effect detected at this scale”. Evidence tier T4 (discovery). [exp]
Run. WMI job 322153 (completed, 410 GPU-seconds) on one NVIDIA GeForce RTX 4090, torch 2.7.1+cu128; checker peano_lab_verify SHA-256 9ca28827c769…; seeds 11, 29, 47. Files: experiments/e2_small/results/322153/.
4.2.2. Lean-accepted certificates#
Recounted here from the raw prediction files (<arm>-seed<seed>/predictions-r<r>.jsonl): a
certificate counts as accepted when the record says lean_accepted and the checker exited
with code 0.
arm |
R |
iid (of 105) |
ood_depth (of 192) |
ood_operand (of 96) |
|---|---|---|---|---|
latent-recurrent |
1 |
14 (5/7/2) |
0 (0/0/0) |
9 (3/2/4) |
latent-recurrent |
2 |
14 (6/4/4) |
0 (0/0/0) |
5 (2/0/3) |
latent-recurrent |
4 |
14 (6/4/4) |
0 (0/0/0) |
5 (2/0/3) |
latent-recurrent |
8 |
14 (6/4/4) |
0 (0/0/0) |
5 (2/0/3) |
latent-recurrent |
16 |
14 (6/4/4) |
0 (0/0/0) |
5 (2/0/3) |
prenorm-loop |
1 |
8 (2/3/3) |
0 (0/0/0) |
0 (0/0/0) |
prenorm-loop |
2 |
9 (2/4/3) |
0 (0/0/0) |
2 (2/0/0) |
prenorm-loop |
4 |
7 (1/4/2) |
0 (0/0/0) |
3 (3/0/0) |
prenorm-loop |
8 |
6 (1/3/2) |
0 (0/0/0) |
2 (1/0/1) |
prenorm-loop |
16 |
8 (2/3/3) |
0 (0/0/0) |
2 (1/0/1) |
arloop-untied |
1 |
8 (0/5/3) |
0 (0/0/0) |
3 (0/1/2) |
arloop-untied |
2 |
10 (1/5/4) |
0 (0/0/0) |
2 (0/1/1) |
arloop-untied |
4 |
10 (1/5/4) |
0 (0/0/0) |
2 (0/2/0) |
arloop-untied |
8 |
8 (0/5/3) |
0 (0/0/0) |
2 (0/2/0) |
arloop-untied |
16 |
8 (1/5/2) |
0 (0/0/0) |
2 (0/2/0) |
arloop-tied |
1 |
8 (2/3/3) |
0 (0/0/0) |
2 (0/2/0) |
arloop-tied |
2 |
7 (1/3/3) |
0 (0/0/0) |
2 (0/2/0) |
arloop-tied |
4 |
9 (1/4/4) |
0 (0/0/0) |
2 (0/2/0) |
arloop-tied |
8 |
9 (1/4/4) |
0 (0/0/0) |
2 (0/2/0) |
arloop-tied |
16 |
9 (1/4/4) |
0 (0/0/0) |
2 (0/2/0) |
standard-parameter |
– |
11 (2/5/4) |
0 (0/0/0) |
0 (0/0/0) |
standard-depth |
– |
10 (5/3/2) |
0 (0/0/0) |
1 (0/1/0) |
Cell: total over the three seeds (per seed 11/29/47).
On the iid split at \(R = 4\) (the mean training recurrence) Lean accepts 14 of 105 certificates
from latent-recurrent, 10 from arloop-untied, 9 from arloop-tied and 7 from
prenorm-loop; the reference arm accepts 14 at every \(R\). No arm, seed or number of loops produces
an accepted ood_depth certificate (0 of 192 per arm and \(R\)). [exp]
4.2.3. The pre-registered comparisons#
The primary family compares each new arm with latent-recurrent on iid at \(R = 4\) and \(R = 16\),
paired over (seed, item). The statistics are recomputed here from the prediction files with the
protocol’s bootstrap (items resampled within each seed, 10,000 draws, seed 20261115).
comparison (iid) |
R |
difference |
95% interval |
per seed (count) |
discordant |
McNemar p |
effect rule met |
|---|---|---|---|---|---|---|---|
prenorm-loop − latent-recurrent |
4 |
−0.067 |
[−0.133, +0.000] |
−5/+0/−2 |
4/11 |
0.12 |
no |
prenorm-loop − latent-recurrent |
16 |
−0.057 |
[−0.133, +0.010] |
−4/−1/−1 |
5/11 |
0.21 |
no |
arloop-untied − latent-recurrent |
4 |
−0.038 |
[−0.114, +0.038] |
−5/+1/+0 |
7/11 |
0.48 |
no |
arloop-untied − latent-recurrent |
16 |
−0.057 |
[−0.133, +0.010] |
−5/+1/−2 |
5/11 |
0.21 |
no |
arloop-tied − latent-recurrent |
4 |
−0.048 |
[−0.124, +0.029] |
−5/+0/+0 |
7/12 |
0.36 |
no |
arloop-tied − latent-recurrent |
16 |
−0.048 |
[−0.124, +0.029] |
−5/+0/+0 |
7/12 |
0.36 |
no |
No primary comparison meets the effect rule. All six point estimates are negative (from −0.067 to
−0.038 in accuracy, that is the new arms accept fewer certificates than latent’s model), and every
95% interval contains 0. The recomputation agrees in every field with the experiment’s own analysis
(analysis.json). [exp]
Secondary comparisons (descriptive, uncorrected, read from analysis.json): 114, of which 4 meet the rule:
x |
y |
split |
difference |
95% interval |
per seed |
|---|---|---|---|---|---|
prenorm-loop at R = 1 |
latent-recurrent at R = 1 |
ood_operand |
−0.094 |
[−0.156, −0.042] |
−3/−2/−4 |
prenorm-loop at R = 8 |
latent-recurrent at R = 8 |
iid |
−0.076 |
[−0.152, −0.010] |
−5/−1/−2 |
arloop-untied at R = 1 |
latent-recurrent at R = 1 |
ood_operand |
−0.062 |
[−0.125, −0.010] |
−3/−1/−2 |
latent-recurrent at R = 1 |
standard-depth |
ood_operand |
+0.083 |
[+0.021, +0.146] |
+3/+1/+4 |
Among the 114 secondary comparisons four meet the rule: three put a new arm below latent’s decoder, one puts the decoder above the depth-matched control, and none favours a new arm. With this many uncorrected tests they are leads at most.
4.2.4. Depth: does \(R = 16\) change anything?#
arm |
iid items accepted only at R = 16 / only at R = 4 |
|---|---|
latent-recurrent |
0/0 |
prenorm-loop |
3/2 |
arloop-untied |
2/4 |
arloop-tied |
0/0 |
From \(R = 4\) to \(R = 16\) the reference arm and the tied-query arm accept exactly the same iid items; the two others change on a handful of items in both directions. Sixteen loops bring no detectable gain here. [exp]
4.2.5. Where does the read-out look?#
The experiment’s analysis (analysis.json) records the routing weights of the read-out query at
\(R = 16\) (four sources: the embedding source \(b_0\) and the three most recent blocks).
arm |
seed |
sources of the read-out |
weight on b0 |
|---|---|---|---|
arloop-untied |
11 |
b0, b14, b15, b16 |
0.38 |
arloop-untied |
29 |
b0, b14, b15, b16 |
0.17 |
arloop-untied |
47 |
b0, b14, b15, b16 |
0.36 |
arloop-tied |
11 |
b0, b14, b15, b16 |
0.33 |
arloop-tied |
29 |
b0, b14, b15, b16 |
0.17 |
arloop-tied |
47 |
b0, b14, b15, b16 |
0.24 |
Uniform mixing over four sources would give 0.25.
The weight on the embedding source ranges from below to above the uniform 0.25 across seeds: no consistent preference for the embedding was learned at this scale.
4.2.6. Reproduction of latent’s job 284986#
The unchanged arm is also a reproduction test: latent-recurrent and both controls at seeds 11
and 29 must give exactly what latent recorded in its job 284986.
Item records identical to job 284986: 1,834 of 1,834 (fields: prediction, lean_accepted, reference_valid, verifier_exit, certificate_sha256, parse_error); recurrence histograms identical: yes; largest difference in the logged loss history: 0.0.
All 1,834 item records (prediction, Lean verdict, checker exit code, certificate hash) are
identical to latent’s, across two torch versions on the same GPU model. An independent recount
(runs/e2/referee.md) confirms this. [exp]
4.2.7. What E2 says, and what it does not#
Independent re-check
runs/e2/referee.md: a separate script recounted every cell from the raw prediction files, and the reproduction of latent was checked record by record. Verdict: established as T4 evidence, that is, computational evidence from a small discovery run.
At this scale attention over depth does not beat latent’s recurrent decoder on Lean-checked
certificates, no arm gains detectably from more loops, and no arm generalises to the deeper
ood_depth problems. This is “no effect detected at this scale”, not evidence that attention residuals cannot
help: the models are tiny (width 64, 1,000 updates, 93 training identities), the ARLoop arms differ
from latent-recurrent in more than the residual (no adapter, PreNorm instead of sandwich norm),
they have no value residuals (registered in the protocol), which the paper’s App. A.1 and A.3 report
its sliding window needs, they follow eq. (4) of the paper rather than the released code’s first
block, and training uses a
random recurrence with truncated backpropagation, where the paper trains at a fixed \(R\)
(experiments/e2_small/RESULTS.md, “Caveats”). The tied-query arm is our own variant. Stage 1b trains
the same canary for longer (Stage 1: the same tests after more training).