NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Improving Autoencoder Image Interpolation via Dynamic Optimal Transport

Feng Xue, Thomas StrohmerarXiv 2024 · DOI

TL;DR

This paper introduces a physics-driven approach to image interpolation by integrating Dynamic Optimal Transport (OT) into autoencoder training. By treating images as fluid mass and penalizing the "kinetic energy" of the transformation path, the authors enable autoencoders to generate smooth, realistic morphing sequences—even when training data is extremely scarce.

What Problem Does This Paper Address?

Autoencoders are excellent at compressing data into a low-dimensional "latent space." A common trick to generate new content is interpolation: take the latent codes of two images, find the midpoint, and decode it.

However, standard autoencoders usually fail here. Instead of a smooth motion (like a circle sliding across the screen), they produce a "ghosting" or "cross-dissolve" effect where the first object fades out while the second fades in. While researchers have tried using Generative Adversarial Networks (GANs) to fix this, those methods require massive datasets to learn what "realistic" looks like. This paper tackles the challenge of creating semantically meaningful interpolations without needing mountains of data, by using the laws of physics as a guide.

Methods

The authors propose a novel Path Energy regularization term based on the fluid mechanics formulation of Optimal Transport (the Benamou-Brenier framework).

  1. Images as Mass: They treat grayscale pixel intensities as "mass." Moving from one image to another is viewed as a mass transfer problem.
  2. The Continuity Equation: To ensure the transformation is physical, they enforce a constraint where mass is conserved—it can't just disappear and reappear elsewhere.
  3. Kinetic Energy Minimization: They define a "path energy" function that calculates the kinetic energy required to move mass along a trajectory. The autoencoder is penalized if it chooses a high-energy (unrealistic) path.
  4. Differentiable Solver: To make this work during neural network training, the authors derived a closed-form gradient for the path energy. This allows the model to backpropagate through the physics engine.
  5. Extensions: The model is flexible enough to handle obstacles (where mass cannot pass through certain pixels) and unbalanced OT (where the total brightness/mass of the source and target images differ).

Datasets

The researchers evaluated their method across several scenarios:

  • Toy Datasets: Simple binary and grayscale shapes (circles moving or splitting) and RGB cartoon faces.
  • Labyrinth Maps: A custom environment used to test interpolation around pink "walls" or obstacles.
  • Shape Benchmarks: Sets of teeth, hearts, and ducks used for "Barycenter" (averaging) problems.
  • MNIST: The classic dataset of 70,000 handwritten digits, used to benchmark against state-of-the-art generative models.

Key Insights and Ideas

  • Physics as a Prior: Instead of a "critic" network (as in GANs) guessing if an image looks real, the continuity equation provides a mathematical guarantee of smoothness. This acts as a powerful "inductive bias" that compensates for missing data.
  • Data Efficiency: Perhaps the most striking insight is that this method works with as few as two training samples. Because the physics are built-in, the model doesn't need to see thousands of examples to understand that objects should move continuously.
  • Pixel-Space Regularization: Unlike methods that only shape the latent space, this path energy works directly on the decoded pixels. This ensures that even if the latent space is messy, the visual output remains physically plausible.

Key Results

  • Visual Quality: On MNIST, the proposed method achieved a Structural Similarity Index (SSIM) of 0.96, significantly higher than the popular ACAI (0.87) and VAE (0.90) models.
  • Smoothness: In the "Labyrinth" test, the model successfully "squeezed" a circle through narrow corridors to reach its destination, whereas traditional optimization methods produced messy, fragmented results.
  • Barycenters: The model produced sharp, fluid-like "average" shapes (e.g., a shape halfway between a tooth and a heart) that maintained clear boundaries rather than becoming a blurry blob.

Limitations and Future Work

The primary bottleneck is computational cost. Calculating the path energy requires solving large linear systems (sparse Poisson-like equations) for every training step. While the authors used efficient solvers, this is still more taxing than standard autoencoder training.

For future work, the authors suggest exploring Normalizing Flows or more advanced numerical solvers to speed up the process. They also note that while the method ensures smooth motion, it doesn't necessarily help the autoencoder "disentangle" features like class identity (e.g., knowing a '7' is different from an '8') as effectively as adversarial methods do.

Summary updated

BibTeX
@misc{xue2024improving,
  author = {Feng Xue and Thomas Strohmer},
  title = {{Improving Autoencoder Image Interpolation via Dynamic Optimal Transport}},
  year = {2024},
  eprint = {2404.08900},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.08900},
}
Figure