Table of Contents
Fetching ...

NfgTransformer: Equivariant Representation Learning for Normal-form Games

Siqi Liu, Luke Marris, Georgios Piliouras, Ian Gemp, Nicolas Heess

TL;DR

The paper addresses the challenge of learning compact, generalizable representations for normal-form games by leveraging permutation equivariance inherent to NFGs. It introduces NfgTransformer, an encoder that represents payoff tensors as action embeddings refined through permutation-equivariant attention blocks, enabling end-to-end solving of Nash equilibria, deviation gains, and payoff reconstruction, even for incomplete or varying-sized games. Across synthetic and empirical DISC games, the approach achieves state-of-the-art performance, demonstrates interpretability through attention patterns and embeddings, and remains parameter-efficient with a size-independent parameter budget. This work paves the way for integrating game-theoretic reasoning into deep learning systems used in competitive and cooperative human-AI settings.

Abstract

Normal-form games (NFGs) are the fundamental model of strategic interaction. We study their representation using neural networks. We describe the inherent equivariance of NFGs -- any permutation of strategies describes an equivalent game -- as well as the challenges this poses for representation learning. We then propose the NfgTransformer architecture that leverages this equivariance, leading to state-of-the-art performance in a range of game-theoretic tasks including equilibrium-solving, deviation gain estimation and ranking, with a common approach to NFG representation. We show that the resulting model is interpretable and versatile, paving the way towards deep learning systems capable of game-theoretic reasoning when interacting with humans and with each other.

NfgTransformer: Equivariant Representation Learning for Normal-form Games

TL;DR

The paper addresses the challenge of learning compact, generalizable representations for normal-form games by leveraging permutation equivariance inherent to NFGs. It introduces NfgTransformer, an encoder that represents payoff tensors as action embeddings refined through permutation-equivariant attention blocks, enabling end-to-end solving of Nash equilibria, deviation gains, and payoff reconstruction, even for incomplete or varying-sized games. Across synthetic and empirical DISC games, the approach achieves state-of-the-art performance, demonstrates interpretability through attention patterns and embeddings, and remains parameter-efficient with a size-independent parameter budget. This work paves the way for integrating game-theoretic reasoning into deep learning systems used in competitive and cooperative human-AI settings.

Abstract

Normal-form games (NFGs) are the fundamental model of strategic interaction. We study their representation using neural networks. We describe the inherent equivariance of NFGs -- any permutation of strategies describes an equivalent game -- as well as the challenges this poses for representation learning. We then propose the NfgTransformer architecture that leverages this equivariance, leading to state-of-the-art performance in a range of game-theoretic tasks including equilibrium-solving, deviation gain estimation and ranking, with a common approach to NFG representation. We show that the resulting model is interpretable and versatile, paving the way towards deep learning systems capable of game-theoretic reasoning when interacting with humans and with each other.
Paper Structure (38 sections, 5 theorems, 10 equations, 9 figures, 2 tables)

This paper contains 38 sections, 5 theorems, 10 equations, 9 figures, 2 tables.

Key Result

Proposition 3.1

If $G(a^i_p, a_{\neg p}) = G(a^j_p, a_{\neg p}), \forall a_{\neg p}$ and $f$ is deterministic and equivariant with $f(G) = (\dots, (\dots, {\bm{a}}^i_p, \dots, {\bm{a}}^j_p, \dots), \dots)$ then it follows that ${\bm{a}}^i_p = {\bm{a}}^j_p$.

Figures (9)

  • Figure 1: An overview of the NfgTransformer. The payoff tensor $G$ is encoded as action embeddings $\{{\bm{a}}^t_p \mid \forall t \in [T], \forall p \in [N]\}$ (Top). Action embeddings are zero-initialised and iteratively updated through a sequence of $K$ NfgTransformer blocks (Bottom). An arrow labeled with "(Q)KV" originates from a set of input (query-)key-values and terminates at a set of outputs. Each dashed box denotes an unordered set of elements of a specific type and cardinality.
  • Figure 2: Example task-specific decoders and losses from general-purpose action embeddings.
  • Figure 3: Payoff prediction error averaged over all players across unobserved joint-actions. Results are averaged over 32 randomly sampled empirical DISC games in each game configuration.
  • Figure 4: Visualisation of attention masks and action-embeddings at inference time on a held-out instance of Bertrand Oligopoly game whose payoff tensor is shown on the Left and the inferred NE strategy profile shown on the right (with NE Gap at near zero). The equilibrium pure-strategies for the two players are shown in red. The sequence of 8 action-to-play attention masks and the PCA-reduced action-embeddings at the end of each transformer block are shown in the middle.
  • Figure 5: Strongly isomorphic games.
  • ...and 4 more figures

Theorems & Definitions (12)

  • Proposition 3.1: Repeated Actions
  • Proposition 3.2: Player Symmetry
  • Definition 5.1: Disc Game
  • Definition A.1: Strongly Isomorphic Games
  • Definition A.2: Strongly Automorphic Game
  • Definition A.3: Strategically Equivalent Actions
  • Theorem A.4
  • proof
  • Proposition A.5: Repeated Actions
  • proof : Proof
  • ...and 2 more