Filtering Learning Histories Enhances In-Context Reinforcement Learning
On the map: Deep reinforcement learning methods → Deep RL algorithms and representations
Abstract (arXiv)
Transformer models (TMs) have exhibited remarkable in-context reinforcement learning (ICRL) capabilities, allowing them to generalize to and improve in previously unseen environments without re-training or fine-tuning. This is typically accomplished by imitating the complete learning histories of a source RL algorithm over a substantial amount of pretraining environments, which, however, may transfer suboptimal behaviors inherited from the source algorithm/dataset. Therefore, in this work, we address the issue of inheriting suboptimality from the perspective of dataset preprocessing. Motivated by the success of the weighted empirical risk minimization, we propose a simple yet effective approach, learning history filtering (LHF), to enhance ICRL by reweighting and filtering the learning histories based on their improvement and stability characteristics. To the best of our knowledge, LHF is the first approach to avoid source suboptimality by dataset preprocessing, and can be combined with the current state-of-the-art (SOTA) ICRL algorithms. We substantiate the effectiveness of LHF through a series of experiments conducted on the well-known ICRL benchmarks, encompassing both discrete environments and continuous robotic manipulation tasks, with three SOTA ICRL algorithms (AD, DPT, DICP) as the backbones. LHF exhibits robust performance across a variety of suboptimal scenarios, as well as under varying hyperparameters and sampling strategies. Notably, the superior performance of LHF becomes more pronounced in the presence of noisy data, indicating the significance of filtering learning histories.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Placed in Deep RL algorithms and representations, one of 15 directions in Deep reinforcement learning methods. Builds on 28 of its 34 references that are in the map. First posted on arXiv 21 May 2025.
Builds on
28 of 34 references.
Closest ancestors · 2
Same direction, newest first
- 2025Distilling Reinforcement Learning Algorithms for In-Context Model-Based Planning26 Feb
- 2024Random Policy Enables In-Context Reinforcement Learning within Trust Horizons25 Oct
Other references · 26
- 2017Attention Is All You Needcited by 60,361
- 2017Proximal Policy Optimization Algorithmscited by 15,215
- 2013Playing Atari with Deep Reinforcement Learningcited by 3,274
- 2021Decision Transformer: Reinforcement Learning via Sequence Modelingcited by 1,546
- 2018Soft Actor-Critic Algorithms and Applicationscited by 1,240
- 2019Meta-World: A Benchmark and Evaluation for Multi-Task and Meta Reinforcement Learningcited by 1,204
- 2015End-to-End Training of Deep Visuomotor Policiescited by 875
- 2022A Generalist Agentcited by 808
- 2021Offline Reinforcement Learning as One Big Sequence Modeling Problemcited by 644
- 2024TinyLlama: An Open-Source Small Language Modelcited by 618
- 2023Larger language models do in-context learning differentlycited by 394
- 2016Benchmarking Deep Reinforcement Learning for Continuous Controlcited by 371
14 more
- 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 222
- 2022Multi-Game Decision Transformerscited by 214
- 2021Reinforcement learning based recommender systems: A surveycited by 188
- 2021A Survey of Zero-shot Generalisation in Deep Reinforcement Learningcited by 170
- 2023Supervised Pretraining Can Learn In-Context Reinforcement Learningcited by 139
- 2023The Learnability of In-Context Learningcited by 127
- 2023Transformers as Decision Makers: Provable In-Context Reinforcement Learning via Supervised Pretrainingcited by 83
- 2018Hierarchical Reinforcement Learning for Zero-shot Generalization with Subtask Dependenciescited by 43
- 2023Emergence of In-Context Reinforcement Learning from Noise Distillationcited by 27
- 2023In-Context Reinforcement Learning for Variable Action Spacescited by 24
- 2023Explore to Generalize in Zero-Shot RLcited by 20
- 2021A Survey on Reinforcement Learning for Recommender Systemscited by 18
- 2021Improving Zero-shot Generalization in Offline Reinforcement Learning using Generalized Similarity Functionscited by 17
- 2025Reweighting Improves Conditional Risk Boundscited by 1
Built on by
Citing papers per year: 2025: 1; 2026: 4.
5 papers.
- 2026Vintix II: Decision Pre-Trained Transformer is a Scalable In-Context Reinforcement Learnercited by 1
- 2026In-Context Reinforcement Learning under Non-Stationarity: A Surveycited by 1
- 2025Robust In-Context Reinforcement Learning Under Reward Poisoning Attackscited by 0
- 2026Downstream-Aware Context Selection for Online In-Context Reinforcement Learningcited by 0
- 2026Do LLMs Learn from Rewards in Context? : Rethinking the role of reward in In-Context Reinforcement Learningcited by 0
- 2026Do LLMs Learn from Rewards in Context? : Rethinking the role of reward in In-Context Reinforcement Learning8 Oct 2026
- 2026Downstream-Aware Context Selection for Online In-Context Reinforcement Learning27 Sep 2026
- 2026In-Context Reinforcement Learning under Non-Stationarity: A Survey1 Jul 2026
- 2026Vintix II: Decision Pre-Trained Transformer is a Scalable In-Context Reinforcement Learner6 Apr 2026
- 2025Robust In-Context Reinforcement Learning Under Reward Poisoning Attacks7 Jun 2025
Similar, not cited
Close in wording, no citation either way
- 2026In-Context Reinforcement Learning From Suboptimal Historical Data
- 2026Transformers Provably Implement In-Context Reinforcement Learning with Policy Improvement
- 2024Transformers Can Learn Temporal Difference Methods for In-Context Reinforcement Learning
- 2026Learning in Context, Guided by Choice: A Reward-Free Paradigm for Reinforcement Learning with Transformers
- 2025Heuristic Transformer: Belief Augmented In-Context Reinforcement Learning
- 2024XLand-100B: A Large-Scale Multi-Task Dataset for In-Context Reinforcement Learning
- 2026From Weak Data to Strong Policy: Q-Targets Enable Provable In-Context Reinforcement Learning
- 2024In-Context Decision Transformer: Reinforcement Learning via Hierarchical Chain-of-Thought