# Эксперимент: Truncated-Fourier Domain Pooling (#1192) { "worked": false, "confidence": 9, "verdict": "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.", "metrics": { "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." }, "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'\nimport numpy as np\nfrom fourier_pool import truncated_fourier_weights, pool\nn=48; x=(np.arange(n)+.5)/n; X,Y=np.meshgrid(x,x,indexing='ij')\nm=(((X-.5)/.32)**2+((Y-.5)/.24)**2<1).astype(float)\nw=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)))\nPY", "files": [ "experiment.py", "fourier_pool.py", "results.json" ], "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." }