feat(format): linear-probe-classifier-v1 + model-family-parity-v1 9-gate PARTIAL discharge#1382
Closed
noahgift wants to merge 2 commits into
Closed
feat(format): linear-probe-classifier-v1 + model-family-parity-v1 9-gate PARTIAL discharge#1382noahgift wants to merge 2 commits into
noahgift wants to merge 2 commits into
Conversation
…ate PARTIAL discharge Bundles two sister contracts in one verdict module: linear-probe-classifier-v1 (FALSIFY-PROBE-001..004): - PROBE-001: encoder weights byte-equal before/after 100 training steps - PROBE-002: softmax sums to 1 within 1e-6 AND every value > 0 - PROBE-003: trainable_params == K * d_model + K (overflow-safe) - PROBE-004: embedding bit-determinism across calls (ULP-strict) model-family-parity-v1 (FALSIFY-PARITY-001..005): - PARITY-001 + 002: enum and YAML registry sets are equal - PARITY-003: from_model_type round-trips for every (str, variant) - PARITY-004: display_name() is non-empty for all variants - PARITY-005: is_llm() classification matches contract per variant ## Five Whys 1. Why bundle these two contracts? Both are 4 + 5 gate sister contracts in the model-architecture / family-registry coverage band. One verdict module captures both without provenance pin overhead. 2. Why does this block ship? Coverage % cannot move while peripheral probe-classifier and model-family-registry contracts are unbound at PARTIAL_ALGORITHM_LEVEL. 3. Why a 3-tuple `(model_type, expected, actual)` for PARITY-003 vs a simple `(actual, expected)` pair? The contract is testing the round-trip dispatch, not just an equality check; including `model_type_str` makes the test assertion debuggable when a future YAML rename breaks the dispatch. 4. Why HashSet equality for PARITY-001+002 vs sorted-vec? Family names are unordered identifiers; sorted-vec equality would impose a declaration-order constraint the YAML doesn't actually require. 5. Why a strict `> 0.0` for PROBE-002 not `>= 0.0`? Sigmoid / softmax saturation produces exactly 0.0 — `>= 0.0` would let the regression class pass. Strict `> 0.0` catches numerical underflow exactly as the contract intends. Adds 28 unit tests including 11-bucket softmax band sweep on PROBE-002 and 4-shape param-formula sweep on PROBE-003. Realistic-healthy walks a complete 9-gate Pass; pre-fix walks 9 simultaneous regressions (gradient leak, sigmoid underflow, extra params, embedding ULP drift, orphan registry, dispatch dropout, empty display name, audio-as-LLM, LLM-as-non-LLM). No runtime % shift; algorithm-level coverage advances by 9 gates.
cabda0e to
8440233
Compare
Contributor
Author
auto-merge was automatically disabled
May 12, 2026 09:21
Pull request was closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bundles two sister contracts in one verdict module:
linear-probe-classifier-v1(FALSIFY-PROBE-001..004): encoder frozen, softmax valid, K*d+K param count, embedding determinismmodel-family-parity-v1(FALSIFY-PARITY-001..005): enum↔YAML symmetry, round-trip, display_name nonempty, is_llm classification28 unit tests including 11-bucket softmax sweep + 4-shape param formula sweep.
Algorithm-level coverage advances by 9 gates; runtime ship % unchanged.
Gates bound
trainable_params == K * d_model + Kfrom_model_type(str)round-trips for every variantdisplay_name()is non-empty for all variantsis_llm()classification matches contractFive Whys
See commit message — captures HashSet vs sorted-vec, 3-tuple vs pair for round-trip, and strict
> 0.0for softmax saturation.Test plan
cargo test -p aprender-core --lib probe_parity— 28 passed🤖 Generated with Claude Code