Explore the research collection
2 entries · Follow this search
- Paper
Switching Linear Attention
Switching Linear Attention (SwiLA) is a sequence layer from Stanford (Lee, Gonzalez, Zucchet, Buchanan, Fox, Linderman) that tries to close linear attention's expressivity gap while keeping its fixed-size recurrent state (no growing KV cache). Derived in the test-time regression framework, the state is a mixture of J linear regressors (state O(JD²)) fitted online by expectation–maximization: posterior responsibilities computed from each component's prediction error plus a learned gating prior weight a delta-rule update per component. Because each output dimension selects its component independently, the layer realizes J^D piecewise-linear maps and its recurrence is nonlinear in the state — unlike Mixture-of-Memories, whose router is state-independent. Variants add temporal persistence in the assignment prior (Temporal SwiLA) and input-dependent gating (Gated SwiLA). At 374M parameters pretrained on 15B FineWeb-Edu tokens with state size matched across recurrent baselines, Gated SwiLA variants average 45.4 on a commonsense suite vs 45.3 for Transformer++ and 43.7 for DeltaNet (KDA leads the linear family at 46.6); on six recall-intensive tasks Gated Temporal SwiLA's 20.6 is the best pure-recurrent average (DeltaNet 17.3) though softmax models still lead (FoX 33.7), and Hybrid Temporal SwiLA (3:1 recurrent:softmax interleave) reaches 31.8, beating Hybrid GDN (29.5) and Transformer++. Profiled at 1.3B, SwiLA gets 4–5× the Transformer's end-to-end inference throughput (batch-size effect of having no KV cache) but trains ~2× slower than Gated DeltaNet with a sequential Triton kernel; a chunkwise parallel Newton training algorithm is derived but not yet implemented. Ablations (115M): temporal persistence helps consistently, load balancing prevents expert collapse in vanilla SwiLA, and more experts (4→16) slightly hurt at fixed state budget.
- Paper
Invariant Learning Dynamics of Transformers in Inductive Reasoning Tasks
Defines the Invariant Manifold of Inductive Reasoning (IMIR): a low-dimensional subspace that gradient descent never leaves on a block-list task class unifying in-context n-grams, k-hop induction, and associative recall. QK and output weights stay in a span of interpretable token/position selection and action bases. In a 2-layer 1-head model the IMIR is 28-dimensional; ICL (alpha, beta, gamma induction head) competes with IWL (delta). IWL emerges first and multiplies ICL gradients by a data-dependent factor; burstiness multiplies the ICL gradient. In 3-layer models, initialization selects among three induction-head circuits with sharp cooperative/competitive phase boundaries. Projecting trained weights onto the IMIR recovers two-hop induction circuits including extra aiding directions. Analysis is attention-only with fixed orthogonal OV maps and merged QK; FFN/LN extensions are sketched. No official code on the abs page.