{"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/order-preserving-gflownets","title":"Order-Preserving GFlowNets","arxiv_id":"2310.00386","date":"2023-09-30","proceeding":null,"authors":["Yihang Chen","Lukas Mauch"],"abstract":"Generative Flow Networks (GFlowNets) have been introduced as a method to sample a diverse set of candidates with probabilities proportional to a given reward. However, GFlowNets can only be used with a predefined scalar reward, which can be either computationally expensive or not directly accessible, in the case of multi-objective optimization (MOO) tasks for example. Moreover, to prioritize identifying high-reward candidates, the conventional practice is to raise the reward to a higher exponent, the optimal choice of which may vary across different environments. To address these issues, we propose Order-Preserving GFlowNets (OP-GFNs), which sample with probabilities in proportion to a learned reward function that is consistent with a provided (partial) order on the candidates, thus eliminating the need for an explicit formulation of the reward function. We theoretically prove that the training process of OP-GFNs gradually sparsifies the learned reward landscape in single-objective maximization tasks. The sparsification concentrates on candidates of a higher hierarchy in the ordering, ensuring exploration at the beginning and exploitation towards the end of the training. We demonstrate OP-GFN's state-of-the-art performance in single-objective maximization (totally ordered) and multi-objective Pareto front approximation (partially ordered) tasks, including synthetic datasets, molecule generation, and neural architecture search.","url_abs":"https://arxiv.org/abs/2310.00386v2","url_pdf":"https://arxiv.org/pdf/2310.00386v2.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":"order-preserving-gflownets","repo_url":"https://github.com/yhangchen/op-gfn","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"architecture-search","task_name":"Neural Architecture Search"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.00386","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.00386"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yhangchen/op-gfn","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran_fixture":1,"ran_honours":3,"ran":6,"ran_draft_wrong":1,"unverified":8},"by_repo_kind":{"official":{"samples":19,"ran":11,"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":19,"samples":[{"code_sha256_prefix":"1a1ebe33ee0285e0","entry":"batch","repo":"yhangchen/op-gfn","repo_kind":"official","path":"single/GFN-Mole/gflownet/utils.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/single/GFN-Mole/gflownet/utils.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1a1ebe33ee0285e0"}},{"code_sha256_prefix":"b8e02a8995424b4e","entry":"branin","repo":"yhangchen/op-gfn","repo_kind":"official","path":"multi/grid_cond_gfn.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/multi/grid_cond_gfn.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b8e02a8995424b4e"}},{"code_sha256_prefix":"7d8c95fef7c01a82","entry":"collate_states_scores","repo":"yhangchen/op-gfn","repo_kind":"official","path":"single/GFN-Mole/gflownet/policy.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/single/GFN-Mole/gflownet/policy.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"7d8c95fef7c01a82"}},{"code_sha256_prefix":"54dafc6a55c42deb","entry":"currin","repo":"yhangchen/op-gfn","repo_kind":"official","path":"multi/grid_cond_gfn.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/multi/grid_cond_gfn.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"54dafc6a55c42deb"}},{"code_sha256_prefix":"198490929c547443","entry":"dist_calibration_error","repo":"yhangchen/op-gfn","repo_kind":"official","path":"single/GFN-Mole/gflownet/evaluate.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/single/GFN-Mole/gflownet/evaluate.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"198490929c547443"}},{"code_sha256_prefix":"2dfc42fc19e46728","entry":"get_unique_children_in_x","repo":"yhangchen/op-gfn","repo_kind":"official","path":"single/GFN-Mole/gflownet/guide.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/single/GFN-Mole/gflownet/guide.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2dfc42fc19e46728"}},{"code_sha256_prefix":"266dbf4340bef3f5","entry":"make_mlp","repo":"yhangchen/op-gfn","repo_kind":"official","path":"single/GFN-Mole/gflownet/network.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/single/GFN-Mole/gflownet/network.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"266dbf4340bef3f5"}},{"code_sha256_prefix":"7e8123dabbedb095","entry":"make_nodesummary_gnn","repo":"yhangchen/op-gfn","repo_kind":"official","path":"single/GFN-Mole/gflownet/network.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/single/GFN-Mole/gflownet/network.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7e8123dabbedb095"}},{"code_sha256_prefix":"1c23da6bab23ab31","entry":"pack","repo":"yhangchen/op-gfn","repo_kind":"official","path":"single/GFN-Mole/gflownet/utils.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/single/GFN-Mole/gflownet/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1c23da6bab23ab31"}},{"code_sha256_prefix":"84f5d9cf76d6c466","entry":"sphere","repo":"yhangchen/op-gfn","repo_kind":"official","path":"multi/grid_cond_gfn.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/multi/grid_cond_gfn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"84f5d9cf76d6c466"}},{"code_sha256_prefix":"973c7b0697f6a623","entry":"tensor_to_np","repo":"yhangchen/op-gfn","repo_kind":"official","path":"single/GFN-Mole/gflownet/utils.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/single/GFN-Mole/gflownet/utils.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"973c7b0697f6a623"}},{"code_sha256_prefix":"cfafc9ffa57d7acf","entry":"anderson_darling","repo":"yhangchen/op-gfn","repo_kind":"official","path":"single/GFN-Mole/gflownet/evaluate.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/single/GFN-Mole/gflownet/evaluate.py","link_basis":"harvester_set","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":"cfafc9ffa57d7acf"}},{"code_sha256_prefix":"0fec2c0107112bfd","entry":"collate_probs","repo":"yhangchen/op-gfn","repo_kind":"official","path":"single/GFN-Mole/gflownet/policy.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/single/GFN-Mole/gflownet/policy.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"0fec2c0107112bfd"}},{"code_sha256_prefix":"ac05e44262397b23","entry":"guide_logp","repo":"yhangchen/op-gfn","repo_kind":"official","path":"single/GFN-Mole/gflownet/guide.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/single/GFN-Mole/gflownet/guide.py","link_basis":"harvester_set","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":"ac05e44262397b23"}},{"code_sha256_prefix":"6b1b2290357fc6dc","entry":"guide_sample","repo":"yhangchen/op-gfn","repo_kind":"official","path":"single/GFN-Mole/gflownet/guide.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/single/GFN-Mole/gflownet/guide.py","link_basis":"harvester_set","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":"6b1b2290357fc6dc"}},{"code_sha256_prefix":"b3c76e81a3360fbd","entry":"make_convnet","repo":"yhangchen/op-gfn","repo_kind":"official","path":"single/GFN-Mole/gflownet/network.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/single/GFN-Mole/gflownet/network.py","link_basis":"harvester_set","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":"b3c76e81a3360fbd"}},{"code_sha256_prefix":"07d2630a9cb727da","entry":"make_full_exp","repo":"yhangchen/op-gfn","repo_kind":"official","path":"single/GFN-Mole/gflownet/data.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/single/GFN-Mole/gflownet/data.py","link_basis":"harvester_set","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":"07d2630a9cb727da"}},{"code_sha256_prefix":"6dd46344ca1baf43","entry":"multi_set_distance","repo":"yhangchen/op-gfn","repo_kind":"official","path":"single/GFN-Mole/gflownet/monitor.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/single/GFN-Mole/gflownet/monitor.py","link_basis":"harvester_set","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":"6dd46344ca1baf43"}},{"code_sha256_prefix":"f928c1f4da5deecd","entry":"unique_keep_order_filter_children","repo":"yhangchen/op-gfn","repo_kind":"official","path":"single/GFN-Mole/gflownet/policy.py","file_url":"https://github.com/yhangchen/op-gfn/blob/HEAD/single/GFN-Mole/gflownet/policy.py","link_basis":"harvester_set","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":"f928c1f4da5deecd"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}