arXiv:2606.20538cs.LG2026-06

让模型像贝叶斯推断一样高效适应新先验,提升预测鲁棒性。

Multi-Task Bayesian In-Context Learning

论文配图:Multi-Task Bayesian In-Context Learning
图 1 · 摘自论文原文
  • 用序列前缀显式编码先验信息,通过多任务学习训练变压器自适应不同先验。
  • 在高维隐变量和分布外先验上表现接近最优贝叶斯模型,速度提升数量级。
  • 适合需要快速、稳健推理的现实场景,如时空温度预测。

贝叶斯预测推断提供了不确定性量化、数据高效与鲁棒泛化的原理框架。然而,精确推断通常不可行,而可扩展的近似方法可能仍计算昂贵或需限制性建模假设,导致预测性能下降。先前的先验-数据拟合与上下文内模型虽作为可伸缩替代方案,但其绑定训练先验支持,缺乏测试时适配新先验的机制,分布偏移下鲁棒性有限。本文提出一种多任务上下文内学习框架,用于近似分层贝叶斯预测推断,显式将先验信息作为上下文数据的前缀。通过在先验与目标任务序列上训练的Transformer,学习跨先验族调整预测。在逐步增加难度的评估中,包括分布外先验与高维隐结构先验,该方法匹配了最优贝叶斯预测器,同时快数个数量级。进一步在真实世界的时空温度预测基准上验证其实际价值。代码已开源:https://github.com/martianmartina/multi-task-bayesian-icl/

原文摘要 · Abstract (English)

Bayesian predictive inference provides a principled framework for uncertainty quantification, data efficiency, and robust generalization. However, exact inference is often intractable, and scalable approximations may remain computationally expensive or require restrictive modeling assumptions that degrade predictive performance. Prior-Data Fitted and in-context models have recently emerged as an amortized alternative by learning to map datasets directly to predictive distributions, but existing approaches are tightly coupled to the support of the training prior and lack explicit mechanisms for adapting to new priors at test time, resulting in limited robustness under distribution shift. We introduce a multi-task in-context learning framework for amortized hierarchical Bayesian predictive inference that explicitly represents prior information as a prefix of in-context datasets. A transformer trained on sequences of prior and target tasks learns to adapt its predictions across families of priors. On a suite of evaluations with increasing difficulty, including out-of-meta-distribution priors and priors with high-dimensional latent structures, our method matches oracle Bayesian predictors while being orders of magnitude faster. We further demonstrate its practical relevance on a real-world spatiotemporal temperature prediction benchmark. Code is available at https://github.com/martianmartina/multi-task-bayesian-icl/.

贝叶斯推断上下文学习多任务学习不确定性量化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。