In-Context Reinforcement Learning From Suboptimal Historical Data
Juncheng Dong, Moyang Guo, Ethan X. Fang, Zhuoran Yang, Vahid Tarokh
Abstract
Transformer models have achieved remarkable empirical successes, largely due to their incontext learning capabilities. Inspired by this, we explore training an autoregressive transformer for in-context reinforcement learning (ICRL). In this setting, we initially train a transformer on an offline dataset consisting of trajectories collected from various RL tasks, and then fix and use this transformer to create an action policy for new RL tasks. Notably, we consider the setting where the offline dataset contains trajectories sampled from suboptimal behavioral policies. In this case, standard autoregressive training corresponds to imitation learning and results in suboptimal performance. To address this, we propose the Decision Importance Transformer (DIT) framework, which emulates the actor-critic algorithm in an in-context manner. In particular, we first train a transformer-based value function that estimates the advantage functions of the behavior policies that collected the suboptimal trajectories. Then we train a transformer-based policy via a weighted maximum likelihood estimation loss, where the weights are constructed based on the trained value function to steer the suboptimal policies to the optimal ones. We conduct extensive experiments to test the performance of DIT on both bandit and Markov Decision Process problems. Our results show that DIT achieves superior performance, particularly when the offline dataset contains suboptimal historical data.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
3 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Scalable In-Context Q-Learning cites Offline Reinforcement Learning with Implicit Q-Learning
- Scalable In-Context Q-Learning cites Language Models are Few-Shot Learners
- A Minimalist Approach to Offline Reinforcement Learning cites Decision Transformer: Reinforcement Learning via Sequence Modeling
- A Minimalist Approach to Offline Reinforcement Learning cites Conservative Q-Learning for Offline Reinforcement Learning
- Vintix II: Decision Pre-Trained Transformer is a Scalable In-Context Reinforcement Learner cites Language Models are Few-Shot Learners
- Offline Reinforcement Learning with Implicit Q-Learning cites A Minimalist Approach to Offline Reinforcement Learning
- Offline Reinforcement Learning with Implicit Q-Learning cites Decision Transformer: Reinforcement Learning via Sequence Modeling
- Offline Reinforcement Learning with Implicit Q-Learning cites Conservative Q-Learning for Offline Reinforcement Learning
- Decision Transformer: Reinforcement Learning via Sequence Modeling cites Language Models are Few-Shot Learners
- Decision Transformer: Reinforcement Learning via Sequence Modeling cites Conservative Q-Learning for Offline Reinforcement Learning
- Benchmarking the Limits of In-Context Reinforcement Learning for Ad-Hoc Teamwork cites Decision Transformer: Reinforcement Learning via Sequence Modeling
Cited by top-tier papers3
- Scalable In-Context Q-LearningJinmei Liu, Fuhong Liu, Zhenhong Sun, Jianye HAO et al.ICLR 2026 · 8 citations
- Vintix II: Decision Pre-Trained Transformer is a Scalable In-Context Reinforcement LearnerAndrei Polubarov, Nikita Lyubaykin, Alexander Derevyagin, Artyom Grishin et al.ICLR 2026
- Benchmarking the Limits of In-Context Reinforcement Learning for Ad-Hoc TeamworkYuheng Jing, Kai Li, Jiajun Zhang, Zeyao Ma et al.ICML 2026
Builds on19
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Conservative Q-Learning for Offline Reinforcement LearningAviral Kumar, Aurick Zhou, George Tucker, Sergey LevineNeurIPS 2020 · 2,881 citations
- Decision Transformer: Reinforcement Learning via Sequence ModelingLili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee et al.NeurIPS 2021 · 2,557 citations
- Offline Reinforcement Learning with Implicit Q-LearningIlya Kostrikov, Ashvin Nair, Sergey LevineICLR 2022 · 1,402 citations
- A Minimalist Approach to Offline Reinforcement LearningScott Fujimoto, Shixiang Shane GuNeurIPS 2021 · 1,292 citations
Related papers
- Transformers as Decision Makers: Provable In-Context Reinforcement Learning via Supervised PretrainingLicong Lin, Yu Bai, Song MeiICLR 2024 · 74 citations
- Q-learning Decision Transformer: Leveraging Dynamic Programming for Conditional Sequence Modelling in Offline RLTaku Yamagata, Ahmed Khalil, Raúl Santos-RodríguezICML 2023 · 121 citations
- In-Context Decision Transformer: Reinforcement Learning via Hierarchical Chain-of-ThoughtSili Huang, Jifeng Hu, Hechang Chen, Lichao Sun et al.ICML 2024 · 25 citations
- Emergent Agentic Transformer from Chain of Hindsight ExperienceHao Liu, Pieter AbbeelICML 2023 · 35 citations
- Rethinking Decision Transformer via Hierarchical Reinforcement LearningYi Ma, Jianye Hao, Hebin Liang, Chenjun XiaoICML 2024 · 15 citations
