Uncovering the Computational Roles of Nonlinearity in Sequence Modeling Using Almost-Linear RNNs
Not on the map. Why?
Abstract (arXiv)
Sequence modeling tasks across domains such as natural language processing, time series forecasting, and control require learning complex input-output mappings. Nonlinear recurrence is theoretically required for universal approximation of sequence-to-sequence functions, yet linear recurrent models often prove surprisingly effective. This raises the question of when nonlinearity is truly required. We present a framework to systematically dissect the functional role of nonlinearity in recurrent networks, identifying when it is computationally necessary and what mechanisms it enables. We address this using Almost Linear Recurrent Neural Networks (AL-RNNs), which allow recurrence nonlinearity to be gradually attenuated and decompose network dynamics into analyzable linear regimes, making computational mechanisms explicit. We illustrate the framework across diverse synthetic and real-world tasks, including classic sequence modeling benchmarks, a neuroscientific stimulus-selection task, and a multi-task suite. We demonstrate how the AL-RNN's piecewise linear structure enables identification of computational primitives such as gating, rule-based integration, and memory-dependent transients, revealing that these operations emerge within predominantly linear backbones. Across tasks, sparse nonlinearity improves interpretability by reducing and localizing nonlinear computations, promotes shared representations in multi-task settings, and reduces computational cost. Moreover, sparse nonlinearity acts as a useful inductive bias: in low-data regimes or when tasks require discrete switching between linear regimes, sparsely nonlinear models often match or exceed fully nonlinear architectures. Our findings provide a principled approach for identifying where nonlinearity is functionally necessary, guiding the design of recurrent architectures that balance performance, efficiency, and interpretability.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 40 of its 78 references that are in the map. First posted on arXiv 9 Jun 2025.
Builds on
40 of 78 references.
References · 40
- 2017Attention Is All You Needcited by 60,361
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,057
- 2015Continuous control with deep reinforcement learningcited by 3,407
- 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,465
- 2014Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modelingcited by 2,367
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2014Convolutional Neural Networks for Sentence Classificationcited by 1,127
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 827
- 2022Simplified State Space Layers for Sequence Modelingcited by 788
- 2019Temporal Fusion Transformers for Interpretable Multi-horizon Time Series Forecastingcited by 761
- 2018Speech Commands: A Dataset for Limited-Vocabulary Speech Recognitioncited by 752
28 more
- 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 700
- 2020HiPPO: Recurrent Memory with Optimal Polynomial Projectionscited by 605
- 2023Resurrecting Recurrent Neural Networks for Long Sequencescited by 408
- 2024Jamba: A Hybrid Transformer-Mamba Language Modelcited by 401
- 2023Hyena Hierarchy: Towards Larger Convolutional Language Modelscited by 393
- 2022Diagonal State Spaces are as Effective as Structured State Spacescited by 350
- 2022Long Range Language Modeling via Gated State Spacescited by 265
- 2022Liquid Structural State-Space Modelscited by 136
- 2017Parallelizing Linear Recurrent Neural Nets Over Sequence Lengthcited by 127
- 2023Hierarchically Gated Recurrent Neural Network for Sequence Modelingcited by 102
- 2021Neural Production Systems: Learning Rule-Governed Visual Dynamicscited by 75
- 2021On the difficulty of learning chaotic dynamics with RNNscited by 67
- 2024Mamba-360: Survey of State Space Models as Transformer Alternative for Long Sequence Modelling: Methods, Applications, and Challengescited by 64
- 2015A C-LSTM Neural Network for Text Classificationcited by 54
- 2021Long Expressive Memory for Sequence Modelingcited by 41
- 2019Reverse engineering recurrent networks for sentiment classification reveals line attractor dynamicscited by 39
- 2016Recurrent Orthogonal Networks and Long-Memory Taskscited by 38
- 2022Tractable Dendritic RNNs for Reconstructing Nonlinear Dynamical Systemscited by 36
- 2023Universality of Linear Recurrences Followed by Non-linear Projections: Finite-Width Guarantees and Benefits of Complex Eigenvaluescited by 36
- 2016Recurrent switching linear dynamical systemscited by 35
- 2020On Lyapunov Exponents for RNNs: Understanding Information Propagation Using Dynamical Systems Toolscited by 31
- 2024Understanding the differences in Foundation Models: Attention, State Space Models, and Recurrent Neural Networkscited by 26
- 2016A State Space Approach for Piecewise-Linear Recurrent Neural Networks for Reconstructing Nonlinear Dynamics from Neural Measurementscited by 25
- 2016Recurrent Network Models Of Sequence Generation And Memorycited by 21
- 2024Almost-Linear RNNs Yield Highly Interpretable Symbolic Codes in Dynamical Systems Reconstructioncited by 19
- 2023Bifurcations and loss jumps in RNN trainingcited by 17
- 2024Learning Interpretable Hierarchical Dynamical Systems Models from Time Series Datacited by 15
- 2022Integrating Multimodal Data for Joint Generative Modeling of Complex Dynamicscited by 14
Built on by
Citing papers per year: 2026: 5.
5 papers.
- 2026Continuous-Time Piecewise-Linear Recurrent Neural Networkscited by 4
- 2026Teacher Forcing as Generalized Bayes: Optimization Geometry Mismatch in Switching Surrogates for Chaotic Dynamicscited by 2
- 2026Continual Learning of Dynamical Systems in Recurrent Neural Networks through Recyclable Unit Gatingcited by 0
- 2026From Redundancy to Minimality: Fixed-Point-Guided Hierarchical Reduction of Learned Piecewise-Linear Dynamicscited by 0
- 2026Learning Transferable Policies from Action-free Time Series Through Dynamical Embeddingscited by 0
- 2026Learning Transferable Policies from Action-free Time Series Through Dynamical Embeddings2 Oct 2026
- 2026From Redundancy to Minimality: Fixed-Point-Guided Hierarchical Reduction of Learned Piecewise-Linear Dynamics1 Oct 2026
- 2026Continual Learning of Dynamical Systems in Recurrent Neural Networks through Recyclable Unit Gating29 Sep 2026
- 2026Teacher Forcing as Generalized Bayes: Optimization Geometry Mismatch in Switching Surrogates for Chaotic Dynamics28 Apr 2026
- 2026Continuous-Time Piecewise-Linear Recurrent Neural Networks17 Feb 2026