Reproduce “Transformers Can Achieve Length Generalization But Not Robustly” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Yongchao Zhou, Uri Alon, Xinyun Chen, Xuezhi Wang, Rishabh Agarwal, Denny Zhou
Transformers can generalize to sequence lengths 2.5 times longer than their training data on N-digit addition when using specific configurations of positional encodings and data formats. However, this high generalization performance demonstrates significant fragility across different random initializations.
Key insights
- Transformers can achieve substantial length generalization for algorithmic tasks when specific positional encodings and data formats are optimally combined, overturning prior assumptions about their inherent limitations.
- The synergy between FIRE position encodings, randomized PEs, reversed data format, and index hints is crucial for enabling this generalization.
- Despite achieving high generalization, the performance is highly fragile, exhibiting significant variance across different random initializations and training data orders.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.