Recursive–Structured-State–Termination (RST) - Improving the performance of RLM for long-context reasoning with the help of structured graph state
Transformer-based language models achieve strong performance across natural language processing tasks, but their effectiveness degrades in very long-context settings due to context rot and the quadratic computational cost of self-attention. Although recursive language models mitigate this limitation by processing inputs in chunks, they introduce a control challenge in determining when to continue reasoning, consolidate evidence, or terminate. We propose the Recursive-Structured-State-Termination (RST) Reasoning Engine, an adaptive recursive framework for long-context understanding. RST partitions long documents into chunks, incrementally extracts knowledge, and maintains a structured reasoning graph composed of Claims, Partial Answers, and Open Questions. This graph preserves evidence across iterations, tracks dependencies, identifies contradictions, and guides further exploration through explicit information gaps. A convergence-based termination mechanism determines when sufficient evidence has been accumulated to generate a reliable response, thereby improving reasoning transparency while reducing unnecessary computation. We evaluate RST on OOLONG, OOLONG-Pairs, and LongBench-v2 CodeQA. RST consistently improves over RLM across model scales and domains. On OOLONG, RST achieves mean gains of 44.2% over RLM with Qwen3-8B and 33.9% over the base Qwen3-235B-A22B model. On OOLONG-Pairs, RST outperforms both base models and RLM without helper functions, reaching 14.2% and 41.9% F1 on the 32K setting with Qwen3-8B and Qwen3-235B, respectively, and 12.1% F1 on the challenging 131K setting. With helper functions, RST further improves to 76.6% F1 on 32K and 72.1% F1 on 131K using Qwen3-235B, while running approximately 2–3× faster than RLM. RST also transfers effectively to LongBench-v2 CodeQA, yielding large gains across code-capable models. Finally, integrating Mamba2-1.3B for long-context extraction and compaction further improves effectiveness and efficiency, highlighting the complementarity of structured state-space modeling and adaptive recursive reasoning for long-context tasks.
Authors
- Swagatam Das (ORCID: https://orcid.org/0000-0001-6843-4508)
- Sanjay Kukreja
- Amritendu Mukherjee (ORCID: https://orcid.org/0000-0003-0373-4619)
- Anupam Chattopadhyay (ORCID: https://orcid.org/0000-0002-8818-6983)
- Niladri Dutta (ORCID: https://orcid.org/0000-0002-2957-8389)
- Sohan Meshram
- Tarun Kumar
Institutions
- Nanyang Technological University (SG)
- Eckert & Ziegler (United States) (US)
- Indian Statistical Institute (IN)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-06-27
- DOI
- https://doi.org/10.5281/zenodo.20963160
- Primary Topic
- Topic Modeling
- Type
- preprint