Polar Slack Attention
Implementation & benchmark of arXiv:2609.02439 — Dual Geometry of Spherical Designs: Polarity, Self-Polar Rigidity, and Quadrature Structure
Source paper: Dual Geometry of Spherical Designs: Polarity, Self-Polar Rigidity, and Quadrature Structure arXiv:2609.02439 ⓘ · analyzed Sep 3, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Use a spherical-design codebook and the paper's polar slack factorization to create a nonnegative geometric interaction bias for attention or expert routing. The resulting kernel is generated by a rank-one term and a rank-at-most-d term, and entries close to zero can define a structured sparse mask instead of relying only on learned top-k selection.
Formulas
Mathematical statement
Let X = [x_1,...,x_N] be a d by N matrix whose columns x_i are unit spherical-design points, let h = (h_1,...,h_N)^T contain positive support numbers, let U be an orthogonal d by d matrix, and let c > 0. Under the paper's self-polar relation, the slack matrix is A = c h h^T - X^T U^T X, with A_{ij} = c h_i h_j - x_i^T U^T x_j. The paper states that A is nonnegative, has rank d+1, and has a zero pattern equal to facet-vertex incidence. The rank bound follows because c h h^T has rank one and X^T U^T X has rank at most d. For neural attention, use A as a positive structural kernel and add log(A + epsilon) to ordinary query-key logits, where epsilon > 0 avoids logarithms of zero. The mathematical guarantee applies only when h, c, and U form the paper's valid polar realization; in an ML relaxation, nonnegativity is enforced explicitly and the factorization is retained even when exact incidence zeros are absent.
Implementation notes
Integrate the construction into one attention layer or an MoE router whose sequence positions or experts are indexed by N geometric slots. Construct a spherical-design matrix X with N columns in R^d and normalize every column to unit norm. Store positive support values h_i using h_i = exp(g_i), where g_i is fixed initially or is a trainable scalar. Store U as an orthogonal matrix, initially U = I; if it is trained, parameterize it with a Cayley transform or periodically project the raw matrix onto O(d) using QR. At initialization compute rho = max_{i,j} x_i^T U^T x_j and choose c = (1 + margin) rho divided by min_{i,j}(h_i h_j), with margin such as 0.01; if rho is nonpositive, use c = 1. Recompute A = c outer(h,h) - X^T U^T X on every forward pass for small N, or cache it and refresh it periodically for larger N. Clamp A to max(A,0), form B = log(A + epsilon), and add alpha B to the standard QK^T divided by sqrt(d_k). For sparse inference, keep only the k largest A entries in each row or retain entries with A_{ij} greater than a threshold tau, then apply a sparse softmax over the retained indices. The paper-derived quantities are the factorized slack formula, its nonnegativity target, and its rank structure; alpha, epsilon, k, tau, and whether h and U are trainable are empirical choices. First run a small experiment with a 2-layer, 4-head Transformer on CIFAR-10 converted to patches or a character-level language model on Tiny Shakespeare. Compare dense attention, ordinary top-k attention, and geometric slack attention at equal hidden size. Measure validation loss, active edges per row, attention FLOPs, GPU memory, and seed-to-seed variance. The method succeeds if it reaches the same validation loss with at least 2x fewer retained attention edges, or gives faster loss reduction at equal FLOPs without producing negative-kernel numerical failures.
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 polar-slack module and deterministic verification experiment. For the tetrahedral spherical 2-design with U=-I, h=1, and c=1/3, A is effectively (4/3)I, has three incidence zeros per row, rank 4=d+1, and the Gram term has rank 3 with singular values 4/3. The geometric log-bias gives perfect target selection in the toy proxy, but ordinary top-1 already retains one edge per row, so no improvement over that baseline was observed; arbitrary supports also produced negative slack entries.
- Agent confidence
- 9/10
- Baseline
- Dense attention: target probability 0.24655, cross-entropy 1.72943, 4 edges/row; ordinary top-1 accuracy 0.24338, 1 edge/row.
- Idea
- Polar slack: target probability 0.99999994, cross-entropy 6.02e-08, argmax accuracy 1.0, 1 effective positive edge/row after tolerance; exact slack min -1.11e-16 from roundoff, rank 4.
Limitations: No trained Transformer, CIFAR-10, language-model, GPU speed, memory, FLOP, or seed-to-seed training comparison was run. The exact tetrahedral case is highly structured and makes the geometric mask essentially an identity mask; it does not test larger spherical designs or learned h/U. The invalid-support test shows that the paper's nonnegativity guarantee cannot be assumed for unconstrained ML relaxations.
How to run: python3 run_experiment.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Artifacts
- polar_slack.py 0.9 KB View Raw
- report.md 1.5 KB View
- run_experiment.py 3.0 KB View Raw