Zeta-Corrected Singular Integral Layer
Implementation & benchmark of arXiv:2607.12390 — SinCoTrap: A High-Order Locally Corrected Trapezoidal Rule for Periodic Singular Integrals in Arbitrary Dimensions
Source paper: SinCoTrap: A High-Order Locally Corrected Trapezoidal Rule for Periodic Singular Integrals in Arbitrary Dimensions arXiv:2607.12390 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Construct a periodic neural integral layer whose fixed singular kernel behaves like |y|^{-s} near the origin, but whose samples on the uniform grid are replaced on a small symmetric stencil by SinCoTrap correction weights. The correction cancels low-order Taylor errors caused by sampling the singularity, while all nonlocal grid points remain unchanged. Increasing the correction order from p=0 to p=1 or p=2 should reduce discretization error without increasing global grid resolution.
Formulas
Mathematical statement
The paper considers I[φ·σ]=∫_V φ(x)σ(x) dx with σ(x)=|x−x_0|^{-s}, where d is the spatial dimension, 0<s<d, V is a periodic unit cell, and φ is smooth away from the isolated singularity. Its corrected trapezoidal rule changes only a fixed number of weights near the singular grid point and achieves error O(h^{2p+2+d−s}), where h is grid spacing and p is correction order. The correction coefficients are generated from the analytically continued generalized lattice zeta function Z_{2α}(s)=Σ_{n∈Z^d\{0}} n^{2α}/|n|^s, initially defined for Re(s)>d+2|α|_1, with multi-index α=(α_1,...,α_d) and n^{2α}=∏_k n_k^{2α_k}. For an implementable approximation, use a symmetric stencil S and solve the even-moment system Σ_{r∈S} c_r r^{2α}=b_α(d,s) for |α|_1≤p, where b_α(d,s) is obtained from analytically continued zeta values; a practical initialization is b_α=AC[Z_{2α}(s)]/(2α)!, followed by calibration against a high-resolution reference. Symmetry makes odd moments vanish automatically and keeps the stored coefficient set small.
Implementation notes
(1) Exact integration point: add this as a periodic neural integral or convolution layer operating on a feature tensor F∈R^{B×C×n^d}. Fix a singular component K_sing(y)=a|y|^{-s}, optionally followed by a learned channel-mixing matrix A∈R^{C×C}; let a smooth learned branch model the nonsingular remainder. Apply the correction only to displacement samples in a fixed stencil S around zero during both training and inference. (2) Pseudocode: choose grid spacing h=1/n, dimension d, exponent s, correction order p, and symmetric stencil S={r∈Z^d:||r||_∞≤R}. Offline, evaluate or approximate AC[Z_{2α}(s)] for all |α|_1≤p, form b_α=AC[Z_{2α}(s)]/(2α)!, and solve the constrained least-squares system M c=b with M_{α,r}=r^{2α}; impose c_r=c_{−r} and use a minimum-norm solution. At runtime, for every grid site i, compute G_i=h^d[Σ_{j∉S}|hj|^{-s}F_{i−j}+h^{−s}Σ_{r∈S}w_rF_{i−r}] using periodic indexing, then output Y_i=φ(A G_i+W F_i). Set w_r to the ordinary sampled value |r|^{-s} plus correction c_r, with a finite learned or fixed value at r=0. (3) Mathematics versus empirical estimation: d,s,p, the moment equations, predicted order 2p+2+d−s, and zeta-based coefficients come from the paper. Estimate analytically continued zeta values numerically with Ewald splitting or fit coefficients against a very fine-grid reference, and monitor the moment residual ||Mc−b||_2. Train only the singular amplitude a and channel matrix A initially; freeze correction weights for the first ablation. (4) First cheap experiment: use a 2D periodic Burgers or advection-diffusion surrogate with inputs and targets on 32×32, 64×64, and 128×128 grids. Compare a naive periodic neural convolution against corrected layers with p=0,1,2, keeping width, optimizer, parameter count, and wall-clock budget fixed. Generate smooth random Fourier fields and compute reference singular convolutions on a 512×512 grid. The expected signal is a log-log discretization slope near 2p+2+d−s and lower validation error at equal resolution; success means p=1 or p=2 reaches the baseline accuracy with fewer grid points while adding only O(|S|) local work per site.
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 readable periodic 2-D ZetaSingularIntegral layer in zeta_layer.py and a calibrated singular quadrature experiment in experiment.py. The even-moment systems solved to near machine precision, but the predicted slopes 3.5, 5.5, and 7.5 were not confirmed; observed smooth-field slopes were approximately 0.01, 0.05, and -3.09 for p=0,1,2, with nonmonotonic errors. Thus there is no reliable evidence of the claimed discretization-order win.
- Agent confidence
- 9/10
- Baseline
- The calibrated p=0 smooth-field errors for n=[12,20,32,48,72,104] were [3.74e-3, 7.62e-5, 4.03e-4, 4.40e-4, 4.27e-4, 4.15e-4]. A separate learned baseline training comparison was not completed.
- Idea
- For p=1, smooth-field errors were [1.01e-2, 3.49e-3, 9.72e-4, 4.76e-5, 3.68e-4, 5.42e-4]. For p=2 they were [1.65e-2, 6.27e-3, 2.37e-3, 9.57e-4, 3.23e-4, 5.80e-5]. p=2 improves at the finest grid but does not exhibit the predicted 7.5 slope. Maximum final moment residuals were 3.6e-15, 1.5e-12, and 6.7e-9 for p=0,1,2.
Limitations: No analytically continued generalized zeta/Ewald implementation, no Burgers or learned neural training experiment, no wall-clock or FLOP comparison, and no independent 512x512 reference. Calibration used exact polar cell moments rather than paper-derived analytically continued zeta coefficients, so this tests a local moment-calibration proxy rather than a fully paper-faithful zeta implementation.
How to run: python3 experiment.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Artifacts
- experiment.py 2.8 KB View Raw
- report.md 1.7 KB View
- results.json 3.0 KB View Raw
- results_final.json 3.1 KB View Raw
- results_fixed.json 2.9 KB View Raw
- results_fixed2.json 3.0 KB View Raw
- zeta_layer.py 2.2 KB View Raw