Discovering Learning Rules that Shape Others

Hong Jun Lee, Ziyan Wang, Jun Wang, Stefanos Leonardos, Yali Du

TL;DR

Researchers have developed DUOS (Discovered Update Rule for Opponent Shaping), the first method to meta-learn a learning algorithm specifically for general-sum games. Unlike previous methods that require "peeking" at an opponent's internal code or rewards, DUOS discovers a rule that works using only the agent's own experience, yet still manages to successfully shape opponent behavior to achieve superior long-term returns.

What Problem Does This Paper Address?

In general-sum games—scenarios where players' interests are neither perfectly aligned nor perfectly opposed—self-interested agents often fall into "traps." In the classic Iterated Prisoner’s Dilemma (IPD), for instance, two naive learners will often converge on mutual defection, even though mutual cooperation would be better for both.

To solve this, researchers developed Opponent Shaping. The idea is to influence how your opponent learns so that they eventually adopt a strategy that benefits you. However, existing state-of-the-art shapers (like LOLA or M-FOS) have a major drawback: they are "privileged." During deployment, they usually need access to the opponent’s internal parameters, exact policy, or reward functions. In the real world—think self-driving cars or high-frequency trading—you rarely get to see your opponent's "brain."

The authors of this paper asked: Can we discover a learning rule that shapes others using only our own experience?

Methods

The authors introduce DUOS, which uses a two-tier meta-learning architecture:

  1. The Meta-Network ($\eta$): This is the "discovered rule." It’s a recurrent neural network (GRU) that takes in the agent's own recent history (states, actions, and rewards) and outputs how the agent's policy should change.
  2. The Inner Network ($\theta$): This is the actual policy the agent uses to play the game. It is updated by the Meta-Network after every match.
Overview of DUOS architecture and training process

Key Technical Innovations: * Lifetime Maximization: Instead of just trying to win the current round, the meta-objective is to maximize the total reward over an agent's entire "lifetime" (e.g., 100 matches). * Likelihood-Ratio Meta-Gradients: Training update rules in multi-agent settings is notoriously unstable because gradients can explode. DUOS uses a likelihood-ratio gradient (similar to REINFORCE) to update the meta-network, avoiding the need to differentiate through the entire learning process. * Robustness via PSRO: To prevent the rule from being easily exploited, the authors used a technique inspired by Policy Space Response Oracles (PSRO). They iteratively trained "exploiters" against the current rule and then retrained the rule to handle those exploiters.

Datasets

The authors evaluated DUOS across five classic game theory benchmarks:

  • Iterated Prisoner’s Dilemma (IPD): The gold standard for social dilemmas.
  • Iterated Matching Pennies (IMP): A zero-sum game testing competitive adaptation.
  • Chicken & Stag Hunt: Games testing coordination and risk.
  • Coin Game: A more complex grid-world social dilemma involving spatial navigation.

Key Insights and Ideas

  • Shaping Emerges Naturally: Even though DUOS isn't explicitly told to "shape" the opponent, the behavior emerges because it's the best way to maximize lifetime rewards. In IPD, DUOS learns to "teach" naive learners to cooperate, then exploits that cooperation for higher gains.
  • Zero-Shot Generalization: A learning rule discovered in the Prisoner's Dilemma can be dropped into Chicken or Stag Hunt and still perform competitively without any retraining. This suggests the discovered rules capture fundamental principles of multi-agent interaction.
  • Self-Play Synergy: When two DUOS agents play each other, they don't just exploit; they reach near-perfect mutual cooperation much faster than traditional algorithms.
Figure 2: IPD learning trajectories over 50 matches. Left: rewards of DUOS against a naive learner (NL). Centre: joint-action frequencies against NL (DUOS’s action first, C: cooperation, D: defection). Right: mutual cooperation in self-play, within and across training seeds. Curves average five DUOS seeds. Shaded bands show 95% 𝑡-intervals.

Key Results

DUOS dominated the competition in a round-robin tournament against established baselines like M-FOS, SHAPER, and LOLA:

  • 1st Place Overall: DUOS ranked 1st in normalized mean score across all five games.
  • 1st Place in Self-Play: It outperformed all other entrants when playing against a copy of itself.
  • Superior Cooperation: In IPD self-play, DUOS reached 99.8% mutual cooperation by the final rounds.
  • Robustness: The PSRO training stage successfully halved the rule's exploitability in competitive games like Matching Pennies.
Tournament scores across different games

Limitations and Future Work

  • Rule Expressivity: In the complex Coin Game, the discovered rule simplified itself to a standard REINFORCE-like learner. The authors suggest that more complex "rule forms" (the mathematical structure of the update) might be needed for high-dimensional environments.
  • Per-Game Training: While the IPD rule generalized well, the best performance still came from rules trained on specific games. A future goal is to discover a single "universal" learning rule for all multi-agent social dilemmas.
  • Scaling to LLMs: As multi-agent systems involving Large Language Models become more common, discovering rules that allow these models to coordinate without sharing internal weights is a high-priority next step.

Summary updated

Abstract

In general-sum games, self-interested learners can reach outcomes that are poor for everyone, which has motivated methods that shape the opponent's learning. Methods like Learning with Opponent-Learning Awareness (LOLA), which differentiates through the opponent's learning process, and Model-Free Opponent Shaping (M-FOS), which uses model-free optimisation methods for long-horizon opponent shaping, have enabled mutual cooperation and exploitation of learners. However, these methods require access to the opponent's parameters, policy, rewards or learning rule during deployment. In single-agent reinforcement learning, update rules discovered by meta-learning have achieved state-of-the-art results (e.g. DiscoRL). These rules are separate from the policy they train and read only the agent's own experience. We hereby extend this framework to general-sum settings by introducing Discovered Update Rule for Opponent Shaping (DUOS). To the best of our knowledge, this is the first method to discover an update rule for an agent in general-sum games. DUOS meta-trains the rule to maximise the agent's expected return over its lifetime, and updates an inner network using the agent's own experience. We show that our discovered rule exhibits behaviour consistent with opponent shaping without reading opponent policies or parameters, and ranks 1st in normalised mean score and 1st in self-play among tournament entrants.
BibTeX
@misc{lee2026discovering,
  author = {Hong Jun Lee and Ziyan Wang and Jun Wang and Stefanos Leonardos and Yali Du},
  title = {{Discovering Learning Rules that Shape Others}},
  year = {2026},
  eprint = {2611.08335},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.08335},
}
Figure