TL;DR
When using deep generative models like VAEs, calculating distances between latent representations requires Riemannian geometry, but Euclidean latent spaces cannot naturally capture the complex, disconnected topology of real data. This paper proposes using an ensemble of decoders to quantify model uncertainty as a proxy for manifold topology, creating reliable "energy barriers" in low-data regions. By dropping spurious cross-covariance terms in the path energy calculation, the method yields geodesic interpolations that are dramatically more stable and reproducible than standard RBF-based heuristics.
What Problem Does This Paper Address?
In Variational Autoencoders (VAEs), Euclidean distances in the latent space $\mathcal{Z}$ are arbitrary: smooth transformations (diffeomorphisms) can warp the latent space without changing the underlying data density. Differential geometry solves this by viewing the latent space as a Riemannian manifold equipped with a pull-back metric $G_z = J_z^\top J_z$, where $J_z$ is the Jacobian of the decoder.
However, a fundamental mismatch remains: the latent space is continuous and Euclidean ($\mathbb{R}^d$), whereas real-world data manifolds are compact, often disconnected, and full of holes. Left unguided, shortest paths (geodesics) cut straight through empty regions of latent space where no real data exists.
Prior work established that model uncertainty can act as a topological barrier—making empty space "expensive" to traverse. But for neural network decoders, existing solutions rely on crude heuristics like Radial Basis Function (RBF) variance networks, which break down when the latent dimension exceeds a handful of variables.
Methods
The authors introduce a principled, scalable approach to geometric uncertainty using deep ensembles:
- Decoder Ensembling: Instead of a single decoder, the model trains an ensemble of $S$ decoders $\{f_{\theta_s}\}_{s=1}^S$ sharing a single encoder. At each mini-batch step, a decoder is randomly sampled to optimize the ELBO.
-
De-correlated Expected Energy: Minimizing curve length is equivalent to minimizing curve energy. In theory, the expected energy under the ensemble posterior involves differences $\Delta = f(z_2) - f(z_1)$. The authors show that the standard expected squared distance includes a cross-covariance term: $$\mathbb{E}[\|\Delta\|^2] = \|\mathbb{E}[\Delta]\|^2 + \text{tr}[\Sigma_{11} + \Sigma_{22}] - 2\,\text{tr}[\Sigma_{12}]$$ Because cross-covariance ($\Sigma_{12}$) inappropriately reduces energy when step sizes along the discretized curve are non-infinitesimal, the authors explicitly discard it.
-
Practical Implementation: Geodesics are parameterized as cubic splines. The curve energy without cross-covariance is evaluated by sampling two independent decoders per step: $$\mathcal{E}[\gamma] \approx \sum_{t=0}^{T-1} \mathbb{E}_{\theta, \theta' \sim q(\theta)} \left[ \| f_\theta(\gamma(t + 1/T)) - f_{\theta'}(\gamma(t/T)) \|^2 \right]$$ This is optimized using a single-sample Monte Carlo estimate.
Datasets
The authors evaluated their approach on standard generative modeling benchmarks:
- MNIST-3: A reduced subset containing 3 classes of MNIST digits.
- Full MNIST: 10 digit classes evaluated in both 2-dimensional ($d=2$) and 50-dimensional ($d=50$) latent spaces.
- Fashion-MNIST (FMNIST): 10 clothing classes evaluated in a 2D latent space.
No new datasets were introduced.
Key Insights and Ideas
- Uncertainty as Topology: Areas of the latent space that have little to no training data exhibit high variance across the decoder ensemble. Under the expected metric, this high variance acts as high curvature/distance, naturally repelling geodesics away from empty regions and keeping them on the data manifold.
- The "Spurious Cross-Covariance" Flaw: In theory, infinitesimally close points share correlated predictions. In practice, finite curve discretization causes neural network correlations to artificially lower the energy across data voids. Explicitly decoupling evaluations ($f_\theta$ vs. $f_{\theta'}$) restores the penalty for traversing uncertain territory.
Key Results
The stability of geodesics was assessed by retraining models over 30 distinct random seeds and computing the Coefficient of Variation ($CV = \sigma / \mu$) of geodesic distances across 100 fixed pairs of test points:
- High Stability: Geodesic distances computed via decoder ensembles exhibited significantly lower $CV$ compared to the RBF network baseline across all benchmarks.
- Statistical Significance: Paired one-sided Student's t-tests confirmed that ensemble geodesics are substantially more consistent across seeds:
- MNIST-3 ($d=2$): $t = -16.834, p \approx 1.0$ (lower variation)
- MNIST ($d=2$): $t = -16.290, p \approx 1.0$
- FMNIST ($d=2$): $t = -15.339, p \approx 1.0$
- MNIST ($d=50$): $t = -6.472, p \approx 0.999$
- Scalability: Unlike RBF networks—which degrade rapidly beyond low-dimensional spaces—the ensemble approach scaled seamlessly to a 50-dimensional latent space.
Limitations and Future Work
- Ensemble Variance Underestimation: Standard deep ensembles can still underestimate epistemic uncertainty because all ensemble members are trained on the exact same data points without explicit diversity enforcement.
- Computational Cost: Evaluating and optimizing paths across multiple neural network decoders adds compute overhead compared to evaluating a single point estimate.
- Future Work: Further exploring scalable Bayesian deep learning techniques to better approximate the weight posterior $p(\theta|\mathcal{D})$ without relying purely on basic ensembles.
Summary updated