Abstract: Many economic games and machine learning approaches can be cast as competitive optimization problems where multiple agents are minimizing their respective objective function, which depends on all agents' actions. While gradient descent is a reliable basic workhorse for single-agent optimization, it often leads to oscillation in competitive optimization. In this work we propose polymatrix competitive gradient descent (PCGD) as a method for solving general sum competitive optimization involving arbitrary numbers of agents. The updates of our method are obtained as the Nash equilibria of a local polymatrix approximation with a quadratic regularization, and can be computed efficiently by solving a linear system of equations. We prove local convergence of PCGD to stable fixed points for $n$-player general-sum games, and show that it does not require adapting the step size to the strength of the player-interactions. We use PCGD to optimize policies in multi-agent reinforcement learning and demonstrate its advantages in Snake, Markov soccer and an electricity market game. Agents trained by PCGD outperform agents trained with simultaneous gradient descent, symplectic gradient adjustment, and extragradient in Snake and Markov soccer games and on the electricity market game, PCGD trains faster than both simultaneous gradient descent and the extragradient method.
Introduction
In single-agent machine learning, Simultaneous Gradient Descent (SimGD) is the standard optimization tool. However, as machine learning moves toward multi-agent systems—such as Generative Adversarial Networks (GANs) or multi-agent reinforcement learning (MARL)—SimGD often fails. In these competitive environments, agents have conflicting goals, and their objectives are interdependent. Because SimGD assumes agents ignore how their opponents might react to updates, the system frequently falls into endless oscillations or "cycles" rather than converging to a stable Nash equilibrium.
While Competitive Gradient Descent (CGD) was recently introduced to address these issues in two-player games, scaling it to $n$ players presents a significant computational challenge. A full mathematical model of $n$-player interactions requires solving multilinear systems of equations, a task that is NP-hard. This has historically left researchers choosing between SimGD (which is fast but unstable) and full multilinear CGD (which is stable but computationally intractable).
The PCGD Framework
Polymatrix Competitive Gradient Descent (PCGD) offers a solution by finding a "sweet spot" in computational complexity. Instead of attempting to model every high-order interaction (e.g., how Player A's move affects Player B's reaction to Player C), PCGD utilizes a polymatrix approximation.
Pairwise Interaction Focus
The core innovation of PCGD is its focus on pairwise relationships. The algorithm explicitly accounts for interactions between every pair of agents while ignoring higher-order group interactions. This simplification transforms the optimization problem into a linear system of equations, which can be solved efficiently.
The Update Rule and Computation
To ensure stability, PCGD incorporates quadratic regularization, preventing agents from making excessive updates based on local approximations. The update is calculated as:
$$\vec{ heta} = -\eta(I + \eta H_o)^{-1} \xi$$
where $H_o$ represents the off-block-diagonal part of the game Hessian. To manage the memory costs associated with calculating a full Hessian, PCGD employs "double backpropagation" to compute Hessian-vector products. The resulting linear system is then solved using the Conjugate Gradient method, ensuring the algorithm remains scalable for complex models.
Theoretical Contributions
A significant theoretical contribution of this work is the decoupling of step size from interaction strength. In standard SimGD, if the competition is "strong" (indicated by high interaction terms), the step size must be kept extremely small to avoid divergence. PCGD is robust to these interaction strengths, allowing for larger step sizes and faster convergence.
Furthermore, the authors provide a formal proof that PCGD converges at an exponential rate to stable local Nash equilibria in general-sum games. This generalizes previous stability results that were largely restricted to two-player zero-sum scenarios.
Experimental Evaluation
The researchers evaluated PCGD across three distinct multi-agent competitive environments to test its versatility and performance:
- Four-Player Snake: A competitive version of the classic game where four snakes compete for food while attempting to "box out" opponents.
- Four-Player Markov Soccer: A grid-world soccer environment requiring strategic movement and ball-stealing mechanics.
- Electricity Market Simulation: A socio-economic game based on a standard 6-bus power system where generators compete to maximize profit while meeting grid demands.
Key Results
- Superior Performance: In both Snake and Markov Soccer, PCGD-trained agents significantly outperformed those trained with SimGD, Symplectic Gradient Adjustment (SGA), and Extragradient. In many scenarios, PCGD agents achieved win rates more than double those of their competitors.
- Robustness to Distributional Shift: PCGD agents maintained their advantage even when placed in games against three opponents trained with different methods, demonstrating the robustness of the learned policies.
- Efficiency in Economic Modeling: In the electricity market simulation, PCGD reached comparable rewards significantly faster than both SimGD and Extragradient, showing improvements in both training iterations and total wall-clock time.
Conclusion and Future Work
PCGD demonstrates that modeling pairwise interactions is sufficient to capture the "essence" of competition and ensure convergence in $n$-player games. While the polymatrix approximation may be inadequate for games where 3-way or higher-order interactions are critical and non-decomposable, it provides a powerful and efficient framework for a wide range of competitive optimization problems.
Future research may explore the behavior of PCGD in purely collaborative settings—where the goal is to maximize social good rather than individual profit—and further investigate the landscape of attractors in non-convex environments to ensure the algorithm consistently finds the most desirable fixed points.
Summary updated