Deterministic Mixture-Entropy Loss
Implementation & benchmark of arXiv:2608.21467 — Gauss--Hermite Quadrature for Gaussian-Mixture Entropy with an Action-Space Hermite Surrogate
Source paper: Gauss--Hermite Quadrature for Gaussian-Mixture Entropy with an Action-Space Hermite Surrogate arXiv:2608.21467 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Use componentwise Gauss--Hermite quadrature to compute the differential entropy of a Gaussian-mixture output head instead of estimating entropy with samples. This gives a low-variance, differentiable uncertainty regularizer for mixture-density networks, latent world models, or policies whose predictive distribution is multimodal.
Formulas
Mathematical statement
The paper defines a Gaussian mixture $g_c(x)=\sum_{i=1}^{5}\omega_i\mathcal{N}(x;\mu_i(c),C_i)$, where $x\in\mathbb{R}^2$ is the random variable, $\omega_i\geq 0$ are mixture weights satisfying $\sum_i\omega_i=1$, $\mu_i(c)$ are component means, $C_i$ are positive-definite covariance matrices, and $c$ is a parameter controlling one mean. Its target differential entropy is $H(g_c)=-\int g_c(x)\log g_c(x)\,dx$. For a general $d$-dimensional component $X_i\sim\mathcal{N}(\mu_i,C_i)$, write $X_i=\mu_i+L_i z$ with $L_iL_i^\top=C_i$ and $z\sim\mathcal{N}(0,I_d)$. Let $(t_k,w_k)_{k=1}^K$ be one-dimensional Gauss--Hermite nodes and weights for the convention $\int e^{-t^2}f(t)dt\approx\sum_k w_kf(t_k)$. Tensor nodes are $z_{\mathbf{k}}=\sqrt{2}(t_{k_1},\ldots,t_{k_d})$ and normalized weights $\bar w_{\mathbf{k}}=\pi^{-d/2}\prod_{r=1}^dw_{k_r}$. The deterministic estimator is $\widehat H_K=-\sum_i\omega_i\sum_{\mathbf{k}}\bar w_{\mathbf{k}}\log\left[\sum_j\omega_j\mathcal{N}(\mu_i+L_i z_{\mathbf{k}};\mu_j,C_j)\right]$. The quadrature error decreases with order when the integrand is sufficiently smooth, while log-sum-exp evaluation prevents numerical underflow.
Implementation notes
Integrate this at the output of a mixture-density head. Given an input tensor h, predict logits a_i, means mu_i, and Cholesky factors for covariance matrices C_i; convert logits to weights w_i=softmax(a)_i and convert diagonal or Cholesky parameters into positive-definite covariance matrices. During each training step, construct a fixed Gauss--Hermite grid with K nodes per output dimension. For every component i and tensor-product node k, compute x[i,k]=mu[i]+sqrt(2)L[i]t[k]. Evaluate all component log densities at x[i,k], combine them with logsumexp(log(w_j)+log_normal_j), and accumulate Hhat=-sum_i w_i sum_k normalized_weight[k] log_mixture_density[i,k]. Add beta*Hhat to the task loss, using beta>0 for entropy maximization or the opposite sign when entropy minimization is desired. Backpropagate through means, Cholesky factors, mixture weights, and logsumexp. Precompute nodes and normalized weights, and cache covariance factorizations within each forward pass. The mathematical approximation is the fixed quadrature rule; no random samples are required. Validate order convergence by comparing K=3,5,7 against a large Monte Carlo estimate on held-out mixtures. First test on a 2D synthetic mixture-density regression problem with bimodal targets, comparing this loss against 1,000-sample Monte Carlo entropy and a single-Gaussian entropy approximation at equal wall-clock budgets. Success means lower entropy-gradient variance, faster validation NLL reduction, and better calibration or entropy accuracy. For dimensions above three, test sparse-grid or factored quadrature because full tensor cost is K^d.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: Inconclusive
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
Built a differentiable 2-D componentwise Gauss–Hermite mixture-entropy estimator with stable log-sum-exp evaluation, plus Monte Carlo and moment-matched Gaussian baselines. The mechanism checks succeeded: Gaussian entropy was exact to about 1e-15, mixture error generally decreased from 1.11e-2 at K=3 to 3.94e-5 at K=13, and deterministic GH gradient variance was zero while Monte Carlo gradient noise followed approximately n^-1/2 scaling. This demonstrates the promised low-variance deterministic estimation effect, but not an end-to-end training or calibration win.
- Agent confidence
- 8/10
- Baseline
- Monte Carlo gradient std 0.0397, 0.0149, 0.00542 at n=100, 1,000, 10,000; moment-matched Gaussian entropy 3.1432
- Idea
- GH K=7 gradient -0.07933 with repeated-run std 0; mixture entropy approximately 2.9945, with absolute error versus K=25 of 3.94e-5 at K=13
Limitations: No full MDN regression training benchmark, validation NLL, calibration, wall-clock comparison, learned covariance/weight experiment, dimensions above two, or independently certified reference integral was tested. K=25 is an internal high-order reference.
How to run: python3 experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.21467)
Ahead of the baseline (−3.9%) but not statistically significant (p=0.7841, wins 5 / 8 paired seeds).
- Benchmark
- Custom_track:conditional_mixture_entropy_regression
- Model
- mdn_shared
- Paired seeds
- 8
- Baseline mean
- 0.7604
- Idea mean
- 0.7304
- Effect (Δ)
- -0.03 (−3.9%; negative = idea better)
- Wins
- 5 / 8 paired seeds
- p-value
- 0.7841 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±15.3%
- Mechanism
- Confirmed ✓
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
Only one custom 2-D diagonal-covariance MDN task was tested. Full-covariance heads, dimensions above two, broader entropy-coefficient sweeps, wall-clock speed, calibration, and external datasets were not tested. The mechanism signature used two trained-model seeds; the primary comparison used the required eight paired seeds.
How to run: python3 mdn_bench.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 matched two-component MDN systems on a custom structurally appropriate bimodal regression track, comparing Monte Carlo entropy regularization with deterministic Gauss–Hermite entropy regularization. GH reduced mean test NLL from 0.760407 to 0.730448, but the paired permutation test gave p=0.7841, so there is no significant benchmark win. The trained-model mechanism signature was confirmed: GH repeated-estimator standard deviation was zero while 32-sample MC entropy had nonzero standard deviation.
- Baseline
- MC entropy regularization, tuned lr=0.006: mean test NLL 0.760407 over 8 seeds
- Idea
- GH K=7 entropy regularization: mean test NLL 0.730448 over 8 seeds; paired delta -0.029959, p=0.7841, 5/8 wins
Benchmark result
Ahead of the baseline (−3.9%) but not statistically significant (p=0.7841, wins 5 / 8 paired seeds).
- Benchmark
- Custom_track:conditional_mixture_entropy_regression
- Model
- mdn_shared
- Paired seeds
- 8
- Baseline mean
- 0.7604
- Idea mean
- 0.7304
- Effect (Δ)
- -0.03 (−3.9%; negative = idea better)
- Wins
- 5 / 8 paired seeds
- p-value
- 0.7841 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±15.3%
- Mechanism
- Confirmed ✓
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
Only one custom 2-D diagonal-covariance MDN task was tested. Full-covariance heads, dimensions above two, broader entropy-coefficient sweeps, wall-clock speed, calibration, and external datasets were not tested. The mechanism signature used two trained-model seeds; the primary comparison used the required eight paired seeds.
How to run: python3 mdn_bench.py
Artifacts
- README.md 2.1 KB View
- bench_report.json 2.5 KB View Raw
- experiment.py 5.7 KB View Raw
- mdn_bench.py 6.9 KB View Raw
- mdn_track.py 0.7 KB View Raw
- report.md 1.4 KB View
- report_bench_2026-09-01T183610.md 3.9 KB View
- results.json 1.9 KB View Raw