Connecting GANs and MFGs

Haoyang Cao, Xin Guo, Mathieu Laurière

Abstract

Generative adversarial networks (GANs) have achieved significant success in image generation and financial modeling. This paper provides a rigorous analysis of GANs through the lenses of mean-field games (MFGs) and optimal transport (OT). We interpret GANs as MFGs under a Pareto Optimality criterion and demonstrate that GANs minimize the optimal transport cost between latent and data distributions. Building on these connections, we introduce MFGANs, a computational framework for solving MFGs using adversarial neural networks. Our results show that MFGANs outperform existing methods, particularly in high-dimensional settings.

Introduction

The empirical success of Generative Adversarial Networks (GANs) has outpaced their theoretical understanding. While typically viewed as a minimax game between a generator and a discriminator, this perspective often overlooks deeper connections to population dynamics and transport theory. Simultaneously, Mean-Field Games (MFGs)—which study the strategic interactions of large populations—face significant computational hurdles due to the "curse of dimensionality."

This paper bridges these gaps by establishing a three-way mapping between GANs, MFGs, and Optimal Transport (OT). By recasting the MFG problem into an adversarial framework, we develop a novel algorithm, MFGANs, capable of solving high-dimensional partial differential equations (PDEs) that are intractable for traditional grid-based methods.

Theoretical Framework

The core of this work lies in unifying three distinct mathematical pillars:

1. GANs as Mean-Field Games

The authors prove that GAN training can be viewed as a cooperative MFG. In this setting, the generator acts as a population of $N$ players attempting to match a target distribution (represented by the discriminator's data) under a Pareto Optimality criterion. This shifts the focus from a purely competitive Nash equilibrium to a collective optimization problem, simplifying the theoretical analysis of how generators learn complex distributions.

2. GANs and Optimal Transport

The paper establishes that Wasserstein GANs (WGANs) are analytically equivalent to minimizing the transport cost from a known latent distribution to an unknown data distribution. Specifically, Theorem 5 provides a formal proof that the WGAN loss function is a specific instance of an Optimal Transport problem, grounding the empirical success of WGANs in rigorous transport theory.

The MFGANs Algorithm

Solving MFGs requires finding the solution to two coupled PDEs: the forward-moving Fokker-Planck (FP) equation, which describes the population distribution, and the backward-moving Hamilton-Jacobi-Bellman (HJB) equation, which describes the value function.

The MFGANs framework addresses this coupling by utilizing the adversarial structure of GANs:

  • The Generator ($m$): A neural network approximating the mean-field distribution (solving the FP equation).
  • The Discriminator ($u$): A neural network approximating the value function (solving the HJB equation).

By training these networks adversarially, the generator mimics the equilibrium distribution while the discriminator penalizes deviations. This approach leverages the Deep Galerkin Method (DGM) architecture, allowing the model to operate without spatial grids and thus bypass the curse of dimensionality.

Experimental Evaluation

The authors evaluated MFGANs on synthetic benchmarks of varying complexity to verify accuracy and scalability:

  • 4D Ergodic MFG: In this high-dimensional test, MFGANs demonstrated superior convergence. The algorithm achieved high precision in approximately $8 \times 10^4$ iterations, whereas previous state-of-the-art solvers (like standard DGM) required over $10^6$ iterations to reach comparable accuracy.
  • 8D Ergodic MFG: To test the limits of the framework, the authors applied it to an 8D problem with no known analytical solution. MFGANs successfully captured the periodic structure of the mean-field and value functions, demonstrating stability in dimensions where classical numerical methods fail.

Conclusion and Future Work

The unification of GANs, MFGs, and OT provides a powerful toolkit for both generative modeling and game theory. The MFGANs algorithm effectively mirrors the natural coupling of forward-backward equations through adversarial training.

However, the current approach relies on the MFG possessing a specific "variational structure." Future research will focus on adapting the framework for more general MFGs and exploring "unbalanced" optimal transport, where the total mass of distributions is not conserved. Additionally, applying this framework to complex dynamic systems governed by physical laws remains a promising avenue for high-dimensional modeling.

Summary updated

Abstract

Generative adversarial networks (GANs) have enjoyed tremendous success in image generation and processing, and have recently attracted growing interests in financial modelings. This paper analyzes GANs from the perspectives of mean-field games (MFGs) and optimal transport. More specifically, from the game theoretical perspective, GANs are interpreted as MFGs under Pareto Optimality criterion or mean-field controls; from the optimal transport perspective, GANs are to minimize the optimal transport cost indexed by the generator from the known latent distribution to the unknown true distribution of data. The MFGs perspective of GANs leads to a GAN-based computational method (MFGANs) to solve MFGs: one neural network for the backward Hamilton-Jacobi-Bellman equation and one neural network for the forward Fokker-Planck equation, with the two neural networks trained in an adversarial way. Numerical experiments demonstrate superior performance of this proposed algorithm, especially in the higher dimensional case, when compared with existing neural network approaches.
BibTeX
@article{cao2024connecting,
  author = {Haoyang Cao and Xin Guo and Mathieu Laurière},
  title = {{Connecting GANs and MFGs}},
  journal = {SIAM J. Appl. Math.},
  year = {2024},
  doi = {10.1137/22m1499534},
}
Figure