{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/self-playing-adversarial-language-game","title":"Self-playing Adversarial Language Game Enhances LLM Reasoning","arxiv_id":"2404.10642","date":"2024-04-16","proceeding":null,"authors":["Pengyu Cheng","Tianhao Hu","Han Xu","Zhisong Zhang","Zheng Yuan","Yong Dai","Lei Han","Nan Du","Xiaolong Li"],"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.","url_abs":"https://arxiv.org/abs/2404.10642v3","url_pdf":"https://arxiv.org/pdf/2404.10642v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"self-playing-adversarial-language-game","repo_url":"https://github.com/linear95/spag","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2404.10642","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.10642"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/Linear95/SPAG","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/linear95/spag","reach":null}],"summary":{"ran_violates":1,"ran_draft_wrong":1,"unverified":1},"by_repo_kind":{"official":{"samples":3,"ran":2,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"3f80297da8f27692","entry":"is_prediction","repo":"Linear95/SPAG","repo_kind":"official","path":"tools/assign_rewards.py","file_url":"https://github.com/Linear95/SPAG/blob/HEAD/tools/assign_rewards.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3f80297da8f27692"}},{"code_sha256_prefix":"2dbc36d1deee2171","entry":"load_keyword_list","repo":"Linear95/SPAG","repo_kind":"official","path":"tools/play_llm_game.py","file_url":"https://github.com/Linear95/SPAG/blob/HEAD/tools/play_llm_game.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2dbc36d1deee2171"}},{"code_sha256_prefix":"5df43ca05397b237","entry":"convert_game_history_to_query","repo":"linear95/spag","repo_kind":"official","path":"utils.py","file_url":"https://github.com/linear95/spag/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5df43ca05397b237"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}