NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

The Dynamics of Policy Gradient in Social Dilemmas with Partner Selection

Benedict Russell, Chin-wing Leung, Paolo Turrini

TL;DR

When AI agents learn in shared environments, pure self-interest usually drives them to betray one another—unless they are allowed to walk away from bad actors. While computer simulations have long hinted that "partner selection" fosters cooperation, this paper provides the first rigorous mathematical proof of why and how it works for reinforcement learning agents. By translating messy multi-agent interactions into clean differential equations, the authors reveal the hidden ingredients—like strategic diversity and noisy learning rates—required for a cooperative society to emerge.

What Problem Does This Paper Address?

Imagine playing the Prisoner’s Dilemma: mutual cooperation is best for society, but betraying (defecting against) your partner always yields a better immediate payoff for you.

Table 1: Prisoner’s Dilemma payoff matrix.

When independent Reinforcement Learning (RL) agents play this game, they face a shifting, non-stationary world because their opponents are also learning. Left to random pairings, self-interested agents inevitably learn to defect.

Researchers know from empirical simulations that partner selection—letting agents choose whom they interact with—breaks this curse, allowing cooperators to cluster together and ostracize defectors. However, our understanding has relied almost entirely on running simulations and watching what happens. Until now, we lacked a formal mathematical theory explaining how partner selection reshapes the underlying reward landscape for policy-gradient RL algorithms, or what exact population conditions are necessary for cooperation to take hold.

Methods

The authors trade pure trial-and-error simulation for analytical physics-style modeling, studying a population of memoryless agents updating their cooperation probabilities ($x \in [0,1]$) via the standard REINFORCE policy-gradient algorithm. Over episodes of $H$ rounds, agents interact under four predefined partner-switching rules:

  • Out-for-Tat (OFT): Stay together if and only if both cooperate; otherwise, draw a new random partner.
  • Reverse Out-for-Tat (ROFT): Stay together if and only if both defect (effectively trapping defectors together).
  • Always Stay / Always Switch: Baselines that ignore actions.

What is novel here is how the authors mathematically bridge individual RL updates with population-wide shifts:

  1. Mean-Field Dynamics: They derive the conditional opponent distribution—calculating the exact probability of facing a cooperator in round $h$ given your strategy and past actions—and embed this into a partial differential equation (continuity PDE) to track how the population's average strategies flow over time.
  2. Stochastic Diffusion (Fokker-Planck Equation): Real RL is noisy; agents explore actions randomly and draw random partners. Using a two-dimensional Wiener process (Brownian motion) and Itô calculus, the authors upgrade their deterministic equations into a Fokker-Planck PDE that captures both the expected drift and the random diffusion of strategies across the population.

Datasets

Not discussed in the paper. Because this is a game-theoretic and analytical study, no static external datasets are used. Instead, the authors validate their mathematical equations against ground-truth agent-based simulations (30 runs of $N = 1,000$ RL agents training over $5 \times 10^6$ episodes of the repeated Prisoner's Dilemma).

Key Insights and Ideas

  • Diversity is Mathematically Mandatory: Under average (mean) dynamics, cooperation cannot emerge in a uniform population. Cooperating always costs $-c$ right now, and only pays off later if switching rules help you find better-than-average partners. As shown below, the future reward advantage for OFT and ROFT scales directly with population variance ($\mu_2 - \mu_1^2$). If everyone has the exact same strategy, variance is zero, partner selection changes nothing, and defection wins.
Table 2: Conditional partner distribution update step and per round reward difference for episode length H = 2. In each case, the initial distribution is ρ(y).
  • Learning Rate as a Diversity Engine: If diversity is required, how do identically initialized agents ever learn to cooperate in practice? The stochastic model solves this mystery: a higher learning rate ($\alpha$) amplifies the random noise of early trajectories, artificially injecting variance into a uniform population. Once enough variance exists, partner selection latches onto it to build cooperative clusters.
  • Trapping Defectors vs. Rewarding Cooperators: For short 2-round episodes ($H=2$), OFT (keeping cooperators together) and ROFT (keeping defectors stuck together) are mathematically identical in how they promote cooperation. Only in longer episodes ($H > 2$) does pro-social loyalty (OFT) outperform anti-social punishment (ROFT).

Key Results

  • Exact Analytical Alignment: Numerical solutions to the authors' Fokker-Planck equation match the strategy histograms of 1,000-agent RL simulations almost indistinguishably across 5,000 time units for all four rules.
  • Bimodal Clustering: Under OFT and ROFT (with $b=3, c=0.1$), populations initialized with a $\text{Beta}(2,2)$ distribution split into distinct pure-cooperator and pure-defector clusters, whereas Always Stay and Always Switch collapse entirely into pure defection, confirming theoretical proofs.
  • The Learning Rate Switch: When all agents start at an identical 50% cooperation rate ($\delta_{0.5}$), a tiny learning rate ($\alpha = 0.001$) suppresses noise and causes cooperation to die out. Increasing $\alpha$ to $0.01$ generates enough stochastic variance to birth a thriving cooperative cluster.
  • Episode Length Payoffs: In simulations where initial variance is too low to guarantee cooperation at $H=2$ (yielding a low mean cooperation of $0.21$ for both OFT and ROFT), extending the episode length to $H=5$ boosts mean cooperation to $0.76$ under OFT and $0.67$ under ROFT, while Stay and Switch sink to $0.051$.

Limitations and Future Work

To isolate the pure mechanics of partner selection, the authors made two simplifying assumptions:

  1. Memoryless Policies: Agents play a fixed probability of cooperating regardless of past rounds, intentionally ruling out classic reciprocity strategies like Tit-for-Tat.
  2. Asynchronous Updates: Only one focal agent updates its policy per episode, ignoring the complex feedback loops that happen when frequently paired partners learn simultaneously.

Future work aims to relax both constraints—extending this mathematical framework to reactive, memory-equipped policies, synchronous multi-agent updates, and RL algorithms beyond vanilla policy gradients.

Summary updated

BibTeX
@inproceedings{russell2026dynamics,
  author = {Benedict Russell and Chin-wing Leung and Paolo Turrini},
  title = {{The Dynamics of Policy Gradient in Social Dilemmas with Partner Selection}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=WxOMxfirif},
}
Figure