Learning Gradients of Convex Functions with Monotone Gradient Networks

Shreyas Chaudhari, Srinivasa Pranav, José M. F. Moura

Abstract

In many machine learning and optimization tasks, the primary requirement is to learn a monotone mapping, which corresponds to the gradient of a convex function. Traditional approaches, such as Input Convex Neural Networks (ICNNs), attempt to learn the underlying convex function directly, but they suffer from training instabilities and limited expressivity due to non-negative weight constraints. This paper introduces Monotone Gradient Networks (MGNs), a novel class of architectures that directly parameterize the gradient of a convex function. By enforcing a Positive Semidefinite (PSD) Jacobian through architectural design—specifically weight-tying and modularity—MGNs achieve significantly higher accuracy and parameter efficiency than ICNNs across synthetic and real-world tasks.

Introduction

Convex functions are foundational to signal processing, optimal transport, and machine learning because of their predictable behavior and global optimality properties. However, in practical applications like gradient-based optimization or distribution mapping, the function itself is often a nuisance variable; the real object of interest is its gradient.

Mathematically, the gradient of a convex function is a monotone mapping. While neural networks are powerful function approximators, enforcing the monotonicity constraint is non-trivial. The standard solution, the Input Convex Neural Network (ICNN), enforces convexity by requiring most network weights to be non-negative. This constraint significantly hampers the optimization process and limits the functions the network can represent. This research explores a different path: skipping the scalar function entirely and learning the monotone gradient directly through specialized network architectures.

Monotone Gradient Networks (MGNs)

To ensure a mapping is the gradient of a convex function, its Jacobian matrix must be symmetric and Positive Semidefinite (PSD). The authors propose two architectural strategies to satisfy these conditions without resorting to restrictive weight clipping.

1. Cascaded MGN (C-MGN)

The C-MGN architecture utilizes a series of layers that share a common weight matrix $W$. By tying these weights across the network and employing monotonically increasing activation functions (such as tanh or softplus), the authors mathematically demonstrate that the resulting Jacobian is guaranteed to be PSD. This weight-tying acts as a powerful inductive bias, ensuring the network respects the geometric constraints of a convex gradient while remaining easy to optimize.

2. Modular MGN (M-MGN)

The M-MGN approach takes a modular perspective, constructing the final mapping as a sum of several parallel modules. Each module is designed such that its individual Jacobian is PSD by construction. Because the sum of PSD matrices is also PSD, the entire network maintains the required monotonicity. Unlike ICNNs, neither C-MGN nor M-MGN requires every weight to be positive, allowing the models to utilize a much broader range of the parameter space.

Experimental Evaluation

The researchers evaluated MGNs against traditional ICNNs and other baseline models across three distinct domains:

  • Synthetic Gradient Fields: The models were tasked with estimating the gradient of a complex 2D polynomial. This benchmark tested the basic ability of the architectures to capture non-linear monotone mappings.
  • Gaussian Optimal Coupling: This experiment involved learning the optimal transport mapping between two Gaussian distributions in both low-dimensional (2D) and higher-dimensional (16D) spaces. This is a classic problem where the optimal map is known to be the gradient of a convex function.
  • Color Domain Adaptation: Using the Dark Zurich dataset, the authors applied MGNs to map pixel colors from daytime road scenes to a sunset distribution. This tested the models' ability to handle real-world data distributions in a practical computer vision task.

Key Insights and Results

The experiments revealed that MGNs offer substantial advantages over existing methods in terms of both accuracy and efficiency.

Efficiency and Accuracy

On the synthetic gradient task, the C-MGN achieved a Mean Squared Error (MSE) that was 10 dB lower than the ICNN baseline. Remarkably, it achieved this superior performance using only 14 parameters, compared to the 163 parameters required by the ICNN. This represents a reduction in parameter count of over 90%, highlighting the effectiveness of the PSD inductive bias.

Optimal Transport and Adaptation

In Gaussian coupling experiments, MGNs consistently outperformed established methods like Convex Potential Flows and Inverse Autoregressive Flows, achieving lower Negative Log-Likelihood (NLL) and lower transport costs. In the color domain adaptation task, the models successfully transformed daytime images to match sunset profiles. The results were comparable to complex, specialized solvers but were achieved through a much simpler, direct learning approach.

Conclusion and Future Work

Monotone Gradient Networks provide a robust alternative to ICNNs for learning gradients of convex functions. By shifting the focus from weight constraints to architectural symmetry and weight-tying, MGNs overcome the training difficulties associated with non-negativity constraints.

While the current work demonstrates success in vector-based tasks and pixel-wise operations, future research could expand these architectures into high-dimensional latent spaces for generative modeling. Additionally, the authors suggest that MGNs could be extended to represent "strongly convex" functions by adding a scalar multiple of the input to the output, potentially opening new avenues for normalizing flows and deep generative models.

Summary updated

BibTeX
@inproceedings{chaudhari2023learning,
  author = {Shreyas Chaudhari and Srinivasa Pranav and José M. F. Moura},
  title = {{Learning Gradients of Convex Functions with Monotone Gradient Networks}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  doi = {10.1109/icassp49357.2023.10097266},
}
Figure