Differentiable Euler-density morphology loss
Implementation & benchmark of arXiv:2608.24897 — Exact topology of conservative multiplicative cascades: An ultrametric transfer-operator genus
Source paper: Exact topology of conservative multiplicative cascades: An ultrametric transfer-operator genus arXiv:2608.24897 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Add a threshold-dependent Euler-density loss to an image generator or diffusion denoiser. The loss matches the predicted field's local excursion topology to that of real images using differentiable soft occupancy probabilities over pixels, horizontal and vertical edges, and 2x2 faces.
Formulas
Mathematical statement
For a binary excursion set formed by cells with density \(\rho>\nu\), Eq. (4) states that the bulk Euler density per unit area is \(\chi_j(\nu)/A=p_1-p_{Eh}-p_{Ev}+p_F\). Here \(p_1=\Pr(\rho>\nu)\) is the one-cell exceedance probability, \(p_{Eh}\) and \(p_{Ev}\) are the probabilities that horizontally or vertically adjacent cell pairs both exceed \(\nu\), and \(p_F\) is the probability that all four cells in a 2x2 block exceed \(\nu\). The alternating signs are the cubical Euler-characteristic inclusion-exclusion rule: occupied cells contribute \(+1\), shared edges contribute \(-1\), and filled faces contribute \(+1\). For a neural image \(x\), replace the hard indicator \(1[x_u>\nu]\) by \(s_u=\sigma((x_u-\nu)/T)\), where \(T>0\) is a temperature. Estimate each probability by spatial averages of the corresponding products. Match this statistic at several thresholds because one threshold constrains only one morphology regime.
Implementation notes
Integrate this as an auxiliary loss on generated images, either on the final sample of a GAN or on reconstructed clean images \(\hat x_0\) predicted by a diffusion model. Normalize each image channel to a fixed range and choose thresholds \(\mathcal T\) as empirical real-data quantiles, for example \(\{0.1,0.2,\ldots,0.9\}\). For each threshold, compute \(s=\operatorname{sigmoid}((x-\nu)/T)\), with \(T\) initially 0.1 and optionally annealed to 0.03. Compute the mean occupancy, mean products for horizontal neighbors, mean products for vertical neighbors, and mean four-way products in 2x2 windows. Combine them exactly as \(\widehat\chi=\widehat p_1-\widehat p_{Eh}-\widehat p_{Ev}+\widehat p_F\), then add \(\lambda\mathcal L_{Euler}\) to the normal generator or denoising objective. Maintain exponential moving averages of the four real-image statistics, or compute minibatch targets directly. Ramp \(\lambda\) from zero during the first 10% of training. The paper supplies the cubical formula; the sigmoid temperature, thresholds, and weighting are empirical. First test on CIFAR-10, CelebA-64, or binary microscopy images with a small UNet or GAN, comparing the baseline against baseline plus Euler loss at equal compute. Evaluate FID or reconstruction quality and exact hard-threshold Euler curves using binary 2x2 counts. Success means lower integrated Euler-curve error without worse FID, plus improved connected-component and hole statistics.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: No measurable effect
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 8/10
Implemented differentiable multi-threshold Euler-density morphology loss with exact hard-threshold reference and a small denoising integration. The mechanism checks passed: temperature reduction monotonically approached the hard statistic, constant-field cancellation matched the predicted zero bulk density, and iid Bernoulli measurements matched q−2q²+q⁴ within 0.00018. The denoising experiment showed only a negligible morphology improvement, so the mathematical mechanism is validated but a meaningful ML quality win was not demonstrated.
- Agent confidence
- 8/10
- Baseline
- Denoising MSE 0.00597470; hard Euler-curve MAE 0.00132996; soft target MSE 0.00031454.
- Idea
- Denoising MSE 0.00597462; hard Euler-curve MAE 0.00132935; soft target MSE 0.00031418. Temperature sweep mean absolute error decreased from 0.02207 at T=0.20 to 0.00394 at T=0.01; iid Bernoulli observed 0.119827 versus predicted 0.120006.
Limitations: Only a tiny synthetic 16x16 denoising task and 80 optimization steps were tested; no CIFAR-10, diffusion, GAN, FID, connected-component, hole-count, equal-FLOP, or GPU comparison was performed. The observed practical improvement is too small to claim generalization.
How to run: python3 run_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.24897)
No significant difference vs. the tuned baseline (+0.2%, p=0.0917, wins 3 / 8 paired seeds).
- Benchmark
- Euler_morphology_denoising
- Model
- small_denoiser
- Paired seeds
- 8
- Baseline mean
- 0.1141
- Idea mean
- 0.1144
- Effect (Δ)
- 0.0002 (+0.2%; negative = idea better)
- Wins
- 3 / 8 paired seeds
- p-value
- 0.0917 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±0.3%
- Mechanism
- Confirmed ✓
- Practical effect
- No effect
- Baseline tuning
- swept over 3 configs
The built-in CIFAR vision track is classification and lacks a reconstructed image field, so a local custom denoising track was required. The custom benchmark used 160 training samples, 80 test samples, 5 epochs, a small CNN, and synthetic disks/rectangles rather than CIFAR, CelebA, diffusion, GAN, FID, or component/hole evaluations. The baseline and idea learning-rate union was swept, but only the Euler lambda and temperature were fixed rather than separately swept.
How to run: python3 bench_euler.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
Built a custom spatial image-denoising track and an end-to-end CNN comparison where the only intervention was the differentiable multi-threshold Euler-density auxiliary loss. Across 8 paired seeds, the baseline achieved mean test MSE 0.1141428 versus 0.1143862 for the idea, giving delta_mean +0.0002435 and permutation p=0.0917. The trained-model mechanism signature was confirmed, but there was no significant standard-metric improvement.
- Baseline
- Best lr=0.006; 8-seed test MSE mean 0.1141427802, std 0.0198688870
- Idea
- Euler lambda=0.2, T=0.1, lr=0.006; 8-seed test MSE mean 0.1143862335, std 0.0195904620; delta +0.0002434533; p=0.0917; 3/8 paired wins; mechanism confirmed=true
Benchmark result
No significant difference vs. the tuned baseline (+0.2%, p=0.0917, wins 3 / 8 paired seeds).
- Benchmark
- Euler_morphology_denoising
- Model
- small_denoiser
- Paired seeds
- 8
- Baseline mean
- 0.1141
- Idea mean
- 0.1144
- Effect (Δ)
- 0.0002 (+0.2%; negative = idea better)
- Wins
- 3 / 8 paired seeds
- p-value
- 0.0917 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±0.3%
- Mechanism
- Confirmed ✓
- Practical effect
- No effect
- Baseline tuning
- swept over 3 configs
The built-in CIFAR vision track is classification and lacks a reconstructed image field, so a local custom denoising track was required. The custom benchmark used 160 training samples, 80 test samples, 5 epochs, a small CNN, and synthetic disks/rectangles rather than CIFAR, CelebA, diffusion, GAN, FID, or component/hole evaluations. The baseline and idea learning-rate union was swept, but only the Euler lambda and temperature were fixed rather than separately swept.
How to run: python3 bench_euler.py
Artifacts
- REPORT.md 2.4 KB View
- bench_euler.py 5.4 KB View Raw
- bench_report.json 4.1 KB View Raw
- euler_custom_track.py 1.3 KB View Raw
- report.md 1.5 KB View
- report_bench_2026-09-02T001928.md 3.9 KB View
- results.json 1.0 KB View Raw
- run_experiment.py 4.2 KB View Raw