When Do Transformers Shine in RL? Decoupling Memory from Credit Assignment
Tianwei Ni, Michel Ma, Benjamin Eysenbach, Pierre-Luc Bacon

TL;DR
Transformers significantly improve memory in RL by enabling algorithms to recall observations up to 1500 steps ago, but they do not enhance the ability to perform long-term credit assignment, clarifying their role in RL success.
Contribution
The paper introduces formal measures for memory and credit assignment lengths and empirically demonstrates that Transformers improve memory but not credit assignment in RL.
Findings
Transformers extend memory capacity up to 1500 steps.
Transformers do not improve long-term credit assignment.
Empirical measures distinguish memory from credit assignment in RL.
Abstract
Reinforcement learning (RL) algorithms face two distinct challenges: learning effective representations of past and present observations, and determining how actions influence future returns. Both challenges involve modeling long-term dependencies. The Transformer architecture has been very successful to solve problems that involve long-term dependencies, including in the RL domain. However, the underlying reason for the strong performance of Transformer-based RL methods remains unclear: is it because they learn effective memory, or because they perform effective credit assignment? After introducing formal definitions of memory length and credit assignment length, we design simple configurable tasks to measure these distinct quantities. Our empirical results reveal that Transformers can enhance the memory capability of RL algorithms, scaling up to tasks that require memorizing…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Taxonomy
TopicsReinforcement Learning in Robotics · Evolutionary Algorithms and Applications · Software Engineering Research
MethodsMulti-Head Attention · Attention Is All You Need · Residual Connection · Label Smoothing · Linear Layer · Dense Connections · Position-Wise Feed-Forward Layer · Dropout · Adam · Absolute Position Encodings
