{"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/optimizing-notears-objectives-via-topological","title":"Optimizing NOTEARS Objectives via Topological Swaps","arxiv_id":"2305.17277","date":"2023-05-26","proceeding":null,"authors":["Chang Deng","Kevin Bello","Bryon Aragam","Pradeep Ravikumar"],"abstract":"Recently, an intriguing class of non-convex optimization problems has emerged in the context of learning directed acyclic graphs (DAGs). These problems involve minimizing a given loss or score function, subject to a non-convex continuous constraint that penalizes the presence of cycles in a graph. In this work, we delve into the optimization challenges associated with this class of non-convex programs. To address these challenges, we propose a bi-level algorithm that leverages the non-convex constraint in a novel way. The outer level of the algorithm optimizes over topological orders by iteratively swapping pairs of nodes within the topological order of a DAG. A key innovation of our approach is the development of an effective method for generating a set of candidate swapping pairs for each iteration. At the inner level, given a topological order, we utilize off-the-shelf solvers that can handle linear constraints. The key advantage of our proposed algorithm is that it is guaranteed to find a local minimum or a KKT point under weaker conditions compared to previous work and finds solutions with lower scores. Extensive experiments demonstrate that our method outperforms state-of-the-art approaches in terms of achieving a better score. Additionally, our method can also be used as a post-processing algorithm to significantly improve the score of other algorithms. Code implementing the proposed method is available at https://github.com/duntrain/topo.","url_abs":"https://arxiv.org/abs/2305.17277v1","url_pdf":"https://arxiv.org/pdf/2305.17277v1.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":"optimizing-notears-objectives-via-topological","repo_url":"https://github.com/duntrain/topo","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=2305.17277","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.17277"}},"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/duntrain/topo","reach":null}],"summary":{"ran_fixture":4,"ran_draft_wrong":1},"by_repo_kind":{"official":{"samples":5,"ran":5,"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":5,"samples":[{"code_sha256_prefix":"5d585a21d486c401","entry":"create_Z","repo":"duntrain/topo","repo_kind":"official","path":"topo_utils.py","file_url":"https://github.com/duntrain/topo/blob/HEAD/topo_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5d585a21d486c401"}},{"code_sha256_prefix":"576d4a7151de71fe","entry":"create_new_topo","repo":"duntrain/topo","repo_kind":"official","path":"topo_utils.py","file_url":"https://github.com/duntrain/topo/blob/HEAD/topo_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"576d4a7151de71fe"}},{"code_sha256_prefix":"a4eb67ba26987477","entry":"init_Wstar","repo":"duntrain/topo","repo_kind":"official","path":"topo_utils.py","file_url":"https://github.com/duntrain/topo/blob/HEAD/topo_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a4eb67ba26987477"}},{"code_sha256_prefix":"db3f560479660a06","entry":"init_Wstar_slice","repo":"duntrain/topo","repo_kind":"official","path":"topo_utils.py","file_url":"https://github.com/duntrain/topo/blob/HEAD/topo_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"db3f560479660a06"}},{"code_sha256_prefix":"5f91a4deec81f05c","entry":"update_topo_linear","repo":"duntrain/topo","repo_kind":"official","path":"topo_utils.py","file_url":"https://github.com/duntrain/topo/blob/HEAD/topo_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5f91a4deec81f05c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}