Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
assert MoGParticlePrior(sigma=0.1).sample(2)[0].shape == (2, 4)
assert DDGAN().steps == 4
default = get_recipe()
assert DEFAULT_RECIPE == "bispf_optimized"
assert DEFAULT_RECIPE == "empf"
assert default.optimizer_svd_backend == "batched"
assert default.training_precision == "bf16_channels_last"
assert default == get_recipe(DEFAULT_RECIPE)
Expand Down
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@ for _ in range(recipe.total_steps):
samples = trainer.sample(1024)
```

`get_recipe()` returns the default recipe, **optimized BISPF** (`DEFAULT_RECIPE =
"bispf_optimized"` in [particlegan/recipes.py](particlegan/recipes.py)). It uses a
non-saturating loss, a Born-Infeld critic penalty, an SBNP prior regularizer,
zero-momentum DualNorm and constant rates. The acronyms are expanded in the
`get_recipe()` returns the default recipe, **EMPF** (*Exponential Moving Prototype Flow*,
`DEFAULT_RECIPE = "empf"` in [particlegan/recipes.py](particlegan/recipes.py)). It uses a
clock-free online *e-means* sufficient-statistics prototype bank, mass-weighted
prototype-to-fake Sinkhorn OT, a state-driven settling Born-Infeld critic penalty, a
DoF-aware EMPF prior regularizer, zero-momentum DualNorm and constant rates. Explicit
`get_recipe("bispf_optimized")` retains the previous 0.9.1 optimized BISPF preset. The
acronyms are expanded in the
[research glossary](RESEARCH_GLOSSARY.md#acronyms-and-short-names), and the
[recipe settings and evidence](docs/api.md#recipes-and-defaults) explain the configuration.

Expand Down Expand Up @@ -103,10 +106,13 @@ metrics, receipts and training GIFs. Other report pages are historical records.

What the evidence does and does not show today:

- **The default is a research selection, not a qualified winner.** In the inventory's
full-suite table on 2026-10-25, the default BISPF recipe records 18 PASS,
11 FAIL and 20 unmeasured out of 49 distinct tests. Forge's screening calibration
is still provisional.
- **The default is a research selection, not a qualified winner.** In the
[technique inventory](reports/forge/technique-inventory.md), the selected EMPF recipe
(`empf-v2`, `DEFAULT_RECIPE = "empf"`) leads screening at **82/115** counted view
requirements (`27/27` Tier 1 PASS, `55/78` Tier 2, `0/10` Tier 3) and **22 PASS**,
**15 FAIL**, 8 not measured and 16 blocked across the 61-test fixed suite (ahead of
`bispf_optimized` at `81/115` and `18/61`). Forge's screening calibration, Tier 2/3
full-tier gates and untouched holdout confirmation remain open.
- **Controlled prior comparison** ([matched prior ablation, 2026-10-25](reports/prior-ablation-2026-10-25/README.md)).
Each arm changes only the prior policy. Architecture, data, budget, seed 0 and
the initial table are the same. These are one-seed diagnostics with no
Expand Down Expand Up @@ -176,10 +182,10 @@ qualification and review of the winner. The
acquisition, settling, endurance and recovery required again.

**Changing the default.** A promotion changes one line in
[particlegan/recipes.py](particlegan/recipes.py): `DEFAULT_RECIPE = "bispf_optimized"`.
[particlegan/recipes.py](particlegan/recipes.py): `DEFAULT_RECIPE = "empf"`.
All model-family factories inherit that trainer preset. Explicit presets such as
`get_recipe("ka2")` remain available. This is the owner-selected research default;
Forge calibration remains provisional.
`get_recipe("bispf_optimized")` and `get_recipe("ka2")` remain available. This is the
owner-selected research default; Forge calibration remains provisional.

**0.9.1 throughput.** Version 0.9.1 made the faster BISPF execution policy the
default, and kept explicit historical settings and saved-recipe restoration (see the
Expand Down
3 changes: 2 additions & 1 deletion RESEARCH_GLOSSARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ so the row gives a functional description instead.

| Name | Expansion | What it is | Source |
|---|---|---|---|
| **BISPF** | Born-Infeld Sinkhorn Particle Flow | The current default family (`DEFAULT_RECIPE = "bispf_optimized"`): Sinkhorn relativistic pairing, a Born-Infeld critic penalty, the SBNP prior and residual-driven noise. | `particlegan/bispf.py` module docstring; `particlegan/recipes.py` |
| **EMPF** | Exponential Moving Prototype Flow | The current default family (`DEFAULT_RECIPE = "empf"`): clock-free online *e-means* sufficient-statistics prototype bank, mass-weighted prototype-to-fake Sinkhorn OT, state-driven settling Born-Infeld critic penalty, and DoF-aware EMPF prior regularizer. | `particlegan/empf.py` module docstring; `particlegan/recipes.py`; [`reports/forge/empf/README.md`](reports/forge/empf/README.md) |
| **BISPF** | Born-Infeld Sinkhorn Particle Flow | The previous 0.9.x default family (`get_recipe("bispf_optimized")` / `get_recipe("bispf")`): Sinkhorn relativistic pairing, a Born-Infeld critic penalty, the SBNP prior and residual-driven noise. | `particlegan/bispf.py` module docstring; `particlegan/recipes.py` |
| **SBNP** | Stratified Blue-Noise Particle Prior | BISPF's prior regularizer / particle table (`StratifiedBlueNoisePrior`). | `particlegan/bispf.py` module docstring |
| **SRpGAN** | Scale-Free Sinkhorn Relativistic Pairing | BISPF's pairing of real and fake samples in the relativistic loss. | `particlegan/bispf.py` module docstring |
| **EBI-TCR** | Elastic Born-Infeld Transport-Chord Regularization | BISPF's critic penalty, with a zero-mean logit gauge. | `particlegan/bispf.py` module docstring |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"budget_seconds": 10800,
"candidate_budget_seconds": 1200,
"id": "dcgan-performance-cloud-1acd41cb5f4a"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"budget_seconds": 10800,
"candidate_budget_seconds": 1200,
"id": "dcgan-performance-cloud-66339a696dff"
}
76 changes: 76 additions & 0 deletions configs/forge/family-documentation/empf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"overview": "Exponential Moving Prototype Flow (EMPF) is a clock-free, constant-learning-rate ParticleGAN formulation inspired by e-means (Bessa et al., arXiv:2611.09501) with no EMA critic network copy. Instead of computing transport chords solely against noisy raw mini-batches, EMPF maintains a checkpointed online sufficient-statistics prototype bank (S, N) updated with clock-free (K, B) hit-rate EMA scaling and deterministic mass-conserving proportional-split dead-prototype revival, couples non-uniform prototype masses to generated samples via scale-free entropic Optimal Transport, bounds critic gradients along endpoints and prototype chords with an Elastic Born-Infeld potential and zero-mean logit gauge, and regularizes trainable particle priors with a degree-of-freedom-aware EMPF tether/repulsion/revival law.",
"symbols": "$G$ is the generator, $D$ the raw-score critic, $P$ the task prior with $M$ locations in $\\mathbb R^{d_z}$, $x$ a real batch of size $B_r$, $z\\sim P$ a latent batch and $y=G(z)$ the generated batch of size $B_f$. $(S, N)$ is the online prototype bank of size $K=\\min(K_{\\max}, B_r)$ with centroids $C_k=S_k/N_k$ and normalized row masses $w_k=N_k/\\sum_j N_j$. $\\Pi$ is the entropic Optimal Transport coupling matching row marginals $w$ to uniform column marginals $1/B_f$, $x_{\\mathrm{chord}}=(1-u)y+u C_{\\pi}$ is a stratified prototype transport chord, and $g_r, g_f, g_c$ are critic input gradients.",
"pseudocode": [
"Choose an adversarial loss, optimizer and constant learning rates.",
"For each task-owned training update:",
" Sample real x and latent z from the task prior P; compute y=G(z).",
" On unconditioned continuous vector domains, assign x to nearest centroids C_prev = S / N, update (S, N) with hit-rate EMA rate alpha_eff(K, B_r), and revive any starved prototype (N_k < tau_rev * mean(N)) via deterministic half-mass donor splitting.",
" Compute mass-weighted scale-free Sinkhorn coupling Pi between (C, w) and stop_gradient(y); on conditioned critics, bypass the marginal bank and align chords per conditioning fiber.",
" Sample stratified transport chords x_chord = (1 - u) stop_gradient(y) + u C_pi.",
" Evaluate Elastic Born-Infeld potential on input-gradient norms at x, stop_gradient(y) and x_chord plus zero-mean logit gauge, and update instance-bound state-driven thermal scale.",
" Backpropagate critic adversarial loss + EMPF penalty and step D.",
" With D fixed, recompute differentiable fake samples y=G(z) and evaluate generator adversarial loss + EMPF prior regularizer.",
" Step G, trainable prior P and encoder E when present using constant learning rates."
],
"training_details": {
"loss": "Selectable non-saturating logistic (selected DualNorm configuration), paired relativistic logistic, EMPF Sinkhorn relativistic logistic, hinge, Wasserstein or least squares. Joint encoder/generator hosts train both critic streams.",
"optimizer": "Supports DualNorm (selected configuration: zero momentum, smoothing 0.001, per-offset quintic convolution, batched SVD backend, BF16 channels-last conv training, direction-blend constraint geometry) as well as native Adam and formulation-owned EMPFCriticAdam without an EMA critic network copy.",
"learning_rates": "Strictly constant (`lr_floor=1.0`, `network_lr_floor=1.0`): global LR $0.012$, critic multiplier $1.5$ and DualNorm sampled-row prior multiplier $2.5$ (`prior_reg=0.01`), matching `bispf-throughput-v1` / `presets[bispf_optimized]`.",
"gradient_clipping": "None. Critic spike guard is disabled; gradient bounding acts smoothly through the Elastic Born-Infeld critic potential.",
"critic_penalty": "Prototype-chord Elastic Born-Infeld regularizer evaluated on real endpoints, fake endpoints and mass-weighted prototype Sinkhorn chords ($\\kappa=1$, base sharpness $\\beta_0=6$ tightening quadratically via state-driven settling sharpness $\\beta_{\\mathrm{eff}}(r_{\\mathrm{ema}}, B_r)$ once $r_{\\mathrm{ema}}<0.16$, harmonic floor $\\lambda_{\\mathrm{floor}}=0.01$, chord blend $0.05$) plus a settling zero-mean logit gauge ($\\gamma_{\\mathrm{gauge}}=0.05$). Conditioned critics preserve fiber alignment automatically; no EMA critic anchor.",
"damping_and_guards": "Instance-bound state-driven smoothstep thermal cooling, 2D harmonic basin capture lock, and discrete-simplex post-acquisition Sinkhorn thermal cooling ($r_{\\mathrm{ema}}<0.070$) damp post-convergence mini-batch fluctuations below DualNorm's smoothing floor using zero global state and zero step counters.",
"noise": "No scheduled additive critic-input or generator-output training noise in the selected benchmark configuration ($0.0$). Task-declared MoG intrinsic sigma is preserved.",
"averaging": "Generator EMA decay=$0$ and serve_average=$0$; all evaluations score live unaveraged weights."
},
"configuration_notes": [
"EMPF translates the online sufficient-statistics EMA and proportional-split dead-unit revival of e-means into a clock-free adversarial transport formulation without dataset-size or epoch-horizon dependencies.",
"All prototype bank tensors (proto_sum, proto_count), low-discrepancy phases and thermal scalars live exclusively on the critic optimizer's instance-bound step record and travel bit-for-bit through state_dict() and load_state_dict() with strict corruption rejection.",
"The EMPF prior regularizer skips global moment/covariance distortion when prior row capacity is at or below the degree-of-freedom threshold (returning exact zero on unanchored small codebooks and applying only a short-range one-sided prototype non-collision hinge on reference-anchored small discrete codebooks) while applying initial-moment tethering, scale-free k-NN log-repulsion, local scatter circularization, and a local median-normalized 1-NN revival tether on continuous particle clouds.",
"One global trainer configuration supplies every displayed result across Tier 1, Tier 2 and Tier 3; task-owned architectures, priors, initializations, budgets and gates remain fixed."
],
"references": [
{
"title": "e-means: outperforming k-means (in one-tenth the epochs)",
"url": "https://arxiv.org/abs/2611.09501",
"component": "Online sufficient-statistics EMA prototype updates, hit-rate step-size scaling, and proportional-split dead-unit revival inspiring the EMPF prototype bank and outlier tether."
},
{
"title": "Sinkhorn Distances: Lightspeed Computation of Optimal Transport",
"url": "https://arxiv.org/abs/1306.0895",
"component": "Entropic Optimal Transport Sinkhorn-Knopp coupling generalized here to non-uniform prototype row masses."
},
{
"title": "Adam: A Method for Stochastic Optimization",
"url": "https://arxiv.org/abs/1412.6980",
"component": "Base first-order optimizer family supported alongside DualNorm."
}
],
"sources": [
"particlegan/empf.py",
"particlegan/_empf/prototypes.py",
"particlegan/_empf/transport.py",
"particlegan/_empf/critic.py",
"particlegan/_empf/penalty.py",
"particlegan/_empf/prior.py",
"particlegan/_empf/loss.py",
"particlegan/recipes.py",
"configs/forge/ideas/empf-v1.json",
"configs/forge/studies/empf-v1-study.json",
"configs/forge/ideas/empf-v2.json",
"configs/forge/studies/empf-v2-study.json",
"reports/forge/empf/README.md"
],
"equations": [
{
"label": "Clock-Free Online e-means Sufficient-Statistics Prototype Update",
"latex": "S_k^{(t)}=(1-\\alpha_{\\mathrm{eff}})S_k^{(t-1)}+\\alpha_{\\mathrm{eff}}\\sum_{i:a_i=k}x_i,\\quad N_k^{(t)}=(1-\\alpha_{\\mathrm{eff}})N_k^{(t-1)}+\\alpha_{\\mathrm{eff}}\\,|\\{i:a_i=k\\}|,\\quad \\alpha_{\\mathrm{eff}}=\\operatorname{clip}\\!\\left(\\alpha_0(B_r/K)^\\eta,\\alpha_{\\min},\\alpha_{\\max}\\right)",
"explanation": "Maintains denoised online centroids $C_k=S_k/N_k$ and normalized mode-mass shares $w_k=N_k/\\sum_j N_j$ without dataset-size or epoch-horizon clocks; prototypes with $N_k<\\tau_{\\mathrm{rev}}\\bar N$ split the heaviest donor deterministically."
},
{
"label": "Prototype-Chord Elastic Born-Infeld Penalty and Zero-Mean Gauge",
"latex": "R_{\\mathrm{EMPF}}=\\frac{\\lambda_{\\mathrm{floor}}}{6d}\\mathbb E\\!\\left[\\lVert g_r\\rVert_2^2+\\lVert g_f\\rVert_2^2+\\lVert g_c\\rVert_2^2\\right]+\\frac{\\lambda_{\\mathrm{cap}}}{2}\\mathbb E\\!\\left[\\phi_\\beta(\\lVert g_r\\rVert_2-\\kappa)^2+(1-\\alpha_c)\\phi_\\beta(\\lVert g_f\\rVert_2-\\kappa)^2+\\alpha_c\\phi_\\beta(\\lVert g_c\\rVert_2-\\kappa)^2\\right]+\\frac{\\gamma_{\\mathrm{gauge}}}{2}\\bar D^2",
"explanation": "Bounds critic input-gradient norms along real endpoints, fake endpoints and mass-weighted prototype Sinkhorn chords $x_{\\mathrm{chord}}=(1-u)y+u C_\\pi$ while pinning translational logit drift via $\\bar D=\\frac{1}{2}(\\mathbb E[D(x)]+\\mathbb E[D(y)])$."
}
]
}
Loading
Loading