Truncated-Fourier Domain Pooling
Implementation & benchmark of arXiv:2608.25264 — "Truncated Fourier Filtering" method for fast and high-order evaluation of integrals and convolutions in general domains
Source paper: "Truncated Fourier Filtering" method for fast and high-order evaluation of integrals and convolutions in general domains arXiv:2608.25264 ⓘ · analyzed Aug 29, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace ordinary masked mean pooling with a Fourier-compressed quadrature operator for arbitrary two-dimensional or three-dimensional domains. The geometry is preprocessed once into reusable grid weights, allowing every channel and every training example using the same domain to be pooled without boundary-area bias.
Formulas
Mathematical statement
The paper evaluates the functional \(\mathcal{A}[f]=\int_{\mathcal{K}}f(\mathbf{x})\,d\mathbf{x}\), where \(\mathcal{K}\subset\mathbb{R}^{m}\) is a compact domain and \(f\) is a feature field. Approximate the indicator of the domain by \(\chi_{\mathcal K}(\mathbf{x})\approx\sum_{|\ell|_{\mathrm c}\le F}c_{\ell}\exp(2\pi i\ell\cdot\mathbf{x}/L)\), where \(c_{\ell}\) are Fourier coefficients, \(F=(F_1,\ldots,F_m)\) is the coordinatewise truncation bandwidth, \(L=(L_1,\ldots,L_m)\) contains the periodic-box side lengths, and \(\ell\in\mathbb{Z}^{m}\). Evaluating this approximation on grid points \(\mathbf{x}_{\mathbf q}\) produces weights \(w_{\mathbf q}\). The extracted aliasing estimate contains factors \(\prod_{s:i_s\ne0}n_s^{-p_s}\), where \(n_s\) is the grid size in coordinate \(s\) and \(p_s\ge2\) is the decay exponent. The practical constraint \(F_s\le a n_s\) keeps retained modes away from the Nyquist limit.
Implementation notes
Integrate the method at the global-pooling or masked-pooling operation of a CNN, ViT, or grid-based neural operator. Inputs are a fixed binary or continuous domain mask, a feature tensor X with shape B by C by n1 through nm, grid coordinates x_q, box lengths L_s, and bandwidths F_s. In preprocessing, compute the multidimensional FFT of the mask, retain coefficients c_l satisfying |l_s| <= F_s, inverse-transform the retained coefficients to obtain w_q, and normalize the weights using Z = Delta V times the sum over q of w_q. In each forward pass, compute pooled[b,c] = Delta V times the sum over q of X[b,c,q] times w_q divided by Z plus epsilon. Use the paper's constraint F_s <= a n_s, initially with a between 0.25 and 0.5. Geometry coefficients and weights are computed from the paper's Fourier approximation; grid resolution, bandwidth, padding, and optional clipping of tiny negative weights are empirical choices. First test a small U-Net or ViT on images restricted to random polygon, ellipse, hole, and cusp masks. Compare ordinary masked mean pooling, zero-padded mean pooling, and Fourier pooling at equal resolution. Measure pooling error against a high-resolution numerical integral, validation accuracy as boundary complexity increases, and amortized runtime after preprocessing. Success is lower integration bias and improved boundary-heavy validation accuracy with negligible per-step overhead.
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 reusable 2-D/3-D truncated-FFT domain weights and normalized weighted pooling. Constant-field pooling was exact to about 2e-15, and half-Nyquist truncation reconstructed the sampled ellipse mask to L2 error 1.5e-16. However, across ellipse, hole, cusp, and polygon masks at 24/48/96 resolution, quarter-bandwidth Fourier pooling had mean MAE ratio 1.053 versus masked mean, while clipping negative weights increased the ratio to 2.092; therefore the claimed accuracy win was not observed.
- Agent confidence
- 9/10
- Baseline
- Masked-mean mean absolute integration error; reference-based aggregate Fourier ratio = 1.053 at quarter bandwidth (half bandwidth reproduced the sampled mask and matched baseline).
- Idea
- Truncated Fourier pooling: exact constant preservation (~1.9e-15 error), representative preprocessing 0.445 ms and 4-channel pooling 0.105 ms; quarter-bandwidth mean error was 5.3% higher than masked mean, and clipped weights were 109% higher.
Limitations: Only synthetic analytic 2-D fields and masks were tested; no CNN/ViT training, validation-accuracy experiment, CUDA benchmark, 3-D accuracy study, or high-resolution real-data boundary benchmark was run. Runtime measurements are small NumPy CPU timings and do not establish a production speedup.
How to run: cd /home/maxwelhelp/all/math2nn/experiments/exp165_truncated-fourier-domain-pooling && /home/maxwelhelp/main/bin/python3 experiment.py && /home/maxwelhelp/main/bin/python3 - <<'PY'
import numpy as np
from fourier_pool import truncated_fourier_weights, pool
n=48; x=(np.arange(n)+.5)/n; X,Y=np.meshgrid(x,x,indexing='ij')
m=(((X-.5)/.32)**2+((Y-.5)/.24)**2<1).astype(float)
w=truncated_fourier_weights(m,(n//4,n//4)); print(abs(pool(np.ones((1,1,n,n)),w)[0,0]-1), np.sqrt(np.mean((w-m)**2)))
PY
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Artifacts
- experiment.py 4.1 KB View Raw
- fourier_pool.py 1.3 KB View Raw
- report.md 2.0 KB View
- results.json 8.6 KB View Raw