paper-with-me

Papers

Transformers Learn Temporal Difference Methods for In-Context Reinforcement Learning

2024-05-22 · Jiuqi Wang, Ethan Blaser, Hadi Daneshmand, Shangtong Zhang

In-context learning refers to the learning ability of a model during inference time without adapting its parameters. The input (i.e., prompt) to the model (e.g., transformers) consists of both a context (i.e., instance-label pairs) and a query instance. The model is then able to output a label for the query instance according to the context during inference. A possible explanation for in-context learning is that the forward pass of (linear) transformers implements iterations of gradient descent on the instance-label pairs in the context. In this paper, we prove by construction that transformers can also implement temporal difference (TD) learning in the forward pass, a phenomenon we refer to as in-context TD. We demonstrate the emergence of in-context TD after training the transformer with a multi-task TD algorithm, accompanied by theoretical analysis. Furthermore, we prove that transformers are expressive enough to implement many other policy evaluation algorithms in the forward pass, including residual gradient, TD with eligibility trace, and average-reward TD.

📄 PDF Abstract BibTeX arXiv:2405.13861

Code (0)

등록된 구현이 없습니다.

Tasks

In-Context LearningIn-Context Reinforcement Learningreinforcement-learningReinforcement Learning

Similar Papers 제목 키워드 기반

Emergence of Episodic Memory in Transformers: Characterizing Changes in Temporal Structure of Attention Scores During Training

2025-02-09 · Deven Mahesh Mistry, Anooshka Bajaj, Yash Aggarwal, Sahaj Singh Maini 외

We investigate in-context temporal biases in attention heads and transformer outputs. Using cognitive science methodologies, we analyze attention scores and outputs of the GPT-2 models of varying sizes. Across attention …

In-Context Learning

PhysMamba: Efficient Remote Physiological Measurement with SlowFast Temporal Difference Mamba

2024-09-18 · Chaoqi Luo, Yiping Xie, Zitong Yu

Facial-video based Remote photoplethysmography (rPPG) aims at measuring physiological signals and monitoring heart activity without any contact, showing significant potential in various applications. Previous deep learni…

MambaState Space Models

PhysFormer++: Facial Video-based Physiological Measurement with SlowFast Temporal Difference Transformer

2023-02-07 · Zitong Yu, Yuming Shen, Jingang Shi, Hengshuang Zhao 외

Remote photoplethysmography (rPPG), which aims at measuring heart activities and physiological signals from facial video without any contact, has great potential in many applications (e.g., remote healthcare and affectiv…

Multi-Scale Temporal Difference Transformer for Video-Text Retrieval

2024-06-23 · Ni Wang, Dongliang Liao, Xing Xu

Currently, in the field of video-text retrieval, there are many transformer-based methods. Most of them usually stack frame features and regrade frames as tokens, then use transformers for video temporal modeling. Howeve…

RetrievalText RetrievalVideo-Text Retrieval

One for All: A Non-Linear Transformer can Enable Cross-Domain Generalization for In-Context Reinforcement Learning

2026-05-10 · Bowen He, Juncheng Dong, Lin Lin, Xiang Cheng arxiv

A central challenge in reinforcement learning (RL) is to learn models that generalize beyond the tasks on which they are trained, a goal traditionally pursued through multi-task and meta RL. Recently, transformer archite…

Reinforcement LearningDomain Generalization