To Infinity and Beyond: Tool-Use Unlocks Length Generalization in State Space Models
Eran Malach, Omid Saremi, Sinead Williamson, Arwen Bradley, Aryo Lotfi, Emmanuel Abbe, Josh Susskind, Etai Littwin
TL;DR
This work analyzes the gap between memory-bounded state space models (SSMs) and Transformers for long-form sequence generation. It proves that fixed-memory GSSMs cannot solve arbitrarily long tasks without interacting with external tools, but that interactive tool-use can enable perfect length generalization on any computable long-form task given appropriate training data. The authors provide a formal framework for CoT and tool-use settings, and validate the theory with experiments across arithmetic, reasoning, and coding tasks, showing strong extrapolation when SSMs are augmented with tools. The findings suggest that, in interactive, tool-using environments, SSMs can be an efficient and scalable alternative to Transformers for long-context, agentic applications such as coding, search, and complex reasoning.
Abstract
State Space Models (SSMs) have become the leading alternative to Transformers for sequence modeling. Their primary advantage is efficiency in long-context and long-form generation, enabled by fixed-size memory and linear scaling of computational complexity. We begin this work by showing a simple theoretical result stating that SSMs cannot accurately solve any ``truly long-form'' generation problem (in a sense we formally define), undermining their main competitive advantage. However, we show that this limitation can be mitigated by allowing SSMs interactive access to external tools. In fact, we show that given the right choice of tool access and problem-dependent training data, SSMs can learn to solve any tractable problem and generalize to arbitrary problem length/complexity (i.e., achieve length generalization). Following our theoretical finding, we demonstrate that tool-augmented SSMs achieve remarkable length generalization on a variety of arithmetic, reasoning, and coding tasks. These findings highlight SSMs as a potential efficient alternative to Transformers in interactive tool-based and agentic settings.
