arXiv:2502.06601cs.LGcs.AI2025-02被引 16

用上下文学习加速贝叶斯后验推断,提升预测效果

Amortized In-Context Bayesian Posterior Estimation

  • 通过条件估计实现贝叶斯后验的快速推理
  • 逆KL散度结合Transformer与归一化流表现最优
  • 适合需快速适应新数据的场景,如真实世界迁移

贝叶斯推断为引入先验信念并为假设空间分配概率提供了自然方式。现有方法依赖迭代过程如马尔可夫链蒙特卡洛(MCMC)和变分推断(VI),每次新观测出现都需重新运行。通过条件估计实现的摊销策略可缓解此问题,成为基于模拟推断、神经过程及预训练模型上下文方法的核心原则。本文从不同优化目标与架构选择角度,对上下文学习中的摊销贝叶斯后验估计方法进行系统比较。这些方法通过将数据样本作为上下文输入序列模型(如Transformer)来训练一个摊销估计器,实现后验参数推断。不同于语言模型,我们采用排列不变架构,因真实后验不随上下文样本顺序变化。实验涵盖分布外任务泛化、模型误设情况以及从仿真到真实问题的迁移。结果表明,逆KL估计器在预测任务中表现更优,尤其结合Transformer与归一化流时优势显著。

原文摘要 · Abstract (English)

Bayesian inference provides a natural way of incorporating prior beliefs and assigning a probability measure to the space of hypotheses. Current solutions rely on iterative routines like Markov Chain Monte Carlo (MCMC) sampling and Variational Inference (VI), which need to be re-run whenever new observations are available. Amortization, through conditional estimation, is a viable strategy to alleviate such difficulties and has been the guiding principle behind simulation-based inference, neural processes and in-context methods using pre-trained models. In this work, we conduct a thorough comparative analysis of amortized in-context Bayesian posterior estimation methods from the lens of different optimization objectives and architectural choices. Such methods train an amortized estimator to perform posterior parameter inference by conditioning on a set of data examples passed as context to a sequence model such as a transformer. In contrast to language models, we leverage permutation invariant architectures as the true posterior is invariant to the ordering of context examples. Our empirical study includes generalization to out-of-distribution tasks, cases where the assumed underlying model is misspecified, and transfer from simulated to real problems. Subsequently, it highlights the superiority of the reverse KL estimator for predictive problems, especially when combined with the transformer architecture and normalizing flows.

贝叶斯推断上下文学习Transformer归一化流

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