Gale-Nullspace Feature Mixer
Implementation & benchmark of arXiv:2608.17992 — Combinatorics of the Fourier transform: Stokes data, Gale duality and frieze patterns
Source paper: Combinatorics of the Fourier transform: Stokes data, Gale duality and frieze patterns arXiv:2608.17992 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Represent a batch of token or feature directions as columns of a matrix X, and construct a complementary feature basis Y whose columns are annihilated by X under a diagonal gauge. Use Y as a second algebraically complementary channel for attention or token mixing, either replacing redundant feature projections or regularizing them toward an exact nullspace relation.
Formulas
Mathematical statement
The paper's Gale duality starts with b projective points represented by an a by b full-row-rank matrix X, whose i-th column is a representative of the i-th point. A Gale dual configuration is represented by a (b-a) by b matrix Y, and there exists an invertible diagonal matrix D equal to diag(d_1,...,d_b) such that Y D X-transpose equals zero. The diagonal matrix accounts for the fact that projective column representatives are defined only up to independent rescaling. In the neural adaptation, X is in R to the power a by b and contains projected token features, Y is in R to the power (b-a) by b and is a complementary channel, and D is initially the identity. The useful property is exact annihilation: every row of Y lies in the nullspace of X, so the two channels cannot encode the same linear directions. For numerical training, compute Y from the singular value decomposition of X-transpose and take the singular vectors associated with the smallest b-a singular values. If exact nullspaces do not exist because X is noisy or rank-deficient, use a soft penalty on the residual.
Implementation notes
Integrate this into a Transformer block immediately after token embedding or after the value projection, before the usual token mixer. For a sequence tensor H of shape B by T by d, choose a window length b equal to T_w and a primary channel dimension a smaller than b. For each batch element and window, form X = W_x H-transpose, with shape a by b, where W_x has shape a by d. Compute the thin SVD of X-transpose, take the last b-a left singular vectors, and set their transpose to Y, with shape (b-a) by b. Project the same window through W_y and mix it with Y: compute primary output as P times V using ordinary attention, compute dual output as the transpose of Y times the projected feature matrix, then concatenate or gated-sum the two outputs before the output projection. In a cheaper training-only version, make Y a learned parameter generated by a small network and add lambda times the normalized Frobenius penalty from the formula. At inference, recompute Y with a randomized SVD or a few power iterations. Compute from the paper's mathematics the nullspace basis and orthogonality penalty; estimate the window size, dimension a, and gate coefficient empirically. First test a 6-layer, 128-dimensional causal Transformer on WikiText-2 with window size 64, comparing standard attention, low-rank attention of rank a, and the Gale mixer at equal parameter count. Measure validation perplexity, singular-value overlap between primary and dual channels, and peak activation memory. Success means matching or improving perplexity while reducing redundant channel dimension; a useful target is at least 10 percent lower activation memory at equal perplexity.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: No measurable effect
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 and numerically verified the Gale nullspace mixer MVP. Across four matrix sizes, exact SVD construction gave ||YXᵀ||≈4.2e-16–2.5e-15; perturbation sweeps measured residual scaling gamma^1.0000 and normalized penalty scaling gamma^2.0002, matching theory. A constant diagonal gauge preserved annihilation while nonconstant gauges produced increasing residuals; the toy dual-channel probe reduced MSE from 0.04744 to 0.00243, but used width 8 versus primary width 3, so no equal-budget memory or perplexity win was established.
- Agent confidence
- 9/10
- Baseline
- Primary-only held-out toy probe MSE: 0.0474379; representation width 3
- Idea
- Primary+Gale dual held-out toy probe MSE: 0.00242766; representation width 8. Exact nullspace residuals: 4.24e-16 to 2.46e-15; perturbation slopes: residual 1.0000, penalty 2.0002
Limitations: No Transformer, WikiText-2, attention training, equal-parameter comparison, activation-memory measurement, learned diagonal D, or inference-time randomized SVD was tested. The toy probe intentionally constructs targets using both channels and is evidence for a mechanism signal rather than a practical language-model improvement.
How to run: python3 gale_mixer_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.17992)
Ahead of the baseline (−0.2%) but not statistically significant (p=0.1868, wins 5 / 8 paired seeds).
- Benchmark
- Sequence modeling
- Model
- transformer_tiny
- Paired seeds
- 8
- Baseline mean
- 0.3066
- Idea mean
- 0.3061
- Effect (Δ)
- -0.0006 (−0.2%; negative = idea better)
- Wins
- 5 / 8 paired seeds
- p-value
- 0.1868 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±0.3%
- Mechanism
- Confirmed ✓
- Practical effect
- No effect
- Baseline tuning
- swept over 3 configs
Only the built-in sequence forecast track was tested; no WikiText-2, six-layer 128-dimensional Transformer, randomized-SVD inference, learned diagonal gauge, activation-memory measurement, or equal-parameter memory study was run.
How to run: python3 gale_stage2_bench.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
Built and trained an end-to-end Gale nullspace mixer on the structurally matched sequence forecast track using the canonical transformer training loop. The core SVD check passed with maximum residual 5.56e-15, and the trained-model null residual averaged 9.66e-7. Test MSE changed from 0.306645 to 0.306060, but the paired delta was -0.000585 with permutation p=0.18685, so there was no significant benchmark win.
- Baseline
- Test MSE mean 0.3066449799, std 0.0326071854; best lr 0.001
- Idea
- Test MSE mean 0.3060599342, std 0.0324784173; best lr 0.001; paired delta -0.0005850457; 5/8 wins; permutation p=0.18685
Benchmark result
Ahead of the baseline (−0.2%) but not statistically significant (p=0.1868, wins 5 / 8 paired seeds).
- Benchmark
- Sequence modeling
- Model
- transformer_tiny
- Paired seeds
- 8
- Baseline mean
- 0.3066
- Idea mean
- 0.3061
- Effect (Δ)
- -0.0006 (−0.2%; negative = idea better)
- Wins
- 5 / 8 paired seeds
- p-value
- 0.1868 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±0.3%
- Mechanism
- Confirmed ✓
- Practical effect
- No effect
- Baseline tuning
- swept over 3 configs
Only the built-in sequence forecast track was tested; no WikiText-2, six-layer 128-dimensional Transformer, randomized-SVD inference, learned diagonal gauge, activation-memory measurement, or equal-parameter memory study was run.
How to run: python3 gale_stage2_bench.py
Artifacts
- README.md 1.1 KB View
- bench_report.json 3.2 KB View Raw
- gale_mixer_experiment.py 4.7 KB View Raw
- gale_stage2_bench.py 5.5 KB View Raw
- report.md 1.4 KB View
- report_bench_2026-09-01T165502.md 4.1 KB View
- results.json 3.7 KB View Raw