NeuroGame Transformer: Gibbs-Inspired Attention Driven by Game Theory and Statistical Physics

Djamel Bouchaffra, Fayçal Ykhlef, Hanene Azzag, Mustapha Lebbah, Bilal Faye
3/19/2026
cs.AI

Official code: dbouchaffra/NeuroGame-Transformer (1 star, last commit 2026-03-19).

Abstract

Standard attention mechanisms in transformers are limited by their pairwise formulation, which hinders the modeling of higher-order dependencies among tokens. We introduce the NeuroGame Transformer (NGT) to overcome this by reconceptualizing attention through a dual perspective: tokens are treated simultaneously as players in a cooperative game and as interacting spins in a statistical physics system. Token importance is quantified using two complementary game-theoretic concepts -- Shapley values for global, permutation-based attribution and Banzhaf indices for local, coalition-level influence. These are combined via a learnable gating parameter to form an external magnetic field, while pairwise interaction potentials capture synergistic relationships. The system's energy follows an Ising Hamiltonian, with attention weights emerging as marginal probabilities under the Gibbs distribution, efficiently computed via mean-field equations. To ensure scalability despite the exponential coalition space, we develop importance-weighted Monte Carlo estimators with Gibbs-distributed weights. This approach avoids explicit exponential factors, ensuring numerical stability for long sequences. We provide theoretical convergence guarantees and characterize the fairness-sensitivity trade-off governed by the interpolation parameter. Experimental results demonstrate that the NeuroGame Transformer achieves strong performance across SNLI, and MNLI-matched, outperforming some major efficient transformer baselines. On SNLI, it attains a test accuracy of 86.4\% (with a peak validation accuracy of 86.6\%), surpassing ALBERT-Base and remaining highly competitive with RoBERTa-Base. Code is available at https://github.com/dbouchaffra/NeuroGame-Transformer.

View on arXivView PDF

Code Implementations(1)

NeuroGame Transformer: Integrating Game Theory and Statistical Physics for Interpretable NLP

11PythonMar 13, 20267 months ago

Similar Papers

Cite this paper

@article{bouchaffra2026neurogame,
  title  = {NeuroGame Transformer: Gibbs-Inspired Attention Driven by Game Theory and Statistical Physics},
  author = {Djamel Bouchaffra and Fayçal Ykhlef and Hanene Azzag and Mustapha Lebbah and Bilal Faye},
  year   = {2026},
  eprint = {2603.18761},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.18761v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2603.18761.svg)](https://codeofpaper.com/paper/2603.18761)

Discussion