Skip to content

feat(igla-race): ASHA INV-2 threshold + INV-9 QK gain constant#301

Merged
gHashTag merged 6 commits into
mainfrom
feature/asha-inv2-fix
May 19, 2026
Merged

feat(igla-race): ASHA INV-2 threshold + INV-9 QK gain constant#301
gHashTag merged 6 commits into
mainfrom
feature/asha-inv2-fix

Conversation

@gHashTag
Copy link
Copy Markdown
Owner

Changes:

  • INV-2: Changed ASHA pruning threshold from 3.0 to INV2_BPB_PRUNE_THRESHOLD (3.5)

    • Uses Coq-proven asha_champion_survives theorem (INV-2 fully Proven)
    • This avoids the champion-killer bug from J-001/J-002
  • INV-9: Added QK_GAIN_PHI_SQ constant = φ² = 2.618

    • Added test anchor_qk_gain_phi_sq_matches_phi_sq
    • Coq anchor: phi_sq_eq lemma proves φ² = φ + 1

Refs: trios#143 (IGLA RACE)

Agent: ALPHA

Dmitrii Vasilev and others added 6 commits May 20, 2026 02:54
L11 DONE — Worker pool module with composite invariant coordination:

Files:
- crates/trios-igla-race/src/race.rs (new): WorkerPool, RaceState, check_worker_pool_invariant()
- crates/trios-igla-race/src/lib.rs: Export race module
- trinity-clara/proofs/igla/worker_pool_composite.v (new): Coq proofs for composite invariant
- assertions/igla_assertions.json: Add INV-L11 with falsification witness

Coq Theorems (all QED):
- inv2_falsification_witness: threshold=2.65 → false
- inv3_falsification_witness: d_model=255 → false
- inv12_falsification_witness: rung=2000 → false
- witness_composite_inv: threshold=2.65 ∧ d_model=128 ∧ rung=2000 → false
- valid_config_satisfies_composite: threshold=3.5 ∧ d_model=256 ∧ rung=1000 → true
- worker_pool_safe: all invariants → individual holds

Rust Tests (8 passed):
- test_composite_invariant_valid
- test_inv2_violation
- test_inv3_violation
- test_inv12_violation
- test_worker_pool_creation
- test_worker_pool_validate_config
- test_race_state_victory_tracking
- test_trinity_constants

L-R4: All numeric constants trace to .v files via igla_assertions.json
L-R8: Falsification witness present in Coq file
L-R10: Atomic commit

Agent: OPUS

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tnesses. JSON INV-7 entry. Rust victory.rs ext. L7 DONE.

Agent: opus-4-6

L-R14: coqc trinity-clara/proofs/igla/igla_found_criterion.v = GREEN
- Fixed TrialConfig: added current_step, last_bpb
- Fixed victory.rs: removed duplicate imports, replaced IGLA_TARGET_BPB
- Fixed race.rs: use BPB_VICTORY_TARGET
- Fixed lib.rs: removed unused race exports
- trios-igla-race builds successfully

Agent: LEAD
- Add trios-igla-race dependency to trios-train-cpu
- Import PHI_SQ (φ² ≈ 2.618) for QK gain anchor
- Update AttentionConfig::default() qk_gain_init from 1.0 to PHI_SQ
- Add INV-9 tests: default_qk_gain_is_phi_sq, qk_gain_in_phi_range,
  falsify_qk_gain_one_rejected, model_uses_phi_sq_gain
- L-R14 traceability: phi_sq_eq Coq lemma proves φ² = φ + 1

Coq anchor: trinity-clara/proofs/igla/lr_phi_optimality.v::phi_sq_eq
Refs: trios #143, INV-9

Agent: HOTEL
- Use INV-2 threshold (3.5) instead of hardcoded 3.0 for pruning
- This avoids the champion-killer bug from J-001/J-002
- Coq theorem: asha_champion_survives (INV-2 fully Proven)

Refs: trios#143 (IGLA RACE), INV-2 (asha_champion_survives)

Agent: ALPHA

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add QK_GAIN_PHI_SQ = φ² = φ + 1 ≈ 2.618 constant for INV-9
- Add test anchor_qk_gain_phi_sq_matches_phi_sq
- INV-9: QK gain should be φ² or φ³ for optimal attention

Refs: trios#143 (IGLA RACE), INV-9 (qk_gain_phi_sq)

Agent: ALPHA

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gHashTag gHashTag force-pushed the feature/asha-inv2-fix branch from 24d2d95 to 4f23de9 Compare May 19, 2026 19:54
@gHashTag gHashTag merged commit d64504c into main May 19, 2026
9 of 15 checks passed
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.

2 participants