TAMTRL: Teacher-Aligned Reward Reshaping for Multi-Turn Reinforcement Learning in Long-Context Compression
Authors: Li Wang, Yandong Wang, Xin Yu, Kui Zhang, Tianhao Peng, Wenjun Wu
Organizations: School of Artificial Intelligence, Beihang University, Beijing, 100191, China · Hangzhou International Innovation Institute, Beihang University, Hangzhou, China · Beijing Advanced Innovation Center for Future Blockchain and Privacy Computing, Beihang University, Beijing, China
The rapid progress of large language models (LLMs) has led to remarkable performance gains across a wide range of tasks. However, when handling long documents that exceed the model's context window limit, the entire context cannot be processed in a single pass, making chunk-wise processing necessary. This requires multiple turns to read different chunks and update memory. However, supervision is typically provided only by the final outcome, which makes it difficult to evaluate the quality of memory updates at each turn in the multi-turn training setting. This introduces a temporal credit assignment challenge. Existing approaches, such as LLM-as-a-judge or process reward models, incur substantial computational overhead and suffer from estimation noise. To better address the credit assignment problem in multi-turn memory training, we propose Teacher-Aligned Reward Reshaping for Multi-Turn Reinforcement Learning (TAMTRL). TAMTRL leverages relevant documents as teacher signals by aligning them with each turn of model input and assigns rewards through normalized probabilities in a self-supervised manner. This provides fine-grained learning signals for each memory update and improves long-context processing. Experiments with multiple models of varying scales across seven long-context benchmarks show that TAMTRL consistently outperforms strong baselines, demonstrating its effectiveness. Our code is available at https://anonymous.4open.science/r/TAMTRL-F1F8.
Figures & tables
Figure 1: In multi-turn RLVR, the lack of temporal credit assignment may wrongly penalize turns with good answers or reward turns with poor answers, introducing noisy supervision that complicates training and degrades performance. Existing solutions either incur significant computational overhead or rely on external models.
Figure 2: Framework of the TAMTRL Method. Solving long-context problems through chunk-based processing, utilizing the probability scores from a teacher with local and global views for turn-level credit assignment to enable multi-turn reinforcement learning.
Methods
HotpotQA
RULER-QA
NIAH
2Wikimqa
Musique
Narrativeqa
Qasper
Average
# Qwen3-0.6B
Base [ 57 ]
0.00
0.65
11.65
0.63
0.12
0.00
0.50
1.94
SFT [ 23 ]
34.38
44.80
97.60
37.75
18.13
4.00
10.37
35.29
STaR [ 55 ]
12.11
22.15
82.70
24.50
5.12
1.88
11.00
22.78
Vanilla-KD [ 56 ]
27.73
38.15
89.40
35.75
18.75
2.62
11.25
31.95
MemAgent [ 9 ]
38.87
47.05
95.04
40.13
23.62
4.13
12.00
37.26
Table 1: Performance (%) of Qwen3-0.6B and Qwen3-1.7B models across seven representative benchmarks under various methods. The bold and underline indicate the best and second-best results, respectively.
Figure 3: Training dynamics comparison of Qwen3-0.6B model.
Figure 4: Training dynamics comparison of Qwen3-1.7B model.
Methods
HotpotQA
RULER-QA
NIAH
2Wikimqa
Musique
Narrativeqa
Qasper
Average
# Qwen3-0.6B
TAMTRL (ours)
42.09
52.25
95.04
43.00
24.75
4.37
13.50
39.29
w/o l-norm
39.26
49.70
95.15
39.50
22.25
4.00
13.12
37.57
w/o mm-norm
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
# Qwen3-1.7B
TAMTRL (ours)
47.66
55.45
98.25
53.25
29.00
5.50
13.38
43.21
Table 2: Ablation study on the performance (%) of Qwen3 model across seven representative benchmarks under various methods. The bold and underline indicate the best and second-best results, respectively.
Methods
HotpotQA
RULER-QA
NIAH
2Wikimqa
Musique
Narrativeqa
Qasper
Average
# Qwen3-0.6B
TAMTRL (ours)
42.09
52.25
95.04
43.00
24.75
4.37
13.50
39.29
global-reward
42.77
51.50
89.75
41.62
22.88
3.62
14.12
38.04
plus-reward
16.02
19.30
65.00
21.25
2.50
1.37
8.75
19.17
# Qwen3-1.7B
TAMTRL (ours)
47.66
55.45
98.25
53.25
29.00
5.50
13.38
43.21
Table 3: Exploration of reward design for Qwen3 model across seven representative benchmarks. The bold and underline indicate the best and second-best results, respectively.
Figure 5: Analysis of the impact of different document quantities on the performance of TAMTRL on the HotpotQA dataset. (Left) Test results with varying training document quantities at a fixed test document quantity of 100; (Right) Test results with varying test document quantities at a fixed training document quantity of 100.
Figure 6: Analysis of the impact of different chunk sizes on the performance of TAMTRL on the HotpotQA dataset. (Left) Test results with varying training chunk sizes at a fixed test chunk size of 5000; (Right) Test results with varying test chunk sizes at a fixed training chunk size of 5000.
Figure 7: Average performance variation of the model with TAMTRL under different training data ratios on seven datasets.
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
Dataset
# Train / Test
HotpotQA-train
25600 / -
SFT-train
65057 / -
STaR-train-0.6B
5264 / -
STaR-train-1.7B
60773 / -
Vanilla-KD-train
80040 / -
HotpotQA-test
- / 128
Appendix
Table A1: Statistics of the training and test datasets used by all methods.
Method
Data Processing
Training
Total
SFT
54.12
3.7
58.82
STaR
23.33
0.32
23.65
Vanilla-KD
37.66
21.59
59.25
MemAgent
0
37.75
37.75
LLM-judge
0
48.41
48.41
PRM
41.06
40.71
81.77
Appendix
Table A2: Estimated computational time (hours) for various methods with Qwen3-0.6B.
Figure A1: Design of Prompt for MemAgent.
Figure A2: Design of Prompt for LLM-judge.
Figure A3: TAMTRL-0.6B model output example 1 on the hotpotQA dataset.
Figure A4: TAMTRL-1.7B model output example 1 on the hotpotQA dataset.
Long-context reasoning remains a critical bottleneck for large language models, as recent recurrent-memory approaches face two inherent challenges: sequential chunk-wise updates can overwrite early critical evidence with later irrelevant content, and serial inter-chunk dependencies limit parallelism and cause latency to increase with context length. To address these issues, we propose PI-Mem (Parallel-Iterative Memory), a mechanism that processes all chunks in parallel and iteratively refines a shared memory over a bounded number of turns. In each turn, PI-Mem reads all chunks in parallel conditioned on the current memory, selects new or complementary evidence from each chunk, and merges the selected evidence into a compact shared memory for the next turn. To discourage redundant turns, we optimize the workflow through reinforcement learning with an auxiliary turn-efficiency reward, enabling the model to adaptively exit once sufficient evidence has been accumulated. We evaluate PI-Mem with Qwen3.5-35B-A3B and Qwen2.5-7B on the HotpotQA benchmark across context lengths up to 3.6 million tokens and find that it outperforms the recurrent-memory baseline by +6.25 and +7.81 absolute points while achieving 6.1× and 2.1× inference speedups, respectively. These results demonstrate that PI-Mem breaks the accuracy--efficiency trade-off in long-context reasoning and provides a scalable approach to complex multi-hop question answering over extremely long documents.
Dawei Liu, Haixu Song, Shuang Cheng +9
Shanghai Jiao Tong University · Shanghai Artificial Intelligence Laboratory · Tsinghua University +3
Long-context reasoning is essential for complex and long-horizon tasks, yet the performance of large language models (LLMs) degrades as context length increases. Recent approaches address this by processing input chunk by chunk while maintaining a bounded textual memory in model context. However, premature information compression can discard critical details essential for subsequent reasoning. In this paper, we introduce Commit-on-Evidence Memory (CoEM), which learns when to convert source evidence into compact memory facts. Specifically, under a fixed context-memory budget, CoEM preserves potentially useful source excerpts verbatim in a pending set, allowing subsequent context to clarify their relevance before irreversible compression. As new context arrives, a learned policy revisits each pending excerpt and decides whether to promote it to the committed memory, retain it for further consideration, or discard it. A frozen verifier ensures proposed facts are accepted only if supported by retained excerpts and current context. To further guide effective memory management, we train this policy using reinforcement learning by combining fine-grained, step-level evidence rewards with final answer rewards. Extensive experiments demonstrate that CoEM consistently improves long-context reasoning. When evaluated on 6,400 documents long-context input, CoEM outperforms the strongest memory baseline by 10.4-11.4 F1 points on Qwen3.5-9B. Code repository: https://github.com/benmagnifico/CoEM.
Jingguang Li, Yebo Wu, Zuyi Guo +7
Korea Advanced Institute of Science & Technology · University of Macau · Massachusetts Institute of Technology
Long-context tasks require LLMs to identify and preserve answer-relevant information from large contexts. Chunk-wise memory agents address this issue by sequentially reading document chunks, updating a compact memory, and generating the final answer from the accumulated memory. However, existing RL-based chunk-wise agents either rely on sparse final-answer rewards or use lexical intermediate rewards for memory and retrieval actions. These signals supervise task success or local overlap, but do not directly evaluate whether the final memory supports the ground-truth answer. We propose InfoMem, a reward mechanism for training chunk-wise memory agents that evaluates final-memory utility using answer-conditioned information. InfoMem measures how much the final memory increases the model's per-token log-likelihood of the ground-truth answer. To stabilize RL optimization, InfoMem applies this signal only to successful trajectories and normalizes it before reward composition. Under the same GRPO framework and training budget, InfoMem improves long-context memory-agent performance over comparable memory-agent RL baselines. Analyses show that effective final-memory rewards should operate on successful trajectories, be normalized before reward composition, and be conditioned on the answer rather than the query. Our code is available at https://github.com/GenSouKa1/InfoMem.
Tiancheng Han, Yong Li, Wuzhou Yu +2
1Tongji University · 2Shanghai Innovation Institute · 3Shanghai AI Laboratory