--- name: benchmarks-0.18.0 description: "The Andrey 0.18.0 release card - DAGMA supported, DAS, SkewD, and CPCM, the Tübingen cause-effect pairs, and ANM, PNL, and LOCI independent of row order." meta: type: guide tags: [benchmarks, DAGMA, NOTEARS, functional causal models, pairwise, datasets] ai: drafted ai_tools: Claude Code and Codex --- # 0.18.0 release card :::::{div} release-opening :::{card} :class-card: release-cover release-default :shadow: none Release card

Andrey

0.18.0 ::: ::::{div} release-opening-text 0.18.0 makes DAGMA, a continuous-optimization method, supported with its gap stated: its result depends on the data's scale, and on z-scored columns neither it nor its authors' package made fewer errors than the empty graph. Against that package on its paper's simulation it made no more errors in any of 42 settings of raw and z-scored columns. Its `robust=True` path, and that of NOTEARS, now follows the authors' code, and we checked both methods on measured protein data. The release also adds three experimental methods, for functional causal modeling. DAS prunes SCORE's causal order at scale, SkewD reads the direction of a pair whose noise is skewed, and CPCM reads it where an effect follows a chosen distribution, such as counts. `load_dataset` loads the Tübingen cause-effect pairs, ANM, PNL, and LOCI return the same direction under any order of the rows, and the project states how it uses AI tools. :::: ::::: ## The benchmarks The earlier release cards keep the numbers of the builds they measured. This release's summary adds the comparison of DAGMA with its authors' package, with a check of DAGMA and NOTEARS on measured data ([DAGMA](#dagma), [NOTEARS](#notears)). DAS, SkewD, and CPCM are experimental and are benchmarked when they are promoted ([Experimental methods](#experimental-methods)). ## DAGMA `andrey.dagma` (Bello et al., 2022) fits a weighted DAG by minimizing least squares with an `l1` penalty under a log-determinant acyclicity constraint. It is supported, with a gap: its result depends on the data's scale. The [API reference](../api.md#supported-methods) describes it. We compared it with its authors' package on the DAGMA paper's simulation: linear models with weights from +-[0.5, 2], unit noise variances, and 1,000 rows, on Erdos-Renyi graphs with `2 d` edges and scale-free graphs with `4 d`, 10, 20, 50, and 100 variables, Gaussian, exponential, and Gumbel noise, and 20 datasets per setting. It made no more errors than the package in any of the 24 settings with every column z-scored and any of the 18 on the simulation's own units (raw columns), and in 17 of the 18 settings where each variable is divided by its standard deviation as it is generated (rescaled); the other one was worse on its first 20 datasets and tied on 20 fresh ones. On raw columns it made fewer errors than the empty graph in all 18 settings. On z-scored columns it made fewer in none of the 24, and more in 16, as the package did. On raw columns the variance of a variable grows along the causal order, which the least-squares fit reads (varsortability; Reisach et al., 2021), and z-scoring removes it. The [comparison page][nd] has every setting. ### On measured data The Sachs data hold 853 observational measurements of 11 proteins and phospholipids with a 17-edge consensus network (`andrey.load_dataset("sachs")`), and 7,466 measurements in all nine experimental conditions, which the methods here read as one sample. The table gives the errors between the estimated CPDAG and the consensus network's, the empty graph's being the 17 edges. The first number is the fit on all the rows, and the second, in parentheses, the mean over 10 resamples of the rows. DAGMA and NOTEARS draw no random numbers; `pc` and `ges` run at their defaults. On the raw 853 measurements the consensus network's varsortability is 0.67, and 0.50 once the columns are z-scored. | Method | 853 cells, raw | 853 cells, z-scored | 7,466 cells, raw | 7,466 cells, z-scored | |---|---:|---:|---:|---:| | Empty graph | 17 | 17 | 17 | 17 | | `dagma` | 13 (14.2) | 13 (12.1) | 12 (12.1) | 13 (12.6) | | `dagma(robust=True)` | 13 (12.5) | 13 (12.6) | 13 (13.1) | 15 (15.8) | | `notears` | 14 (16.0) | 13 (12.7) | 21 (22.6) | 13 (13.0) | | `notears(robust=True)` | 14 (14.3) | 13 (12.6) | 18 (18.0) | 18 (16.7) | | `pc` | 11 (14.5) | 11 (14.5) | 29 (27.7) | 29 (27.7) | | `ges` | 11 (14.4) | 11 (14.4) | 36 (36.7) | 36 (36.7) | On the 853 observational measurements the four fits made fewer errors than the empty graph, on raw and z-scored columns alike, and on all the rows `pc` and `ges` made fewer than them. On the pooled measurements, which mix experiments, `dagma` stayed below the empty graph, `notears` on the raw columns and `notears(robust=True)` on both did not, and `pc` and `ges` made more errors than the empty graph. The fits are on one dataset with a consensus network, so the table says little about other data. The release's [lane file][lane] records every fit's errors under `sachs`. ### The likelihood path `robust=True` follows the first fit with the likelihood path of Deng et al. (2024). Its likelihood no longer includes the log-determinant of `I - W`, which is zero for every DAG: the gradient of the term is not zero while a fit is cyclic, and the authors' code leaves it out. We ran it on the simulation of their paper, linear Gaussian models with weights from +-[0.5, 1.5], noise standard deviations from [0.1, 0.7], 1,000 rows, columns shuffled, and 20 datasets per setting, and scored the CPDAG errors, the paper's measure, on z-scored columns, against the path run with the authors' code. | Setting | Empty graph | `dagma(robust=True)` before | `dagma(robust=True)` now | The authors' code | |---|---:|---:|---:|---:| | Erdos-Renyi, 10 variables | 20.00 | 23.05 | 21.30 | 20.05 | | Erdos-Renyi, 20 variables | 40.00 | 44.25 | 39.95 | 42.40 | | Scale-free, 10 variables | 17.00 | 23.50 | 17.90 | 18.15 | | Scale-free, 20 variables | 37.00 | 54.05 | 39.05 | 39.35 | On z-scored columns `robust=True` does not change the finding: in none of the four settings does it make fewer errors than the empty graph (the 95% interval of the difference includes 0 in each), and neither does the path run with the authors' code. The [lane file][lane] records these means, with their intervals, under `likelihood_path`. ## NOTEARS `andrey.notears` (Zheng et al., 2018) is supported since 0.17.0, and its comparison with its authors' code is on the [0.17.0 release card](0.17.0.md#notears). Its result also depends on the data's scale (Reisach et al., 2021), and its `robust=True` path had the same log-determinant term; the table under [DAGMA](#on-measured-data) gives its errors on the Sachs data. On the paper's simulation of Deng et al. (2024) at 10 variables, with Erdos-Renyi graphs and 20 datasets, the CPDAG errors of `notears(robust=True)` were 18.50 on z-scored columns, against 20.00 for the empty graph and 18.45 for the path run with the authors' code, and 11.80 on raw columns, against 11.75 for the authors' code; before the change they were 16.60 and 13.25. ## Experimental methods Each of these methods follows its paper and is tested on fixed cases and on simulated data with a known graph. None is benchmarked yet: a campaign against its authors' code comes before it is supported, and its docstring's **Limitations** paragraph, on the [API pages](../api.md), says what is known so far. The [functional causal models post](../../blog/20261103-andrey-0-13-0.md) describes DAS, SkewD-MV, and the CPCM graph search, and the [pairwise direction post](../../blog/20261015-andrey-0-4-0.md) the two pair tests. - **DAS** (`andrey.das`; Montagna et al., 2023) finds SCORE's causal order of nonlinear data with additive Gaussian noise, then screens each variable's candidate parents on the same estimate of the score's Jacobian, at most 20 by default, and prunes only those with CAM's tests. It is for graphs with too many variables for SCORE's pruning. - **SkewD** (`andrey.skewd`) and **SkewD-MV** (`andrey.skewd_mv`; Klippert and Marx, 2026) read the direction of a pair, and choose a DAG of a few variables in PC's equivalence class, under location-scale noise whose distribution is skew-normal. With symmetric noise, the model reduces to LOCI's. - **CPCM** (`andrey.cpcm`) and its graph search (`andrey.cpcm_graph`; Bodik and Chavez-Demoulin, 2025) assume that each variable given its causes follows a family you choose, such as Gaussian with a changing mean and scale, Poisson, or Pareto, and read the direction from which model leaves residuals independent of the cause. They suit counts, positive or heavy-tailed variables, and pairs where each column has its own family. ## Other changes in 0.18.0 `andrey.data.load_dataset("tuebingen")` loads the Tübingen cause-effect pairs (Mooij et al., 2016), 108 pairs of real measurements, each with its reference direction and a weight for averaging over the collection. Andrey downloads the archive from its original server and checks it, since the collection states no license. ANM, PNL, and LOCI fit each direction on its rows sorted by the data, so a result does not depend on the order of the rows. Every pairwise method decides a tie between the two directions by the same rule, and a tie in both the p-values and the statistics gives no edge. On the recorded-output and recovery inputs, no graph changes. The DirectLiNGAM order search stops scoring a candidate once it can be neither picked nor tied, which makes DirectLiNGAM and its multi-group variant faster on larger graphs with the same output; VARMA-LiNGAM and longitudinal LiNGAM use the same search, with the same output. The Fisher z test, the normal-scores test, and two other p-values compute their upper tail directly, so a strong dependence keeps a positive p-value down to about 1e-308. The normal-scores test reads data from one environment only, and GIN keeps its latents' numbers under any column order. The examples gain a notebook on missing values. The project states how it uses AI tools: every change goes through the same checks and a pull request that a person answers for, benchmark numbers come only from recorded runs, and every post and release card, this one included, ends with a statement of how AI tools were used to write it. The [AI policy](https://github.com/Abel-ai-lab/Andrey/blob/main/DEVELOPMENT.md#ai-tools) has the rules. The [changelog](../changelog.md) lists every change. ## Reproduce You can find environment setup, campaign drivers, and scores in the [benchmark harness guide][harness]. To rerun the comparison, install Andrey (andrey-core) in the harness's environment. Times will differ with the hardware and build; the errors should match closely. | Comparison | Lane | Sizes | Datasets x repeats | Wall cap (s) | |---|---|---|---|---:| | DAGMA against its authors' package | `notears_cpu.py`, judged by `notears_summary.py` | the DAGMA paper's simulation: Erdos-Renyi and scale-free graphs with 10, 20, and 50 variables on every scale, and 100 on z-scored columns | 20 x 1, and 20 fresh x 1 for a worse cell | 1,800 | The fits on the Sachs data and the likelihood-path runs have no lane in the harness. The [lane file][lane] records their data, settings, and the code the reference column ran. ## References - Bello, K., Aragam, B., and Ravikumar, P. (2022). DAGMA: Learning DAGs via M-matrices and a log-determinant acyclicity characterization. *NeurIPS* 35, 8226-8239. - Bodik, J., and Chavez-Demoulin, V. (2025). Identifiability of causal graphs under non-additive conditionally parametric causal models. *JMLR* 26(264), 1-55. - Deng, C., Bello, K., Ravikumar, P., and Aragam, B. (2024). Markov equivalence and consistency in differentiable structure learning. *NeurIPS* 37. - Klippert, D., and Marx, A. (2026). Skewness-robust causal discovery in location-scale noise models. *ICML*, PMLR 306. - Montagna, F., Noceti, N., Rosasco, L., Zhang, K., and Locatello, F. (2023). Scalable causal discovery with score matching. *CLeaR*, PMLR 213, 752-771. - Mooij, J. M., Peters, J., Janzing, D., Zscheischler, J., and Schölkopf, B. (2016). Distinguishing cause from effect using observational data: methods and benchmarks. *JMLR* 17(32), 1-102. - Reisach, A. G., Seiler, C., and Weichwald, S. (2021). Beware of the simulated DAG! Causal discovery benchmarks may be easy to game. *NeurIPS* 34. [harness]: https://github.com/Abel-ai-lab/Andrey/blob/main/benchmarks/README.md [lane]: https://github.com/Abel-ai-lab/Andrey/blob/main/benchmarks/published/0.18.0/notears-dagma.json [nd]: https://github.com/Abel-ai-lab/Andrey/blob/main/benchmarks/comparisons/notears-dagma.md