Dirichlet Spectral Projection Layers
Implementation & benchmark of arXiv:2608.27256 — Enforcing Dirichlet Boundary Conditions in Operator Learning
Source paper: Enforcing Dirichlet Boundary Conditions in Operator Learning arXiv:2608.27256 ⓘ · analyzed Aug 29, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace soft boundary penalties in neural operators with a hard projection onto a finite-dimensional span of homogeneous Dirichlet Laplacian eigenfunctions. Every projected hidden field is identically zero on the boundary, while increasing the number of retained eigenfunctions recovers the expressive capacity needed for operator approximation.
Formulas
Mathematical statement
Let \(\Omega\subset\mathbb{R}^{d}\) be a bounded Lipschitz domain and let \((\phi_k,\lambda_k)\) be Dirichlet Laplacian eigenpairs satisfying \(-\Delta\phi_k=\lambda_k\phi_k\) in \(\Omega\), \(\phi_k=0\) on \(\partial\Omega\), with \(\langle\phi_i,\phi_j\rangle_{L^2(\Omega)}=\delta_{ij}\). For a truncation level \(M\), define \(V_M=\operatorname{span}\{\phi_1,\ldots,\phi_M\}\) and the orthogonal projection \(P_M f=\sum_{k=1}^{M}\langle f,\phi_k\rangle_{L^2(\Omega)}\phi_k\). Since every \(\phi_k\) vanishes on \(\partial\Omega\), \((P_Mf)|_{\partial\Omega}=0\) exactly. Adapt a kernel-integral neural-operator layer \(G_l\) by setting \(u_{l+1}=P_M\,\sigma(G_l(u_l))\), where \(\sigma\) is a pointwise channel nonlinearity and the projection is applied after the nonlinearity. On a mesh with mass matrix \(M_h\) and matrix \(V\) whose columns are mass-orthonormal discrete eigenvectors, the implementable projection is \(P_h f=V V^{\mathsf T}M_h f\). The paper's key construction is the restriction of each layer output to \(V_M\); the eigenbasis truncation controls the accuracy-versus-compute tradeoff.
Implementation notes
(1) Integration point: use a mesh-based neural operator for a PDE coefficient-to-solution map. Replace the final output head, and optionally every hidden function-valued layer, with a Dirichlet spectral projection. The input coefficient can remain in the original mesh representation; only channels representing solution fields are projected. For a fixed domain, precompute the first M finite-element eigenvectors of the generalized problem K_h v_k=\lambda_k M_hv_k, where K_h is the stiffness matrix and M_h is the mass matrix. Normalize V so V^T M_h V=I. (2) Pseudocode: Z = kernel_integral_layer(U, coordinates); Y = activation(Z); C = V.T @ M_h @ Y; U_next = V @ C; for batched tensors, use C = einsum('kn,nm,bmc->bkc', V.T, M_h, Y) and U_next = einsum('nk,bkc->bnc', V, C). Repeat for each selected layer and decode the final projected field directly on mesh nodes. The displayed projection is P_M. (3) Computed from the mathematics: eigenvectors, mass-weighted inner products, and exact zero boundary values inherited from the discrete Dirichlet eigenproblem. Estimated empirically: choose M by validation, measure projection truncation error \(\|Y-P_hY\|_{M_h}\), and optionally increase M during training. For a nonhomogeneous boundary g, construct a lifting function Lg and predict v in the homogeneous space, returning u=Lg+v. (4) First experiment: train a small graph or kernel neural operator on Poisson or Darcy flow on both a square and a disk, comparing ordinary neural-operator training, a boundary penalty \(\|u|_{\partial\Omega}\|^2\), and projection layers with M in {16,32,64,128}. Use identical parameter counts and optimize relative L2 solution error. The expected signal is boundary error at machine precision for the projected model, improved validation error when boundary data are sparse or noisy, and no degradation at sufficiently large M. Report wall-clock cost, memory, and transfer to an irregular mesh; success requires lower boundary and total error than penalty training at equal epochs, with projection overhead below roughly 20%.
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 9/10
Built a mass-weighted Dirichlet spectral projection module and reproducible toy Poisson operator experiment. The mechanism was confirmed: mass orthogonality error was 5.2e-15, projection idempotence was below 7.5e-15, projected boundary values were exactly zero, and pure-mode recovery transitioned from relative error 1 below the cutoff to approximately 1e-15 at and above it. For coefficients decaying as k^-2, the observed truncation slope was -1.450 versus the predicted -1.5. In the toy regression, spectral M=8 improved relative L2 from 0.0975 to 0.0918 while enforcing zero boundary values, though M=16 was 0.1137 after the fixed training budget, so broad optimization superiority is not established.
- Agent confidence
- 9/10
- Baseline
- relative L2 0.09751; max boundary abs 0.01245; 16,962 parameters; 2.48 s
- Idea
- M=8: relative L2 0.09183; max boundary abs 0; 11,336 parameters; 1.87 s. M=16: relative L2 0.11372; max boundary abs 0; 12,112 parameters; 1.77 s. Math checks: orthogonality 5.18e-15, idempotence <=7.48e-15, cutoff errors 1.0 below M and approximately 1e-15 at/above, tail slope -1.450 versus -1.5 predicted.
Limitations: This is a 1-D sine-basis toy rather than a finite-element 2-D square or disk neural operator. It does not test irregular meshes, nonhomogeneous boundary lifting, sparse or noisy boundary data, or a careful hyperparameter and FLOP-matched sweep; the M=16 regression is sensitive to the fixed 700-step budget.
How to run: python3 experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.27256)
Significantly WORSE than the tuned baseline (+377.6%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Poisson–Dirichlet process
- Model
- shared_mlp
- Paired seeds
- 8
- Baseline mean
- 0.0001
- Idea mean
- 0.0005
- Effect (Δ)
- 0.0004 (+377.6%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Confirmed ✓
- Practical effect
- Hurts
- Baseline tuning
- swept over 0 configs
The custom task is a fast 1-D sampled-sine Poisson benchmark, not a 2-D finite-element square or disk mesh. It does not test irregular meshes, nonhomogeneous boundary lifting, noisy or sparse boundary observations, hidden-layer projections, larger M values, or independent wall-clock overhead. The baseline sweep used soft boundary penalties including zero penalty; no larger neural operator or PDE generalization study was run.
How to run: python3 run_bench.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
Built and evaluated a structurally matched custom 1-D Poisson Dirichlet benchmark with 8 paired seeds, baseline hyperparameter sweep, idea sweep, and trained-model mechanism signature. The hard spectral projection prediction was confirmed quantitatively: idea boundary mean absolute value was 0 versus 0.004505 for baseline, and the trained idea output had relative spectral residual 3.85e-7. However, the idea was significantly worse on independent task MSE (0.0005028 versus 0.0001053, paired delta +0.0003975, permutation p=0.0081), so it does not give a benchmark win.
- Baseline
- Best config lr=0.006, boundary_penalty=0.0; 8-seed test MSE mean 0.0001052740, std 0.0000100267.
- Idea
- Best config lr=0.006, M=16; 8-seed test MSE mean 0.0005027884, std 0.0000498265. Paired delta +0.0003975144, p=0.0081, 0/8 idea wins. Boundary mean abs: baseline 0.00450547, idea 0.0; spectral residual 3.8486e-7.
Benchmark result
Significantly WORSE than the tuned baseline (+377.6%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Poisson–Dirichlet process
- Model
- shared_mlp
- Paired seeds
- 8
- Baseline mean
- 0.0001
- Idea mean
- 0.0005
- Effect (Δ)
- 0.0004 (+377.6%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Confirmed ✓
- Practical effect
- Hurts
- Baseline tuning
- swept over 0 configs
The custom task is a fast 1-D sampled-sine Poisson benchmark, not a 2-D finite-element square or disk mesh. It does not test irregular meshes, nonhomogeneous boundary lifting, noisy or sparse boundary observations, hidden-layer projections, larger M values, or independent wall-clock overhead. The baseline sweep used soft boundary penalties including zero penalty; no larger neural operator or PDE generalization study was run.
How to run: python3 run_bench.py
Artifacts
- bench_report.json 5.5 KB View Raw
- experiment.py 5.7 KB View Raw
- poisson_track.py 1.2 KB View Raw
- report.md 1.7 KB View
- report_bench_2026-08-30T145413.md 3.8 KB View
- results.json 2.8 KB View Raw
- run_bench.py 6.3 KB View Raw