← All entries
Paper2026#1270

Length Generalization Needs Proper Regularization

Summary

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.

Venue
arXiv 2610.04518 [cs.LG], submitted 3 Oct 2026, preprint
Source
x
Access
free
Language
en
Added
Oct 6, 2026
Verified
Oct 6, 2026
Found via
#random-papers

Tags

length-generalizationdropoutvpadregularizationsmollm3mamba2long-context

Topics

length generalization, dropout, regularization, variance-preserving dropout, positional encoding, long context

Research notes

  • Discovery: @rosinality (ML Engineer, London) X post 2026-10-06 4:08 AM ET (https://x.com/rosinality/status/2107382390721278278), ~3.3K views — 'Dropout for length generalization. Interesting.'
  • Code: https://github.com/deep-spin/len-gen-regularization
  • Affiliations: Instituto Superior Tecnico, Universidade de Lisboa, Instituto de Telecomunicacoes, ELLIS Unit Lisbon, Gandara AI
  • Related: catalog 1538, 1539, 1565, 1571 (norm/sink cluster), 1553, 1561 (long-context attention)

Similar entries