Unverified 2026

Overlap-Gap Temperature Controller

Implementation & benchmark of arXiv:2608.08922 — Clustered Attractor Manifolds and Dynamical Condensation in Self-Attention

Usefulness6/10
Difficulty4/10
Novelty5/10

Source paper: Clustered Attractor Manifolds and Dynamical Condensation in Self-Attention arXiv:2608.08922 ⓘ · analyzed Sep 1, 2026

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

Idea description

Add a per-head controller that adjusts attention sharpness from the observed separation between within-cluster and cross-cluster token similarities. When a positive overlap gap becomes large, the controller lowers the head temperature to prevent exponentially localized attention and rank collapse; when the gap is small, it permits sharper attention so useful structure can form.

Formulas

$$X(t)\longrightarrow A[X(t)]\longrightarrow X(t+1).$$
$$A_{ij}=\frac{\exp(\beta s_{ij})}{\sum_{m=1}^{N}\exp(\beta s_{im})},\qquad s_{ij}=\frac{\langle q_i,k_j\rangle}{\sqrt d}.$$
$$\Delta_i=\min_{j\in C(i)}s_{ij}-\max_{\ell\notin C(i)}s_{i\ell},\qquad p_i^{\mathrm{cross}}=\sum_{\ell\notin C(i)}A_{i\ell}\ \lesssim\ \frac{N-|C(i)|}{|C(i)|}e^{-\beta\Delta_i}.$$
$$\beta_i^{\max}=\frac{1}{\max(\Delta_i,\varepsilon)}\log\!\left(\frac{N-|C(i)|}{|C(i)|\,\tau}\right),\qquad \beta_i\leftarrow\operatorname{clip}\!\left(\beta_i,\beta_{\min},\beta_i^{\max}\right).$$

Mathematical statement

The paper defines self-attention as the discrete dynamical system $X(t)\longrightarrow A[X(t)]\longrightarrow X(t+1)$, where $X(t)\in\mathbb{R}^{N\times d}$ is the matrix of $N$ token states at depth or time $t$, and $A[X(t)]$ is the state-dependent row-stochastic attention matrix. For query token $i$, let $s_{ij}=\langle q_i,k_j\rangle/\sqrt d$ be its scaled similarity to token $j$, let $C(i)$ be its estimated cluster, and define the overlap gap $\Delta_i=\min_{j\in C(i)}s_{ij}-\max_{\ell\notin C(i)}s_{i\ell}$. With inverse temperature $\beta\ge 0$, $A_{ij}=\exp(\beta s_{ij})/\sum_m\exp(\beta s_{im})$. If $\Delta_i>0$, cross-cluster logits are separated from within-cluster logits by at least $\Delta_i$, so cross-cluster probability is exponentially suppressed. A conservative implementable approximation is $p_i^{\mathrm{cross}}\lesssim ((N-|C(i)|)/|C(i)|)\exp(-\beta\Delta_i)$. We invert this bound to enforce a target maximum cross-cluster mass $\tau$.

Implementation notes

Integrate the method into the attention-logit path during training, immediately before the row-wise softmax. For each batch and attention head, compute the usual scaled similarity matrix $S=QK^T/\sqrt d$. Estimate clusters using one or two k-means iterations on detached query vectors, or assign tokens to the nearest of $k$ learned centroids; begin with $k=\min(8,N)$. For every query row $i$, compute the largest similarity to tokens with the same cluster assignment and the largest similarity to tokens with a different assignment. Their difference is the empirical $\Delta_i$. Treat the learned or fixed logit scale as the current $\beta$, choose a target cross-cluster mass $\tau=0.05$, and calculate $\beta_i^{\max}$ using the displayed formula with $\varepsilon=10^{-3}$. Use $\beta_i=\operatorname{clip}(\beta,\beta_{\min},\operatorname{median}_i\beta_i^{\max})$, with an exponential moving average of the median at decay 0.95. Stop gradients through cluster assignments and gap estimates initially. The paper-derived quantity is the exponential suppression bound; cluster membership and gap values are estimated from each batch. First test a 6-layer, 8-head Transformer on WikiText-2 against fixed scaling and standard learned temperature at equal FLOPs. Record validation loss, attention entropy, effective rank of token states, cross-cluster attention mass, gradient norms, and failed runs. Success is at least 20% fewer instability events or lower validation loss at high learning rates without added inference cost.

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.