Explore the research collection
7 entries · Follow this search
- Paper
Length Generalization Needs Proper Regularization
Argues transformers need no architectural changes for length generalization — proper dropout regularization suffices, making the problem architecture-agnostic rather than a positional-encoding or attention-mechanism question. Diagnoses training-procedure culprits for extrapolation failure: weight decay can hinder extrapolation, while dropout improves it only when its placement is reconsidered — standard dropout before layer normalization introduces a systematic distributional mismatch; applying dropout just before the linear projection resolves it. Proposes Variance-Preserving Affine Dropout (VPAD), which substantially reduces the resulting pre-activation variance mismatch and further improves extrapolation; VPAD is complementary to attention-scaling methods. Results: modified SmolLM3 with sliding-window attention, continually pre-trained with dropout, extrapolates perfectly to 64x on Needle-in-a-Haystack and far beyond pre-training context on RULER and HELMET; training SmolLM3 from scratch reaches RBA 100.0 at 32x training length; matches a 'perfect' baseline at 2-8x extrapolation and improves on ICL/NIAH/RULER at longer contexts. Mamba2 also benefits from dropout, supporting the architecture-agnostic claim. CC BY 4.0 license. Directly relevant to the user's long-context training work (3:1 SWA:full-attention hybrid stack) — the dropout-placement fix applies to their architecture too.
- Paper
Triadic Linear Attention: Three-Dimensional Recurrent States for Long-Context Sequence Modeling
Generalizes linear attention from a matrix state to a third-order tensor state: writes the triadic outer product of a key, a second key, and a value (k tensor k' tensor v) into S_t in R^{d x E x d}, and reads by contracting both key axes with two queries. An E-dimensional second key yields an E-fold state-size increase while adding only two projections (negligible parameter overhead; E=16 gives 16x capacity at 1.08x non-embedding params in MQAR tests). Compatible with data-dependent forgetting (per-slice decay gates), the delta rule applied jointly to both keys (removing the value stored under the key pair), and chunkwise-parallel training via custom CuTe kernels that tile the per-head state along the value axis (blocks of 32 columns, all E slices held in registers) so no SM holds the full tensor. Applied to Gated DeltaNet and scalar-gated linear attention, it substantially improves long-context LM and recall, outperforming alternatives that enlarge state via wider heads/values, more heads, or multiple value heads per key. A pretrained linear-attention model can be converted post hoc to its triadic form during long-context extension. Training overhead over vanilla GDN (custom kernels, H100, 1.3B, 2k-64k tokens): 9-11% (E=2), 14-15% (E=4), 28-30% (E=8); E=8 is 3% slower than a Transformer at 4k but faster beyond, reaching 5.1x faster at 64k.
- Paper
Titans: Learning to Memorize at Test Time
Treats attention as short-term memory and a deep MLP as long-term memory updated by surprise (gradient of associative ||M(k)-v||^2) with momentum and adaptive forget/weight-decay, plus persistent task tokens. Three hybrids: MAC, MAG, MAL. 760M MAG Wiki ppl 18.61 vs Transformer++ 25.21 and Gated DeltaNet-H2 19.88; MAC best on long-context NIAH. BABILong MAC beats GPT-4 and Llama3.1-8B+RAG at far fewer params. Claims >2M context. Code "available soon" on abs.
- Paper
Context Language Models
Introduces Context Language Models (CLMs): language models that natively manage their own context by treating the context as a file and allowing unrestricted updates to it, letting the model learn what is most important to maintain in context and naturally extending to multi-agent systems where multiple agent contexts coexist as files. Building CLMs zero-shot with existing models outperforms SOTA context-management strategies: 11.4% higher accuracy with 21.5% fewer FLOPs on BrowseComp-Plus, 5% higher scores with 59% fewer FLOPs on 12-hour EdgeBench, and 65% greater improvement with the same compute on a 24-hour multi-repository agent-swarm task. Shifting context management from external harness control to intrinsic model behavior enables both in-context and parametric learning of context-management strategies: steering CLMs with natural-language instructions evolved through a skill-optimization loop improves held-out accuracy by up to 35.9 points while reducing compute. An online RL method for CLMs improves Qwen3.5-9B on BrowseComp-Plus by 47.6% while using 12% fewer FLOPs. Co-designed Suffix Cache Reuse for CLM serving further cuts server-side compute by 35% relative to standard SGLang at matched performance.
- 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.
- Paper
HySparse2: Hybrid Sparse Attention with Two-Level KV Sharing
Xiaomi LLM-Core paper (arXiv 2609.26368v1, 2026-09-22, cs.CL). HySparse2 extends HySparse with YOCO-style self-decoder (hybrid SWA) + cross-decoder (hybrid sparse attention) and two-level KV sharing: outer KV Bridging (full-attention layers only; cross-decoder K/V from self-decoder full-attn hidden states) and inner KV Reuse (HySparse-style shared KV + selection within hybrid blocks). Refinements vs HySparse: token-level sparsity (replacing block-level) and Forced SWA (recent tokens forced into sparse selection, no separate SWA branch). All cross-decoder KV can be built from self-decoder states, so prefill can exit after the self-decoder (~half the model). On matched 80B-A3B MoE training: after light post-training (~100B tokens), mean MRCR-v2 / RULER-v2 +11.30 / +19.81 vs HySparse; at 256k RULER-v2 58.45 vs HySparse 32.61 / Hybrid SWA 35.74; lower AgentPPL and LongPPL to 256k; at 1M tokens analysis claims 2.92× / 5.02× less prefill FLOPs vs HySparse / Hybrid SWA plus smaller KV cache. No public code link in paper; AlphaXiv abs live; HF papers page 404 at catalog time.
- Paper
Memory Caching: RNNs with Growing Memory
Memory Caching (MC) segments the sequence, caches each segment's memory state, and aggregates online plus cached memories at retrieval. Four variants: Residual Memory, Gated Residual Memory (GRM), Memory Soup, and Sparse Selective Caching (SSC). Complexity O(NL) interpolates RNN O(L) and Transformer O(L^2). Applied to Linear Attention, SWLA, DLA, and Titans. On 760M/30B-token and 1.3B/100B-token FineWeb training, MC lifts language-modeling and commonsense averages; Titans+GRM is strongest. Closes part of the recall gap vs Transformers on NIAH, in-context retrieval, LongBench, and MQAR. No official code on the abs page.