Derivative-Free Very-Weak Neural PDE Solver
Implementation & benchmark of arXiv:2607.14498 — Neural Very Weak Formulations enabling Hardware-Oriented deep PDE solvers
Source paper: Neural Very Weak Formulations enabling Hardware-Oriented deep PDE solvers arXiv:2607.14498 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Train a neural trial function for an elliptic PDE using a very-weak residual in which all derivatives act on fixed smooth test functions rather than on the neural network. This eliminates second-order reverse-mode or forward-mode automatic differentiation and allows low-regularity activations while retaining a least-squares objective over many test functions.
Formulas
Mathematical statement
For the Dirichlet problem $-\Delta u=f$ in $\Omega$ with $u=g$ on $\Gamma=\partial\Omega$, the paper gives, for every test function $w\in H^2(\Omega)\cap H_0^1(\Omega)$, the identity $-\int_\Omega u\Delta w=-\int_\Gamma g\partial_\eta w+\int_\Omega fw$. Here $u$ is the PDE solution, $f$ is the forcing term, $g$ is the boundary value, $\eta$ is the outward unit normal, and $\partial_\eta w=\nabla w\cdot\eta$. Given smooth tests $w_j$, define $u_\theta$ as the neural approximation and $r_j(\theta)=-\int_\Omega u_\theta\Delta w_j+\int_\Gamma g\partial_\eta w_j-\int_\Omega fw_j$. The adapted least-squares loss is $L(\theta)=m^{-1}\sum_{j=1}^m r_j(\theta)^2$ plus an optional boundary penalty. Since only $u_\theta$ is evaluated, no spatial derivatives of the neural network are required.
Implementation notes
Integrate this at the PDE loss layer, replacing the usual pointwise residual $|\Delta u_\theta-f|^2$, which requires differentiating the network twice. Use a network $v_\theta(x)$ and, when possible, a boundary-preserving parameterization $u_\theta(x)=\ell(x)+d(x)v_\theta(x)$, where $\ell$ extends $g$ into the domain and $d$ vanishes on the boundary. Choose $m$ fixed test functions $w_j$ that vanish on the boundary and are twice differentiable; sine products on a box, compactly supported smooth bumps, or low-order finite-element basis functions are suitable. Precompute quadrature points $x_q$, weights $a_q$, values $w_j(x_q)$, $\Delta w_j(x_q)$, and boundary values $\partial_\eta w_j(s_q)$. At each iteration, evaluate only $u_\theta(x_q)$ and compute r[j] = -sum_q(a[q] * u[q] * lap_w[j,q]) + boundary_term[j] - forcing_term[j]; backpropagate through the scalar network outputs but never call input-Jacobian or Hessian autodiff. Randomly rotate or resample the test-function subset every few epochs to reduce the risk of fitting a fixed projection nullspace. The PDE identity and quadrature expressions are mathematical components; quadrature resolution, test selection, and the boundary penalty are empirical choices. First test Poisson on a 2D unit square with a known sinusoidal solution using a four-layer MLP. Compare against a standard PINN with second-order autodiff at equal wall-clock time and equal width. Measure loss descent per second, peak memory, final relative $L^2$ error, and boundary error. Success means comparable or lower error with at least 2x lower training memory or time, especially for high-dimensional inputs or nonsmooth activations.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: Significantly worse ✗
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 derivative-free very-weak Poisson solver with precomputed sine-test Laplacians and a boundary-preserving ReLU MLP, plus a genuine second-order autodiff strong-form baseline. Exact residuals stayed below 4e-15 across quadrature orders and residual/(delta·eigenvalue) was 1.0 across four modes. Weak ReLU achieved 0.0157 relative L2 error versus 0.278 for strong ReLU and ran 6.8x faster, although memory savings were not visible for this tiny model.
- Agent confidence
- 8/10
- Baseline
- Strong ReLU PINN: relative L2 0.2782, loss 2.0697, 14.29 s, peak CUDA memory 18.94 MB; strong tanh: relative L2 0.1010, 15.90 s.
- Idea
- Very-weak ReLU solver: relative L2 0.0157, loss 0.0506, 2.11 s, peak CUDA memory 18.83 MB; width sweep relative L2 0.102, 0.082, 0.056 for widths 16, 32, 48.
Limitations: The comparison used a small 2D manufactured Poisson problem, fixed sine tests, boundary-preserving parameterization, equal optimizer steps rather than equal FLOPs, and a tiny network where memory differences are not meaningful. It did not test higher dimensions, irregular domains, nonzero boundary data, adaptive or random test resampling, nonsmooth forcing, or large-scale memory behavior.
How to run: python3 experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.14498)
Significantly WORSE than the tuned baseline (+6524.9%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Poisson_dirichlet_local
- Model
- mlp_tiny
- Paired seeds
- 8
- Baseline mean
- 0.0002
- Idea mean
- 0.0147
- Effect (Δ)
- 0.0145 (+6524.9%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±604.4%
- Mechanism
- Confirmed ✓
- Practical effect
- Hurts
- Baseline tuning
- swept over 3 configs
Small 1-D spectral Poisson inverse map, 32 spatial outputs, 12 forcing modes, tiny MLP, and 20 epochs; no 2-D or irregular domains, nonzero boundary data, adaptive test resampling, larger networks, memory profiling, wall-clock comparison, or equal-FLOP study.
How to run: python3 bench_stage2.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 10/10
The structurally matched Poisson/Dirichlet benchmark completed with 8 paired seeds. The derivative-free weak method confirmed its lambda-scaled residual mechanism exactly, but was significantly worse than the tuned standard baseline: delta_mean was positive and permutation p=0.0081, so the system verdict is false.
- Baseline
- mean test MSE 0.0002222221 (lr=0.01, epochs=20)
- Idea
- mean test MSE 0.01472205 (best of lr=0.005, 0.01, 0.02; 20 epochs)
Benchmark result
Significantly WORSE than the tuned baseline (+6524.9%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Poisson_dirichlet_local
- Model
- mlp_tiny
- Paired seeds
- 8
- Baseline mean
- 0.0002
- Idea mean
- 0.0147
- Effect (Δ)
- 0.0145 (+6524.9%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±604.4%
- Mechanism
- Confirmed ✓
- Practical effect
- Hurts
- Baseline tuning
- swept over 3 configs
Small 1-D spectral Poisson inverse map, 32 spatial outputs, 12 forcing modes, tiny MLP, and 20 epochs; no 2-D or irregular domains, nonzero boundary data, adaptive test resampling, larger networks, memory profiling, wall-clock comparison, or equal-FLOP study.
How to run: python3 bench_stage2.py
Artifacts
- bench_report.json 4.2 KB View Raw
- bench_stage2.py 5.5 KB View Raw
- experiment.py 6.4 KB View Raw
- report.md 1.4 KB View
- report_bench_2026-08-30T182259.md 3.6 KB View
- results.json 4.1 KB View Raw