Embedded-model flows: Combining the inductive biases of model-free deep learning and explicit probabilistic modeling

Gianluigi Silvestri, Emily Fertig, Dave Moore, Luca Ambrogioni

In the world of generative modeling, researchers often face a frustrating trade-off. On one hand, Normalizing Flows offer incredible flexibility and exact density estimation. However, they are "model-free"—treating data as a black box and struggling when data is scarce or highly structured. On the other hand, Probabilistic Programming allows us to write down explicit physical laws and structural assumptions, but these models are often too simple or misspecified to capture the messy reality of complex datasets.

A paper from ICLR 2022, Embedded-Model Flows: Combining the Inductive Biases of Model-Free Deep Learning and Explicit Probabilistic Modeling, proposes a novel architecture to bridge this gap, allowing models to leverage domain knowledge without sacrificing deep learning's flexibility.

The Challenge of "Blind" Deep Learning

Standard deep learning models are notoriously data-hungry. If you want a model to understand that a time series should be continuous, you usually have to provide massive amounts of data until it "learns" that property from scratch. However, in fields like astrophysics, epidemiology, or biology, we already know the underlying rules (e.g., gravity, infection rates, or chemical kinetics).

The challenge is that while we have these "structured" expert models, they are rarely perfect. As statistician George Box famously noted, "All models are wrong, but some are useful." The authors address the gap between rigid, potentially misspecified expert models and flexible, but "blind," deep learning models.

Introducing Embedded-Model Flows (EMF)

The core innovation of this paper is the Structured Layer. The authors demonstrate that any differentiable probabilistic program can be converted into a bijective (invertible) transformation using a generalized version of the Rosenblatt transform. This allows researchers to convert explicit probabilistic programs (like physical simulations or time-series models) directly into layers within a normalizing flow.

Diagram illustrating the Embedded-Model Flow architecture with gating mechanisms.

Key components of this architecture include:

  • Structured Layers: These turn a user-defined program (like a Markov chain or a mixture model) into a flow layer. If the input is Gaussian, the output follows the distribution defined by the program.
  • Gated Structured Layers (GEMF): This acts as a crucial "safety valve." Each structured layer includes a learnable gate ($\lambda$). If the expert model is a poor fit for the data, the gate allows the flow to bypass the model and act as a simple identity transformation, letting other standard flow layers handle the heavy lifting.
  • Prior-Embedding for Variational Inference (VI): In Bayesian inference, the authors embed the structure of the prior distribution directly into the variational architecture. This gives the model a massive head start in finding the complex posterior distribution.

Key Insights: Topology and Continuity

The authors evaluated EMF across a diverse range of challenges, including 2D toy problems (like "8 Gaussians"), image density estimation (MNIST), time-series data generated from Stochastic Differential Equations (SDEs), and hierarchical Bayesian models.

Several key insights emerged from these experiments:

  • Topology Matters: Standard flows struggle with multimodal data because they are continuous bijections—they find it hard to "break" a single blob of probability into multiple distant islands. By embedding a Mixture of Gaussians as a structured layer, the EMF starts with the correct multimodal topology from day one.
  • The Power of the Gate: The gating mechanism prevents the "wrong" parts of an expert model from ruining the overall density estimation. The model effectively learns which parts of the expert theory to keep and which to discard.
  • Smoothing and Continuity: For time-series data, simply adding a layer that enforces a "random walk" structure (Brownian motion) allows the flow to capture local correlations far more efficiently than a generic masked autoregressive flow (MAF).

Performance and Results

EMFs demonstrated superior performance across multiple domains, particularly in structured Variational Inference tasks and time-series modeling.

Table showing test log-likelihoods on time-series datasets, highlighting GEMF's superior performance.
  • Better Generalization: On time-series datasets, EMFs achieved much higher log-likelihoods than standard flows. For example, on the Lorenz system (LZ), the gated model (GEMF-T) achieved a negative log-probability of -221.3, compared to -194.2 for a standard MAF.
  • Superior Inference: In structured VI tasks, the gated EMF significantly outperformed standard baselines like Mean Field VI and generic Inverse Autoregressive Flows (IAF) in terms of the Evidence Lower Bound (ELBO).
  • Parameter Efficiency: Even though EMFs add structural complexity, they often require fewer parameters than "large" versions of standard flows to achieve better results, because the embedded structure does the work that raw parameters otherwise would.

Limitations and Future Work

Despite the promising results, the authors note several hurdles. Inverting some structured layers (like mixtures) requires numerical root-finding, which is computationally slower than the closed-form solutions used in standard flows. Furthermore, while mixture layers help, EMFs are still subject to the topological limits of bijections. Finally, the current framework is designed for continuous variables; extending this to discrete probabilistic programs remains an open challenge.

Looking forward, embedding even more complex structures—such as deep nets—within these structured layers could combine the best of both worlds for applications in reinforcement learning and robotics.

Summary updated

BibTeX
@inproceedings{silvestri2022embedded,
  author = {Gianluigi Silvestri and Emily Fertig and Dave Moore and Luca Ambrogioni},
  title = {{Embedded-model flows: Combining the inductive biases of model-free deep learning and explicit probabilistic modeling}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=HTxqYW9Hd5t},
}
Figure