🤖 AI Summary
This paper addresses the computational challenge of solving for equilibrium prices in mean-field games (MFGs). We propose an automatic differentiation–based optimization method grounded in a Lagrangian primal-dual framework, formulating price equilibrium as a constrained optimal control problem and solving it end-to-end via primal-dual gradient iterations. Crucially, we are the first to deeply integrate modern automatic differentiation libraries (e.g., PyTorch/TensorFlow) into MFG equilibrium computation—eliminating the need for manual derivation of adjoint equations. The algorithm is modular, scalable to high dimensions, and requires only the agent-level cost function as input to automatically compute full gradients. Experiments demonstrate robust convergence to theoretical equilibria across complex settings—including heterogeneous dynamics and nonlinear/nonconvex costs—while substantially lowering implementation barriers and computational complexity.
📝 Abstract
We develop a simple yet efficient Lagrangian method for computing equilibrium prices in a mean-field game price-formation model. We prove that equilibrium prices are optimal in terms of a suitable criterion and derive a primal-dual gradient-based algorithm for computing them. One of the highlights of our computational framework is the efficient, simple, and flexible implementation of the algorithm using modern automatic differentiation techniques. Our implementation is modular and admits a seamless extension to high-dimensional settings with more complex dynamics, costs, and equilibrium conditions. Additionally, automatic differentiation enables a versatile algorithm that requires only coding the cost functions of agents. It automatically handles the gradients of the costs, thereby eliminating the need to manually form the adjoint equations.