Fenchel-Gap Certified Neural PDE Training
Implementation & benchmark of arXiv:2607.15702 — Non-Asymptotic Variational Learning for Monotone Nonlinear Multiscale Elliptic Equations: Scale-Robust Primal-Dual Bounds and Strong-Form Statistical Ill-Conditioning
Source paper: Non-Asymptotic Variational Learning for Monotone Nonlinear Multiscale Elliptic Equations: Scale-Robust Primal-Dual Bounds and Strong-Form Statistical Ill-Conditioning arXiv:2607.15702 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Train a primal state network and a dual flux network jointly, using the convex primal-dual gap as the main loss and as an a posteriori certificate of state error. Unlike a strong residual, the certificate is based on monotonicity and convex duality, so it can remain informative even when differentiating rapidly oscillatory coefficients would amplify noise by $1/\varepsilon$.
Formulas
Mathematical statement
Let $A(x,\xi)$ be a uniformly monotone flux with potential $W(x,\xi)$ satisfying $\nabla_\xi W(x,\xi)=A(x,\xi)$, and let $W^*(x,q)=\sup_\xi\{q\cdot\xi-W(x,\xi)\}$ be its convex conjugate. For a state $u_\theta$ and flux $q_\phi$, the pointwise Fenchel gap is $G(x)=W(x,\nabla u_\theta)+W^*(x,q_\phi)-q_\phi\cdot\nabla u_\theta\geq0$, with equality exactly when $q_\phi=A(x,\nabla u_\theta)$. The adapted neural loss is the sampled gap plus a weak equilibrium penalty enforcing $\nabla\cdot q_\phi+f=0$ and boundary flux conditions. If $A$ is $\mu$-strongly monotone, the gap controls state error through $\frac{\mu}{2}\|\nabla u_\theta-\nabla u^*\|_{L^2(\Omega)}^2\leq\mathrm{Gap}(u_\theta,q_\phi)$, where $u^*$ is the exact state, $\mu>0$ is the monotonicity constant, and $\Omega$ is the domain.
Implementation notes
1. Integration point: replace the scalar strong-form PINN residual loss with a two-network variational module. The primal MLP outputs $u_\theta(x)$ and the dual MLP outputs a vector flux $q_\phi(x)\in\mathbb{R}^d$. Use automatic differentiation only for $\nabla u_\theta$ and, optionally, $\nabla\cdot q_\phi$; do not differentiate the rapidly varying coefficient inside a strong residual. 2. Pseudocode: sample energy points $x_n$ and equilibrium points $z_m$; compute $g_n=\nabla u_\theta(x_n)$; evaluate $W(x_n,g_n)$ and $W^*(x_n,q_\phi(x_n))$; form $G_n=W+W^*-q_\phi\cdot g_n$; compute $r_m=\nabla\cdot q_\phi(z_m)+f(z_m)$; set $L=N^{-1}\sum_nG_n+\lambda M^{-1}\sum_m r_m^2+L_{boundary}$; jointly update $\theta$ and $\phi$ with Adam or LBFGS. For quadratic $W(x,\xi)=\frac12\xi^TK(x)\xi$, compute $W^*(x,q)=\frac12q^TK(x)^{-1}q$; for a general monotone $W$, evaluate the conjugate by a small inner Newton solve or use a learned convex potential with analytic conjugate. 3. The paper-derived quantity is the nonnegative Fenchel gap and its monotonicity-based state-error certificate. Estimate the full certificate by fresh Monte Carlo points, while training uses minibatch estimates; report the gap, equilibrium residual, and confidence intervals separately. Increase $\lambda$ only until equilibrium violation is comparable to the gap, avoiding an excessively stiff penalty. 4. First cheap experiment: use a 2D periodic nonlinear coefficient with a known finite-element reference solution, and compare a strong-residual PINN, a primal-only Deep Ritz model, and the primal-dual model at $\varepsilon=1/8,1/16$. Plot true $H^1$ error against the reported gap and test whether the gap upper-bounds error throughout training. Success is a monotone reduction in the certificate, strong correlation between certificate and true error, and stable convergence at small $\varepsilon$ where the strong-residual baseline exhibits gradient variance or sample-size degradation.
Verification
Stage 1 · Toy mechanism gate: Failed ✗
Stage 2 · Mechanism transferred to benchmark: Not tested
Stage 2 · Practical benchmark result: Not run
Methodology: Toy-system gate first; the benchmark stage runs only after a pass. How verification works
Stage 1 — Mechanism check agent confidence 9/10
Built a quadratic 1D oscillatory-coefficient PDE MVP with strong-form, Deep Ritz, and primal-dual neural solvers. The Fenchel gap was nonnegative and scaled as predicted with log-log slope 2.0, and the monotonicity lower bound held for an exact constitutive flux with minimum ratio 4.998. However, the pointwise gap can be exactly zero for a wrong state when the dual flux matches that state's constitutive flux, and the trained primal-dual model had large equilibrium residuals and worse H1 error, so no certified-training win was observed.
- Agent confidence
- 9/10
- Baseline
- Strong PINN H1 gradient error: 0.00191 at eps=1/8 and 0.00450 at eps=1/16; Deep Ritz: 0.11165 and 0.20702.
- Idea
- Primal-dual H1 gradient error: 0.33622 at eps=1/8 and 0.29601 at eps=1/16; gap: 0.02865 and 0.02655; equilibrium RMSE: 16.50 and 32.93. Math sweep: gap scaling slope 2.0, minimum certificate ratio 4.998, and wrong-state matching-flux gap 0.
Limitations: Only a small 1D manufactured problem was tested, not the proposed 2D finite-element reference experiment. The primal-dual penalty and network were not extensively tuned, boundary flux conditions were not implemented, and the certificate was not validated under a genuinely equilibrated learned flux.
How to run: python3 fenchel_experiment.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Artifacts
- fenchel_experiment.py 6.0 KB View Raw
- report.md 1.5 KB View
- results.json 2.0 KB View Raw