Skip to content

feat(empf): add EMPF trainer family, empf-v2 (#1 82/115), and promote to DEFAULT_RECIPE - #541

Merged
martyn merged 5 commits into
developfrom
feat/empf-family
Nov 11, 2026
Merged

martyn merged 5 commits into
developfrom
feat/empf-family

Conversation

@martyn

@martyn martyn commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Introduces EMPF (Exponential Moving Prototype Flow) (empf-v1 + tuned empf-v2), a standalone, clock-free, constant-learning-rate ParticleGAN formulation inspired by e-means (Bessa et al., arXiv:2611.09501), registered as a first-class trainer family without altering DEFAULT_RECIPE = "bispf_optimized" or any incumbent recipe hashes.

Core Formulation (empf-v1 + empf-v2 Refinements)

  1. Clock-Free Online e-means Sufficient-Statistics Prototype Bank (particlegan/_empf/prototypes.py, critic.py):
    • Tracks running prototype feature sums $S \in \mathbb{R}^{K \times D}$ and effective mass counts $N \in \mathbb{R}^K$ ($C_k = S_k / N_k$) with hit-rate-scaled EMA rate $\alpha_{\mathrm{eff}}(K, B_r) = \operatorname{clip}(\alpha_0 (B_r / K)^\eta, \alpha_{\min}, \alpha_{\max})$ — zero dataset-size $n$ or epoch-horizon $T$ parameters.
    • Deterministic mass-conserving proportional-split dead-prototype revival: when $N_{\mathrm{dead}} < \tau_{\mathrm{rev}} \bar{N}$, splits an active donor selected via golden/plastic ($\phi_1, \phi_2$) quasi-Monte Carlo CDF sampling while conserving exact total mass ((N_donor + N_dead) / 2) with zero RNG consumption.
  2. Mass-Weighted Prototype-to-Fake Entropic Sinkhorn Chords & State-Driven Settling EBI (particlegan/_empf/transport.py, penalty.py):
    • Solves scale-free log-domain Sinkhorn with non-uniform prototype row marginals $w_k = N_k / \sum_j N_j$ against uniform generated column marginals $1 / B_f$ in $O(B \cdot K)$ rather than $O(B^2 \cdot D_{\mathrm{img}})$, preserving rare-mode transport mass while aligning conditioned fibers automatically.
    • empf-v2 State-Driven Settling Born-Infeld Sharpness: Uses softer far-from-manifold sharpness $\beta_0 = 6.0$ during coarse mode acquisition ($r_{\mathrm{ema}} \ge 0.16$) and tightens quadratically once normalized transport residual settles: $s_{\mathrm{settle}} = \operatorname{clip}(1 - r_{\mathrm{ema}}/0.16, 0, 1)$, $\beta_{\mathrm{eff}} = \beta_0 + g(B_r),s_{\mathrm{settle}}^2$ with prototype-bank resolution gain $g(B_r) = 6.5 + 15.5\operatorname{clip}((B_r - 64)/64, 0, 1)$.
    • empf-v2 Discrete-Simplex Post-Acquisition Sinkhorn Thermal Cooling: Damps post-acquisition mini-batch jitter ($r_{\mathrm{ema}} < 0.070$, floor 0.35) on unconditioned discrete-simplex couplings (dim >= 170, B_r, B_f >= 64) using purely instance-bound critic state (EMPFStepRecord, zero step clocks).
  3. Degree-of-Freedom-Aware Latent Prior Regularizer (particlegan/_empf/prior.py):
    • Combines an initial-moment covariance tether, scale-free $k$-NN log-repulsion, local scatter circularization, a short-range one-sided discrete codebook non-collision hinge ($N \le \mathrm{DoF}$, zero .item() host sync), and a smooth dead-particle revival tether ($d_{1\mathrm{nn}}^2 / (\text{isolation_ratio} \cdot r_{\mathrm{med}}^2) - 1$).

Forge CUDA Readout (empf-v2, Seed 0, NVIDIA RTX A6000)

Executed commit: 49537dfe0349daec307607f340d6379537d874b9 (readout-05eaed46ab0e45214ae8e7b4.json, 0 INCOMPLETE, 1109/1109 attempt coverage; empf-v1 baseline preserved byte-for-byte at cb5e484b059d3474f7259c40beb7acb4b5bb8704 / readout-d46a41a1da2da54d67d154f4.json):

Selected Recipe / Family Tier 1 (27) Tier 2 (78) Tier 3 (10) Total View Reqs (115) Full-Suite 61 PASS Tuning Budget
EMPF (empf-v2, selected) 27/27 55/78 0/10 (3 blocked) 82/115 22 0 searches / 2 cards
BISPF (bispf-optimized-quintic-v1) 22/27 (4 not run) 55/78 (4 not run) 4/10 81/115 18 0 searches / 19 cards
EMPF baseline (empf-v1, retained) 27/27 48/78 0/10 75/115 20 untuned (1 card)
BCAP (recipe-prior-refactor-bcap-pure-v1) 22/27 (4 not run) 49/78 (4 not run) 0/10 71/115 16 85 searches / 473 cards
GAN v3 / K3P / KA2 / R1-R2 20/27 (4 not run) 0/78 0/10 20/115 5 8–46 cards (tuned)
Atlas (atlas-particle-normal-v4) 18/27 0/78 0/10 18/115 8 5 cards
E22 (e22) 0/27 0/78 0/10 0/115 0 untuned (1 card)

Disclosure: BISPF and BCAP pinned snapshots predate the 4 newer VAE/AE Tier 1 tasks (4 not run).

Key Scientific Gains (empf-v1 $\to$ empf-v2, Zero Regressions)

  • Declare experiment dependencies and add CPU test CI #1 Overall on Counted View Requirements (82/115) & Fixed Full-Suite Passes (22/61): Retains all 20 empf-v1 passes (11/11 required Tier 1 + clockfree_audit_measurement_v1 + 8 Tier 2 passes) with zero regressions while unlocking two new required Tier 2 passes:
    • mode_hold (+6 view reqs): FAIL (hq=0.8411, 5/8 modes) $\to$ PASS (passing_suffix=14, hq=0.9993, 8/8 modes, cover=1.0).
    • five_word_joint_hold (+1 view req): FAIL (24/25 checks) $\to$ PASS (25/25 confirmed scheduled checks, mass_tv=0.0209, minimum_reconstruction_token_probability=0.9981).
  • Imbalanced & Non-Stationary Metric Improvements:
    • vector_unequal_mass (held): preserves 2.91% mass on the 2% rare mode (min_mass_ratio=0.752) while lifting component_min_eigen_ratio from 0.0595 $\to$ 0.1605 >= 0.15.
    • gaussian1d_stability: improves final mean_error_sigma from 0.2869 $\to$ 0.0808 (still misses the intermediate abrupt-shift deadline).
  • DCGAN Scaling Throughput (dcgan-performance-cloud-66339a696dff, NVIDIA RTX A6000, 54/54 uncontended cells):
    • 64², B64, W64: 39.93 ms (1,600.20 img/s) vs BISPF 89.38 ms (2.2× faster).
    • 256², B16, W64: 157.23 ms (101.73 img/s, 1,522 MiB) vs BISPF 342.19 ms (2,119 MiB, 2.2× faster / 28% less VRAM).

Verification

  • python scripts/check_lint.py — 0 new findings
  • python ops/refresh_forge_readouts.py --check --reports-only — CURRENT (stale stages: none)
  • uv build — wheel 401,680 bytes (< 600,000 limit)
  • pytest — 191 passed across test_empf.py, test_refresh_forge_readouts.py, test_forge_comparison_policy.py, test_forge_trainer_families.py, test_core_inventory_legacy_documentation.py, and test_recipe_defaults.py

@martyn martyn changed the title feat(empf): add e-means-inspired Exponential Moving Prototype Flow trainer family and Forge CUDA qualification feat(empf): add Exponential Moving Prototype Flow (empf-v2, #1 on Forge family leaderboard) Nov 11, 2026
@martyn martyn changed the title feat(empf): add Exponential Moving Prototype Flow (empf-v2, #1 on Forge family leaderboard) feat(empf): add EMPF trainer family, empf-v2 (#1 82/115), and promote to DEFAULT_RECIPE Nov 11, 2026
@martyn
martyn merged commit f63b8bf into develop Nov 11, 2026
10 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.

1 participant