Introduction
In many scientific domains, from climate forecasting to cosmology, researchers rely on sophisticated numerical simulators to model complex phenomena. While these simulators can generate realistic data, they often lack an analytical "likelihood"—the mathematical function describing the probability of observing specific data given a set of parameters. Simulation-Based Inference (SBI) addresses this by using the simulator to generate synthetic datasets, which are then used to train machine learning models to map observations back to their underlying parameters.
However, SBI faces two significant challenges: the "curse of dimensionality" and parameter non-identifiability. Modern simulators produce high-dimensional outputs (e.g., weather maps) that are computationally expensive to process directly. Furthermore, different parameter sets can often produce identical outputs, leading to complex, multimodal posteriors that standard SBI methods struggle to resolve. This paper introduces Embed and Emulate (E&E), a framework that reframes SBI as a representation learning problem to overcome these hurdles.
The Embed and Emulate Framework
E&E circumvents the need to emulate full, high-dimensional data by learning a low-dimensional "shortcut" through a latent space. Instead of mapping parameters directly to the raw data space, the model learns to map both parameters and data into a shared unit hypersphere.
Key Components
- Joint Training: The framework simultaneously trains an encoder ($\hat{f}_\theta$), which compresses high-dimensional data into a latent summary statistic, and a latent emulator ($\hat{g}_\theta$), which maps parameters directly into the same latent space.
- Symmetric InfoNCE Loss: Inspired by contrastive learning techniques like CLIP, E&E uses a symmetric InfoNCE loss. This objective "pulls" matching parameter-data pairs together in the latent space while "pushing" mismatched pairs apart. This symmetry ensures that the posterior's normalization constant is independent of the data, leading to more stable inference.
- Likelihood-to-Evidence Ratio: The model parameterizes the ratio between the joint and marginal distributions using a simple similarity measure (cosine similarity) in the latent space. This allows the model to converge toward a sufficient statistic, retaining only the information necessary for inference.
- Intra-domain Regularization: To handle chaotic systems, an optional loss helps the model recognize that different initial conditions for the same parameters should result in the same latent representation.
Experimental Evaluation
The researchers evaluated E&E against popular baselines like NPE-C and NRE-C on two primary benchmarks:
- Synthetic Tasks: Controlled experiments designed to test the model's ability to reconstruct underlying latent generative processes and ignore redundant parameters in both unimodal and multimodal settings.
- Lorenz 96 System: A classic, high-dimensional (nearly 100,000 dimensions) chaotic model used in atmospheric dynamics. This served as a stress test for handling non-identifiable parameters and extreme dimensionality.
Results and Discussion
E&E demonstrated significant improvements in both accuracy and computational efficiency:
- Superior Posterior Capture: On the chaotic Lorenz 96 task, E&E successfully captured the full "circular" posterior of non-identifiable parameters. In contrast, existing methods like NPE-C or NRE-C often produced skewed or overly concentrated estimates that failed to represent the true uncertainty.
- Massive Speedup: The framework offers a "once-and-done" advantage. While standard methods require running a heavy neural network for every sample drawn during inference, E&E runs the heavy encoder only once on the observation. Subsequent sampling relies on the lightweight latent emulator. For 10,000 samples, E&E took just 0.10 seconds, compared to 3.51 seconds for NRE-C and 4.20 seconds for NPE-C—a 35x to 42x improvement.
- Robustness: The inclusion of intra-domain loss significantly reduced error variance, ensuring consistent performance across different test observations.
Conclusion
Embed and Emulate (E&E) provides a powerful new tool for simulation-based inference, particularly for high-dimensional and chaotic systems. By combining contrastive representation learning with latent-space emulation, it achieves state-of-the-art accuracy while dramatically reducing the computational cost of posterior sampling. Future work may explore different latent geometries to handle heavy-tailed distributions and leverage the learned summary statistics to gain deeper scientific insights into the underlying generative processes.
Summary updated