Metriplectic Neural Source Layer
Implementation & benchmark of arXiv:2607.13360 — Data driven non-equilibrium moist phase exchanges for atmospheric convection within a discontinuous Galerkin model of the compressible Euler equations
Source paper: Data driven non-equilibrium moist phase exchanges for atmospheric convection within a discontinuous Galerkin model of the compressible Euler equations arXiv:2607.13360 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Use a neural network to predict only constitutive exchange coefficients, while a fixed skew-symmetric operator generates the conservative part of the update and a structured thermodynamic operator generates the irreversible source. The resulting layer preserves a chosen energy exactly in continuous time and can enforce nonnegative entropy production through a constrained parameterization of exchange rates.
Formulas
Mathematical statement
The paper writes an energy-conserving Hamiltonian system as $\partial_t y=\boldsymbol{\mathsf{A}}\,\delta\mathcal{H}/\delta y$, where $y$ is the state, $\mathcal{H}(y)$ is energy, and $\boldsymbol{\mathsf{A}}=-\boldsymbol{\mathsf{A}}^{\top}$ is skew-symmetric. The identity $\mathrm{d}\mathcal{H}/\mathrm{d}t=(\delta\mathcal{H}/\delta y)^{\top}\boldsymbol{\mathsf{A}}(\delta\mathcal{H}/\delta y)=0$ is the conservation mechanism. In the moist model, $B$, $C$, and $D$ are exchange rates for vapour-to-liquid, vapour-to-ice, and liquid-to-ice transfers, while $A$ is the entropy change induced by these exchanges; the extracted formula is $A=-T^{-2}((\mu_v-\mu_l)^2B+(\mu_v-\mu_i)^2C+(\mu_l-\mu_i)^2D)$, where $T$ is temperature and $\mu_v,\mu_l,\mu_i$ are phase chemical potentials. For a generic state $x$, energy gradient $g=\nabla_xH(x)$, skew matrix $K=-K^{\top}$, transfer vectors $s_j$, affinities $a_j=s_j^{\top}\nabla_xS(x)$, and nonnegative rates $r_j\ge0$, use $\dot{x}=Kg+\sum_jr_js_j$ and $\dot{S}=\sum_jr_ja_j$; orient channels or gate rates so that $a_j\ge0$.
Implementation notes
Integrate this at the residual-update or latent-dynamics stage of a neural simulator, rather than inside an ordinary unconstrained MLP output head. Represent each sample state as $x$ and provide differentiable scalar functions $H(x)$ and, if available, $S(x)$. Compute $g=\nabla_xH(x)$ with automatic differentiation. Define a fixed skew matrix $K$ or a sparse block operator matching the state variables, and calculate the conservative derivative $v_c=Kg$. Have an MLP $f_\theta(x)$ output one scalar per admissible transfer channel; convert these values to rates with $r=\operatorname{softplus}(f_\theta(x))$. Store fixed transfer vectors $s_j$ whose entries add and remove the appropriate conserved quantities. Compute $v_d=\sum_jr_js_j$ and use $\dot{x}=v_c+v_d$. If the model has chemical potentials, set each affinity to $a_j=s_j^\top\nabla S(x)$ and orient or gate channels so $a_j\ge0$; alternatively use $r_j=\operatorname{softplus}(f_j)\operatorname{softplus}(a_j)$ and include the signed entropy contribution explicitly. For a discrete residual block use $x_{k+1}=x_k+h(v_c+v_d)$, and compare it with a midpoint or symplectic integrator for the $Kg$ term. The paper supplies the algebraic conservation identity; estimate unknown $H$, $S$, or affinities from analytic simulator formulas or automatic differentiation, not a separately trained network. First test on a 2D damped Hamiltonian toy system and then a 1D reaction benchmark, using an unconstrained neural source baseline with the same parameter count. Track one-step error, cumulative relative energy drift $|H_T-H_0|/|H_0|$, entropy violations, and long-horizon rollout error. Success means comparable validation error with orders-of-magnitude smaller energy drift and fewer unstable rollouts at the same step size.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
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 and numerically verified a metriplectic toy layer with a fixed skew conservative operator and affinity-gated nonnegative source rates. The skew identity was exact to floating point (max |gᵀKg|=0), explicit-Euler energy drift matched the predicted (1+h²)^(T/h)-1 law with maximum ratio error 1.9e-13, and entropy production had zero violations across 15,000 gated samples while scaling linearly with source strength. The mechanism manifested clearly, although this MVP does not establish a neural-network training or accuracy win.
- Agent confidence
- 8/10
- Baseline
- Unconstrained signed source: 2,541/5,000 entropy-production violations (50.82%); 20-unit rollout relative H change +1.859 and entropy change -1.794.
- Idea
- Affinity-gated source: 0 entropy violations across all alpha sweeps; mean entropy production 0.3401, 1.3604, 5.4418 for alpha 0.25, 1, 4 with zero scaling error; 20-unit rollout entropy change +0.9207 and relative H change -0.954.
Limitations: Only a 2D analytic toy system was tested. No learned MLP, dataset, parameter-matched training experiment, midpoint or symplectic integrator, long-horizon accuracy benchmark, or higher-dimensional thermodynamic simulator was evaluated; the dissipative source is not energy-conserving in this toy construction.
How to run: python3 verify_metriplectic.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.13360)
No significant difference vs. the tuned baseline (+777.0%, p=0.078, wins 3 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0011
- Idea mean
- 0.0098
- Effect (Δ)
- 0.0087 (+777.0%; negative = idea better)
- Wins
- 3 / 8 paired seeds
- p-value
- 0.078 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±733.2%
- Mechanism
- Not confirmed ✗
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
Only the registered built-in dynamics track was tested. The implementation simplified the paper's full moist thermodynamic variables to a two-state source construction; no PDE, vision, tabular, sequence, midpoint/symplectic integrator, or longer-horizon metric was evaluated. The trained-model signature failed, indicating that this parameterization did not preserve the intended entropy-production property at neural-network scale.
How to run: python3 stage2_metriplectic_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 and benchmarked an end-to-end metriplectic-style source layer on the registered dynamics track with a shared GRU backbone, fixed skew operator, fixed transfer channels, and learned source rates. The analytic identity passed, but the idea was worse on the independent pendulum test MSE and had no significant win; its trained-model entropy signature also failed to confirm nonnegative production.
- Baseline
- Best lr=0.006; 8-seed test MSE mean 0.0011167459824719117.
- Idea
- Best lr=0.006; 8-seed test MSE mean 0.009794380415314663; paired delta +0.008677634432842751; permutation p=0.078; 3/8 paired wins.
Benchmark result
No significant difference vs. the tuned baseline (+777.0%, p=0.078, wins 3 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0011
- Idea mean
- 0.0098
- Effect (Δ)
- 0.0087 (+777.0%; negative = idea better)
- Wins
- 3 / 8 paired seeds
- p-value
- 0.078 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±733.2%
- Mechanism
- Not confirmed ✗
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
Only the registered built-in dynamics track was tested. The implementation simplified the paper's full moist thermodynamic variables to a two-state source construction; no PDE, vision, tabular, sequence, midpoint/symplectic integrator, or longer-horizon metric was evaluated. The trained-model signature failed, indicating that this parameterization did not preserve the intended entropy-production property at neural-network scale.
How to run: python3 stage2_metriplectic_bench.py
Artifacts
- bench_report.json 5.6 KB View Raw
- report.md 1.5 KB View
- report_bench_2026-08-30T182223.md 7.6 KB View
- results.json 1.8 KB View Raw
- stage2_metriplectic_bench.py 5.7 KB View Raw
- verify_metriplectic.py 3.5 KB View Raw