Emergent Agentic Transformer from Chain of Hindsight Experience
Hao Liu, Pieter Abbeel
Abstract
Large transformer models powered by diverse data and model scale have dominated natural language modeling and computer vision and pushed the frontier of multiple AI areas. In reinforcement learning (RL), despite many efforts into transformer-based policies, a key limitation, however, is that current transformer-based policies cannot learn by directly combining information from multiple sub-optimal trials. In this work, we address this issue using recently proposed chain of hindsight to relabel experience, where we train a transformer on a sequence of trajectory experience ascending sorted according to their total rewards. Our method consists of relabelling target return of each trajectory to the maximum total reward among in sequence of trajectories and training an autoregressive model to predict actions conditioning on past states, actions, rewards, target returns, and task completion tokens, the resulting model, Agentic Transformer (AT), can learn to improve upon itself both at training and test time. As we show on D4RL and ExoRL benchmarks, to the best our knowledge, this is the first time that a simple transformer-based model performs competitively with both temporal-difference and imitation-learning-based approaches, even from sub-optimal data. Our Agentic Transformer also shows a promising scaling trend that bigger models consistently improve results.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 8f7d1aa1-b73d-468a-b15d-666aa8fb23c5Cited by top-tier papers24
- Decision Mamba: Reinforcement Learning via Hybrid Selective Sequence ModelingSili Huang, Jifeng Hu, Zhejian Yang, Liwei Yang et al.NeurIPS 2024 · 65 citations
- Blockwise Parallel Transformers for Large Context ModelsHao Liu, Pieter AbbeelNeurIPS 2023 · 55 citations
- Reward Is Enough: LLMs Are In-Context Reinforcement LearnersKefan Song, Amir Moeini, Peng Wang, Lei Gong et al.ICLR 2026 · 42 citations
- Unleashing the Power of Pre-trained Language Models for Offline Reinforcement LearningRuizhe Shi, Yuyao Liu, Yanjie Ze, Simon Shaolei Du et al.ICLR 2024 · 36 citations
- Learning to Modulate pre-trained Models in RLThomas Schmied, Markus Hofmarcher, Fabian Paischer, Razvan Pascanu et al.NeurIPS 2023 · 34 citations
Builds on18
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Flamingo: a Visual Language Model for Few-Shot LearningJean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech et al.NeurIPS 2022 · 6,707 citations
- Decision Transformer: Reinforcement Learning via Sequence ModelingLili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee et al.NeurIPS 2021 · 2,557 citations
- Solving Quantitative Reasoning Problems with Language ModelsAitor Lewkowycz, Anders Andreassen, David Dohan, Ethan Dyer et al.NeurIPS 2022 · 2,039 citations
Related papers
- Reinformer: Max-Return Sequence Modeling for Offline RLZifeng Zhuang, Dengyun Peng, Jinxin Liu, Ziqi Zhang et al.ICML 2024 · 29 citations
- In-Context Reinforcement Learning From Suboptimal Historical DataJuncheng Dong, Moyang Guo, Ethan X. Fang, Zhuoran Yang et al.ICML 2025
- 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
- Rethinking Decision Transformer via Hierarchical Reinforcement LearningYi Ma, Jianye Hao, Hebin Liang, Chenjun XiaoICML 2024 · 15 citations
- Addressing Optimism Bias in Sequence Modeling for Reinforcement LearningAdam R. Villaflor, Zhe Huang, Swapnil Pande, John M. Dolan et al.ICML 2022 · 30 citations
