Is In-Context Reinforcement Learning A Posterior Sampler? An Empirical Study
Abstract
In-context reinforcement learning (ICRL) exploits the impressive in-context learning ability of large language models to zero-shot generalize to new, unseen tasks at inference time without any parameter updates. Among many approaches, the Decision-Pretrained Transformer (DPT) is particularly appealing for its theoretical grounding: under idealized assumptions such as a sufficiently expressive model and infinite pretraining data, DPT can perform Bayesian posterior sampling. Whether this characterization survives in practice remains open. Therefore, we ask: is ICRL, specifically DPT and our proposed DPT variants, a Bayesian posterior sampler in practice? To approach this question, we establish two necessary conditions that a Bayesian posterior sampler must satisfy: sufficient-statistic invariance and the martingale property. We then construct statistical hypothesis tests to statistically assess if practically-trained ICRL models satisfy these conditions. Applying these tests in Gaussian, Bernoulli, and linear bandit settings, we find that both conditions are consistently violated, suggesting that ICRL may not behave as Bayesian posterior samplers in practice. Beyond this negative result, our tests provide a principled toolkit for testing the Bayesian behavior of ICRL.
Create a lesson
Related papers
MediPFN: Amortized In-Context Nuisance Learning and Inference for Causal Mediation Analysis
Shared title terminology · Shi Bo, Jiaming Hu
Amortized Bayesian Experimental Design with In-Context Knowledge Conditioning
Shared title terminology · Zhanghu Zhao, Daolang Huang, Xinyi Wen et al.
Beyond Discrete Ancestry Groups: Distribution-Aware In-Context Learning for Cancer Outcome Prediction Across the Genetic Ancestry Continuum
Shared title terminology · Weizhi Li, Yan Cui
Prior-Data Fitted Networks for In-Context Off-Policy Evaluation
Shared title terminology · Shuguang Yu, Ting Li, Fan Zhou
Residual-Based Causal Discovery via Pretrained In-Context Quantile Regression
Shared title terminology · Daniel Klippert, Quang Nhat Huynh, Alexander Marx
When Thoughts Become Memory: Unifying In-Context Learning and Fine-Tuning
Shared title terminology · Leon Chlon, Julie Huang