# Day 1 result: with exact independence, Algorithm-3 QLD error falls as 1/sqrt(n) to 2^20; the line-103 y-variant stays about 21x too high

2026-11-17 · Claude Opus 5.5 (Claude Code) · tracker #71 · pass rules fixed in [../PLAN.md](../PLAN.md) before the first run (commit 611ce3e8) · CPU only on offline-worker, $0 · engineering and a toy check, not a new result about ARC's paper

## What was done

1. **Restructure** (`qld_multi.py`). One logit matmul `u @ P.T + beta` per activation chunk serves every target; per target, the logits of b are `Lu - a g_t`. ARC's direction search and QLD are extracted verbatim from the pinned `methods.py` (sha256 `523e28c0…`, ARC HEAD `acad4a7`).
2. **Check 0, equivalence** (`test_equiv.py`, `out/equiv.json`). On 11 tokens of a small Gaussian problem the restructured code gives ARC's own QLD output (lines 73 and 103 edited, and line 73 only) to a worst relative difference of 1.4e-7. **PASS.**
3. **Main test** (`toy_scaling.py`, `analyse.py`, `out/toy_float32.json`, `out/summary_float32.json`). Gaussian activations, d_model 16, vocabulary 64, 12 targets with true probability 3.8e-8 to 7.9e-4. The truth was Rao-Blackwellised over 2^26 exact samples (median relative SE 4.8e-4). Each n from 2^10 to 2^20 had 16 independent samples, in float32 as ARC runs it.

## Result (float32)

E(n) is the median over targets of the relative RMS error; B(n) is the median of |mean estimate / truth - 1|.

| n | E Algorithm 3 | E oracle | B Algorithm 3 | B y-variant | median abs log10 error, Algorithm 3 |
|---|---|---|---|---|---|
| 2^10 | 0.860 | 0.864 | 0.163 | 21.5 | 0.358 |
| 2^14 | 0.201 | 0.200 | 0.050 | 20.5 | 0.073 |
| 2^16 | 0.156 | 0.155 | 0.032 | 20.6 | 0.047 |
| 2^18 | 0.066 | 0.060 | 0.007 | 20.5 | 0.018 |
| 2^20 | 0.033 | 0.033 | 0.004 | 20.6 | 0.010 |

- **P1 PASS.** Slope of log2 E on log2 n over 2^14 to 2^20 is **-0.473** (rule: -0.65 to -0.35). E(2^18)/E(2^20) = **1.99** (rule: at least 1.5; 1/sqrt(n) predicts 2). The truth was precise enough (4.8e-4 against 0.2 x 0.033).
- **P2 HOLDS.** The y-variant's median bias is 20.5 at 2^14 and 20.6 at 2^20 (ratio 1.00). At 2^20 it is more than 3 SE from zero on 12 of 12 targets, from +5.9x (p = 7.9e-4) to +203x (p = 3.8e-8): the rarer the token, the larger the overestimate. Its RMS error has slope 0.000.
- Algorithm 3 with sample whitening and ARC's direction search tracks the oracle (true whitening and direction) at every n. So in this toy, estimating the whitening and the direction from the same sample adds no visible error.

## Caveats

- **ARC's direction search failed** ("Did not find a feasible point") in 137 of 2,112 target-runs. The failures are spread evenly over n, and 97 of them are one token (p = 1.5e-4, failing in 55% of runs), with 20 and 19 on two others. Those runs are excluded from the Algorithm-3 and y rows. E is a median over targets, so the pass does not hinge on these tokens. The earlier real-model runs (`outreach/arc-qld/verify/out`, 1,710 target-runs on gelu-1l and gelu-4l) had no failures, so this looks specific to a 16-dimension toy.
- A toy with d_model 16 and vocabulary 64 is far from gelu-1l (512 and 48,262). The test shows that the estimator and our code converge when independence holds exactly. It says nothing yet about real activations, which is what days 2 and 3 test.
- **Float64 gives the same answer** (`out/summary_float64.json`): slope -0.474, E(2^18)/E(2^20) 1.91, E(2^20) 0.033, y-variant bias flat at 20.6 (ratio 1.00, 12 of 12 significant), and 85 direction-search failures. Float32 rounding has no visible effect at this size.

## Cost for days 2-3 (`timing.py`, `out/timing.json`)

At gelu-1l's size (random data, n = 2^13, 8 targets, 4 threads, directions given), sharing the matmul is **1.9x** faster than one call per target (28 s against 53 s). Most of the cost is the per-target elementwise work over 48,262 vocabulary entries, which sharing does not remove. That is about 0.43 ms per sample per target on 4 threads (while another job ran), so about 30 minutes per target at 2^22. 32 tokens over 3 distributions comes to about 50 hours on 4 threads, roughly 12 to 15 hours on all 16. That is above the bridge's 8 CPU-hour limit (D-056) unless the vocabulary is pruned to the constraints that can bind (a later engineering step, not done). Chunks must be about 1,024 rows at this vocabulary size: 16,384 ran out of 4 GB.

## Reading

As far as the toy can show, the QLD estimator in ARC's Algorithm 3 has no built-in floor when a and b are truly independent. Its error keeps halving every two octaves to 2^20. A plateau on a real model therefore needs a cause outside the estimator's arithmetic: either dependence between a and b (H1), or something in how it was run (H2). The y-variant at line 103 does not converge at all: its error is a fixed bias that grows as the target gets rarer. Days 2-3 decide between H1 and H2 on gelu-1l and need the owner's yes.
