Unverified 2026

Spectral-gap regularized doubly stochastic attention

Implementation & benchmark of arXiv:2608.11760 — Tight Nonasymptotic Local Convergence of Sinkhorn-Knopp

Usefulness5/10
Difficulty6/10
Novelty6/10

Source paper: Tight Nonasymptotic Local Convergence of Sinkhorn-Knopp arXiv:2608.11760 ⓘ · analyzed Sep 1, 2026

AI-generated research hypothesis, automatically tested. Not peer-reviewed.

Idea description

Train attention logits so that the associated Sinkhorn-scaled operator has a favorable local spectral gap, making iterative normalization contract faster. Add a differentiable penalty on the second eigenvalue of the normalized operator while retaining the task loss and marginal-feasibility loss.

Formulas

$$1-\sigma_{2}=\lambda_{m-1}(B),\qquad B=P^{-1/2}A^{\star}Q^{-1}(A^{\star})^{\top}P^{-1/2}.$$
$$\mathcal{L}_{\mathrm{gap}}=\left[\widehat{\lambda}_2(B)-\lambda_{\mathrm{target}}\right]_{+}^{2},\qquad \mathcal{L}=\mathcal{L}_{\mathrm{task}}+\beta\mathcal{L}_{\mathrm{gap}}+\gamma\|r\|_2^2,$$
$$z_{t+1}=\frac{(I-ww^{\top})Bz_t}{\|(I-ww^{\top})Bz_t\|_2},\qquad \widehat{\lambda}_2=z_t^{\top}Bz_t,$$
$$r=\begin{bmatrix}A^{\star}\mathbf{1}_n-p\\(A^{\star})^{\top}\mathbf{1}_m-q\end{bmatrix}.$$

Mathematical statement

The relevant operator is $$B=P^{-1/2}A^{\star}Q^{-1}(A^{\star})^{\top}P^{-1/2},$$ with P=diag(p), Q=diag(q), and A^{\star}=diag(u^{\star})A diag(v^{\star}) the Sinkhorn-scaled kernel. The paper's local contraction factor is \rho=1-\sigma_2, where \sigma_2=\lambda_{m-1}(B) is the second-largest eigenvalue. A larger spectral gap \sigma_2 means a smaller contraction factor and therefore faster local convergence. In a neural network, A=exp(S/ au) depends on attention logits S, so penalize \lambda_{m-1}(B) or maximize the gap surrogate \sigma_2. Estimate the second eigenvalue using power iteration after projecting away from the dominant eigenvector. For robustness, use a squared penalty on excess eigenvalue rather than maximizing the gap without bounds.

Implementation notes

Insert the regularizer in a Sinkhorn-based attention layer during training. For each batch element, form A=exp((S-c)/tau), run a detached or low-iteration Sinkhorn pass to obtain A_star=diag(u)A diag(v), and define B=P^{-1/2}A_star Q^{-1}A_star^T P^{-1/2}. For square self-attention with uniform marginals p=q=1/L, P and Q are scalar multiples of the identity; for general marginals use the supplied diagonal vectors. Estimate the dominant eigenvector w with 5 power iterations on B, normalize it, then run 3-5 projected power iterations z <- (I-ww^T)Bz followed by normalization. Estimate lambda2=z^T Bz and add L_gap=[lambda2-lambda_target]_+^2 to the task loss. Set lambda_target initially to 0.7 or to the median lambda2 observed during a warm-up epoch; use beta between 1e-4 and 1e-2 so the regularizer cannot dominate language-model loss. Compute the marginal residual r and optionally include gamma||r||^2, but do not backpropagate through more Sinkhorn iterations than the baseline. The eigenvalue estimate and regularizer come from the paper's contraction formula; lambda_target, beta, and power-iteration count are empirical hyperparameters. First test on a 2-layer, 4-head Transformer on a synthetic permutation/assignment dataset and WikiText-2, comparing ordinary Sinkhorn attention with the regularized version at the same fixed iteration budget. Track estimated lambda2, actual residual decay per iteration, task accuracy or perplexity, gradient stability, and wall-clock overhead. The hypothesis is that training lowers lambda2, produces steeper residual decay, and permits reducing fixed Sinkhorn iterations by 25-50% without increasing marginal error or validation loss.

Verification

This idea has not been verified yet.

Verification happens in two stages: Stage 1 — a mechanism check on a toy system confirms the claimed mathematical phenomenon reproduces; Stage 2 — a benchmark implements the idea on a real (small) neural network task and compares it against a tuned baseline over 8 paired seeds with a permutation test.

Artifacts

Artifacts unavailable.