mlsanityData to 14 Oct 2026

Filtering Learning Histories Enhances In-Context Reinforcement Learning

arXiv 2505.15143 ↗First posted 21 May 2025cs.LG cs.ROcited by 5

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

  1. 2025Distilling Reinforcement Learning Algorithms for In-Context Model-Based Planning26 Feb
  2. 2024Random Policy Enables In-Context Reinforcement Learning within Trust Horizons25 Oct

Other references · 26

  1. 2017Attention Is All You Needcited by 60,361
  2. 2017Proximal Policy Optimization Algorithmscited by 15,215
  3. 2013Playing Atari with Deep Reinforcement Learningcited by 3,274
  4. 2021Decision Transformer: Reinforcement Learning via Sequence Modelingcited by 1,546
  5. 2018Soft Actor-Critic Algorithms and Applicationscited by 1,240
  6. 2019Meta-World: A Benchmark and Evaluation for Multi-Task and Meta Reinforcement Learningcited by 1,204
  7. 2015End-to-End Training of Deep Visuomotor Policiescited by 875
  8. 2022A Generalist Agentcited by 808
  9. 2021Offline Reinforcement Learning as One Big Sequence Modeling Problemcited by 644
  10. 2024TinyLlama: An Open-Source Small Language Modelcited by 618
  11. 2023Larger language models do in-context learning differentlycited by 394
  12. 2016Benchmarking Deep Reinforcement Learning for Continuous Controlcited by 371
14 more
  1. 2023Transformers as Algorithms: Generalization and Stability in In-context Learningcited by 222
  2. 2022Multi-Game Decision Transformerscited by 214
  3. 2021Reinforcement learning based recommender systems: A surveycited by 188
  4. 2021A Survey of Zero-shot Generalisation in Deep Reinforcement Learningcited by 170
  5. 2023Supervised Pretraining Can Learn In-Context Reinforcement Learningcited by 139
  6. 2023The Learnability of In-Context Learningcited by 127
  7. 2023Transformers as Decision Makers: Provable In-Context Reinforcement Learning via Supervised Pretrainingcited by 83
  8. 2018Hierarchical Reinforcement Learning for Zero-shot Generalization with Subtask Dependenciescited by 43
  9. 2023Emergence of In-Context Reinforcement Learning from Noise Distillationcited by 27
  10. 2023In-Context Reinforcement Learning for Variable Action Spacescited by 24
  11. 2023Explore to Generalize in Zero-Shot RLcited by 20
  12. 2021A Survey on Reinforcement Learning for Recommender Systemscited by 18
  13. 2021Improving Zero-shot Generalization in Offline Reinforcement Learning using Generalized Similarity Functionscited by 17
  14. 2025Reweighting Improves Conditional Risk Boundscited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 4.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026In-Context Reinforcement Learning From Suboptimal Historical Data
  2. 2026Transformers Provably Implement In-Context Reinforcement Learning with Policy Improvement
  3. 2024Transformers Can Learn Temporal Difference Methods for In-Context Reinforcement Learning
  4. 2026Learning in Context, Guided by Choice: A Reward-Free Paradigm for Reinforcement Learning with Transformers
  5. 2025Heuristic Transformer: Belief Augmented In-Context Reinforcement Learning
  6. 2024XLand-100B: A Large-Scale Multi-Task Dataset for In-Context Reinforcement Learning
  7. 2026From Weak Data to Strong Policy: Q-Targets Enable Provable In-Context Reinforcement Learning
  8. 2024In-Context Decision Transformer: Reinforcement Learning via Hierarchical Chain-of-Thought