Skip to content

feat(unified): add opt-in unified_v13 (feydy_atomic) solving both 256-byte ByteGAN stretch tasks with 0 regressions - #644

Merged
martyn merged 3 commits into
developfrom
feat/unified-v13-bytegan
Nov 24, 2026
Merged

martyn merged 3 commits into
developfrom
feat/unified-v13-bytegan

Conversation

@martyn

@martyn martyn commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Research Question

Can an unchanged, strictly recipe-owned global extension of unified_v12 solve both zero-sigma 256-particle discrete byte codebook stretch benchmarks (bytegan_hypercube8 4k steps and bytegan_bigan_dictionary 6k steps) in an exact 1-to-1 bijection without editing any frozen task/adapter/scorer, adding Recipe fields, breaking clock-freedom or zero-autograd.grad/SVD/eigh/pinv invariants, or regressing any existing Tier 1–2 task or high-res Conv2d speed?

Answer: Yes. Opt-in preset unified_v13 (rhbi_self_coupling="feydy_atomic", single-field delta from unified_v12, zero new Recipe fields) passes both ByteGAN benchmarks (0/2 -> 2/2 PASS, 5/5 terminal checks each) while preserving strict 0.000e+00 bit-exact metric parity across all 41/41 matched non-ByteGAN regression tasks and zero latency/VRAM overhead on dcgan_performance_r256.


Matched RTX A6000 Results (seed = 0, Python 3.15 / PyTorch 2.15, Source bed1d3cdeaa7)

1. Target Benchmarks: ByteGAN 256-Byte Bijection

Task unified-v12 (Control) unified-v13 (Candidate)
bytegan_hypercube8 (Tier 2 Stretch, 4k steps) FAIL (0/5 · 0/24) · valid_unique=139/256 (raw=154), coll=102, vfrac=0.8555, rms=0.0875, mass_tv=0.3848 PASS (5/5 · 18/24, first pass @834) · valid_unique=256/256 (raw=256), coll=0, vfrac=1.0000, rms=0.0445, max=0.1640, mass_tv=0.0000 (173.9s, 15,431.8 J)
bytegan_bigan_dictionary (Tier 4 Stretch, 6k steps) FAIL (0/5 · 0/24) · fwd=177/256, recon_exact=0/256, recon_rms=0.8769, enc_bij=152/256, enc_cyc=88/256, rms=0.1416 PASS (5/5 · 20/24, first pass @1250) · fwd=256/256, recon_exact=256/256, recon_rms=0.0124, enc_bij=256/256, enc_cyc=256/256, enc_dist=0.0330, rms=0.0040, mass_tv=0.0000 (251.6s, 23,026.5 J)

2. Full Matched Regression & High-Res Conv2d Summary

Evaluation Cohort (Matched Same-Cohort RTX A6000, seed = 0) unified-v12 Control unified-v13 Candidate Net Delta
Target: ByteGAN Stretch (2 tasks) 0 / 2 PASS 2 / 2 PASS +2 PASS, 0 reg
Brief Suite (43 tasks: ByteGAN + 16 T1 + 24 Key T2 + r256) 38 / 43 PASS 40 / 43 PASS +2 PASS, 0 reg
All Matched Live Control Pairs (44 tasks) 38 / 44 PASS 40 / 44 PASS +2 PASS, 0 reg
Matched Non-ByteGAN Regression Parity (41 tasks) Baseline 41 / 41 bit-exact (max_abs_diff == 0.000e+00) 0.000e+00 drift
Full Measured unified-v13 Suite (51 tasks: all 49 T1–2 + BiGAN + r256) — 47 / 51 PASS (0 ERROR / TIMEOUT / BLOCKED) 7/7 extra T2 PASS
Solo Uncontended GPU 0 dcgan_performance_r256 41.11 ms (p95 42.77, 1147.65 MiB alloc / 1188.00 MiB res, 536.4 J) 39.94 ms (p95 40.63, 1147.65 MiB alloc / 1188.00 MiB res, 514.2 J) -1.18 ms, 0.00 MiB

Honest same-cohort disclosure: On this Python 3.15 / PyTorch 2.15 RTX A6000 cohort, both matched live unified-v12 and unified-v13 record bit-exact identical FAIL curves (0.000e+00 diff) on model_ddgan_bimodal_chain, model_ae_ddgan_bimodal_chain, interp_img_patch_shift, and interp_saddle_barycentric.


Recipe-Owned Mechanism (particlegan/)

Strictly opt-in via rhbi_self_coupling="feydy_atomic" (get_recipe("unified_v13")), general/task-agnostic (zero hardcoded 256 / {-1,+1}^8 / byte constants), clock-free, deterministic, zero autograd.grad / SVD / eigh / pinv, and fully checkpointed via opt_d.record:

  • Scale-invariant discrete-atomic support gate (particlegan/_t1_coupling/atomic.py:compute_discrete_atomic_gate): distinguishes finite K >= 2 discrete atomic supports (exact duplicate draws separated by an empty annular gap) from continuous 1D/nD densities, manifolds, and point masses across 6+ orders of scale.
  • Persistent 1-stays / surplus-moves bijection ledger (update_atomic_ledger, compute_atomic_quotas): pins closest particle(s) per discovered chart under deterministic Hamilton quotas (exact unit quotas whenever M == K) and routes only surplus duplicates to nearest deficit charts with zero-radius Born-Infeld commitment and non-splitting streaming charts.
  • Discrete atomic thermal residual: holds thermal cooling open while any particle is unassigned or uncrisp relative to inter-atom spacing, cooling smoothly to 1e-6 once settled.
  • Joint BiGAN inverse codebook contraction (split_joint_table_pair, match_inverse_atomic_targets): contracts encoder outputs E(x) toward each real atom's assigned latent particle code inside joint_relativistic_loss with zero extra forward passes.

Scope & Governance Boundaries


Verification Summary (Independently Audited)

  • python scripts/check_lint.py — PASS (294 existing findings, 0 additions)
  • python scripts/check_repo_bloat.py — PASS (0 new violations, 302 legacy allowlisted)
  • python -m experiments.forge validate — PASS (675 candidates, 42 families)
  • python -m experiments.forge history --check — PASS (8927/8927 valid)
  • python -m experiments.forge compile --check — PASS (CURRENT, memory_current=true)
  • python ops/refresh_forge_readouts.py --check --reports-only — PASS (CURRENT, stale stages: none)
  • pytest -q (18 suites incl. tests/test_unified*.py, tests/test_forge_bytegan.py, tests/test_training.py, tests/test_dualnorm_batched_gram_parity.py, etc.) — 635 passed, 0 failed
  • Wheel build check: particlegan-0.12.0-py3-none-any.whl = 943,328 B (< 1.2 MB), clean roots (particlegan, particlegan_forge, .dist-info)
  • Non-ByteGAN generalization spot-check (K=17, D=5 random Gaussian atoms, M=17, 800 steps): unified_v12 15/17 vs unified_v13 17/17 exact bijection.

…crete atomic targets

Introduce self_coupling='feydy_atomic' (exposed via opt-in preset 'unified_v13' with
zero new Recipe fields, preserving unified_v12 / DEFAULT_RECIPE bit-for-bit):

1. Scale-invariant discrete-atomic support gate (compute_discrete_atomic_gate):
   distinguishes finite discrete atomic targets (exact duplicate draws separated by an
   empty annular gap) from continuous 1D/nD densities and point masses, preventing
   the q75/q90 manifold gate from blinding chart discovery and orphan transport.
2. Persistent 1-stays / surplus-moves bijection ledger (update_atomic_ledger):
   uses exact sampled prior rows to pin closest particle(s) per chart via deterministic
   Hamilton quotas and route only surplus duplicates to nearest deficit charts, paired
   with zero-radius Born-Infeld commitment, absent-chart shielding, and non-splitting
   streaming charts (allow_dead_revival=False in atomic mode).
3. Scale-invariant discrete atomic thermal residual: keeps thermal cooling active while
   any particle is unassigned or uncrisp relative to inter-atom spacing, then cools
   smoothly once settled.
4. Joint BiGAN inverse codebook contraction (split_joint_table_pair,
   match_inverse_atomic_targets): contracts encoder codes toward each real atom's
   assigned latent particle code inside joint_relativistic_loss with zero extra
   forward passes and full checkpointing via opt_d.record.

Verified on GPU 0 (seed=0):
- bytegan_hypercube8: PASS 5/5 (256/256 valid unique, rms=0.0445, max=0.183)
- bytegan_bigan_dictionary: PASS 5/5 (256/256 fwd/recon/enc-bij, rms=0.0041, recon_rms=0.0109)
- 9/9 Forge canaries PASS (clockfree, two_pole, unused_token_hold, cover_leftover,
  gaussian1d_smoke, interp_sparse_arc, ring16_acquisition, img_bars4, five_word_joint_smoke)
- Unit tests (incl. tests/test_unified_bytegan.py bit-exact continuation & parity),
  check_lint.py, check_repo_bloat.py, and experiments.forge validate all clean.
@martyn
martyn merged commit 36e287f into develop Nov 24, 2026
4 checks passed
@martyn
martyn deleted the feat/unified-v13-bytegan branch November 24, 2026 11:26
martyn added a commit that referenced this pull request Nov 24, 2026
Phase-2: Sync origin/develop (PR #644), CPU-only CI parity & P0-P10 consistency audit
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