mlsanityData to 7 Oct 2026

Recursion in Recursion: Two-Level Nested Recursion for Length Generalization with Scalability

arXiv 2311.04449 ↗First posted 8 Nov 2023cs.LG cs.CLcited by 5

Not on the map. Why?

Abstract (arXiv)

Binary Balanced Tree RvNNs (BBT-RvNNs) enforce sequence composition according to a preset balanced binary tree structure. Thus, their non-linear recursion depth is just log2 n (n being the sequence length). Such logarithmic scaling makes BBT-RvNNs efficient and scalable on long sequence tasks such as Long Range Arena (LRA). However, such computational efficiency comes at a cost because BBT-RvNNs cannot solve simple arithmetic tasks like ListOps. On the flip side, RvNNs (e.g., Beam Tree RvNN) that do succeed on ListOps (and other structure-sensitive tasks like formal logical inference) are generally several times more expensive than even RNNs. In this paper, we introduce a novel framework -- Recursion in Recursion (RIR) to strike a balance between the two sides - getting some of the benefits from both worlds. In RIR, we use a form of two-level nested recursion - where the outer recursion is a k-ary balanced tree model with another recursive model (inner recursion) implementing its cell function. For the inner recursion, we choose Beam Tree RvNNs (BT-RvNN). To adjust BT-RvNNs within RIR we also propose a novel strategy of beam alignment. Overall, this entails that the total recursive depth in RIR is upper-bounded by k logk n. Our best RIR-based model is the first model that demonstrates high (≥ 90%) length-generalization performance on ListOps while at the same time being scalable enough to be trainable on long sequence inputs from LRA. Moreover, in terms of accuracy in the LRA language tasks, it performs competitively with Structured State Space Models (SSMs) without any special initialization - outperforming Transformers by a large margin. On the other hand, while SSMs can marginally outperform RIR on LRA, they (SSMs) fail to length-generalize on ListOps. Our code is available at: urlhttps://github.com/JRC1995/BeamRecursionFamily/.

Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 85 of its 107 references that are in the map. First posted on arXiv 8 Nov 2023.

Builds on

85 of 107 references.

References · 85

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
  4. 2016Categorical Reparameterization with Gumbel-Softmaxcited by 2,708
  5. 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
  6. 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,424
  7. 2013Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computationcited by 2,031
  8. 2015A large annotated corpus for learning natural language inferencecited by 1,837
  9. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
  10. 2018An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modelingcited by 1,447
  11. 2016The Concrete Distribution: A Continuous Relaxation of Discrete Random Variablescited by 1,135
  12. 2014Convolutional Neural Networks for Sentence Classificationcited by 1,124
38 more
  1. 2022Simplified State Space Layers for Sequence Modelingcited by 776
  2. 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 696
  3. 2016Language Modeling with Gated Convolutional Networkscited by 688
  4. 2018Annotation Artifacts in Natural Language Inference Datacited by 656
  5. 2021Transformer in Transformercited by 632
  6. 2017Convolutional Sequence to Sequence Learningcited by 550
  7. 2019Learning the Difference that Makes a Difference with Counterfactually-Augmented Datacited by 428
  8. 2022On the Parameterization and Initialization of Diagonal State Space Modelscited by 418
  9. 2023Resurrecting Recurrent Neural Networks for Long Sequencescited by 397
  10. 2019PAWS: Paraphrase Adversaries from Word Scramblingcited by 395
  11. 2022Diagonal State Spaces are as Effective as Structured State Spacescited by 350
  12. 2015Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networkscited by 305
  13. 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 286
  14. 2018Stress Test Evaluation for Natural Language Inferencecited by 211
  15. 2019Stochastic Beams and Where to Find Them: The Gumbel-Top-k Trick for Sampling Sequences Without Replacementcited by 205
  16. 2022Recurrent Memory Transformercited by 197
  17. 2022Transformer Quality in Linear Timecited by 189
  18. 2022Mega: Moving Average Equipped Gated Attentioncited by 178
  19. 2014A Convolutional Neural Network for Modelling Sentencescited by 163
  20. 2020Funnel-Transformer: Filtering out Sequential Redundancy for Efficient Language Processingcited by 161
  21. 2018Breaking NLI Systems with Sentences that Require Simple Lexical Inferencescited by 134
  22. 2022Liquid Structural State-Space Modelscited by 134
  23. 2019Hierarchical Transformers for Multi-Document Summarizationcited by 132
  24. 2018ListOps: A Diagnostic Dataset for Latent Tree Learningcited by 128
  25. 2017Parallelizing Linear Recurrent Neural Nets Over Sequence Lengthcited by 126
  26. 2022How to Train Your HiPPO: State Space Models with Generalized Orthogonal Basis Projectionscited by 121
  27. 2017Bilateral Multi-Perspective Matching for Natural Language Sentencescited by 120
  28. 2022Block-Recurrent Transformerscited by 107
  29. 2021Hierarchical Transformers Are More Efficient Language Modelscited by 99
  30. 2021Nested Hierarchical Transformer: Towards Accurate, Data-Efficient and Interpretable Visual Understandingcited by 97
  31. 2021Do Transformer Modifications Transfer Across Implementations and Applications?cited by 87
  32. 2022What Makes Convolutional Models Great on Long Sequence Modeling?cited by 86
  33. 2023Exposing Attention Glitches with Flip-Flop Language Modelingcited by 74
  34. 2015A Hierarchical Recurrent Encoder-Decoder For Generative Context-Aware Query Suggestioncited by 68
  35. 2018Stable Recurrent Modelscited by 65
  36. 2021Combiner: Full Attention Transformer with Sparse Computation Costcited by 64
  37. 2023Simple Hardware-Efficient Long Convolutions for Sequence Modelingcited by 62
  38. 2019Unsupervised Latent Tree Induction with Deep Inside-Outside Recursive Autoencoderscited by 60

50 most cited of 85 All 85 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 3; 2025: 0; 2026: 2.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024On Provable Length and Compositional Generalization
  2. 2024Universal Length Generalization with Turing Programs
  3. 2026Random Recursive Models
  4. 2022Neural-Symbolic Recursive Machine for Systematic Generalization
  5. 2026Where Induction Runs Out: Description-Length Difficulty and the Memorisation Gap in Integer-Sequence Benchmarks
  6. 2026Form Follows Function: Recursive Stem Model
  7. 2023Universality of Linear Recurrences Followed by Non-linear Projections: Finite-Width Guarantees and Benefits of Complex Eigenvalues
  8. 2026What Limits Recursive Reasoning Models: Optimization, Architecture and Test-Time Scaling