Repository navigation
State safety: divergence given perturbation, by onset (perturbation.py) - #162
Conversation
For each pair of runs, a prompt is perturbed when its outputs are not bitwise identical, and its onset is the first output index where they differ. The script reports, overall and by onset bucket (0-31, 32-127, 128+), the share of perturbed prompts whose tokens diverge (Wilson 95% interval), the median onset, and token divergences per 1,000 post-onset positions. analyze_all.sh runs it on both run roots.
perturbation.py at 187995e on the existing runs (no new GPU run): python perturbation.py --runs ~/vp-data/state/runs --pairs pairs.json and --runs ~/vp-data/state/runs_pinned --pairs pairs_pinned.json. About half of the perturbed prompts diverge in tokens whatever perturbed them, in the 0-31 onset bucket that holds nearly all of them; post-onset rates 3.5 to 4.1 per 1,000.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Verdict: REQUEST CHANGES (6793e90; 1 blocking. The method and numbers are right, but two sentences generalize past the pairs.) What checks out
Blocking
Optional
|
…list the exceptions Review of #162: the conditional rate is not the same for every source of perturbation. The README now limits the conclusion to MTP against plain decoding beside the cap-8 and cap-16 floors, in the 0-31 onset bucket, and lists the pairs that differ with their numbers, among them the unexplained deterministic + verify KV-split pair (28/96, 0.29). The output may end before 256 tokens, and at c32 speculation also perturbs some prompts from the prefill.
|
@codex review |
|
Verdict: APPROVE (provisional, on 53020c7: Codex has not reviewed this head yet. I will confirm once it does.) 53020c7 changes only the README section, and it resolves my item.
Nit, optional: the lowest share among "the other pinned pairs" is 152/320 = 0.475 (MTP s5 c1 vs c32), which conventional rounding makes 0.48. "0.47 to 0.55" is fine as a range that contains it. |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Verdict: APPROVE (confirmed on 53020c7) This confirms my provisional approval. Codex found no issues on this head (20:37 UTC). |
The editor shortens Table 1, Table 2, Section 3's accumulation lemma, the kernel checks, Section 2.5 and Figure 5 in the main text; their full versions land here in the same milestone as those cuts: - A.1: the full numerical-assumptions table, verbatim, as tab:assumptions-full; - A.3: the statement of Lemma lem:tree before its proof, the sentence on what the tree's shape distinguishes, and that the conservative model covers the Hopper model's gamma about sixfold; - A.8: the outlier-column, PCA and centring results (selfevidence-csv, stats) and the gather-size sentence that #160 dropped, traced to selfevidence_plain4b.json's batch unions (9.45 and 12.51 entries on steps with 5-8 and 9-16 positions); - A.9 (new, app:kernel-checks): the per-variant self-test, runtime probes and tests, the measured int8 TMA violation and the seven-build version pattern that matches triton-lang/triton#9433 (kernel-impl, kernel-tma, triton-tma); - C.5: the capture prompts' datasets and domains from prompt_manifest.csv; - C.7: the full transport table, verbatim, as tab:transport-full; - E.8: Figure fig:frontier with its detail (four of nine arms, 3.45x per-request rate, 0.98x and 0.86x, run-to-run variation), and the divergence-given- perturbation result of #162 with its intervals and exceptions, cited through a new register entry state-perturb. The app-scope glossary terms "Capture and replay", "Certified row" and "Enclosure" go: the main-text block now defines them. Built alone, the branch shows lem:tree and fig:frontier defined twice; the editor's cuts remove the main-text copies in the same push. Checker clean.
The main text now explains the method in plain operations before its machinery, and separates method from measurement: - Introduction: what a verifier uses from the head, the method as four operations (approximate, bound, refine, fall back), why the reference must be the engine's own kernel (with a marked hypothetical BF16 tie), transport in one paragraph, and shorter contributions. - Section 2 defines vocabulary entry, position and batch shape, keeps the references, the gap condition and the interval form, and is the one place that explains the error models and the fallback. Table 1 is a short one-column table; the full table is Appendix A (tab:assumptions-full). Section 2.5 keeps the headline divergences and the scoped perturbation result (#162); the rest is in Appendix D. - Section 3 is the method: the error bound (Lemma tree now stated in Appendix A), the refinement as five steps, sampled decisions, the kernel and its checks (TMA detail in Appendix A.9). - Section 4 is the measurement: setup, candidates, fallback and agreement, and the head-only runtime with its committed cause (kernel-micro). - Section 5 keeps the transport argument; Table 2 is a two-drafter summary (full table in Appendix C) and Figure 4 is placed at the section start. - Section 7 consolidates the limitations; the stock serving frontier keeps two sentences and its figure moves to Appendix E. "Row" now means a row of W only in mathematics; prose says vocabulary entry for rows of W and position for head inputs.
How much of a divergence rate is "how many prompts were perturbed" and how much is "how often a perturbed trajectory flips a near tie"? The ratios to the floor in Appendix E (1.15 times at cap 16, about six times at cap 8) depend on the first. This PR measures the two separately, conditioned on when the perturbation starts.
Code
experiments/state_safety/perturbation.py(187995e), run byanalyze_all.shon both run roots:compare.py).compare.py'sfirst_difference).tests/test_state_safety_perturbation.py.Evidence (
6793e90, from existing runs, no GPU; README scoped in53020c7)perturbation.json(first matrix) andperturbation_pinned.json. Summary inevidence/state_safety/README.md, "Divergence given perturbation":Checks
tests/test_state_safety_perturbation.pyandtests/test_state_safety_compare.py: pass. pre-commit (ruff, mypy, shellcheck, codespell, host-identity guard): pass.missing_pairs, empty groups givenull), output written via temp file and rename.Appendix holds its "derived" floor sentence until this merges, then folds it citing the README.
Review
53020c7. The conclusion is scoped to speculation against the floors, all ranges are given, and the deterministic + KV-split pair is named as unexplained. Also taken: "within the generated output (up to 256 tokens)" and "at c32 also from the prefill (36-63 prompts at output index 0)".