It Just Takes Two: Scaling Amortized Inference to Large Sets

Antoine Wehenkel, Michael Kagan, Lukas Heinrich, Chris Pollard
5/8/2026
cs.LGcs.AIstat.ML

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Neural posterior estimation has emerged as a powerful tool for amortized inference, with growing adoption across scientific and applied domains. In many of these applications, the conditioning variable is a set of observations whose elements depend not only on the target but also on unknown factors shared across the set. Optimal inference therefore requires treating the set jointly, which in turn requires training the estimator at the deployment set size -- a regime where memory and compute quickly become prohibitive. We introduce a simple, theoretically grounded strategy that decouples representation learning from posterior modeling. Our method trains a mean-pool Deep Set on sets of size at most two, producing an encoder that generalizes to arbitrary set sizes. The inference head is then finetuned on pre-aggregated embeddings, making training cost essentially independent of the deployment set size N. Across scalar, image, multi-view 3D, molecular, and high-dimensional conditional generation benchmarks with N in the thousands, our approach matches or outperforms standard baselines at a fraction of the compute.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wehenkel2026just,
  title  = {It Just Takes Two: Scaling Amortized Inference to Large Sets},
  author = {Antoine Wehenkel and Michael Kagan and Lukas Heinrich and Chris Pollard},
  year   = {2026},
  eprint = {2605.07972},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.07972v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.07972.svg)](https://codeofpaper.com/paper/2605.07972)

Discussion