Self-playing Adversarial Language Game Enhances LLM Reasoning

Pengyu Cheng, Tianhao Hu, Han Xu, Zhisong Zhang, Zheng Yuan +4 more
4/16/2024
cs.CLcs.LG

Official code: Linear95/SPAG (144 stars, Apache-2.0, last commit 2025-02-24).

Abstract

We explore the potential of self-play training for large language models (LLMs) in a two-player adversarial language game called Adversarial Taboo. In this game, an attacker and a defender communicate around a target word only visible to the attacker. The attacker aims to induce the defender to speak the target word unconsciously, while the defender tries to infer the target word from the attacker's utterances. To win the game, both players must have sufficient knowledge about the target word and high-level reasoning ability to infer and express in this information-reserved conversation. Hence, we are curious about whether LLMs' reasoning ability can be further enhanced by Self-Playing this Adversarial language Game (SPAG). With this goal, we select several open-source LLMs and let each act as the attacker and play with a copy of itself as the defender on an extensive range of target words. Through reinforcement learning on the game outcomes, we observe that the LLMs' performances uniformly improve on a broad range of reasoning benchmarks. Furthermore, iteratively adopting this self-play process can continuously promote LLMs' reasoning abilities. The code is available at https://github.com/Linear95/SPAG.

View on arXivView PDF

Code Implementations(1)

Linear95/SPAGOfficial100%
Apache-2.0

Self-playing Adversarial Language Game Enhances LLM Reasoning, NeurIPS 2024

14422PythonApr 12, 20241 years agoApache-2.0

Cite this paper

@article{cheng2024selfplaying,
  title  = {Self-playing Adversarial Language Game Enhances LLM Reasoning},
  author = {Pengyu Cheng and Tianhao Hu and Han Xu and Zhisong Zhang and Zheng Yuan and Yong Dai and Lei Han and Nan Du and Xiaolong Li},
  year   = {2024},
  eprint = {2404.10642},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2404.10642},
  url    = {http://arxiv.org/abs/2404.10642v3},
  journal = {NEURIPS 2024 2024}
}

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/2404.10642.svg)](https://codeofpaper.com/paper/2404.10642)

Discussion