# Dirichlet Spectral Projection Layers

- ID: 232
- Canonical URL: https://synthcore.org/idea/232/dirichlet-spectral-projection-layers
- API JSON: https://synthcore.org/api/idea/232.json
- API Markdown: https://synthcore.org/api/idea/232.md
- Verification status: mech_ok_no_baseline
- Source: [arXiv:2608.27256](https://arxiv.org/abs/2608.27256)
- Category: architecture
- Solves: accuracy, stability, generalization
- ML areas: cnn, mlp, training
- Math tags: pde, spectral-theory, functional-analysis, numerical-analysis, geometry
- Ratings: usefulness 7/10; difficulty 5/10; novelty 7/10

## 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.

## 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.

## Key formulas

- $$-\Delta\phi_k=\lambda_k\phi_k\quad\text{in }\Omega,\qquad \phi_k=0\quad\text{on }\partial\Omega,\qquad \langle\phi_i,\phi_j\rangle_{L^2(\Omega)}=\delta_{ij}.$$
- $$P_M f=\sum_{k=1}^{M}\langle f,\phi_k\rangle_{L^2(\Omega)}\phi_k,\qquad V_M=\operatorname{span}\{\phi_1,\ldots,\phi_M\},$$
- $$u_{l+1}=P_M\!\left[\sigma\!\left(W_lu_l+b_l+\int_{\Omega}\kappa_l(\cdot,y)u_l(y)\,dy\right)\right],$$
- $$P_h f=V V^{\mathsf T}M_h f,\qquad V^{\mathsf T}M_hV=I,$$

## 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

- Status: mech_ok_no_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: harms
- Verdict: 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.

### Mechanism check

- Verdict: 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.
- Confidence: 9/10
- 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.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.0081
- Paired wins: 0/8
- Benchmark verdict: idea worse (significant)

## Artifacts

- [bench_report.json](https://synthcore.org/code/107/bench_report.json)
- [experiment.py](https://synthcore.org/code/107/experiment.py)
- [poisson_track.py](https://synthcore.org/code/107/poisson_track.py)
- [report.md](https://synthcore.org/code/107/report.md)
- [report_bench_2026-08-30T145413.md](https://synthcore.org/code/107/report_bench_2026-08-30T145413.md)
- [results.json](https://synthcore.org/code/107/results.json)
- [run_bench.py](https://synthcore.org/code/107/run_bench.py)
- [Download all files as ZIP](https://synthcore.org/download/107)

## Disclaimer

AI-generated research hypothesis, automatically tested. Not peer-reviewed.
