Efficient Autoregressive Inference for Transformer Probabilistic Models
Conor Hassan, Nasrulloh R. B. S. Loka, Cen-You Li, Daolang Huang, Paul E. Chang, Yang Yang, Francesco Silvestrin, Samuel Kaski, Luigi Acerbi
Abstract
Set-based transformer models for amortized probabilistic inference and meta-learning, such as neural processes, prior-fitted networks, and tabular foundation models, excel at single-pass marginal prediction. However, many applications require joint distributions over multiple predictions. Purely autoregressive architectures generate these efficiently but sacrifice flexible set-conditioning. Obtaining joint distributions from set-based models requires re-encoding the entire context at each autoregressive step, which scales poorly. We introduce a causal autoregressive buffer that combines the strengths of both paradigms. The model encodes the context once and caches it; a lightweight causal buffer captures dependencies among generated targets, with each new prediction attending to both the cached context and all previously predicted targets added to the buffer. This enables efficient batched autoregressive sampling and joint predictive density evaluation. Training integrates set-based and autoregressive modes through masked attention at minimal overhead. Across synthetic functions, EEG time series, a Bayesian model comparison task, and tabular regression, our method closely matches the performance of full context re-encoding while delivering up to faster joint sampling and density evaluation, and up to lower memory usage.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- LoRA: Low-Rank Adaptation of Large Language Models cites Language Models are Few-Shot Learners
- Incremental Transformer Neural Processes cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
- Revisiting Neural Processes via Fourier Transform and Volterra Series cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
- TabICLv2: A Better, Faster, Scalable, and Open Tabular Foundation Model cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
Cited by top-tier papers5
- TabICLv2: A Better, Faster, Scalable, and Open Tabular Foundation ModelJingang QU, David Holzmüller, Gael Varoquaux, Marine Le MorvanICML 2026 · 85 citations
- ALINE: Joint Amortization for Bayesian Inference and Active Data AcquisitionDaolang Huang, Xinyi Wen, Ayush Bharti, Samuel Kaski et al.NeurIPS 2025 · 8 citations
- In-Context Multi-Objective OptimizationXinyu Zhang, Conor Hassan, Julien Martinelli, Daolang Huang et al.ICLR 2026 · 6 citations
- Incremental Transformer Neural ProcessesPhilip Mortimer, Cristiana Diaconu, Tommy Rochussen, Bruno Mlodozeniec et al.ICML 2026
- Revisiting Neural Processes via Fourier Transform and Volterra SeriesPeiman Mohseni, Nick Duffield, Raymond K WongICML 2026
Builds on33
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
- LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
- FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 citations
- Generative Pretraining From PixelsMark Chen, Alec Radford, Rewon Child, Jeffrey Wu et al.ICML 2020 · 1,773 citations
Related papers
- Autoregressive Conditional Neural ProcessesWessel P. Bruinsma, Stratis Markou, James Requeima, Andrew Y. K. Foong et al.ICLR 2023 · 3 citations
- Multi-Task Bayesian In-Context LearningQingyang Zhu, Eric Oermann, Kyunghyun ChoICML 2026
- PABBO: Preferential Amortized Black-Box OptimizationXinyu Zhang, Daolang Huang, Samuel Kaski, Julien MartinelliICLR 2025
- Global Perception Based Autoregressive Neural ProcessesJinyang TaiICCV 2023 · 1 citation
- Transformer Neural Processes: Uncertainty-Aware Meta Learning Via Sequence ModelingTung Nguyen, Aditya GroverICML 2022 · 148 citations
