Conservative Chapman–Enskog Neural Layer
Implementation & benchmark of arXiv:2607.17358 — Richards' equation as a hydrodynamic limit: Chapman--Enskog reduction of the continuum kinetic equation for unsaturated soil water
Source paper: Richards' equation as a hydrodynamic limit: Chapman--Enskog reduction of the continuum kinetic equation for unsaturated soil water arXiv:2607.17358 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace an unconstrained recurrent hidden-state update by a fast redistribution state with a dissipative Jacobian and a slow conserved state. The network computes an equilibrium state and a first-order pseudoinverse response correction, transferring the paper’s separation between local relaxation and macroscopic transport into a stable recurrent or state-space layer.
Formulas
Mathematical statement
Let $g\in\mathbb{R}^n$ be a fast hidden occupancy vector, $m=w^\top g$ the conserved scalar state, and $C(g)$ a redistribution vector field satisfying $w^\top C(g)=0$. At an equilibrium $g_{\rm eq}(m)$, define $J=\partial C/\partial g|_{g_{\rm eq}}$. The mechanism requires $J$ to be self-adjoint in a positive mass-weighted inner product and negative semidefinite, with $\ker J=\mathrm{span}\{w\}$, so only the component orthogonal to the conserved mode relaxes. For a slowly varying forcing $S$, the first Chapman–Enskog correction is $\chi=-J^\dagger S$, where $J^\dagger$ is the pseudoinverse on the decaying subspace. The spectral gap $\gamma=-\max\{\lambda<0:\lambda\in\mathrm{spec}(J)\}$ controls the fast decay and the validity of the reduction.
Implementation notes
Use this as a recurrent cell or continuous-time state-space layer. Let an input projection produce a scalar or low-dimensional conserved state $m_t$ and parameters $\theta_t$. Define a redistribution field $C_\theta(g)$ with exact conservation, for example by using a graph-Laplacian parameterization whose column sums vanish. Compute $g_{\rm eq}(m_t,\theta_t)$ by several fixed-point iterations while enforcing $w^\top g_{\rm eq}=m_t$. Use automatic differentiation to estimate the Jacobian $J$ at equilibrium, project out the conserved direction with $P=I-w(w^\top w)^{-1}w^\top$, and solve $PJP\chi=-PS$ by conjugate gradients instead of explicitly forming an inverse. Update the fast state using $g_{t+1}=g_{\rm eq}+\mathrm{Da}\chi$ or initialize an implicit Euler step with this approximation. Update the slow state as $m_{t+1}=m_t+\Delta t\,w^\top S$. The paper-derived ingredients are the conserved nullspace, dissipative Jacobian, and pseudoinverse response; the network estimates $J$, equilibrium, and forcing from data. The first cheap experiment is a GRU replacement on sequential MNIST and Copy Memory, compared with a GRU and implicit RNN at matched parameter count. Sweep $\mathrm{Da}$ and timestep $\Delta t$. Prediction: perturbations orthogonal to $w$ decay as approximately $\exp(-\gamma t/\mathrm{Da})$, while explicit integration becomes unstable near $\Delta t|\lambda_{\min}(J)|/\mathrm{Da}=2$; the measured boundary should agree within 20%.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: Significant win ✓
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 9/10
Built a conservative recurrent layer with an exactly conserved mode and symmetric negative-semidefinite redistribution Jacobian, plus numerical verification and a sequence-sum mini-experiment. The mechanism manifested: decay-rate error was 0.50%, the explicit-Euler stability boundary matched the predicted boundary within 0.02%, and the Chapman–Enskog response scaled linearly with Da with negligible error. On the learning task, the conservative layer had essentially identical test MSE to the tanh RNN, so no meaningful task-level accuracy win was observed.
- Agent confidence
- 9/10
- Baseline
- Tanh RNN: test MSE 27.2673988, 33 parameters; unconstrained linear sanity baseline growth factor 39.59.
- Idea
- Conservative layer: test MSE 27.2620087, 12 parameters; decay rate -1.005 vs predicted -1.000; Euler boundary 0.333277 vs predicted 0.333333; forced-response slope 0.5573522 vs predicted 0.5573522.
Limitations: Only a tiny synthetic length-30 sequence-sum task was tested, not sequential MNIST, Copy Memory, GRU, or implicit Euler. The learning comparison used equal hidden width but not equal parameter count, and only one fixed seed/training configuration; the stability test used a linear fixed operator rather than a learned nonlinear equilibrium solver.
How to run: python3 verify_conservative_layer.py && /home/maxwelhelp/main/bin/python3 mini_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.17358)
Beats the tuned baseline by 62.4% (p=0.0252, wins 7 / 8 paired seeds; metric: lower is better).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0015
- Idea mean
- 0.0006
- Effect (Δ)
- -0.0009 (−62.4%; negative = idea better)
- Wins
- 7 / 8 paired seeds
- p-value
- 0.0252 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±42.0%
- Mechanism
- Confirmed ✓
- Practical effect
- Helps
- Baseline tuning
- swept over 3 configs
Only the built-in dynamics track was tested; no sequential MNIST, Copy Memory, implicit-Euler variant, larger datasets, or equal-parameter-count architecture was evaluated. The idea uses substantially fewer parameters than the GRU baseline, so the observed gain combines the conservative mechanism with a strong parameter reduction.
How to run: python3 bench_runner.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Worked ✓
Agent confidence: 8/10
Implemented the Conservative Chapman–Enskog recurrent layer on the structurally matched dynamics track and completed the 8-seed paired benchmark. The selected idea achieved lower test MSE than the swept GRU baseline, won 7/8 paired seeds, and passed the harness significance criterion (delta_mean < 0 and p < 0.05). The neural-scale mechanism signature was confirmed quantitatively.
- Baseline
- GRU baseline, best lr=0.01: mean test MSE 0.0015080313, std 0.0005410687, 8 seeds, 13313 parameters.
- Comparison
- delta_mean=-0.0009414689, idea_wins=7/8, permutation p=0.0252, verdict='idea better (significant)'.
- Idea
- ConservativeCE, best lr=0.01, Da=2.0, dt=0.05: mean test MSE 0.0005665624, std 0.0005118783, 8 seeds, 384 parameters.
- Mechanism signature
- Predicted decay=-0.9999995, observed=-1.0258663, relative error=2.5867%; predicted Euler boundary=1.9999988, observed=1.9999088, relative error=0.0045%; conservation residual=2.67e-6; symmetry residual=0; confirmed=true.
Benchmark result
Beats the tuned baseline by 62.4% (p=0.0252, wins 7 / 8 paired seeds; metric: lower is better).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0015
- Idea mean
- 0.0006
- Effect (Δ)
- -0.0009 (−62.4%; negative = idea better)
- Wins
- 7 / 8 paired seeds
- p-value
- 0.0252 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±42.0%
- Mechanism
- Confirmed ✓
- Practical effect
- Helps
- Baseline tuning
- swept over 3 configs
Only the built-in dynamics track was tested; no sequential MNIST, Copy Memory, implicit-Euler variant, larger datasets, or equal-parameter-count architecture was evaluated. The idea uses substantially fewer parameters than the GRU baseline, so the observed gain combines the conservative mechanism with a strong parameter reduction.
How to run: python3 bench_runner.py
Artifacts
- bench_report.json 4.3 KB View Raw
- bench_runner.py 5.4 KB View Raw
- mini_experiment.py 3.0 KB View Raw
- mini_results.json 0.3 KB View Raw
- report.md 1.6 KB View
- report_bench_2026-08-30T194456.md 4.0 KB View
- results.json 1.8 KB View Raw
- verify_conservative_layer.py 5.1 KB View Raw