Optimizing Functionals on the Space of Probabilities with Input Convex Neural Networks

David Alvarez-Melis, Yair Schiff, Youssef Mroueh

Abstract

Gradient flows are a powerful tool for optimizing functionals in general metric spaces, including the space of probabilities endowed with the Wasserstein metric. A typical approach to solving this optimization problem relies on its connection to the dynamic formulation of optimal transport and the celebrated Jordan-Kinderlehrer-Otto (JKO) scheme. However, this formulation involves optimization over convex functions, which is challenging, especially in high dimensions. In this work, we propose an approach that relies on the recently introduced input-convex neural networks (ICNN) to parametrize the space of convex functions in order to approximate the JKO scheme, as well as in designing functionals over measures that enjoy convergence guarantees. We derive a computationally efficient implementation of this JKO-ICNN framework and experimentally demonstrate its feasibility and validity in approximating solutions of low-dimensional partial differential equations with known solutions. We also demonstrate its viability in high-dimensional applications through an experiment in controlled generation for molecular discovery.

Introduction

Many fundamental problems in machine learning and physics involve finding a probability distribution that minimizes a specific objective functional. Whether in generative modeling—where the goal is to align a model distribution with empirical data—or in physics—where one might track the diffusion of a gas over time—the Wasserstein gradient flow provides a principled mathematical description of these processes. The Jordan-Kinderlehrer-Otto (JKO) scheme is a well-known iterative method for solving these flows. However, its practical implementation has been hindered by the requirement to optimize over the space of all convex functions. Traditional grid-based discretization methods are effective in 2D or 3D but succumb to the "curse of dimensionality" in higher-dimensional latent spaces, such as those used for molecular modeling.

Methodology: The JKO-ICNN Framework

The authors introduce JKO-ICNN, a framework that replaces rigid spatial grids with flexible, deep Input Convex Neural Networks (ICNNs). ICNNs are a specialized architecture where the output is guaranteed to be a convex function of the input, making them ideal parametric proxies for the potentials that drive mass transport in the JKO scheme.

Exact density evolution for the Porous Medium Equation, providing a benchmark for the JKO-ICNN framework's accuracy.

The JKO-ICNN loop proceeds by solving an optimization problem at each time step to identify the ICNN that best moves the current distribution toward the functional's minimum while staying "close" in terms of Wasserstein distance. This "mesh-free" approach operates on particle samples, ensuring that computational complexity scales with the number of samples rather than the dimensionality of the space. To handle internal energy terms like entropy, which typically require expensive Hessian calculations, the authors utilize stochastic log-determinant estimators to maintain efficiency. Furthermore, the authors highlight a conceptual link between JKO iterations and the layers of a Normalizing Flow, though JKO-ICNN is specifically designed for the rigorous optimization of generic functionals.

A key advantage of this approach is amortization. Unlike particle-based methods that only update specific points, JKO-ICNN learns a continuous map. Once trained for a time step, this network can be applied to new, unseen samples, resulting in a reported 4.6x speedup compared to re-optimizing from scratch.

Experimental Results

The JKO-ICNN framework was evaluated across two distinct regimes: low-dimensional synthetic benchmarks and high-dimensional molecular discovery.

Synthetic PDE Benchmarks

The model was tested on 1D and 2D simulations of the Heat Equation, Fokker-Planck Equation, and Porous Medium Equation. These equations have known analytical solutions, allowing for precise validation. As shown in the results, the evolved distributions produced by JKO-ICNN almost perfectly match the exact mathematical solutions.

Comprehensive results for PDE benchmarks. (a) Porous Medium Equation with pure diffusion. (b) Fokker-Planck with nonlinear diffusion. (c) Aggregation equation. The plots demonstrate accurate density estimation and consistent convergence of the objective values.

Molecular Discovery

In high-dimensional experiments using the MOSES and QM9 datasets, JKO-ICNN was applied to 128-dimensional molecular embeddings. The goal was to shift the distribution toward higher "drug-likeness" (QED) scores. JKO-ICNN demonstrated superior stability over direct optimization methods like SGD or Adam, which often cause distribution collapse or produce invalid molecular structures. By strictly respecting the underlying geometry of the probability space, JKO-ICNN maintained high validity and uniqueness while successfully improving target properties.

Conclusion

JKO-ICNN provides a scalable and principled method for optimizing generic functionals over probability distributions. By leveraging ICNNs, the framework overcomes the dimensionality constraints of traditional JKO implementations while offering the benefits of amortized learning. While challenges remain—such as the computational cost of log-determinant estimation and the need for formal convergence proofs within the ICNN class—this work establishes a robust bridge between rigorous mathematical optimization and modern deep learning for high-dimensional applications.

Summary updated

BibTeX
@article{alvarezmelis2022optimizing,
  author = {David Alvarez-Melis and Yair Schiff and Youssef Mroueh},
  title = {{Optimizing Functionals on the Space of Probabilities with Input Convex Neural Networks}},
  journal = {Accepted by TMLR},
  year = {2022},
  url = {https://openreview.net/forum?id=dpOYN7o8Jm},
}
Figure