{"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/expected-flow-networks-in-stochastic","title":"Expected flow networks in stochastic environments and two-player zero-sum games","arxiv_id":"2310.02779","date":"2023-10-04","proceeding":null,"authors":["Marco Jiralerspong","Bilun Sun","Danilo Vucetic","Tianyu Zhang","Yoshua Bengio","Gauthier Gidel","Nikolay Malkin"],"abstract":"Generative flow networks (GFlowNets) are sequential sampling models trained to match a given distribution. GFlowNets have been successfully applied to various structured object generation tasks, sampling a diverse set of high-reward objects quickly. We propose expected flow networks (EFlowNets), which extend GFlowNets to stochastic environments. We show that EFlowNets outperform other GFlowNet formulations in stochastic tasks such as protein design. We then extend the concept of EFlowNets to adversarial environments, proposing adversarial flow networks (AFlowNets) for two-player zero-sum games. We show that AFlowNets learn to find above 80% of optimal moves in Connect-4 via self-play and outperform AlphaZero in tournaments.","url_abs":"https://arxiv.org/abs/2310.02779v2","url_pdf":"https://arxiv.org/pdf/2310.02779v2.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":"expected-flow-networks-in-stochastic","repo_url":"https://github.com/gfnorg/adversarialflownetworks","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"protein-design","task_name":"Protein Design"}],"methods":[{"method_slug":"alphazero","method_name":"AlphaZero"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.02779","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.02779"}},"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/GFNOrg/AdversarialFlowNetworks","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gfnorg/adversarialflownetworks","reach":{"status":"ok"}}],"summary":{"unverified":4},"by_repo_kind":{"official":{"samples":4,"ran":0,"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":4,"samples":[{"code_sha256_prefix":"9fc358145de34f48","entry":"compute_loss","repo":"gfnorg/adversarialflownetworks","repo_kind":"official","path":"src/tb.py","file_url":"https://github.com/gfnorg/adversarialflownetworks/blob/HEAD/src/tb.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9fc358145de34f48"}},{"code_sha256_prefix":"dfc511f892d91663","entry":"create_win_masks","repo":"GFNOrg/AdversarialFlowNetworks","repo_kind":"official","path":"src/envs/connect4_env.py","file_url":"https://github.com/GFNOrg/AdversarialFlowNetworks/blob/HEAD/src/envs/connect4_env.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"dfc511f892d91663"}},{"code_sha256_prefix":"eee8bef49408a2f4","entry":"instantiate","repo":"GFNOrg/AdversarialFlowNetworks","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/GFNOrg/AdversarialFlowNetworks/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"eee8bef49408a2f4"}},{"code_sha256_prefix":"b9d1ee6f8b8ceb4e","entry":"instantiate_optimizer","repo":"GFNOrg/AdversarialFlowNetworks","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/GFNOrg/AdversarialFlowNetworks/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b9d1ee6f8b8ceb4e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}