Abstract
Amortized meta-learning methods based on pre-training have propelled fields like natural language processing and vision. Transformer-based neural processes and their variants are leading models for probabilistic meta-learning with a tractable objective. Often trained on synthetic data, these models implicitly capture essential latent information in the data-generation process. However, existing methods do not allow users to flexibly inject (condition on) and extract (predict) this probabilistic latent information at runtime, which is key to many tasks. We introduce the Amortized Conditioning Engine (ACE), a new transformer-based meta-learning model that explicitly represents latent variables of interest. ACE affords conditioning on both observed data and interpretable latent variables, the inclusion of priors at runtime, and outputs predictive distributions for discrete and continuous data and latents. We show ACE's practical utility across diverse tasks such as image completion and classification, Bayesian optimization, and simulation-based inference, demonstrating how a general conditioning framework can replace task-specific solutions.
Introduction
In modern machine learning, a fundamental distinction is often made between observed data (e.g., pixels) and latent variables (e.g., class labels, function optima, or physical parameters). While amortized meta-learning methods like Neural Processes excel at data prediction, they typically treat latent information as an implicit, "black box" representation. This lack of transparency prevents users from performing critical operations at runtime, such as injecting informative priors or directly inferring interpretable parameters without resorting to expensive, task-specific iterative algorithms.
The Amortized Conditioning Engine (ACE)
ACE addresses these limitations by treating data and interpretable latents symmetrically within a unified transformer-based framework. By explicitly modeling latents as first-class citizens, ACE allows for flexible "injection" and "extraction" of information in a single forward pass.
The architecture extends the Transformer Prediction Map (TPM) with several key innovations:
- Explicit Latent Representation: Task-relevant latents (e.g., $\theta$ in a simulator) are embedded into the same space as observed data.
- Prior Encoding: Users can provide beliefs at runtime by converting 1D probability density functions into binned histograms, which are then mapped into the transformer's context set.
- Flexible Conditioning: Using a transformer with cross-attention, ACE can take any subset of data and latents as context and predict any other subset as targets.
- Heterogeneous Outputs: The model utilizes a Gaussian Mixture Model (GMM) head for continuous variables and a Categorical head for discrete variables, enabling the modeling of complex, multi-modal distributions.
Applications and Key Results
The versatility of ACE was evaluated across three distinct domains: Bayesian Optimization (BO), Simulation-Based Inference (SBI), and Image Processing.
Bayesian Optimization and SBI
In BO tasks, ACE-based acquisition functions matched or outperformed traditional Gaussian Processes. Notably, when strong priors were injected (ACEP), the model converged to global optima significantly faster. In SBI, ACE demonstrated a massive efficiency gain, generating 1,000 posterior samples in just 0.05 seconds—a speedup of several orders of magnitude compared to diffusion-based alternatives like Simformer (130 minutes), while maintaining comparable accuracy.
Image Versatility and Performance
ACE excels at conditional generation. For instance, it can complete masked faces while specifically conditioning on latent attributes like "smiling" or "bald."
Quantitative results on the CelebA dataset show that ACE and its variants consistently outperform baselines like TNP-D in terms of predictive log-likelihood, especially as the percentage of context pixels increases. This demonstrates the model's ability to effectively leverage available context to reduce uncertainty.
Discussion and Limitations
While ACE provides a powerful, general-purpose engine for probabilistic conditioning, it faces challenges common to amortized models. Its performance is tied to the quality of training simulations, making it sensitive to out-of-distribution data. Additionally, the quadratic complexity of standard attention limits the context size, suggesting a need for sub-quadratic attention mechanisms in future work. Despite these hurdles, ACE represents a significant step toward unified, fast, and interpretable meta-learning.
Summary updated