The geometry of integration in text classification RNNs
Kyle Aitken, Vinay Venkatesh Ramasesh, Ankush Garg, Yuan Cao, David Sussillo, Niru Maheswaranathan
Abstract
Despite the widespread application of recurrent neural networks (RNNs), a unified understanding of how RNNs solve particular tasks remains elusive. In particular, it is unclear what dynamical patterns arise in trained RNNs, and how those patterns depend on the training dataset or task. This work addresses these questions in the context of text classification, building on earlier work studying the dynamics of binary sentiment-classification networks (Maheswaranathan et al., 2019) . We study text-classification tasks beyond the binary case, exploring the dynamics of RNNs trained on both natural and synthetic datasets. These dynamics, which we find to be both interpretable and low-dimensional, share a common mechanism across architectures and datasets: specifically, these text-classification networks use low-dimensional attractor manifolds to accumulate evidence for each class as they process the text. The dimensionality and geometry of the attractor manifold are determined by the structure of the training dataset, with the dimensionality reflecting the number of scalar quantities the network remembers in order to classify. In categorical classification, for example, we show that this dimensionality is one less than the number of classes. Correlations in the dataset, such as those induced by ordering, can further reduce the dimensionality of the attractor manifold; we show how to predict this reduction using simple word-count statistics computed on the training dataset. To the degree that integration of evidence towards a decision is a common computational primitive, this work continues to lay the foundation for using dynamical systems techniques to study the inner workings of RNNs.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers4
- Auxiliary Tasks and Exploration Enable ObjectGoal NavigationJoel Ye, Dhruv Batra, Abhishek Das, Erik WijmansICCV 2021 · 137 citations
- Understanding How Encoder-Decoder Architectures AttendKyle Aitken, Vinay V. Ramasesh, Yuan Cao, Niru MaheswaranathanNeurIPS 2021 · 32 citations
- Trainability, Expressivity and Interpretability in Gated Neural ODEsTimothy Doyeon Kim, Tankut Can, Kamesh KrishnamurthyICML 2023 · 6 citations
- RNNs perform task computations by dynamically warping neural representationsArthur Pellegrino, Angus ChadwickNeurIPS 2025 · 5 citations
Builds on3
- The interplay between randomness and structure during learning in RNNsFriedrich Schüßler, Francesca Mastrogiuseppe, Alexis M. Dubreuil, Srdjan Ostojic et al.NeurIPS 2020 · 91 citations
- How recurrent networks implement contextual processing in sentiment analysisNiru Maheswaranathan, David SussilloICML 2020 · 25 citations
- GoEmotions: A Dataset of Fine-Grained EmotionsDorottya Demszky, Dana Movshovitz-Attias, Jeongwoo Ko, Alan S. Cowen et al.ACL 2020 · 16 citations
Related papers
- Flow-field inference from neural data using deep recurrent networksTimothy Doyeon Kim, Thomas Zhihao Luo, Tankut Can, Kamesh Krishnamurthy et al.ICML 2025
- Learning rule influences recurrent network representations but not attractor structure in decision-making tasksBrandon McMahan, Michael Kleinman, Jonathan C. KaoNeurIPS 2021 · 5 citations
- On the Dynamics of Training Attention ModelsHaoye Lu, Yongyi Mao, Amiya NayakICLR 2021 · 9 citations
- High-dimensional neuronal activity from low-dimensional latent dynamics: a solvable modelValentin Schmutz, Ali Haydaroglu, Shuqi Wang, Yixiao Feng et al.NeurIPS 2025 · 9 citations
- Detecting Invariant Manifolds in ReLU-Based RNNsLukas Eisenmann, Alena Brändle, Zahra Monfared, Daniel DurstewitzICLR 2026 · 3 citations
