{"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/dagma-learning-dags-via-m-matrices-and-a-log","title":"DAGMA: Learning DAGs via M-matrices and a Log-Determinant Acyclicity Characterization","arxiv_id":"2209.08037","date":"2022-09-16","proceeding":null,"authors":["Kevin Bello","Bryon Aragam","Pradeep Ravikumar"],"abstract":"The combinatorial problem of learning directed acyclic graphs (DAGs) from data was recently framed as a purely continuous optimization problem by leveraging a differentiable acyclicity characterization of DAGs based on the trace of a matrix exponential function. Existing acyclicity characterizations are based on the idea that powers of an adjacency matrix contain information about walks and cycles. In this work, we propose a new acyclicity characterization based on the log-determinant (log-det) function, which leverages the nilpotency property of DAGs. To deal with the inherent asymmetries of a DAG, we relate the domain of our log-det characterization to the set of $\\textit{M-matrices}$, which is a key difference to the classical log-det function defined over the cone of positive definite matrices. Similar to acyclicity functions previously proposed, our characterization is also exact and differentiable. However, when compared to existing characterizations, our log-det function: (1) Is better at detecting large cycles; (2) Has better-behaved gradients; and (3) Its runtime is in practice about an order of magnitude faster. From the optimization side, we drop the typically used augmented Lagrangian scheme and propose DAGMA ($\\textit{DAGs via M-matrices for Acyclicity}$), a method that resembles the central path for barrier methods. Each point in the central path of DAGMA is a solution to an unconstrained problem regularized by our log-det function, then we show that at the limit of the central path the solution is guaranteed to be a DAG. Finally, we provide extensive experiments for $\\textit{linear}$ and $\\textit{nonlinear}$ SEMs and show that our approach can reach large speed-ups and smaller structural Hamming distances against state-of-the-art methods. Code implementing the proposed method is open-source and publicly available at https://github.com/kevinsbello/dagma.","url_abs":"https://arxiv.org/abs/2209.08037v3","url_pdf":"https://arxiv.org/pdf/2209.08037v3.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":"dagma-learning-dags-via-m-matrices-and-a-log","repo_url":"https://github.com/kevinsbello/dagma","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"dagma-learning-dags-via-m-matrices-and-a-log","repo_url":"https://github.com/duntrain/topo","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"dagma-learning-dags-via-m-matrices-and-a-log","repo_url":"https://github.com/gabriele-dominici/causalcgm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"dagma-learning-dags-via-m-matrices-and-a-log","repo_url":"https://github.com/isvy08/otm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"dagma-learning-dags-via-m-matrices-and-a-log","repo_url":"https://github.com/samiatto/colide","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"causal-discovery","task_name":"Causal Discovery"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2209.08037","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2209.08037"}},"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/xunzheng/notears","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/kevinsbello/dagma","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/bd2kccd/py-causal","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/ignavierng/golem","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/duntrain/topo","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/isvy08/otm","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/samiatto/colide","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gabriele-dominici/causalcgm","reach":null}],"summary":{"ran":3,"unverified":4},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":5,"ran":2,"repositories":3}},"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":2,"samples":[{"code_sha256_prefix":"3c5e1fbf2afb9f18","entry":"DagmaCE","repo":"gabriele-dominici/causalcgm","repo_kind":"listed","path":"causalcgm/dagma.py","file_url":"https://github.com/gabriele-dominici/causalcgm/blob/HEAD/causalcgm/dagma.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3c5e1fbf2afb9f18"}},{"code_sha256_prefix":"0e741fd1baab2124","entry":"DagmaNonlinear","repo":"isvy08/otm","repo_kind":"listed","path":"dagma.py","file_url":"https://github.com/isvy08/otm/blob/HEAD/dagma.py","link_basis":"first_harvest_node","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":"0e741fd1baab2124"}},{"code_sha256_prefix":"ae4b8f64300ff183","entry":"DagmaNonlinear","repo":"kevinsbello/dagma","repo_kind":"official","path":"src/dagma/nonlinear.py","file_url":"https://github.com/kevinsbello/dagma/blob/HEAD/src/dagma/nonlinear.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ae4b8f64300ff183"}},{"code_sha256_prefix":"614ebb7febab6a64","entry":"count_accuracy","repo":"samiatto/colide","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/samiatto/colide/blob/HEAD/utils.py","link_basis":"harvester_set","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":"614ebb7febab6a64"}},{"code_sha256_prefix":"935903491a9e59b4","entry":"is_dag","repo":"samiatto/colide","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/samiatto/colide/blob/HEAD/utils.py","link_basis":"harvester_set","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":"935903491a9e59b4"}},{"code_sha256_prefix":"8121d0e3bc3faff7","entry":"notears_linear","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"unverified","verification_level":0,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"8121d0e3bc3faff7"}},{"code_sha256_prefix":"48a22750a891be8c","entry":"simulate_sem","repo":"samiatto/colide","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/samiatto/colide/blob/HEAD/utils.py","link_basis":"harvester_set","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":"48a22750a891be8c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}