Skip to content

research: Qwen M3a-1 in_proj of one head as a linear claim on the committed weight table (#229 sub-step c) - #242

Draft
wakesync wants to merge 9 commits into
mainfrom
research/1129-qwen-m3a1-inproj-229
Draft

wakesync wants to merge 9 commits into
mainfrom
research/1129-qwen-m3a1-inproj-229

Conversation

@wakesync

@wakesync wakesync commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Part of #229

Sub-step (c) of issue #229: the in_proj outputs of one Gated DeltaNet head of Qwen3.8-27B (layer 0, V head 0) for ONE token, proved as a linear claim on the committed weight table of PR #231, with the layer's normed input public. Research harness, CPU only. Draft, not for merge by this lane.

This branch conflicts with main and needs the coordinator. Main moved during the lane (PR #224 added a research/results.yaml row; both it and this branch append at the end of that file, so the generated README and CLAIMS rows collide too). fp_merge_main.py aborted on conflicts in CLAIMS.md, README.md and research/results.yaml. Per the lane rules nothing was resolved by hand. No CI run is listed for the last two commits; claims-check and host-path-guard were green on the five commits before them. The same checks pass locally on the head.

What was built

  • The composition, read from the source and then built. LIN's first part already sends W = g^T M as an oracle message and ties it to the table at a point drawn afterwards. blocks/iop/lin.h says a caller may add its own claims to the request's own group before the chain is sealed. So the public input is applied by ONE extra linear claim on W: sum over j < 5,120 of a_j W[j] = v. No sumcheck over the column index. This is what the reviewer of PR research: Qwen M3a-1 weight side, committed head-0 weight table and cell tie (#229) #231 suggested checking (nonblocking 5 of research: Qwen M3a-1 weight side, committed head-0 weight table and cell tie (#229) #231 (comment)).
  • Row weights g = eq(rho, .) over the 514 in_proj rows, rho drawn on the trace chain after the output cells are committed, with the table's name and the input in that chain's first query.
  • 1,028 committed output cells (x_r and rem_r for all 514 rows: q, k, v, z 128 each, a and b 1 each) in exact classes by bits.
  • New directory research/operators/qwen_m3a1c/ only. No existing source file is changed. One coverage row (OP-R21) and one results row.

The statement

For every one of the 514 rows: sum_j a_j M[r][j] + 2^(s_r - 1) = 2^(s_r) x_r + rem_r as an equation in the field, M the committed table, a public, x_r in [-2^23, 2^23), rem_r in [0, 2^(s_r)).

Verdicts (measured, unreplicated, one shared host, research setting)

item result
honest proof, prover seeds 1..5 5 of 5 accepted
9 registered negative tests 9 of 9 rejected
2 registered completeness cases (x at both class edges) 2 of 2 accepted
the program's integer outputs equal the numpy script's 5 of 5 honest runs
N6, added by amendment A2 AFTER the registered results were known (the prover fits W so the caller's claim is true) rejected; not part of the registered threshold

Where each negative test was refused, with source lines: experiments/20261129-229-qwen-m3a1-inproj/RESULTS.md. Two of the nine (another key; the input changed after the proof) are refused by transcript binding, not by the claim; their twins with a matching transcript are refused by the claim.

Measured, n = 5: prove median 1.009 s (0.969 to 1.122), verify median 0.104 s (0.103 to 0.110), table commit median 3.607 s, peak RSS median 488,424 kB; 20,178 product columns, 39,328 relations, table length 2^15.

What is and is not bound

  • The 2,631,680 in_proj weights (table rows 1..514, columns 0..5,119) now take part in a proved equation: the committed table fixes them and the outputs are tied to them and to the public input.
  • Their range is still NOT proved. No Qwen layout of the WF range proof exists and none was built. The equation is therefore the integer rounding only for a table of small integers. Three of the registered cases (N4a, C1, C2) use tables with entries far outside any weight class on purpose; the proof accepts such tables and judges only the class of the output.

NOT established

  • Any soundness level: the trace runs at target 10 bits; LIN runs on hand-made unpriced plans.
  • Any head computation after in_proj (conv, norms, gates, recurrence, out_proj). One token, one head, one layer.
  • Accuracy: the public input is a float64 norm of one embedding row rounded at 2^5, a choice of this step.
  • Hiding; that the table is the advertised checkpoint; independent replication.

Deviations

  • Amendment A2 added a negative test after the 16 registered results were seen and after its outcome on the synthetic fixture was known. It is reported separately.
  • The 16 registered runs and the A2 run used two builds of the program (hashes in ENV.json); neither was rebuilt from its commit to confirm.
  • The two amendment headers carry times a few minutes later than their commits; the order (each before the run it covers) is as stated.
  • Input preparation (hash checks, two 10,240-byte fetches, the numpy reference) ran before amendment A1's commit; it makes no proof.

Open risks

  1. A priced plan for this composition needs a change to an existing file. blocks/frame/lin_frame.h plans a request's own test with exactly 2 + 3 x samples batched claims and BAT ends the process on another count. Here one hand-made plan in the new file has 6. Read, not run.
  2. This use of LIN (a caller's claim on W, one request, the request's mask entry at coefficient 0, a forced extra evaluation claim) is not exercised by upstream tests.
  3. The 10 / |E| argument for the tie is this lane's own and is not reviewed.
  4. LIN's first chain is joined to the trace chain by values in its first query, not by the trace chain's seal (as PR research: Qwen M3a-1 weight side, committed head-0 weight table and cell tie (#229) #231).

Proposed claim, for the ledger row qwen-m3a1-inproj: as the row's summary states, nothing stronger.

Must merge with a merge commit (it adds results.yaml metrics that point at this branch's commits).

Conflicts: research/results.yaml, README.md, CLAIMS.md. results.yaml is main's file plus this PR's own entry (qwen-m3a1-inproj), unchanged and appended at the end. README/CLAIMS take main's side here and are regenerated in the following commit after the merge makes the metric commits available in branch history; README stamp is main's verbatim.
…9d2b

scripts/update-results.py after the merge commit (77 results); stamp line kept as main's verbatim. Adds this PR's row for qwen-m3a1-inproj to the README block and CLAIMS.md on top of main's; no other change.
@wakesync

Copy link
Copy Markdown
Owner Author

Main sync: merged main fef9d2b800b49a2d3eefb45dda82c58474cc25d4 into this branch with a merge commit. Old head 5194cc251d2cc68bf1110743c8ecee088afb9800, new head 276303fd54039fcf76c1c9accc4c85512a157e10 (fast-forward: merge commit a2912fc plus a separate README/CLAIMS regeneration commit 276303fd).

Conflicted files: research/results.yaml, README.md, CLAIMS.md, nothing else (research/coverage/inventory.yaml merged cleanly). research/results.yaml is main's file byte for byte plus this PR's own entry qwen-m3a1-inproj, appended unchanged: removing that entry gives main's file (sha256 05338b46...af1fa0 both), the entry is byte-identical to the old head, and the 77 ids are unique. README and CLAIMS are regenerated; each differs from main only by this PR's one row, and the README stamp line is main's verbatim.

All 23 files under experiments/20261129-229-qwen-m3a1-inproj/ and the 6 other paths this PR changes (research/coverage/inventory.yaml, research/operators/qwen_m3a1c/*) are byte-identical to the old head; the other 3824 experiments/ paths are byte-identical to main. update-results.py --check, check-claims.py, check_inventory.py and the host-path guard all pass on the merged tree. The PR is still a draft.

@wakesync

Copy link
Copy Markdown
Owner Author

APPROVE at 276303f

class A, Opus review, same vendor family as the author, second family not available; this verdict does not by itself allow a merge

Reviewer: review lane review242-opus, claude-opus-5-5. The build lane ran on claude-fable-5-2 (same vendor family) and the sync lane on claude-opus-5-5. I reviewed this as if no one else will look at it.

What I checked myself, with counts

  • History (check 1). 9 commits on the PR, no force push (8 pushes in the branch activity log, each starting from the previous head). The first commit 8ce5788 adds PREREG.md and nothing else. The four PASS conditions and the nine negatives are in the PREREG as first committed. Real order from commit times and run files: A1 and the code committed at 02:34:57; first registered run started 02:35:14, last 02:36:31; runs committed at 02:38:22 (be7f1ff); A2 committed at 02:40:32; N6 run at 02:40:52. So the header times (02:36, 02:42) are 1 to 2 minutes late, and the order is as the text says. No threshold moved. The 16 registered run files and summary.json are unchanged from be7f1ff to the head (only the N6 file and summary-a2.json were added). Between f89780a and the head, qm3a1c.cpp changes only by the N6 code and one comment.
  • The statement in the code (check 2, worry a). I read it in qm3a1c.cpp, lin.h, lin_world.h and bat.h. The argument is written out below. Shifts 13 / 14 / 14 / 16 (qkv, z, a, b) equal the exponents in the merged weights-head0.json, and s_T = e_T matches DESIGN 5.0. The classes are exact by bits: x in [-2^23, 2^23), rem in [0, 2^s). Rows 1..514, columns 5,120 and up of the real M are all zero (I counted 0 nonzero).
  • The plan (check 3, worry b). second_plan() is lin_world()'s second-chain plan with one change: the BAT row count goes from 2 + 3 to 3 + 3. The stages, the 12 draws, the choice and the masks-ahead flag are the same, and the first and shared plans are the library fixture's, unchanged. Every round is Priced::NOTHING in both versions. It weakens no other check: (Dot), (Fold), FOLDEQ and the trace chain run the same code on the same plans. Since nothing is priced, there was no error bound to weaken in the first place. Every surface (RESULTS, README, results row, inventory note, PR body, issue comment) says there is no soundness level.
  • Reproduction (check 4). I built qm3a1c.cpp from the PR head with the README's flags in a private /tmp directory, through the heavy gate, on 6 cores. I did not use the lane's binaries. I reran all 16 registered runs plus N6 on the lane's data, read in place. In 17 of 17 runs, every field I compared equals the committed run file: verdict, all three reason strings, outputs_match_reference, columns, relations, and trace and LIN proof bytes. One caveat: the 16 were rerun with the head binary, which contains the N6 code, and not with a rebuild of f89780a.
  • Input hashes (checks 4, 6). I computed the SHA-256 of a.i32, M.i32, ref.i64, the embedding row of token 760 and input_layernorm.weight. All five equal runs/inputs-head0.json. The embedding row and the norm weight equal the merged fetch-stock.json entries for token 760 and for layer 0, and M equals M_i32_sha256 of the merged weights-head0.json.
  • Independent arithmetic (check 6). I wrote my own script, not prepare_input.py: pure Python integers, my own BF16 decode, the norm and the RNE rounding. I recomputed a from the two fetched rows: SHA-256 equals 8ff01091..., 0 of 5,120 entries differ, |a| max 1,069, 4,988 nonzero. I then recomputed the 514 (x, rem) from M and a: SHA-256 equals ref.i64's f95e57db..., and x lies in [-610, 1,780].
  • My own negative (check 5, reviewer result, private patched copy, the PR's file not changed). The patch adds one static vector. When it is set, the verifier's caller claim on W (input_row in lin_check) uses it in place of the bound a. Everything else is left as it is: trace, table, the tie, the transcript binding of the original a, and the proof made for the original a. Results:
    • R0 (override equal to a, a control): accepted.
    • R1 (a[j0] one unit closer to zero, only in that claim): REJECTED. The trace was accepted, and the reason is "LIN second part: the proximity test on the request's own group (Eval, the public input on W, Dot)", from lin_second_tests_verify at qm3a1c.cpp line 342.
    • R2 (a[j1] changed by one, same setup): REJECTED, same line.
    • A second patch, for a control: a flag that drops the caller claim on both sides and puts the plan back to 2 + 3. With it, the honest proof was accepted, and N1a's cells (x off by one) were ACCEPTED. So, for N1a, the extra claim is the only thing that refuses.
  • Wording (check 7), on RESULTS, PREREG, the operator README, the inventory row, the results row, the generated README and CLAIMS rows, the PR body and issue comment 7249773825. Every one says: one token, one head, one layer; nothing after in_proj; no accuracy claim; unreplicated; the table is not shown to be the advertised checkpoint; no soundness level. The row and RESULTS write "IN THE FIELD" and say the range is not proved. Neither says "computes" or "inner product" without that qualifier.
  • Ledger and hygiene (check 8). update-results.py --check, check-claims.py, check_inventory.py and check-no-host-paths.sh (no rev) all exit 0. The scrub gives total_matches=0 on all 32 changed files, the commit messages, the PR body and the issue comment. The row has pr: 242. Its metrics equal summary.json / summary-a2.json at the cited commits. The three ledger files differ from main only by this PR's row.
  • What may not be in the repository (check 9, worry h). runs/inputs-head0.json and the run files hold hashes, shapes, counts, verdicts and timings. They hold no weight or input values.
  • The sync (check 10). The experiment and operator directories are byte-identical to 5194cc2. No other experiments/ path differs from main fef9d2b. results.yaml differs from main's only by this PR's appended row.
  • Process (check 11). I read the lanes' STATE and RESULT files after forming my view; details below.
  • Main (check 12). origin/main is still fef9d2b, so no merge-tree was needed.

Worry a: what an accepting verifier has checked (from the code)

  1. Trace chain. Its first query binds the relations, the verifier's own table name (root and record of the key it holds) and the verifier's own a (trace_bind). The product oracle root is then sent; it commits x, rem and the bits. Only after that root and PSC does the verifier draw rho (10) and psi2 (13) from its own transcript (close_algebraic(R_JOIN) in trace_decide). So a is absorbed before g = eq(rho, .), and the cells are fixed before rho.
  2. The tie row is the verifier's. It reads v, then adds tie_row(o, rho, v): units on the committed oracle cells, x_i at column i and rem_i at column 514 + i, with coefficients eq(rho, 1 + i) 2^(s_i) and eq(rho, 1 + i). Its target is v plus a constant the verifier computes. The right-hand side comes from committed cells, not from values the prover supplies. The proximity test then checks it.
  3. LIN's first chain. lin_check gets rho, psi2 and v from the verifier's own trace verification (vt) and a as the verifier holds it. All of these, and the table name, go into LIN's first query before W is sent. The row weights g are built by the verifier from rho. The caller claim sum_{j<5120} a_j W[j] = v is built by the verifier from its a and v and added to first.own before the seal. The prover chooses only W and t.
  4. W is tied to the table. (Dot) <g, Omega> = W at psi* is checked with psi* drawn on the shared chain, which sits after the first chain's seal through the binding tree. Omega is tied to the folded row by (Fold), and the folded row to the table's key by FOLDEQ (the one-time test). So W = g^T M, except for a bad psi*, since W is fixed before psi*.
  5. Putting it together. sum_r eq(rho, r) (u_r + 2^(s_r - 1) - 2^(s_r) x_r - rem_r) = 0, with u_r = sum_{j<5120} a_j M[r][j]. The vector in the brackets was fixed before rho, so each of the 514 rows satisfies the field equation, except with probability 10 / |E| in the idealised argument.
  6. (Eval) uses t, which the prover chooses, at psi2. It is a true statement about any W once t is picked to match, so it adds nothing and takes nothing away.

I found no link that the prover chooses and could use for a cheat. The N6 run and my R1 and R2 runs agree with this reading.

Worry c: what the negatives test

N1a, N2b and N3b are built so that the trace is consistent with itself, W is the honest g^T M, (Eval) and (Dot) are true, and the caller claim is false. They are the 3 of 9 registered negatives that test the new claim. That this claim is what refuses is true by construction for all three, and my drop-the-claim control shows it directly for N1a; I did not run that control for N2b or N3b. The other six registered negatives test other things:

  • N1b, N4a and N4b test the trace and the classes (refused at BASE).
  • N2a and N3a test transcript binding (refused at the nonce).
  • N5 tests admission.

N6 (added later) tests LIN's tie of W, on which the claim relies. The PASS rule as first committed is met. It means something for the new piece through 3 cases of the same pattern, not through 9.

Must-fix

None that touches the statement, the runs or the wording.

Nonblocking

  1. Merge condition, not a change to this PR's content. research/coverage/inventory.yaml line 381 adds OP-R21, and PR research: M3a-1 weight side on layer 17, stock vs abliterated (#238) #244 (head 1d6b2ca, not merged) adds OP-R21 at the same place. check_inventory.py refuses a duplicate id, so whichever PR lands second must be renumbered (OP-R22) before its merge.
  2. RESULTS.md line 76 cites N6 as evidence ("or a changed output (N1a, N6) is refused") in the bounds section without saying it was added after the results. The plain-words paragraph (line 9, "Every negative test was refused") also counts N6 implicitly. The tables and the row keep it apart correctly.
  3. On the reader's first surface (the README block row), the row says the range is not proved, but not that a table with entries far outside any weight class is accepted (C1, C2). That is stated only in RESULTS and in a metric note. Adding one clause would close it.
  4. lin_own_test_claims is printed as a hard-coded 6 (qm3a1c.cpp line 376), and RESULTS lists it in the "Measured" table. It is in effect enforced, because BAT's require_rows would end the process on another count. Still, it is a constant, not a measurement.
  5. DESIGN section 6 writes the range check as |x| < 2^23. The PR registers and builds [-2^23, 2^23), and C2 accepts x = -2^23. This is registered and harmless here, but it is a different edge from DESIGN's wording.
  6. The PR body and the issue comment still say the branch conflicts with main and that CI is missing on the last two commits. Both are stale since the sync (the PR is CLEAN and CI is green). The coordinator may want to refresh the body.
  7. f0ac5e1 also changed run_registered.py and summarise.py after the 16 runs. The change is additive (the a2 mode and the output name), and the 16 rerun identically with the head scripts.

Main sync needed: no

Main is fef9d2b, and the PR is CLEAN against it.

CI

From the check-runs API at 276303f: guard completed success, claims completed success.

Skipped checks

None skipped. Partial items:

  • I rebuilt from the head only, not from f89780a or f0ac5e1, so the lane's two binary hashes are still not confirmed. The verdicts and proof byte counts match anyway.
  • My drop-the-claim control was run for N1a only, not for N2b or N3b.
  • Of PR research: Qwen M3a-1 weight side, committed head-0 weight table and cell tie (#229) #231's two review comments, I read only the one this idea comes from (7059688619, nonblocking 5). It proposes exactly this composition and notes that committed output cells and their tie are needed, which this PR builds. I did not read the other one.

What a second reviewer should look at first

The joining of LIN's first chain to the trace chain by values in its first query (rho, v, a, the table name) rather than by the trace chain's seal. Together with the 10 / |E| argument, this is the only part of the composition that is new and not exercised by the library's own tests.

For the person deciding on a waiver

What a merge would put on main: a new research operator directory (research/operators/qwen_m3a1c), one experiment directory, one inventory row and one results row. Together they show, on a CPU research harness, that for ONE token, ONE head and ONE layer of the stock Qwen3.8-27B, 514 committed output cells are in their classes and satisfy the in_proj rounding equation in the field against PR #231's committed table, with a public input. The verdicts rebuild from source exactly, and a verifier whose input differs by one unit in one coordinate refuses.

What it would NOT establish:

  • any soundness level (LIN's plans are hand-made and unpriced; the trace runs at 10 bits);
  • that the table's entries are small integers, so the equation is integer rounding only for an honest-looking table (this proof accepts tables that are not weights);
  • anything after in_proj, more than one token, or accuracy;
  • that the table is the advertised checkpoint;
  • replication.

What I am least sure of: that the argument in this review, and the lane's own, holds once it is compiled. The tie's 10 / |E| bound and the chain join are reasoned by two models of the same vendor family and by nobody else. A priced version would need a change to blocks/frame/lin_frame.h, which nobody has designed yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant