- Published on
From Spread MLE to Implicit MLE
- Authors
- Mingtian Zhang
1. Implicit Generative Models and IMLE
Implicit generative models are easy to sample from but often do not have a tractable likelihood. Let
and let denote the resulting distribution of . We can generate samples from , but evaluating may be impossible. The problem is even more severe when is supported on a low-dimensional manifold, because an ordinary density may not exist at all.
Implicit Maximum Likelihood Estimation (IMLE) trains such a generator without ever requiring access to its density. Given a data distribution , the population IMLE objective can be written as
For an empirical dataset , this becomes
In practice, IMLE repeatedly performs three steps:
- Sample a pool of latent codes .
- Generate candidates .
- For each data point, find its nearest generated candidate and update the generator to reduce the matched distance.
The matching direction is important: every data point selects a generated sample. This encourages the generator to cover all observed modes rather than only improving samples in regions it already generates well.
The expectation over averages over the random candidate pools produced by the model. The empirical average over the data can equivalently be viewed as an expectation under the empirical data distribution.
This objective does not immediately resemble a likelihood-based objective. The following sections show how it can be derived from a finite-sample approximation to spread maximum likelihood.
2. From an Ill-Defined KL to the Spread KL Divergence
Consider a data distribution and an implicit model distribution . A natural objective is the forward KL divergence, which, whenever both distributions admit densities with respect to the same base measure, can be written as
Since the first term does not depend on , minimizing the forward KL is equivalent to maximum likelihood:
That premise fails for the implicit generator above. Mapping a low-dimensional latent into a higher-dimensional observation space leaves supported on a lower-dimensional manifold, with no ordinary density with respect to the ambient Lebesgue measure. Worse, even when and both concentrate on low-dimensional manifolds, their supports may fail to overlap exactly, in which case is infinite or not meaningfully defined through ordinary density ratios.
Spreading the Distributions
Spread divergence addresses this by applying the same smoothing kernel to both distributions. Using Gaussian spreading,
the corresponding spread distributions are the convolutions
Gaussian convolution turns the original, possibly singular distributions into smooth distributions with densities over the full observation space. The spread KL divergence
is therefore well defined, whatever the supports of and happen to be.
Why Spreading Loses Nothing
Well-definedness alone would not be enough. Smoothing could in principle blur away exactly the differences we are trying to detect, leaving an objective that is finite but no longer informative about the original distributions. This does not happen for Gaussian spreading: the spread KL is a genuine divergence on the original distributions,
This holds for every fixed , and follows from the fact that Gaussian convolution is injective, so that already forces . See the spread divergence paper for the proof and for the general conditions a noise distribution must satisfy for its spread divergence to be a valid divergence.
So nothing is lost by spreading: driving the spread KL to zero matches the two distributions we actually care about, even though may itself be ill-defined. What remains is to turn this divergence into something we can optimize.
3. Spread Maximum Likelihood
Expanding the spread KL exactly as before,
the first term again does not depend on . Minimizing the spread KL is therefore maximum likelihood under the spread model, which gives the Spread Maximum Likelihood objective
Because the two objectives differ only by a -independent constant, the identifiability of the spread KL carries over directly. Assuming the data distribution is realizable,
Spread MLE is thus not a compromise objective that merely happens to be computable. Its optimum recovers the unspread data distribution, so it estimates the same thing ordinary MLE would have estimated had the latter been well defined.
For an implicit model, the spread density is a Gaussian mixture over model samples,
which is a smooth density even when the original model is implicit or singular. Substituting it in,
This is a valid likelihood objective, but the inner expectation is generally intractable.
4. A Finite-Sample Approximation
Draw samples from the implicit model:
The spread density can be approximated by a finite Gaussian mixture:
This gives the multi-sample objective
Because the finite mixture is an unbiased estimator of the spread density, Jensen's inequality gives
This is the same general construction used in multi-sample likelihood bounds such as the importance weighted autoencoder: a finite Monte Carlo average is placed inside the logarithm, and the expectation of the resulting log gives a lower bound on the exact log marginal likelihood.
As , the finite mixture approaches the exact spread density under suitable conditions.
5. The Small-Noise Limit
Consider the core log-sum-exp term:
Fix , and for a moment. As , the largest exponential term dominates, so that pointwise
The same limit performs two operations at once:
- The data noise disappears because
- The soft Gaussian responsibilities become a hard nearest-neighbour assignment.
Both the inside the logarithm and the additive constant are killed by the factor, so rescaling by yields
which is exactly the population IMLE objective of Section 1. This last step exchanges the limit with the expectation, which is not automatic: assuming and have finite second moments, and under suitable uniform-integrability conditions, the limit may be passed through the expectation. Bounded , or a compact parameter set with uniformly bounded second moments, is enough in practice.
Replacing by the empirical distribution of gives ,
Note that the rescaling factor is negative, which is what reconciles the two directions of optimisation. Therefore, at the objective-function level, IMLE is the small-noise limit of the rescaled finite-sample spread likelihood. Each training example is matched to its nearest generated sample, and the generator is trained to reduce those distances.
6. The Connection
The relationship can be summarized as
More explicitly, working throughout with the rescaling of the previous section,
The first step is a finite Monte Carlo approximation. The second is an exact pointwise limit; passing the limit through the expectation requires standard integrability conditions. The inside the logarithm contributes , which vanishes as and so leaves no trace in the limit.
7. What Is Lost Along the Way?
The connection is useful, but it is not an exact equivalence.
First, the finite-sample objective is a lower bound on spread likelihood, rather than the exact likelihood itself. For fixed , it generally has a Jensen gap:
Second, the small-noise limit replaces the full Gaussian mixture with only its nearest component. All soft responsibilities are discarded.
Spread MLE therefore remains a probabilistically well-defined likelihood method, while IMLE is its finite-sample, hard-assignment limit.
This perspective explains several otherwise surprising features of IMLE:
- Generated samples act as mixture centers.
- Squared Euclidean distance appears naturally under Gaussian spreading.
- Each data point selects its nearest generated sample.
- An expectation over random generated sample sets is required.
- The resulting objective encourages mode coverage.
The cleanest interpretation is:
IMLE can be viewed as the zero-noise hard-assignment limit of a finite-sample approximation to spread maximum likelihood.
References
- Spread Divergence — Mingtian Zhang, Peter Hayes, Thomas Bird, Raza Habib, David Barber. ICML 2020.
- Implicit Maximum Likelihood Estimation — Ke Li, Jitendra Malik. arXiv preprint, 2018.
- Importance Weighted Autoencoders — Yuri Burda, Roger Grosse, Ruslan Salakhutdinov. ICLR 2016.