# Reinforcement Learning as One Big Sequence Modeling Problem

> 原标题：Reinforcement Learning as One Big Sequence Modeling Problem

- 来源：Berkeley RAIL / Sergey Levine
- 文章发布日期：2021-06-03
- Physical AI Hot：https://physical-ai-hot.pages.dev/items/ozumqmlu2uml60pgbekkx8wdq
- 原文：https://arxiv.org/abs/2106.02039

## 一句话结论

该工作将强化学习统一表述为轨迹序列建模问题，用Transformer预测轨迹分布并以束搜索进行规划，在长时域预测、模仿学习、目标条件强化学习和离线强化学习等场景展示了方法灵活性。

## 摘要

Reinforcement learning (RL) is typically concerned with estimating stationary policies or single-step models, leveraging the Markov property to factorize problems in time. However, we can also view RL as a generic sequence modeling problem, with the goal being to produce a sequence of actions that leads to a sequence of high rewards. Viewed in this way, it is tempting to consider whether high-capacity sequence prediction models that work well in other domains, such as natural-language processing, can also provide effective solutions to the RL problem. To this end, we explore how RL can be tackled with the tools of sequence modeling, using a Transformer architecture to model distributions over trajectories and repurposing beam search as a planning algorithm. Framing RL as sequence modeling problem simplifies a range of design decisions, allowing us to dispense with many of the components common in offline RL algorithms. We demonstrate the flexibility of this approach across long-horizon dynamics prediction, imitation learning, goal-conditioned RL, and offline RL. Further, we show that this approach can be combined with existing model-free algorithms to yield a state-of-the-art planner in sparse-reward, long-horizon tasks.

## 为什么重要

以下为编辑分析，不能视作已验证结果。

这一表述简化了离线强化学习中的部分设计决策，并把自然语言处理中的高容量序列预测模型与强化学习规划联系起来。

方法覆盖长时域动力学预测、模仿学习、目标条件强化学习和离线强化学习，说明序列建模框架具有跨任务适用性。

## 对 AI 研究或应用的影响

以下为编辑分析，不能视作已验证结果。

对强化学习研究而言，轨迹级序列建模可能减少对传统离线RL组件的依赖，并为规划算法提供统一实现路径。

如果该方法在稀疏奖励、长时域任务中的状态最优结果能够稳定复现，则Transformer预测与束搜索的组合可能影响规划器设计；当前材料仅说明文章进行了展示。

## 值得继续追的问题

- 在不同数据规模、任务时域和奖励稀疏程度下，Transformer轨迹建模与束搜索相较于主流离线RL方法的性能和计算成本如何？
- 将该方法与现有无模型算法结合后，最优规划器的收益主要来自序列建模、束搜索，还是两者的组合？

