Simultaneous-Label Sparse Attention
Implementation & benchmark of arXiv:2608.06055 — Simultaneous Graph Parameters and How to Bound Them
Source paper: Simultaneous Graph Parameters and How to Bound Them arXiv:2608.06055 ⓘ · analyzed Aug 31, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace a dense attention pattern by the exact intersection of a fixed or cheaply computed base graph H and a learned shared-label relation. Two tokens can exchange information only when they are adjacent in H and share at least one of d labels, producing a controllable structured sparsity pattern. The label count d becomes an explicit capacity and compute knob: increasing d enlarges the relation vocabulary without requiring a dense pairwise mask.
Formulas
Mathematical statement
The paper defines a simultaneous representation using a graph H and label sets L:V(G) o\mathcal{P}([d]), where [d]=\{1,\ldots,d\}; vertices u,v are adjacent in the represented graph G exactly when uv\in E(H) and L(u)\cap L(v)
eq\varnothing. Equivalently, the edge predicate is the first-order-transduction formula \varphi(u,v):=E_H(u,v)\wedge\bigvee_{i=1}^{d}(M_i(u)\wedge M_i(v)), where M_i(v) means i\in L(v). For neural attention, let h_u\in\mathbb{R}^{D} be token features, H be a base neighbor graph, and z_{u,i}\in\{0,1\} indicate membership of token u in label i. The exact attention mask is A_{uv}=1_{(u,v)\in E(H)}1_{\sum_i z_{u,i}z_{v,i}>0}. A differentiable relaxation uses p_{u,i}\in[0,1] and q_{uv}=1-\prod_{i=1}^{d}(1-p_{u,i}p_{v,i}), giving \widetilde A_{uv}=1_{(u,v)\in E(H)}q_{uv}. The product is the probability that at least one label is shared under independent label-membership events. The paper's FO formula supplies the exact discrete semantics; the relaxed q_{uv} is an ML adaptation used during training.
Implementation notes
Integrate this into the attention-logit and aggregation stage of a Transformer or graph-attention layer. Let X\in\mathbb{R}^{n imes D} be token features, let H provide neighbor lists N_H(u), and add a routing head R=\mathrm{MLP}(X)\in\mathbb{R}^{n imes d}. During an initial warm-up, use p_{u,i}=\sigma(R_{u,i}/ au) and calculate the soft shared-label score q_{uv}=1-\prod_i(1-p_{u,i}p_{v,i}) only for (u,v)\in E(H). Compute logits s_{uv}=(Q_uK_v^ op/\sqrt{D})+\log(q_{uv}+\epsilon) on those edges, apply a segmented softmax over v\in N_H(u), and aggregate V_v. Anneal au from 1.0 to 0.1, then convert p to top-k binary memberships z_{u,i} and use the exact mask A_{uv} from the simultaneous representation at inference. To avoid testing every pair, maintain inverted label buckets B_i=\{u:z_{u,i}=1\}; intersect each bucket with the base-neighbor list, deduplicate candidate edges, and run attention only there. Add \lambda\sum_{u,i}p_{u,i} to discourage excessive labels and a load-balancing term that penalizes unequal bucket sizes. Pseudocode: compute R; compute p; for each u, candidates = union_i(B_i intersect N_H(u)); for each candidate v, calculate q or A; masked-softmax attention; backpropagate through q during training; periodically rebuild B_i. The mathematical quantities computed exactly are the intersection mask and shared-label predicate; the empirical choices are H, d, label sparsity k, temperature schedule, and regularization weights. First test on a 125M-parameter Transformer on WikiText-103 or C4, using a local-window H with occasional global landmark edges. Compare dense attention and fixed local attention at equal sequence length and hidden size. Measure peak attention memory, attention FLOPs, tokens/sec, validation perplexity, average candidate degree, and the fraction of disconnected tokens. A successful result should show substantially lower memory and higher throughput than dense attention with no more than 1-2% perplexity degradation, or better perplexity than fixed local attention at the same candidate-edge budget.
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.