Manuscript Offprint

arXiv:2610.06750

Balancing Memory Pathways: Analyzing and Improving Memory Utilization in Hybrid LMs

Hyunji Lee, Joykirat Singh, Zaid Khan, Justin Chih-Yao Chen, Elias Stengel-Eskin, Alessandro Sordoni, Arman Cohan, Mohit Bansal

ABSTRACT

Recurrent–attention hybrid language models (LMs), which interleave attention and recurrent layers, are increasingly used to combine the efficiency of the recurrent layers with the strong performance of attention layers. Prior work suggests that attention and recurrent layers offer complementary pathways to use past information: attention supports precise memory recall from earlier tokens, while recurrent layers support consolidation of disparate information over long contexts. However, we observe that simply having access to both pathways does not mean that hybrid LMs are effectively using them. When we analyze how much the models rely on each pathway, we find a substantially greater reliance on attention than on the recurrent state. Standard supervised fine-tuning improves overall performance but does not improve how the two memory pathways are coordinated: the model becomes more reliant on information propagated by attention layers, while its use of information propagated by recurrent layers remains limited. To encourage better coordination between the two memory pathways, we add an auxiliary loss that limits attention's access to earlier context while the recurrent state propagates through the full sequence. This objective encourages the model to retain and use information through the recurrent pathway alongside attention. It improves overall performance, with particularly strong gains on tasks involving longer contexts or requiring information aggregation, consistent with the strengths of recurrent layers observed in analysis. Crucially, this imbalance and the benefit of our auxiliary loss generalize: they apply to multiple recurrent-attention LMs in question-answering and agentic tasks, as well as to attention-based LMs that combine different forms of memory. Together, our findings show that simply providing multiple memory pathways does not ensure their effective use, and that targeted supervision is needed to better coordinate them. 1^{1}

1 INTRODUCTION

Recurrent–attention hybrid language models (Qwen Team, 2026; Ren et al., 2025; Dong et al., 2024; NVIDIA et al., 2025), which consist of recurrent and attention layers, leverage efficient recurrent computation and expressive attention memory to allow flexible access to prior context. These architectures contain two memory pathways for retaining and using past information: attention and recurrent layers. Prior work (Lee et al., 2025; Michalak & Abreu, 2025; Bick et al., 2026) has analyzed distinct characteristics and strengths of these components: attention layers support precise memory recall by directly accessing earlier information, while recurrent layers synthesize information distributed across long contexts. Extending these findings, we observe that attention plays a larger role when the answer appears directly in the context or can be found from a single piece of evidence, whereas the recurrent state plays a larger role when the answer must be inferred rather than copied or requires combining multiple pieces of evidence across the context. These complementary strengths motivate an important question: How well do hybrid LMs use both memory pathways, and how can their coordination be improved?

*Correspondence to: hyunjil@cs.unc.edu

1^{1}Code in https://github.com/amy-hyunji/Balancing-Memory-Pathways

Figure

Figure 1: Overview of memory pathways in recurrent-attention hybrid LMs and our findings. (Middle) Two memory pathways in recurrent-attention hybrid LMs play different roles: attention supports precise memory recall of earlier tokens, while the recurrent state supports aggregating information across long contexts. (Right) With Standard SFT ( LSFTL_{SFT}), the model relies mostly on attention and underuses the recurrent pathways. We add an auxiliary loss ( LrecL_{rec}) that masks attention to past context, allowing the model to access it only through recurrent layers. We observe that adding auxiliary loss improves overall performance, with increased use of the recurrent pathway and preserved use of attention.

We first examine how existing hybrid LMs use their attention and recurrent memory pathways. We find that having both pathways does not mean that models use both effectively; models retain most of their accuracy even when the recurrent pathway’s access to past information is limited (30.2% → 20.2%), whereas accuracy drops substantially when the same restriction is applied to attention layers (30.2% → 5.1%). This imbalance in memory utilization persists even after standard supervised fine-tuning (SFT) on downstream tasks such as question answering. Although the overall performance improves, the gains are mostly from better utilization of attention layers whereas their use of the recurrent pathway remains limited (Figure 1, Standard SFT box).

To address this imbalance in memory utilization, we add an auxiliary loss that complements standard SFT by encouraging the model to retain and use information through the recurrent pathway. In an auxiliary forward pass, we restrict the attention layers' access to past context, requiring the model to access it through recurrent states. This simple intervention improves question-answering performance, with average absolute accuracy gains of 3.9% on Qwen3.5-4B (Qwen Team, 2026) and 5.2% on Nemotron-H-4B-Instruct (NVIDIA et al., 2025) across six datasets. Adding the auxiliary loss also substantially improves performance when past information is propagated only through recurrent layers, suggesting increased use of recurrent memory. The gains are particularly large on longer-context datasets (8.0%) compared to shorter context (0.2%), consistent with more effective use of recurrent layers' previously identified strength in processing long contexts. Reversing the restriction to encourage attention leads to smaller gains, suggesting that the improvement from the auxiliary loss depends on which pathway is encouraged, with greater improvement from strengthening the underutilized recurrent pathway (Figure 1, With Auxiliary Loss box).

The benefits of auxiliary supervision also extend to agentic tasks, where agents must explore, accumulate observations, and use them to choose subsequent actions. When averaged across both models, adding recurrent auxiliary supervision improves the success rate by 3.5% and 9.3% on Quest and Treasure tasks in TextWorld (Côté et al., 2019), and by 22.0% and 13.5% on the Put-NextLocal and GoToObjMaze tasks in BabyAI (Chevalier-Boisvert et al., 2019), respectively. We observe that the larger gains on BabyAI mirror our question answering results, where the auxiliary loss tends to show stronger improvement on longer contexts; BabyAI trajectories (avg. 134.0 steps) are substantially longer compared to TextWorld (avg. 42.2 steps).

We further examine how the auxiliary loss affects the use of past information. When models are allowed to retry after failures, with their previous attempts stored in memory so that they can revise their answers or actions (Shinn et al., 2023; Zhao et al., 2024), models trained with the auxiliary loss recover more successfully, improving the cumulative recovery rate over standard SFT by 16.6% on question answering and 19.2% on agentic tasks. In question answering, the gain is especially large on multi-evidence questions compared to single-evidence questions (30.3% vs. 2.8%). We attribute this to the auxiliary loss encouraging greater use of recurrent layers, which we observe to play a larger role in multi-evidence questions. In the agentic setup, when given multiple suboptimal successful demonstrations, we observe that agents trained with the auxiliary loss more often generate trajectories shorter than any provided demonstrations (6.0% on average), with larger gains when the demonstrations are longer. Finally, the same imbalance and the strength of the auxiliary loss generalize to attention-based LMs with multiple memories: standard SFT favors one memory pathway over another, and adding auxiliary supervision that encourages the use of the underutilized pathway increases usage of the pathway and improves overall performance in question-answering. Across architectures and tasks, our findings highlight that simply providing multiple memory pathways does not lead to balanced, complementary use; models must instead be trained to coordinate these memory pathways.

References (51)