Explore the research collection
12 entries · Follow this search
- Paper
Universal interpolation for deep residual self-attention networks
Theoretical result in the dual-of-infinite-width regime: approximation power from depth alone, with strong parameter sharing across layers. Two frozen, randomly initialized single-head attention blocks (never trained — only layer order, signs, and scalar gains are chosen per task) suffice to interpolate (perfectly memorize) any batch of N sequences of n tokens. The proof frames deep residual attention as the forward-Euler discretization of an ODE and uses geometric control theory (Chow–Rashevskii: alternating vector fields generate motion along Lie brackets; if commutators span the tangent space, reachability holds) plus the Ax–Schanuel theorem from transcendence theory to prove the softmax-induced singular locus has codimension ≥ 2, preserving connectedness. Caveats: causal masking breaks universality — the first token attends only to itself and evolves linearly, so when batch size N exceeds dimension d, linear relations are conserved forever and commutators can't escape; and the proof is purely existential (no bound on required depth L or scalar magnitudes), and memorization is not generalization. For looped models (Hyperloop, Mixture-of-Recursions), it confirms parameter tying carries zero theoretical expressivity penalty. For sub-dimension heads (r < d), m = ceil(d/r) frozen blocks are conjectured necessary — 576 Lie-rank tests: m = ceil(d/r) reached full rank 94/96 and 96/96 at 1e-8 tolerance; m−1 reached 0/96. Code: github.com/sibyllema/attention_universality.
- Paper
Emergent One-Third Scaling Law as Attention Tries to Concentrate
Proposes an origin for neural scaling laws: any softmax learning peaked distributions, regardless of its position in the model, develops logit magnitudes that grow as a power law with exponent 1/3, becoming a training bottleneck whose loss contribution decays with the same 1/3 exponent — so total loss obeys 1/3 scaling whenever at least one softmax learns peaked distributions. Toy models show the effect for both output selection and attention-like gating, with a 'loss universality' result (any reasonable loss yields the same law; nonlinearity is the key ingredient). In real LLMs (Pythia, OLMo), loss falls and attention's internal logits grow with exponents near 1/3 while the output head shows no such growth, pointing to attention heads — not the LM head — as the bottleneck driving 1/3 loss scaling. Bypassing the output softmax with MSE training, and using sigmoid/tanh gates, preserves the law.
- Paper
FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precision
FlashAttention-3 redesigns FA2 for Hopper: warp-specialized TMA/WGMMA producer-consumer, pingpong scheduling so softmax hides under GEMM, and FP8 with in-kernel V transpose, block quantization, and Hadamard incoherent processing. H100 FP16 is 1.5-2.0× FA2 (up to 740 TFLOPs/s, 75% util) and 1.5-1.75× backward; FP8 reaches ~1.2 PFLOPs/s with 2.6× lower RMSE vs per-tensor FP8 on outlier-injected QKV. Competitive with or faster than cuDNN FA2 at seq≥1k. Code https://github.com/Dao-AILab/flash-attention.
- Paper
Screening Is Enough
Multiscreen screens unit-normalized QK similarities with Trim (exact zero below threshold) and a learned causal Softmask window, then aggregates surviving values without competition; MiPE rotates only two dims and turns off for large windows. On SlimPajama (2^38 tokens, seq 2^12) it matches Transformer val loss with ~30% fewer params, stays stable at LR 2^{-4} (Transformer diverges), holds long-context PPL past train length, and on ABCDigits retrieval a 286M Multiscreen beats a 1.3B Transformer (99.18% vs 95.98% at train ctx; little degradation to 2^17). Full-context forward latency lower than FlashAttention Transformer at long ctx (RTX 4090, no KV cache). ABCDigits generator https://github.com/ken-nakanishi/abcdigits.
- Paper
Towards Understanding Self-Pretraining for Sequence Classification
Replicates Amos et al. 2024 (ICLR Outstanding Paper): SPT on LRA lifts ListOps/CIFAR10/PathFinder/Retrieval/Text vs from-scratch. Ablations: gains after 1–10 SPT epochs, even in 1-layer models and after swapping the pretraining dataset, pointing to an optimization bottleneck rather than hierarchical features. Freezing random Attention barely hurts from-scratch accuracy; hybrid inits show W_Q/W_K carry the SPT benefit. A 1-layer toy task shows SPT turns additive sinusoidal PEs into a proximity-biased QK map that fine-tuning builds on. Theory: at uniform attention, mean-pooled label loss has zero derivative along some score directions that masked reconstruction can see. No official code on the abs page.
- Paper
High-Dimensional Learning Dynamics of Attention-Indexed Models
ML theory paper on "attention-indexed models," a framework for multi-layer and multi-head attention architectures in the high-dimensional limit. Core result: the population-loss landscape collapses into a finite set of trace order parameters, yet under online SGD the parameter trajectories are governed by an infinite hierarchy of coupled matrix moments (each SGD step mixes S_k with the gradient tensor, so degree-w moments couple to degree-(w+1); degree-M truncations approximate the exact trajectory with exponential precision O((C/s0)^M)). Parameterization is an active regularizer: direct optimization of an attention matrix S in R^(d x d) can stay trapped on an uninformative manifold; tied attention (S = WW^T) forces a positive initial trace and yields automatic symmetry-breaking with weak recovery in Theta(d^2 log d) samples; untied attention (S = UV^T) shows a fast-slow relaxation (fast pre-activation mean drift toward a critical manifold, then slow feature recovery only if the fast boundary layer broke student symmetry). Caveats: assumes online SGD with one-pass streaming Gaussian data (no finite-sample ERM or multi-pass token reuse) and analyzes effective bilinear interactions rather than full end-to-end multi-layer QKV co-evolution.
- Code
xattn
Efficient attention modules for the xLLM framework, with Python APIs for use in other PyTorch projects. Features high-precision FP32 attention output state for backward (reducing BF16 gradient error) and flexible segment-aware masking (segment IDs or BOS masks) for packed sequences. Supports causal Flash Attention, sliding window, sliding chunk, and SoftDelta attention variants; FP16/BF16 inputs; MHA, GQA, and MQA.
- Paper
No More Free Lunch: Corpus Task Complexity Matters as Corpora Grow
Defines Corpus Task Complexity (CTC) and shows that conclusions from ordinary low-CTC long-context evaluations can reverse on high-CTC tasks. Adds 10 high-CTC tasks to a 22-task evaluation suite. Full attention remains stronger on high-CTC tasks but is costly to scale.
- Paper
Memory Attention
Memory Attention (Jiale Kang) replaces the Transformer's learned value projection with V = K + Norm(E[s]) — the sum of contextual keys and layer-specific token-indexed memory vectors. Under matched training budgets it beats standard attention on WikiText perplexity and downstream average while enabling CPU offloading of the memory tables, trading parameter storage for lookup-based capacity.
- Paper
MoBA: Mixture of Block Attention for Long-Context LLMs
Proposes Mixture of Block Attention (MoBA), which applies mixture-of-experts principles to the attention mechanism: the model learns where to attend across blocks rather than using predefined sparse patterns like sink or window attention. It claims superior long-context performance with seamless switching between full and sparse attention, and has been deployed for Kimi's long-context serving.
- Idea
KV cache as GPU-memory bottleneck in Transformer serving (GQA/MQA, quantization, sliding window)
Single long X note_tweet + diagram (2026-09-25) by @techNmak explaining that during inference model weights are mostly fixed while per-request KV state grows with every cached token across attention layers. Frames context length and concurrency as GPU-memory costs; notes GQA/MQA (fewer KV heads), KV quantization (fewer bytes), and sliding-window attention (bounded history) as levers; stresses caching avoids recomputing old K/V projections but full attention still reads the cache each decode step. Diagram gives KV bytes = 2×B×T×L×H_kv×d_k×s (example: 8K tokens ≈ 1 GiB at L=32, H_kv=8, d_k=128, FP16). Pure original explainer — no primary paper; one reply promo-linked github.com/kvcachestore/kvcdn-cli.
- Paper
The Loss Does Not See the Basis, but Adam Does
Shows gradient descent on W=UV^T is biased toward low-rank interpolants while Adam is not, tracing the gap to loss gauge symmetry (U,V)->(UQ,VQ). Equivariant methods (GD, momentum, shared-scalar Adam, Muon, Shampoo) can inherit gradient-flow low-rank bias; coordinate-wise Adam/RMSProp/Lion/Adafactor cannot. Sorts nine update rules on underdetermined matrix sensing; a p-dial from coordinate-wise to shared-scalar Adam restores the bias monotonically. In transformers, Adam splits two gauge-equivalent inits at step 1 (per-head W_Q^T W_K 56% apart). On two hyperspectral datasets at matched train loss, GD cuts held-out error 43-44% vs Adam at lowest sampling density.