In-Context Parametric Inference: Point or Distribution Estimators?

Sarthak Mittal, Yoshua Bengio, Nikolay Malkin, Guillaume LajoiearXiv 2025

Abstract

Bayesian and frequentist inference are two fundamental paradigms in statistical estimation. Bayesian methods treat hypotheses as random variables, incorporating priors and updating beliefs via Bayes' theorem, whereas frequentist methods assume fixed but unknown hypotheses, relying on estimators like maximum likelihood. While extensive research has compared these approaches, the frequentist paradigm of obtaining point estimates has become predominant in deep learning, as Bayesian inference is challenging due to the computational complexity and the approximation gap of posterior estimation methods. However, a good understanding of trade-offs between the two approaches is lacking in the regime of amortized estimators, where in-context learners are trained to estimate either point values via maximum likelihood or maximum a posteriori estimation, or full posteriors using normalizing flows, score-based diffusion samplers, or diagonal Gaussian approximations, conditioned on observations. To help resolve this, we conduct a rigorous comparative analysis spanning diverse problem settings, from linear models to shallow neural networks, with a robust evaluation framework assessing both in-distribution and out-of-distribution generalization on tractable tasks. Our experiments indicate that amortized point estimators generally outperform posterior inference, though the latter remain competitive in some low-dimensional problems, and we further discuss why this might be the case.

Introduction

In statistical estimation, the frequentist and Bayesian paradigms offer distinct approaches to inference. Frequentist methods typically seek a single "best" point estimate (e.g., Maximum Likelihood), while Bayesian methods estimate a full probability distribution over parameters. In the era of deep learning, point estimation has become the standard due to the computational intractability of exact Bayesian inference. However, a new paradigm has emerged: amortized in-context inference. In this setup, a meta-model like a Transformer takes a dataset as input and directly outputs parameter estimates zero-shot. This paper provides a rigorous comparative analysis to determine whether training these meta-models to output point estimates or full Bayesian posteriors yields better predictive performance.

Methods

The study employs Transformer architectures—specifically designed without positional embeddings to ensure input data is treated as a permutation-invariant set—to perform parameter inference across various probabilistic models. The researchers categorize amortized estimators into two primary classes: point estimators and distribution estimators.

Taxonomy of amortized inference methods, distinguishing between frequentist point estimation and various Bayesian posterior approximation techniques.

Point estimators are trained using Maximum Likelihood Estimation (MLE) or Maximum A Posteriori (MAP) objectives. Distribution estimators, representing the Bayesian approach, utilize more complex parameterizations such as Diagonal Gaussians, Normalizing Flows, and Score-based Diffusion models. These are trained using diverse signals, including Forward KL (sample-based), Reverse KL (variational), and Denoising Energy Matching (DEM).

Overview of the experimental landscape, showing the distribution of estimators, parameterization types, and training signals evaluated.

The evaluation framework spans synthetic tasks (Gaussian mixtures, linear regression, shallow neural networks) and real-world out-of-distribution (OoD) tabular datasets from OpenML (CTR23 and CC18). Performance is measured by downstream predictive accuracy and $L_2$ loss rather than just parameter fit.

Key Insights and Results

The comparative analysis yields several critical findings:

  • Superiority of Point Estimators: Contrary to theoretical expectations that Bayesian methods should minimize empirical risk, amortized point estimators (MLE/MAP) consistently outperformed distribution estimators. For instance, on a 100-dimensional nonlinear classification task, MAP achieved ~93% accuracy, significantly higher than the ~79% reached by the best Normalizing Flow.
  • The Curse of Dimensionality: While Bayesian methods remained competitive in low-dimensional settings (1D-2D), their performance degraded sharply as parameter dimensionality increased (e.g., 100D+ neural network parameters).
  • The Mode Approximation Problem: The authors hypothesize that the multi-modality and symmetries inherent in complex models (like neural networks) make it extremely difficult for amortized models to capture the entire posterior. Point estimators avoid this "mode collapse" by successfully identifying and outputting a single high-quality mode.
  • Optimal Bayesian Training: Among distribution-based approaches, training with a Symmetric KL divergence—which combines sample-based and variational signals—generally yielded the best results.
  • Robustness to Misspecification: In zero-shot evaluations on real-world tabular data, point estimators demonstrated superior generalization compared to sample-based Bayesian counterparts, suggesting greater robustness to model misspecification in the amortized regime.

Conclusion

The study highlights a significant "approximation gap" in current amortized Bayesian inference. While Bayesian principles are sound, the practical challenges of capturing complex, high-dimensional posteriors with neural networks often make simple point estimation a more effective strategy for in-context learners. Future research should focus on hybrid approaches—such as applying Bayesian treatment to only a small subset of critical parameters (subnetwork inference)—or developing more efficient amortized variational families that can better navigate the multi-modal landscapes of neural network parameters.

Summary updated

BibTeX
@misc{mittal2025context,
  author = {Sarthak Mittal and Yoshua Bengio and Nikolay Malkin and Guillaume Lajoie},
  title = {{In-Context Parametric Inference: Point or Distribution Estimators?}},
  year = {2025},
  eprint = {2502.11617},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.11617},
}
Figure