{"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/nfgtransformer-equivariant-representation","title":"NfgTransformer: Equivariant Representation Learning for Normal-form Games","arxiv_id":"2402.08393","date":"2024-02-13","proceeding":null,"authors":["Siqi Liu","Luke Marris","Georgios Piliouras","Ian Gemp","Nicolas Heess"],"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.","url_abs":"https://arxiv.org/abs/2402.08393v1","url_pdf":"https://arxiv.org/pdf/2402.08393v1.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":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"nfgtransformer-equivariant-representation","repo_url":"https://github.com/google-deepmind/nfg_transformer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"jax","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.08393","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.08393"}},"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/QB3/discrating","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/google-deepmind/nfg_transformer","reach":null}],"summary":{"ran_honours":1,"ran_fixture":1,"ran":6,"unverified":11},"by_repo_kind":{"official":{"samples":13,"ran":2,"repositories":1},"found_in_text":{"samples":6,"ran":6,"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":"90eee19a6858abd2","entry":"_to_joint_actions","repo":"google-deepmind/nfg_transformer","repo_kind":"official","path":"nfg_transformer/network.py","file_url":"https://github.com/google-deepmind/nfg_transformer/blob/HEAD/nfg_transformer/network.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"90eee19a6858abd2"}},{"code_sha256_prefix":"fc685f4567c883f5","entry":"attend","repo":"google-deepmind/nfg_transformer","repo_kind":"official","path":"nfg_transformer/network.py","file_url":"https://github.com/google-deepmind/nfg_transformer/blob/HEAD/nfg_transformer/network.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fc685f4567c883f5"}},{"code_sha256_prefix":"af09e632468fd34f","entry":"get_energy","repo":"QB3/discrating","repo_kind":"found_in_text","path":"discrating/utils.py","file_url":"https://github.com/QB3/discrating/blob/HEAD/discrating/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"af09e632468fd34f"}},{"code_sha256_prefix":"f96895b69fb5eab8","entry":"get_main_component","repo":"QB3/discrating","repo_kind":"found_in_text","path":"discrating/utils_plot.py","file_url":"https://github.com/QB3/discrating/blob/HEAD/discrating/utils_plot.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"f96895b69fb5eab8"}},{"code_sha256_prefix":"5940a263a759090e","entry":"projection_plane","repo":"QB3/discrating","repo_kind":"found_in_text","path":"discrating/utils_plot.py","file_url":"https://github.com/QB3/discrating/blob/HEAD/discrating/utils_plot.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"5940a263a759090e"}},{"code_sha256_prefix":"60ca657d098223c8","entry":"rotate","repo":"QB3/discrating","repo_kind":"found_in_text","path":"discrating/utils_plot.py","file_url":"https://github.com/QB3/discrating/blob/HEAD/discrating/utils_plot.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"60ca657d098223c8"}},{"code_sha256_prefix":"deb49abf6e0d418f","entry":"squared_loss","repo":"QB3/discrating","repo_kind":"found_in_text","path":"discrating/utils.py","file_url":"https://github.com/QB3/discrating/blob/HEAD/discrating/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"deb49abf6e0d418f"}},{"code_sha256_prefix":"afe10bed08a1252d","entry":"squared_loss_sparse","repo":"QB3/discrating","repo_kind":"found_in_text","path":"discrating/utils.py","file_url":"https://github.com/QB3/discrating/blob/HEAD/discrating/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"afe10bed08a1252d"}},{"code_sha256_prefix":"98ce511a0e4fa8fa","entry":"Attention","repo":"google-deepmind/nfg_transformer","repo_kind":"official","path":"nfg_transformer/network.py","file_url":"https://github.com/google-deepmind/nfg_transformer/blob/HEAD/nfg_transformer/network.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":"98ce511a0e4fa8fa"}},{"code_sha256_prefix":"32711727edad3841","entry":"CrossAttention","repo":"google-deepmind/nfg_transformer","repo_kind":"official","path":"nfg_transformer/network.py","file_url":"https://github.com/google-deepmind/nfg_transformer/blob/HEAD/nfg_transformer/network.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":"32711727edad3841"}},{"code_sha256_prefix":"68b110bcde6505cc","entry":"Dense","repo":"google-deepmind/nfg_transformer","repo_kind":"official","path":"nfg_transformer/network.py","file_url":"https://github.com/google-deepmind/nfg_transformer/blob/HEAD/nfg_transformer/network.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":"68b110bcde6505cc"}},{"code_sha256_prefix":"804b2063b11271f3","entry":"NfgTransformer","repo":"google-deepmind/nfg_transformer","repo_kind":"official","path":"nfg_transformer/network.py","file_url":"https://github.com/google-deepmind/nfg_transformer/blob/HEAD/nfg_transformer/network.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":"804b2063b11271f3"}},{"code_sha256_prefix":"cb256f313e907f48","entry":"NfgTransformerBlock","repo":"google-deepmind/nfg_transformer","repo_kind":"official","path":"nfg_transformer/network.py","file_url":"https://github.com/google-deepmind/nfg_transformer/blob/HEAD/nfg_transformer/network.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":"cb256f313e907f48"}},{"code_sha256_prefix":"82aeead71a0a530e","entry":"SelfAttention","repo":"google-deepmind/nfg_transformer","repo_kind":"official","path":"nfg_transformer/network.py","file_url":"https://github.com/google-deepmind/nfg_transformer/blob/HEAD/nfg_transformer/network.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":"82aeead71a0a530e"}},{"code_sha256_prefix":"56c9eecffbda9cab","entry":"attend","repo":"google-deepmind/nfg_transformer","repo_kind":"official","path":"nfg_transformer/network.py","file_url":"https://github.com/google-deepmind/nfg_transformer/blob/HEAD/nfg_transformer/network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"56c9eecffbda9cab"}},{"code_sha256_prefix":"6c49dd5b70757c14","entry":"conv_1d","repo":"google-deepmind/nfg_transformer","repo_kind":"official","path":"nfg_transformer/network.py","file_url":"https://github.com/google-deepmind/nfg_transformer/blob/HEAD/nfg_transformer/network.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":"6c49dd5b70757c14"}},{"code_sha256_prefix":"58bb57a72c820895","entry":"conv_1d","repo":"google-deepmind/nfg_transformer","repo_kind":"official","path":"nfg_transformer/network.py","file_url":"https://github.com/google-deepmind/nfg_transformer/blob/HEAD/nfg_transformer/network.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":"58bb57a72c820895"}},{"code_sha256_prefix":"662a6c7691ca6ce4","entry":"layer_norm","repo":"google-deepmind/nfg_transformer","repo_kind":"official","path":"nfg_transformer/network.py","file_url":"https://github.com/google-deepmind/nfg_transformer/blob/HEAD/nfg_transformer/network.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":"662a6c7691ca6ce4"}},{"code_sha256_prefix":"8cb271e59820a9a9","entry":"layer_norm","repo":"google-deepmind/nfg_transformer","repo_kind":"official","path":"nfg_transformer/network.py","file_url":"https://github.com/google-deepmind/nfg_transformer/blob/HEAD/nfg_transformer/network.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":"8cb271e59820a9a9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}