--- name: benchmarks-0.20.0 description: "The Andrey 0.20.0 release card - faster fits with the same output, LGES, Regime-PCMCI, and the wGCM and PCM tests supported, new defaults, and FGES." meta: type: guide tags: [benchmarks, speed, memory, LGES, Regime-PCMCI, GCM, wGCM, PCM, missing values, FGES] ai: drafted ai_tools: Claude Code --- # 0.20.0 release card :::::{div} release-opening :::{card} :class-card: release-cover release-default :shadow: none Release card

Andrey

0.20.0 ::: ::::{div} release-opening-text 0.20.0 is an optimization release. Most of its speed work changes how a fit computes its answer, not the answer: on the CPU, each faster path returns the output of the path it replaces bit for bit and asks the same tests or scores or fewer, and the partial-correlation tests move their p-values in the last digits without changing a graph in their checks. Against 0.19.0 on the same datasets and CPUs, 0.20.0 ran 1.01x to 13.2x faster in every setting we timed with a speedup shown, except ANM on four cores, which ran at 0.652x since it now uses one BLAS thread; several searches hold less memory, and worker processes hold more at their peak ([Speed and memory](#speed-and-memory)). LGES, Regime-PCMCI, and the wGCM and PCM tests are supported. LGES now defaults to ConservativeInsert, which made fewer errors than SafeInsert in 20 of 30 settings under the default schedule and more in none ([LGES](#lges)). Regime-PCMCI returned the result of Tigramite's RPCMCI, the authors' code, on every start that ran in both ([Regime-PCMCI](#regime-pcmci)). Each test was measured for its level on the null designs of its paper and its power against its authors' code, and the GCM test stays experimental: PC with it made as many errors as the empty graph where children depend on their parents through a cosine ([The GCM, wGCM, and PCM tests](#the-gcm-wgcm-and-pcm-tests)). `missing="em"` is supported in every method that takes it, now with `xges`, `exact_search`, `dagma`, and `calm`, and `calm`'s `w_threshold` defaults to 0.0, the value of its paper ([Missing data](#missing-data)). `pc` and `fci` now orient colliders by majority vote, and `rsmax2` restricts with IAMB and maximizes with tabu search; the docstrings say what each value of an option favors and gives up, and [Options and defaults](#options-and-defaults) holds the numbers. FGES arrives, experimental. By default it scans every pair as GES does, which drops the paper's one-edge faithfulness assumption; on the FGES paper's simulation from 1,000 to 4,000 variables it made no more errors than GES in any setting and took less time on average in every setting. At 8,000 variables no Andrey method finished within the hour a fit had ([FGES](#fges)). :::: ::::: ## The benchmarks Earlier release cards report the builds they measured. The speed and memory benchmark times 0.20.0 against 0.19.0 on the same datasets, CPUs, and arguments, and checks that both return the same output ([Speed and memory](#speed-and-memory)). LGES is compared with GES, BOSS, and PC and with its authors' code on its paper's simulation, and its two insertion rules with each other ([LGES](#lges)). Regime-PCMCI is compared with Tigramite start by start and with PCMCI on the whole series ([Regime-PCMCI](#regime-pcmci)). The GCM, wGCM, and PCM tests are measured for their level and power against their authors' code, beside KCI, and inside PC ([The GCM, wGCM, and PCM tests](#the-gcm-wgcm-and-pcm-tests)). Structural EM in XGES, exact search, and DAGMA is compared with MissDAG's EM around the same search, CALM's with the empty graph and its fit on the complete data, and GES, BOSS, and GRaSP with EM with Tetrad's EM up to 100 variables ([Missing data](#missing-data)). The options study compares the values of each option with each other and with the empty graph ([Options and defaults](#options-and-defaults)), and FGES is compared with GES and with Tetrad's FGES up to 8,000 variables ([FGES](#fges)). This release's summary holds the rows of LGES and Regime-PCMCI against their authors' code. ## Speed and memory Most of the speed work in 0.20.0 changes how a fit computes its answer, not the answer. On the CPU, each faster path returns the output of the path it replaces bit for bit, the graph, weights, causal order, and metadata, and asks the same tests or scores or fewer. One change, to the partial-correlation tests, moves their p-values and statistics in the last digits and changed no graph in its checks ([Partial correlations in the last digits](#partial-correlations-in-the-last-digits)). Against 0.19.0 on the same datasets and CPUs, 0.20.0 ran 1.01x to 13.2x faster in every setting we timed with a speedup shown, except ANM on four cores (0.652x), with the same output on 397 of 397 datasets; the 6 not finished are Regime-PCMCI datasets on which both builds raise the same error ([Times](#times)). ### How we compare **The same work.** Andrey 0.20.0 (`release/0.20.0` at 4e7f56446) and Andrey 0.19.0 (andrey-core 0.19.0 from PyPI) are two contestants with the same dependency versions (Python 3.14.4, NumPy 2.4.6, SciPy 1.17.1, scikit-learn 1.9.1, PyTorch 2.15.0 on the CPU, pandas 3.1.1, statsmodels 0.15.0). Both fit the same datasets with the same arguments, each dataset drawn once and read by both builds, and each fit capped at 1,800 s of wall time, imports and warm-up included. A fit that reaches the cap counts as not finished, never as an empty graph. Every table of times and memory in this section compares these two builds. **The same machine, at the same time.** Both builds of a dataset run back to back on the same CPUs, the order swapped on alternate repeats, each timed fit in its own process after one untimed warm-up fit (none for the memory cells and the 4,000-variable PC with workers). One-core fits ran in one job on one node, an AMD EPYC 9534 (128 CPUs, 16 L3 caches), on one BLAS thread, 8 fits side by side, each on a core of its own L3 cache. A control timed PC at 600 variables, IAMB with missing values, `import andrey`, and LGES at 100 variables, 3 datasets and 3 repeats each, alone and side by side. With 16 fits side by side the import case took 1.85 times as long as alone, over the control's limit of 1.05, so the one-core fits ran again with 8, and every one-core table below comes from that run. At 8, the other three cases took 1.01 to 1.03 times as long as alone, with the same outputs, and the import case, which waits on the file system, took 0.176 and 0.0994 of its time alone (0.19.0 and 0.20.0) with 0.994 and 0.970 of its CPU time. Worker processes and the memory measurements ran one fit at a time on an idle node, an AMD EPYC 9534 (128 CPUs, 16 L3 caches). **The same output.** For each dataset, every timed fit of both builds must return the same graph and, where the method returns them, the same weights, bit for bit, by a hash of both. The hash does not cover metadata, so a setting whose method takes a partial-correlation test is compared by its graph. A setting whose outputs differ for a reason this card does not name gets no speedup. **The speedup.** A dataset's time is the median of its timed repeats (two or three; one for the memory cells, the 50-variable EM fit, the 4,000-variable PC with workers, and the LGES score counts; ten fresh interpreters for the start-up cases); a setting's time is the median over its datasets (10 for the headline cases, 5 for the other settings, 3 for the memory cells, 2 for the 4,000-variable PC with workers, and 1 for the start-up cases, which need no data). "Faster" is the median over the datasets of 0.19.0's time divided by 0.20.0's. Where both times are under 0.1 s, or a fit did not finish, we give the times and no speedup. 0.19.0 timed against itself on GFCI at 200 variables, GES at 500, BOSS at 100, tabu search at 1,000, and DirectLiNGAM at 20 gives the run-to-run spread: the two times of a dataset differed by a ratio of 0.942 to 1.06 on the four settings of 0.1 s or more; a speedup inside it, or inside a setting's own spread over its repeats where that is larger, is no measurable change. Times and ratios have three significant figures. **Data.** Linear-Gaussian data on Erdos-Renyi graphs with the mean degree a row gives, unless the row names other data. Values missing completely at random are removed at the rate a row gives. For the time-series methods, Variables counts the series and Rows the time steps. ### What changed Each change below returns the same output as the code it replaces, bit for bit, with the same tests or scores or fewer, unless it says otherwise. We group them by where the time goes: the algorithm, Python and the libraries around it, and the hardware below. #### The algorithm - LGES keeps each target's insert verdicts for the whole fit, builds the sets that extend the common neighbors of a source once for every source that shares them, runs one reachability search per clique, and scores each base once. The turning step of GIES and LGES builds the sort key of a turn only for a turn that improves the score. - AGES shares the covariance inverses, each removal's score change without the penalty, and each target's removal candidates across the penalties of its solution path, so it asks fewer score queries than before. - CAM-UV keeps the residual of each regression its sink tests fit, so it fits each variable on each set of regressors once. - Structural EM (`missing="em"` in GES, XGES, hill climbing, tabu search, exact search, BOSS, GRaSP, NOTEARS, DAGMA, and CALM) groups the rows by the columns they observe once per fit, not in each E-step, and solves together the one-row patterns that miss the same number of columns. - PCMCI and PCMCI+ on data with missing values stop the scan that picks each candidate's conditions once it holds the ones the PC1 rounds keep. - IAMB, Inter-IAMB, and MMPC with a list of targets on data with missing values answer every target with one search, so a run that several targets share is made once, and MMPC's lists ask fewer tests. - KCI keeps the kernel of its first variable with the conditioning set for the queries that share it, as it kept the second's, and the skeleton searches evaluate a stack of KCI queries one conditioning set at a time, so each matrix is built once for the stack. - J-PCMCI+ keeps the node counts and design columns that each lagged node adds to a conditioning set, and forms each conditioning set once per query. - LPCMCI, with `fisherz` or `student_t` on complete data, reads the partial correlation of each subset of four or more nodes in a long search from the Cholesky factor of its parent subset, kept between rounds, and asks the test again for the subsets that decide what the search records. - The partial-correlation tests settle a submatrix as not singular from the largest and smallest entries of its inverse, without the absolute value of the whole stack. - The GCM test, and the PCM test with `regression="boosting"`, grow each cross-validation fold only through the round where its early stop cuts it. - The Gaussian kernel matrices of the HSIC tests, of the Stein score estimate, and of ANM's objective are symmetric, and each is computed on and above its diagonal and mirrored below it. - DirectLiNGAM and the LiNGAM methods built on its order search take each column's sign under `measure="skew"` from the mean of `x * x * x` when that mean is clear of rounding, and every measure residualizes the remaining columns with the picked column's variance taken once per step. - DAGMA, and NOTEARS with `robust=True`, take each Adam step from the gradient of the loss and the penalty alone, without computing their values. - BOSS keeps each variable's penalty and rounding terms for the whole fit. #### Python and the libraries - The skeleton search of PC, FCI, CD-NOD, FCI-JCI, RSMAX2, and the other methods built on it, with `fisherz`, `student_t`, or `normal_scores`, builds the queries of the pass with one conditioning variable from arrays and lists the conditioning sets of a small neighborhood at once; on data with missing values it builds the pass with no conditioning variable from arrays. - IAMB and Inter-IAMB read the p-values of a grow scan as one array, also on data with missing values under the Gaussian, chi-square, and G-square tests; their shrink step asks every member it has not visited in one call. The collider test of IAMB, Inter-IAMB, and MMPC hands its conditioning sets as integer arrays to a test that answers many queries at once. - FCI's orientation rules R4, R5, and R6 read columns, rows, and each node's list of `o-o` neighbors instead of one mark at a time, and its possible-d-sep search reads sets of each node's arrowheads and neighbors. - GES keeps the candidates of its forward scan in bit masks and arrays of floats. - BDeu and the discrete BIC count each family's table faster, and BDeu scores a batch of tables together; BOSS and GRaSP score each batch of added parents with fewer temporary arrays. - NoGAM assembles each fold of its kernel regressions from slices of the kernel, builds the kernels in place, and skips repeated checks for non-finite values. - The GCM and wGCM tests, and the PCM test with `regression="boosting"`, grow the boosted trees of their folds in a loop over scikit-learn's decision trees, not in a gradient-boosting fit per fold, and use scikit-learn's compiled staged prediction only after a check at its first use that it returns the bytes of the fits it replaces. - The LiNGAM methods and RCD solve their least-squares fits with the steps of scikit-learn's `LinearRegression` without the estimator's input checks. - CALM applies each Adam step as the in-place tensor operations of `torch.optim.Adam`, so the first fit in a process no longer builds an optimizer. - NOTEARS and DYNOTEARS compute the matrix exponential through SciPy's own kernels on SciPy 1.15 and later, and Regime-PCMCI solves its linear program through the HiGHS bindings that SciPy bundles. Both are private to SciPy, so Andrey uses them only after a check at import that they return the bytes of `scipy.linalg.expm` and `scipy.optimize.linprog`, which take over otherwise. - Every fit checks its data from each column's maximum and minimum, with a full pass for non-finite values only when the data hold one, and builds its result with NumPy. - A process that imports Andrey starts its first fit sooner: `scipy.stats` and pandas are imported only where a fit needs them, and with a CPU build of PyTorch a fit that stays on NumPy no longer imports torch. #### The hardware - CALM, ANM, LOCI, and PNL, and the separating sets, collider votes, and orientation rules of GFCI, BOSS-FCI, and GRaSP-FCI, run on one BLAS thread, and on one torch thread where torch computes, so each returns the result it gives on one thread whatever the machine's thread count; KCI from 2,000 rows keeps every thread in the GFCI family, as it does in PC. They use less CPU time on a machine with several BLAS threads, and ANM and the GFCI family with KCI can take longer in wall time there ([Slower or more memory](#slower-or-more-memory)). - IAMB, Inter-IAMB, and MMPC without a target, Regime-PCMCI's starts, RESIT, and the exact search of CPCM's graph search run on worker processes ([Worker processes](#worker-processes)). - On Linux, the workers of GES, of the skeleton and possible-d-separation searches, and of a list of targets read one shared copy of the covariance or correlation matrix instead of a copy each. - The forkserver preloads the method registry that a worker's first fit reads, so a bootstrap on worker processes starts its workers sooner. ### Worker processes With `andrey.config(n_jobs=...)` above one, four more searches split their work across worker processes: IAMB, Inter-IAMB, and MMPC without a target, and the restrict phase of MMHC and RSMAX2 that reads their sets; Regime-PCMCI's starts; RESIT's regressions; and the fits of the exact search of CPCM's graph search on 3 or 4 variables. Each piece depends only on the data, the settings, and its own index, every worker runs on one BLAS thread, and the results are read in their serial order, never in order of completion, so the output is the same bit for bit on any number of workers. A pool repays its start only above some amount of work, so each search uses its workers only from a cutoff. Each default comes from whole fits in a fresh process, the first pool's start included, on 2, 4, and 8 workers on an idle node, measured on the change before it merged, and stays above the largest size at which a pooled fit was slower than the serial one. `andrey calibrate --method ` measures the cutoff for your machine, for a process that runs many fits and so starts its pools faster, and a fit with more than one worker warns once when it nears a default. | Search | Setting | Default | Work | Measured on | Largest work with a pooled fit slower | Every pooled fit faster | |---|---|---:|---|---|---|---| | IAMB, Inter-IAMB, and MMPC without a target | `ANDREY_BLANKET_PARALLEL_MIN_WORK` | 350,000 | target and candidate pairs, `d * (d - 1)` | Intel Xeon Gold 6542Y, 48 cores | 159,600 pairs: MMPC at 400 variables, on 2, 4, and 8 workers | from 359,400 pairs (600 variables), for each of the three | | Regime-PCMCI starts | `ANDREY_RPCMCI_PARALLEL_MIN_WORK` | 150,000 | `n_starts * n_regimes * T` | AMD EPYC 9534 | 90,000: 150 steps, 300 starts, 2 workers | from 120,000, of 45 cases in all | | RESIT | `ANDREY_RESIT_PARALLEL_MIN_WORK` | 50,000 | regressions of the causal order times rows, `(d * (d + 1) / 2 - 1) * n` | AMD EPYC 9534 | 38,500: 12 variables, 500 rows, 2 workers | from 41,800 to 140,000, of 33 cases in all | | CPCM exact search, `"gaussian"`, `"gamma"`, or `"gumbel"` columns | `ANDREY_CPCM_PARALLEL_MIN_WORK` | 8,000 | fits times rows, `d * (2 ** (d - 1) - 1) * n` | AMD EPYC 9534 | 1,800: 3 variables, 200 rows, 2 workers | from 7,200 to 44,800, of 14 cases under `"gaussian"` | The exact search sends only the columns whose family fits a scale or shape that changes with the parents; under the other families a fit costs less than starting the pool, and they run in the calling process. A Regime-PCMCI fit whose statistics run on a GPU keeps its starts in the calling process. Times on an AMD EPYC 9534 node (128 CPUs, 16 L3 caches), one BLAS thread per process, at the shipped cutoffs. 0.19.0 has no pool for IAMB, RESIT, CPCM, or Regime-PCMCI and runs them serially at any worker count; a row whose 0.20.0 fit started no pool at this size says so. CPU counts the calling process and its workers. | Search | Variables | Rows | Workers | Wall (s), 0.19.0 -> 0.20.0 | Faster | CPU (s), 0.19.0 -> 0.20.0 | Pool started | Same output | |---|---:|---:|---:|---|---|---|---|---| | IAMB, moral graph, mean degree 2 | 600 | 2,000 | 4 | 14.9 -> 1.77 | 8.44x | 14.8 -> 5.56 | yes | 5 of 5 | | IAMB, moral graph, mean degree 2 | 600 | 2,000 | 8 | 15.0 -> 1.09 | 13.2x | 14.9 -> 5.71 | yes | 5 of 5 | | RESIT, additive noise | 20 | 500 | 4 | 18.8 -> 9.84 | 1.89x | 18.7 -> 19.2 | yes | 5 of 5 | | RESIT, additive noise | 20 | 500 | 8 | 18.7 -> 9.28 | 2.00x | 18.7 -> 20.5 | yes | 5 of 5 | | CPCM graph search, `"gaussian"`, additive noise | 4 | 500 | 4 | 11.9 -> 4.39 | 3.01x | 11.9 -> 12.0 | yes | 5 of 5 | | CPCM graph search, `"gaussian"`, additive noise | 4 | 500 | 8 | 11.9 -> 3.30 | 4.12x | 11.9 -> 12.2 | yes | 5 of 5 | | Regime-PCMCI, 50 starts | 2 | 1,000 | 4 | 3.89 -> 3.50 | - | 3.90 -> 3.51 | no pool at this size | 3 of 3, 2 not finished | | Regime-PCMCI, 50 starts | 2 | 1,000 | 8 | 3.88 -> 3.50 | - | 3.89 -> 3.51 | no pool at this size | 3 of 3, 2 not finished | | Bootstrap of PC, 200 resamples | 10 | 500 | 4 | 0.746 -> 0.155 | 4.96x | 1.75 -> 0.501 | yes | 5 of 5 | Regime-PCMCI's rows hold three of the five datasets: on the other two both builds raise the same `RegimeFitError` (every start left a regime with fewer than 6 time steps, or with a test that cannot run on its steps), so those fits have no time and no output to compare. At 50 starts, 2 regimes, and 1,000 steps the work is 100,000, below the cutoff of 150,000, so 0.20.0 started no pool. IAMB, RESIT, and CPCM hold more memory at their peak with workers than 0.19.0 does serially ([Slower or more memory](#slower-or-more-memory)). ### Memory Seven changes cut the memory a fit holds, with the same output bit for bit: - The skeleton search, which PC, FCI, FCI-JCI, CD-NOD, GFCI, BOSS-FCI, GRaSP-FCI, and RSMAX2 share, holds the pairs the empty set separates as one boolean matrix, and their p-values as the matrix of marginal p-values it already computes, where that takes less memory than a separating set and a p-value for each pair, as on a sparse graph; each MMPC run holds its target's such candidates the same way. - GES's forward phase, in GES, GFCI, and AGES, keeps the screening delta and bound of each candidate in two arrays of floats, 16 bytes for each candidate, where it kept a set and two dictionaries. - BOSS, GRaSP, BOSS-FCI, and GRaSP-FCI without knowledge share one tuple of the variables across a search's grow-shrink trees, where each tree stored a list of every other variable. - The move scan of hill climbing, tabu search, MMHC, and RSMAX2 no longer keeps the deltas of removing each edge in a second table, quadratic in the number of variables; it reads each from the table of single-edge moves. - The check for copied columns reads the correlation matrix in blocks of rows instead of making three temporary copies of it, and the BIC's check keeps the whole matrix only when the data have more rows than columns. - With more than one worker, the skeleton search sends each worker the adjacency of a pass at one bit per entry instead of one byte, and PC no longer copies its adjacency for each pass. - On Linux, the workers of GES, the skeleton searches, and a list of targets share one copy of the covariance or correlation matrix in `/dev/shm`. Its memory goes back when the last worker exits, even when a fit is killed; where `/dev/shm` cannot hold the matrix, each worker gets its own copy. Two changes hold more memory. LPCMCI's long searches keep at most 1 GiB of factors per fit, shared by a bootstrap's workers, and a fit's process peaks higher than the factors it keeps. KCI keeps up to 256 MB of each of three kinds of matrix, 768 MB in all, where it kept 512 MB. Peak memory on an AMD EPYC 9534 node (128 CPUs, 16 L3 caches), one fit at a time, each dataset once, with no warm-up: the process's peak resident memory, and with workers the larger of that and the sampled sum of the resident memory of the process and its workers, in which a page that several processes map counts in each. | Method | Variables | Rows | Workers | Peak memory (MB), 0.19.0 -> 0.20.0 | Wall (s), 0.19.0 -> 0.20.0 | Same output | |---|---:|---:|---:|---|---|---| | PC, mean degree 2 | 2,000 | 1,000 | 1 | 1,130 -> 367 | 39.3 -> 19.3 | 3 of 3 | | PC, mean degree 2 | 4,000 | 1,000 | 4 | 4,450 -> 2,240 | 233 -> 217 | 2 of 2 | | GES, mean degree 2 | 1,000 | 10,000 | 1 | 525 -> 399 | 11.2 -> 8.28 | 3 of 3 | | Hill climbing, BIC, mean degree 2 | 4,000 | 300 | 1 | 753 -> 599 | 5.38 -> 4.61 | 3 of 3 | In a trial run, BOSS at 2,000 variables and 1,000 rows reached the time cap on both builds, so the 2,000-variable BOSS memory cell was dropped and the table has no row for it. ### Partial correlations in the last digits `fisherz`, `student_t`, and `normal_scores` take the partial correlation given a conditioning set of two from the second-order closed form, and given three or more from the Cholesky factor of the correlation submatrix, in place of its inverse. Each form settles a submatrix only when a check shows it far from singular; any other submatrix takes the inverse and its eigenvalue test, as before, so the same queries raise the singular-correlation error. Every call path returns the same bits for a query: alone, in a stack, in a worker, and in the collider test of the Markov blanket methods. The constraint-based and time-series methods that take these tests run faster ([Times by family](#times-by-family)), among them PC, FCI, IAMB, Inter-IAMB, MMPC, PCMCI, PCMCI+, LPCMCI, and J-PCMCI+. The partial correlations and p-values differ from the inverse's in their last digits. We compared release/0.20.0 at 819beb8a6 with the change at 95d75461c, on AMD EPYC 7713 with one BLAS thread (OpenBLAS), Python 3.14.4, NumPy 2.4.6, and SciPy 1.17.1. The relative differences count p-values of at least 0.001. | Check | Graphs | Largest relative p-value difference | |---|---|---| | `qa/identity.py`, every supported method, 438 outputs | none differ; 30 outputs differ only in their `p_values` and `statistics` metadata, of PCMCI, PCMCI+, J-PCMCI+, LPCMCI, and Regime-PCMCI; every i.i.d. method's output is equal bit for bit | 5.36e-12 (PCMCI), 6.83e-12 (J-PCMCI+), 1.07e-9 (LPCMCI), 2.16e-7 (PCMCI+) | | The 53 of 152 quality-gate checks that reach the new forms, 503 draws | the output hashes and errors equal on both sides in every draw | - | | 808 more fits: PC, FCI, GFCI, IAMB, Inter-IAMB, MMPC, MMHC, RSMAX2, and CD-NOD with the three tests, and PCMCI, PCMCI+, LPCMCI, and J-PCMCI+ on VAR series, random walks, AR(0.99) and AR(0.9999) series, and a sine with noise, 8 seeds | none differ; all 456 i.i.d. fits that finished are equal bit for bit, and 24 fail on both sides | 3.60e-12 on the VAR series, 3.59e-11 in J-PCMCI+, and 6.32e-7 over the random walks, AR series, and sine, in PCMCI | | 148,068 queries on near-copied and near-collinear columns at 60 noise levels, alone, in stacks, and in stacks of one | no decision to raise the singular-correlation error, error type, or message differs; no test decision at 0.01, 0.05, or 0.1 changes | 1.82e-9; partial correlations within 5.71e-11 | `qa/identity.py --workers 4` refit the worker methods on 4 workers, 176 refits, with no difference, and 207 fits on 4 BLAS threads gave the outputs of one. ### The same output Every speed change was checked against the commit before it with `qa/identity.py`, which fits every supported method on fixed datasets and hashes its whole output, floats as bytes, and fails on any changed output or any rise in the number of tests or scores a search asks; it runs every fit on one BLAS thread. The checks of the two groups ran on AMD EPYC 7713 with Python 3.14.4, NumPy 2.4.6, and PyTorch 2.15.0 on the CPU, the second with SciPy 1.17.1 and scikit-learn 1.9.1. | Check | Builds compared | Result | |---|---|---| | The first group of speed changes | release/0.20.0 at 3070a2d64 and at 9c3e16ffa | 76 methods, 426 outputs: none differ in graph, bits, or metadata; AGES asks fewer score queries in 6 outputs, since it shares them across penalties | | The same, on 4 workers | 9c3e16ffa | 19 worker methods, 104 refits, none differ from the fit in one process | | More cases of the Markov blanket searches | 3070a2d64 and 9c3e16ffa | 912 cases of IAMB, Inter-IAMB, MMPC, and CALM over 8 seeds, all equal; on data with missing values, 104 fits of IAMB and Inter-IAMB with Gaussian tests and 104 with chi-square and G-square tests, none differ; MMPC with a list of targets on data with missing values asks fewer tests, since a run the targets share is made once | | The second group of speed changes, with the dependency floors | release/0.20.0 at 46ead4fc7 and at 0474de3b7 | 78 methods, 430 outputs: none differ, and no count rose or fell | | The same, on 4 workers | 46ead4fc7 and 0474de3b7 | 33 worker methods, 320 outputs, none differ; 160 refits on each build, none differ from the fit in one process | | The first GCM boosting change, the macOS fix of structural EM, the Regime-PCMCI, RESIT, and CPCM worker pools, and the KCI, LPCMCI, and partial-correlation changes | each against the commit before it | each by its own check; none differs, apart from the partial-correlation change's p-values and statistics ([above](#partial-correlations-in-the-last-digits)); KCI: 79 methods, 436 outputs, and 119 fits with `indep_test="kci"` on one and four BLAS threads, none of their 11,578 distinct queries differing in any bit | | 0.20.0 against 0.19.0 | 0.19.0 and `{{check: identity \| 020 build}}` | `{{check: identity \| methods, outputs, changed}}` | **On worker processes.** Each pool has unit tests, run on every pull request, that compare a pooled fit with a serial one bit for bit, and `qa/identity.py --workers 4` refits every worker method with each cutoff at 0, so every pass goes to the pool; the refits above show no difference. **On a second platform.** The unit tests, which compare each faster path with the path it replaces, also run on macOS on Apple silicon with PyTorch on the CPU, without the `release`-marked checks; install, import, and PC and GES fits, with workers, run on macOS and Windows. These runs found two places where macOS rounds differently from Linux. Apple's Accelerate sums a dot product by the memory alignment of its operand, so structural EM solves alone the patterns that observe one column or miss one, as the code before the grouping did. scikit-learn's compiled update on Apple silicon is a fused multiply-add, so the GCM boosting reads scikit-learn's own staged predictions after its byte check. On each platform, these paths return what the earlier code returned on it. No check compares the outputs of the fixed datasets across machines. **Outputs that change.** Two changes of the speed work and one fix change an output on purpose, and the other fixes of this release change the outputs of the cases they describe ([changelog](../changelog.md)). The partial-correlation tests move p-values and statistics in the last digits. DirectLiNGAM and MultiGroupDirectLiNGAM center each column once, so their order no longer changes when a column is shifted by a constant, as it could under `measure="skew"` on columns whose skewness is zero or near it; on such columns with a nonzero mean, the order can differ from 0.19.0's. And the methods that now run on one BLAS thread can return other last digits than 0.19.0 on a machine with several, and CALM another graph; every check above runs on one BLAS thread and cannot show this. `indep_test="cmiknn"` now orders each row's nearest rows by distance, a random tie key, and index, so its p-values are the same on every NumPy version and CPU; that is the order NumPy 2 returned at the default `k_perm` on the CPUs tried, so those p-values did not change. ### Times Each row gives the range of "Faster" over the family's settings and the datasets with the same output, on AMD EPYC 9534 nodes (128 CPUs, 16 L3 caches each), one job for the one-core fits and one for the worker processes. | Family | Settings | Faster | Same output | |---|---:|---|---| | PC | 4 | 2.72x to 3.96x | 25 of 25 | | FCI and GFCI | 4 | 1.08x to 3.21x | 25 of 25 | | GES, LGES, and AGES | 7 | 1.05x to 3.86x | 45 of 45 | | BOSS and GRaSP | 3 | 1.01x to 1.04x | 15 of 15 | | IAMB, Inter-IAMB, and MMPC | 6 | 1.27x to 2.66x | 35 of 35 | | Discrete scores | 6 | 1.42x to 1.62x | 30 of 30 | | Hill climbing and tabu search | 1 | 1.05x to 1.05x | 5 of 5 | | Kernel and regression methods | 7 | 0.652x to 1.49x | 35 of 35 | | PC with kernel and regression tests | 4 | 1.35x to 6.65x | 25 of 25 | | Continuous optimization | 6 | 1.09x to 1.54x | 30 of 30 | | DirectLiNGAM | 2 | 1.35x to 1.35x | 10 of 10 | | Missing values | 9 | 1.32x to 7.94x | 50 of 50 | | PCMCI family | 5 | 1.12x to 1.83x | 23 of 23, 2 not finished | | Worker processes | 9 | 1.89x to 13.2x | 41 of 41, 4 not finished | | Start-up | 1 | 1.82x to 1.82x | 1 of 1 | #### Headline cases Eight cases on one core with one BLAS thread. The start-up case is a fresh interpreter that imports Andrey; its time is the median of 10 fresh processes. | Case | Variables | Rows | Setting | Wall (s), 0.19.0 -> 0.20.0 | CPU (s), 0.19.0 -> 0.20.0 | Faster | Same output | Peak memory (MB), 0.19.0 -> 0.20.0 | |---|---:|---:|---|---|---|---|---|---| | PC | 600 | 1,000 | `fisherz`, mean degree 4 | 1.79 -> 0.601 | 1.77 -> 0.595 | 2.98x | 10 of 10 | 243 -> 124 | | FCI | 600 | 1,000 | `fisherz`, mean degree 4 | 2.56 -> 0.800 | 2.53 -> 0.796 | 3.21x | 10 of 10 | 239 -> 129 | | PC with the GCM test | 4 | 150 | additive noise, mean degree 2 | 11.1 -> 1.66 | 11.0 -> 1.63 | 6.65x | 10 of 10 | 176 -> 183 | | IAMB, 5% missing | 60 | 2,000 | `fisherz`, mean degree 4 | 20.0 -> 8.77 | 19.8 -> 8.70 | 2.24x | 10 of 10 | 232 -> 169 | | GES with EM, 30% missing | 20 | 2,000 | BIC, mean degree 4 | 7.34 -> 1.40 | 7.20 -> 1.38 | 5.21x | 10 of 10 | 101 -> 84.3 | | AGES | 100 | 2,000 | BIC, mean degree 2 | 1.39 -> 0.505 | 1.34 -> 0.491 | 2.78x | 10 of 10 | 112 -> 84.6 | | LGES | 200 | 2,000 | BIC, mean degree 2 | 14.1 -> 3.64 | 14.0 -> 3.61 | 3.86x | 10 of 10 | 152 -> 126 | | `import andrey` | - | - | fresh interpreter | 1.05 -> 0.578 | 0.614 -> 0.315 | 1.82x | - | 169 -> 110 | The import case waits on the file system: alone on the node it took 5.96 s on 0.19.0 and 5.81 s on 0.20.0 of wall time, and within 3% of the CPU time in the table. #### Where the time went In 0.19.0, PC at 600 variables spent 75.2% of its fit in the pass with one conditioning variable, and 43.7% at 100 variables (1,000 rows, mean degree 4, `fisherz`; median over 10 datasets). LGES at 100 variables (2,000 rows, mean degree 2) asked for 1,575,425 local scores in 0.19.0 and 160,823.5 in 0.20.0, of 25,083.5 distinct ones (median over the datasets; 1,534,052 in 0.19.0 and 148,309 in 0.20.0, of 24,301 distinct on the first), with the same graph on 10 of 10 datasets. ### Times by family One core, one BLAS thread. Same output counts the datasets on which every fit of both builds returned one graph and, where the method returns them, the same weights. #### PC, FCI, and GFCI `fisherz` at alpha 0.05, the default test of the three methods. | Method | Variables | Rows | Mean degree | Wall (s), 0.19.0 -> 0.20.0 | CPU (s), 0.19.0 -> 0.20.0 | Faster | Same output | |---|---:|---:|---:|---|---|---|---| | PC | 100 | 1,000 | 4 | 0.0678 -> 0.0279 | 0.0675 -> 0.0277 | - | 5 of 5 | | PC | 300 | 1,000 | 4 | 0.480 -> 0.162 | 0.459 -> 0.157 | 2.72x | 5 of 5 | | PC | 200 | 4,000 | 6 | 1.02 -> 0.266 | 1.00 -> 0.254 | 3.96x | 5 of 5 | | FCI | 300 | 1,000 | 4 | 0.757 -> 0.282 | 0.741 -> 0.278 | 2.71x | 5 of 5 | | FCI | 400 | 4,000 | 2 | 0.724 -> 0.336 | 0.712 -> 0.315 | 2.16x | 5 of 5 | | GFCI | 200 | 1,000 | 4 | 1.86 -> 1.71 | 1.80 -> 1.67 | 1.08x | 5 of 5 | #### GES, LGES, AGES, BOSS, and GRaSP The linear-Gaussian BIC, the default score. | Method | Variables | Rows | Mean degree | Wall (s), 0.19.0 -> 0.20.0 | CPU (s), 0.19.0 -> 0.20.0 | Faster | Same output | |---|---:|---:|---:|---|---|---|---| | GES | 500 | 5,000 | 2 | 1.70 -> 1.63 | 1.68 -> 1.61 | 1.05x | 5 of 5 | | LGES | 100 | 2,000 | 2 | 1.76 -> 0.647 | 1.73 -> 0.630 | 2.69x | 5 of 5 | | LGES | 150 | 2,000 | 2 | 5.95 -> 1.80 | 5.90 -> 1.79 | 3.31x | 5 of 5 | | AGES | 50 | 2,000 | 2 | 0.303 -> 0.115 | 0.291 -> 0.112 | 2.57x | 5 of 5 | | AGES | 150 | 2,000 | 2 | 3.32 -> 1.11 | 3.26 -> 1.09 | 2.88x | 5 of 5 | | BOSS | 100 | 1,000 | 2 | 0.386 -> 0.358 | 0.365 -> 0.353 | 1.02x | 5 of 5 | | BOSS | 200 | 1,000 | 4 | 9.34 -> 8.79 | 9.26 -> 8.72 | 1.04x | 5 of 5 | | GRaSP | 100 | 1,000 | 2 | 0.388 -> 0.375 | 0.377 -> 0.370 | 1.01x | 5 of 5 | #### IAMB, Inter-IAMB, and MMPC `fisherz`, the default test. | Method | Variables | Rows | Mean degree | Output | Wall (s), 0.19.0 -> 0.20.0 | CPU (s), 0.19.0 -> 0.20.0 | Faster | Same output | |---|---:|---:|---:|---|---|---|---|---| | IAMB | 300 | 3,000 | 2 | moral graph | 2.18 -> 0.819 | 2.16 -> 0.812 | 2.66x | 5 of 5 | | IAMB | 300 | 3,000 | 2 | CPDAG | 2.44 -> 1.01 | 2.39 -> 0.993 | 2.41x | 5 of 5 | | Inter-IAMB | 300 | 3,000 | 2 | moral graph | 2.78 -> 1.09 | 2.72 -> 1.08 | 2.54x | 5 of 5 | | IAMB | 150 | 2,000 | 4 | CPDAG | 1.23 -> 0.679 | 1.21 -> 0.668 | 1.80x | 5 of 5 | | MMPC | 80 | 2,000 | 3 | skeleton | 0.145 -> 0.123 | 0.143 -> 0.113 | 1.27x | 5 of 5 | #### Discrete scores, hill climbing, and tabu search Categorical data on Erdos-Renyi graphs with mean degree 2 and BDeu, except the last row: tabu search with the linear-Gaussian BIC on many variables and few rows. | Method | Variables | Rows | Score | Wall (s), 0.19.0 -> 0.20.0 | CPU (s), 0.19.0 -> 0.20.0 | Faster | Same output | |---|---:|---:|---|---|---|---|---| | Hill climbing | 40 | 5,000 | BDeu | 0.191 -> 0.135 | 0.188 -> 0.129 | 1.45x | 5 of 5 | | Hill climbing | 40 | 20,000 | BDeu | 0.519 -> 0.321 | 0.507 -> 0.313 | 1.62x | 5 of 5 | | Tabu search | 40 | 5,000 | BDeu | 0.221 -> 0.147 | 0.213 -> 0.146 | 1.49x | 5 of 5 | | GES | 40 | 5,000 | BDeu | 0.236 -> 0.164 | 0.229 -> 0.159 | 1.43x | 5 of 5 | | BOSS | 40 | 5,000 | BDeu | 0.497 -> 0.335 | 0.473 -> 0.327 | 1.46x | 5 of 5 | | Exact search | 12 | 5,000 | BDeu | 2.46 -> 1.74 | 2.44 -> 1.73 | 1.42x | 5 of 5 | | Tabu search | 1,000 | 300 | BIC | 0.663 -> 0.632 | 0.638 -> 0.609 | 1.05x | 5 of 5 | #### Kernel and regression methods and tests Additive noise models with Gaussian noise on Erdos-Renyi graphs with mean degree 2, except LOCI (a location-scale pair), SCORE and NoGAM (the SCORE paper's simulation), and RCD (linear non-Gaussian data with 2 hidden variables). | Method | Variables | Rows | Wall (s), 0.19.0 -> 0.20.0 | CPU (s), 0.19.0 -> 0.20.0 | Faster | Same output | |---|---:|---:|---|---|---|---| | RESIT | 10 | 1,000 | 3.82 -> 2.56 | 3.76 -> 2.50 | 1.49x | 5 of 5 | | CAM-UV | 10 | 1,000 | 2.16 -> 1.44 | 2.10 -> 1.41 | 1.49x | 5 of 5 | | LOCI | 2 | 1,000 | 0.113 -> 0.0739 | 0.110 -> 0.0735 | 1.45x | 5 of 5 | | SCORE | 10 | 1,000 | 0.528 -> 0.492 | 0.521 -> 0.486 | 1.07x | 5 of 5 | | NoGAM | 10 | 1,000 | 5.18 -> 4.67 | 5.15 -> 4.64 | 1.11x | 5 of 5 | | RCD | 12 | 1,000 | 0.295 -> 0.243 | 0.293 -> 0.239 | 1.24x | 5 of 5 | | PC with KCI | 8 | 300 | 0.750 -> 0.503 | 0.734 -> 0.500 | 1.38x | 5 of 5 | | PC with KCI | 8 | 600 | 4.58 -> 3.24 | 4.55 -> 3.22 | 1.35x | 5 of 5 | | PC with wGCM | 4 | 150 | 101 -> 34.8 | 100 -> 34.3 | 2.91x | 5 of 5 | #### Continuous optimization and LiNGAM Linear-Gaussian data with mean degree 2 and 500 rows, except DYNOTEARS (its paper's simulation) and DirectLiNGAM (linear data with uniform noise on scale-free graphs). | Method | Variables | Rows | Setting | Wall (s), 0.19.0 -> 0.20.0 | CPU (s), 0.19.0 -> 0.20.0 | Faster | Same output | |---|---:|---:|---|---|---|---|---| | NOTEARS | 20 | 500 | default | 0.704 -> 0.646 | 0.696 -> 0.642 | 1.09x | 5 of 5 | | NOTEARS | 10 | 500 | `robust=True` | 35.1 -> 22.8 | 34.8 -> 22.7 | 1.54x | 5 of 5 | | DAGMA | 10 | 500 | default | 0.954 -> 0.768 | 0.945 -> 0.759 | 1.24x | 5 of 5 | | DAGMA | 40 | 500 | default | 3.36 -> 2.92 | 3.32 -> 2.88 | 1.16x | 5 of 5 | | DYNOTEARS | 10 | 500 | default | 0.390 -> 0.379 | 0.378 -> 0.349 | 1.12x | 5 of 5 | | CALM | 10 | 500 | default | 6.58 -> 5.48 | 6.49 -> 5.41 | 1.19x | 5 of 5 | | DirectLiNGAM | 100 | 2,000 | `measure="skew"` | 2.54 -> 1.89 | 2.52 -> 1.86 | 1.35x | 5 of 5 | | DirectLiNGAM | 20 | 1,000 | default | 0.0838 -> 0.0752 | 0.0831 -> 0.0744 | - | 5 of 5 | #### Missing values Values missing completely at random, at the rate each row gives; linear-Gaussian data with mean degree 4, except the chi-square row (categorical data) and PCMCI (its paper's simulation, `tau_max` 5). The structural EM rows use `missing="em"`; the others use test-wise deletion, the default. | Method | Variables | Rows | Missing | Setting | Wall (s), 0.19.0 -> 0.20.0 | CPU (s), 0.19.0 -> 0.20.0 | Faster | Same output | |---|---:|---:|---:|---|---|---|---|---| | PC | 200 | 1,000 | 5% | `fisherz` | 8.83 -> 6.26 | 8.77 -> 6.22 | 1.32x | 5 of 5 | | Inter-IAMB | 30 | 1,000 | 5% | `fisherz` | 2.54 -> 0.880 | 2.50 -> 0.841 | 2.94x | 5 of 5 | | IAMB | 60 | 3,000 | 5% | `chisq` | 22.1 -> 4.69 | 21.9 -> 4.66 | 4.61x | 5 of 5 | | MMPC, every column a target | 100 | 2,000 | 5% | `fisherz` | 17.4 -> 2.35 | 17.0 -> 2.29 | 7.94x | 5 of 5 | | GES | 20 | 2,000 | 5% | structural EM | 2.03 -> 1.01 | 1.94 -> 0.966 | 1.91x | 5 of 5 | | GES | 50 | 5,000 | 10% | structural EM | 23.0 -> 9.71 | 22.9 -> 9.64 | 2.41x | 5 of 5 | | BOSS | 20 | 2,000 | 30% | structural EM | 8.17 -> 2.24 | 8.06 -> 2.19 | 3.65x | 5 of 5 | | PCMCI | 40 | 2,000 | 5% | `fisherz` | 12.4 -> 4.85 | 12.3 -> 4.83 | 2.39x | 5 of 5 | #### PCMCI family Each method on its paper's simulation, except J-PCMCI+ (Andrey's sampler of series with context variables) and Regime-PCMCI (two series that switch regimes). LPCMCI's data have 10 series, of which 3 are unobserved, so it reads 7. | Method | Variables | Steps | Setting | Wall (s), 0.19.0 -> 0.20.0 | CPU (s), 0.19.0 -> 0.20.0 | Faster | Same output | |---|---:|---:|---|---|---|---|---| | PCMCI | 40 | 2,000 | `tau_max` 5 | 0.346 -> 0.227 | 0.324 -> 0.224 | 1.38x | 5 of 5 | | PCMCI+ | 40 | 2,000 | `tau_max` 5 | 0.162 -> 0.144 | 0.157 -> 0.140 | 1.15x | 5 of 5 | | LPCMCI | 7 | 1,000 | `tau_max` 3 | 0.117 -> 0.107 | 0.115 -> 0.102 | 1.12x | 5 of 5 | | J-PCMCI+ | 15, with 3 context variables | 10 datasets of 100 | `tau_max` 2 | 0.917 -> 0.496 | 0.898 -> 0.493 | 1.83x | 5 of 5 | | Regime-PCMCI | 2 | 1,000 | 5 starts | 0.481 -> 0.423 | 0.474 -> 0.421 | - | 3 of 3, 2 not finished | Regime-PCMCI's row holds three of the five datasets: on the other two both builds raise the same `RegimeFitError`, so those fits have no time and no output to compare, and we give no speedup. ### Start-up A fresh interpreter for each of 10 runs, after one discarded run that warms the file cache. `python -c pass` gives the interpreter's own floor. | Case | Wall (s), 0.19.0 -> 0.20.0 | CPU (s), 0.19.0 -> 0.20.0 | Faster | |---|---|---|---| | The interpreter alone | 0.0177 -> 0.0179 | 0.0112 -> 0.0113 | - | | `import andrey` | 1.05 -> 0.578 | 0.614 -> 0.315 | 1.82x | | Import and one PC fit, 10 variables, 500 rows | 5.66 -> 4.11 | 0.989 -> 0.429 | - | | Import and a first DirectLiNGAM fit, 20 variables, 1,000 rows | 14.4 -> 6.93 | 2.55 -> 1.31 | - | | Import and a first PC fit with KCI, 4 variables, 200 rows | 6.12 -> 3.90 | 1.01 -> 0.759 | - | Wall times here wait on the file system, which CPU times do not: the slowest of the 10 runs of a case that imports and fits took 2.46 to 11.8 times the fastest on the build that varied more (1.31 for the interpreter alone), so we give no speedup. `import andrey` is in the headline cases above. ### Slower or more memory Where 0.20.0 took longer or held more memory than 0.19.0 in the settings we timed. ANM now runs on one BLAS thread, so on the four cores we gave it its wall time rose from 1.28 s to 1.97 s while its CPU time fell from 5.76 s to 1.96 s. Each worker is a process of its own, so IAMB, RESIT, and CPCM with 4 or 8 workers peak at more memory than 0.19.0's serial fit, in return for the wall times in [Worker processes](#worker-processes); the peak is measured as in [Memory](#memory). KCI keeps up to 256 MB of each of three kinds of matrix, 768 MB in all, where it kept 512 MB, and PC with KCI at 600 rows peaked at 995 MB where 0.19.0 peaked at 843 MB; at 300 rows its peak fell. Three other settings peaked 2 to 7 MB higher. LPCMCI keeps factors for its long searches, up to 1 GiB per fit; we timed no long LPCMCI search, and the one LPCMCI setting we timed ([PCMCI family](#pcmci-family)) peaked at 164 MB on 0.19.0 and 77.6 MB on 0.20.0. | Method | Variables | Rows | Cores or workers | Wall (s), 0.19.0 -> 0.20.0 | CPU (s), 0.19.0 -> 0.20.0 | Peak memory (MB), 0.19.0 -> 0.20.0 | Same output | |---|---:|---:|---:|---|---|---|---| | ANM, additive noise pair | 2 | 1,000 | 4 | 1.28 -> 1.97 | 5.76 -> 1.96 | 249 -> 244 | 5 of 5 | | PC with KCI | 8 | 600 | 1 | 4.58 -> 3.24 | 4.55 -> 3.22 | 843 -> 995 | 5 of 5 | | PC with the GCM test | 4 | 150 | 1 | 11.1 -> 1.66 | 11.0 -> 1.63 | 176 -> 183 | 10 of 10 | | SCORE | 10 | 1,000 | 1 | 0.528 -> 0.492 | 0.521 -> 0.486 | 135 -> 138 | 5 of 5 | | GES with structural EM, 10% missing | 50 | 5,000 | 1 | 23.0 -> 9.71 | 22.9 -> 9.64 | 119 -> 121 | 5 of 5 | | IAMB, moral graph | 600 | 2,000 | 4 workers | 14.9 -> 1.77 | 14.8 -> 5.56 | 223 -> 652 | 5 of 5 | | IAMB, moral graph | 600 | 2,000 | 8 workers | 15.0 -> 1.09 | 14.9 -> 5.71 | 223 -> 1,040 | 5 of 5 | | RESIT, additive noise | 20 | 500 | 4 workers | 18.8 -> 9.84 | 18.7 -> 19.2 | 134 -> 650 | 5 of 5 | | RESIT, additive noise | 20 | 500 | 8 workers | 18.7 -> 9.28 | 18.7 -> 20.5 | 133 -> 1,080 | 5 of 5 | | CPCM graph search, `"gaussian"` | 4 | 500 | 4 workers | 11.9 -> 4.39 | 11.9 -> 12.0 | 184 -> 609 | 5 of 5 | | CPCM graph search, `"gaussian"` | 4 | 500 | 8 workers | 11.9 -> 3.30 | 11.9 -> 12.2 | 184 -> 994 | 5 of 5 | **No measurable change.** GES at 500 variables (1.04x to 1.06x over its datasets), BOSS at 100 variables (1.01x to 1.08x), BOSS at 200 variables with mean degree 4 (1.02x to 1.07x), GRaSP at 100 variables (0.968x to 1.05x), and tabu search at 1,000 variables (1.01x to 1.09x) lie inside the run-to-run spread. ### Dependency floors Andrey 0.20.0 needs newer versions of its dependencies. scikit-learn 1.9 and PyTorch 2.5 are the versions from which the faster least-squares fits of the LiNGAM methods and CALM's Adam step return the bytes of the code they replace, so there is no second code path for older ones. NumPy's floor is not a test result: 1.26 is outside the scientific Python support window. Each other floor is the oldest version on which the test suite passes with every direct dependency at its oldest allowed version. | Package | Was | Now | Below the new floor | |---|---|---|---| | scikit-learn | 1.5 | 1.9 | the faster least-squares fits would need a second code path | | PyTorch (`torch` extra) | 2.2 | 2.5 | CALM's inline Adam step would need a second code path | | NumPy | 1.26 | 2.0 | outside the scientific Python support window | | SciPy | 1.13 | 1.14 | NoGAM raises on an empty system | | pandas | 2.2 | 2.2.2 | does not install beside NumPy 2 | | statsmodels | 0.14 | 0.14.2 | does not work with NumPy 2 | | networkx | 3 | 3.3 | the tests' d-separation oracle is missing | | typer | 0.12.4 | 0.26 | the command words its usage errors differently | | threadpoolctl | 3 | 3.5 | scikit-learn 1.9 already requires it | | matplotlib (`viz` extra) | 3.7 | 3.8.4 | does not work with NumPy 2 | At the release's freeze, the test suite ran without the `release`-marked checks on Python 3.11 with every direct dependency at its floor (`{{check: lowest-versions | versions}}`), at `{{check: lowest-versions | commit}}`: `{{check: lowest-versions | passed, skipped, failed}}`. On SciPy 1.14, NOTEARS and DYNOTEARS take `scipy.linalg.expm` and Regime-PCMCI `scipy.optimize.linprog`, the code the faster paths replace, so the tests of those paths skip there. ## LGES `andrey.lges` is less greedy equivalence search (Ejaz and Bareinboim, 2025), a score search beside GES. Before each addition it takes one DAG of the current class and leaves out every pair that the DAG scores better without; it deletes and reverses edges as GES and GIES do. LGES is supported in 0.20.0. `insertion="conservative"` (ConservativeInsert), which also leaves out a pair when any valid addition of its edge worsens the score, is the default; `insertion="safe"` (SafeInsert), the rule the paper's proof of recovery covers, stays as an option. The [API reference](../api.md#supported-methods) describes both. We drew the paper's simulation with the authors' generator, unmodified: Erdos-Renyi DAGs from sempler's `dag_avg_deg` with an average degree of 1, 2, or 3, linear-Gaussian data, and the columns in a random order. The paper's text names these graphs ER1 to ER3; its released code draws them with an average degree of 1 to 3, and we follow the code. The 19 settings are the ones the paper ran: 10,000 rows at 10, 20, 50, 100, and 150 variables and each degree, and 1,000 rows at degree 2 and 10, 25, 50, and 100 variables. Each setting has 20 datasets. The 13 settings where, on those datasets, another method made fewer errors than LGES and took less time ran again on 20 fresh datasets. LGES uses the paper's score, the standard BIC (`ebic_gamma=0.0`, its default). We fitted GES with the same score (`ebic_gamma=0.0`), GES and BOSS at their defaults (the extended BIC, `ebic_gamma=1.0`, a larger penalty per edge), and PC at its defaults (Fisher's z at 0.05). SHD counts the edge errors between the estimated and the true CPDAG, and the empty graph's SHD is the number of true edges. Andrey's errors are those of the 0.20.0 pre-release of November 26, 2026 (commit d9e6efdde); the pre-release of November 27 (commit 5bf71fec6) returned the same graph on all 640 datasets for every method in the tables, and its seconds are the ones shown: every fit of that build ran on one AMD EPYC 7713 core with one BLAS thread, with Python 3.14.4, NumPy 2.4.6, and SciPy 1.17.1, and the methods of one dataset ran back to back in one process, so their times are paired. ### LGES beside GES, BOSS, and PC The table gives the mean SHD over the 20 datasets of each setting. | Variables | Degree | Rows | Empty graph | LGES, conservative | LGES, safe | GES, standard BIC | GES | BOSS | PC | |---:|---:|---:|---:|---:|---:|---:|---:|---:|---:| | 10 | 1 | 10,000 | 5.2 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.2 | | 20 | 1 | 10,000 | 9.8 | 0.7 | 1.1 | 1.1 | 0.1 | 0.0 | 3.3 | | 50 | 1 | 10,000 | 26.5 | 3.2 | 5.3 | 7.1 | 0.1 | 1.9 | 18.9 | | 100 | 1 | 10,000 | 52.4 | 11.4 | 23.9 | 29.1 | 1.1 | 1.6 | 63.2 | | 150 | 1 | 10,000 | 76.8 | 24.7 | 48.0 | 60.1 | 0.5 | 3.1 | 149.2 | | 10 | 2 | 10,000 | 10.3 | 0.1 | 0.1 | 0.2 | 0.0 | 0.4 | 2.8 | | 20 | 2 | 10,000 | 19.4 | 2.7 | 3.1 | 5.3 | 5.2 | 0.6 | 4.5 | | 50 | 2 | 10,000 | 50.2 | 4.9 | 7.2 | 12.0 | 3.4 | 2.4 | 12.8 | | 100 | 2 | 10,000 | 101.8 | 12.6 | 23.8 | 31.6 | 4.5 | 7.8 | 35.5 | | 150 | 2 | 10,000 | 151.4 | 33.3 | 53.5 | 64.8 | 5.5 | 9.6 | 68.7 | | 10 | 3 | 10,000 | 14.9 | 3.6 | 5.2 | 9.0 | 8.4 | 2.1 | 5.5 | | 20 | 3 | 10,000 | 29.2 | 3.0 | 3.4 | 11.5 | 10.1 | 1.6 | 11.4 | | 50 | 3 | 10,000 | 77.0 | 16.4 | 18.2 | 24.4 | 20.8 | 3.1 | 27.6 | | 100 | 3 | 10,000 | 148.6 | 32.9 | 46.0 | 63.2 | 35.8 | 4.3 | 52.3 | | 150 | 3 | 10,000 | 228.9 | 41.2 | 54.3 | 88.4 | 33.5 | 5.2 | 77.8 | | 10 | 2 | 1,000 | 10.3 | 1.6 | 1.1 | 2.9 | 2.0 | 0.8 | 3.6 | | 25 | 2 | 1,000 | 25.2 | 4.2 | 6.8 | 8.8 | 3.6 | 1.6 | 7.0 | | 50 | 2 | 1,000 | 50.2 | 16.1 | 19.9 | 27.2 | 5.9 | 2.7 | 17.6 | | 100 | 2 | 1,000 | 101.8 | 52.3 | 73.8 | 81.0 | 9.6 | 6.9 | 41.1 | The median seconds of a fit, on the pre-release of November 27: | Variables | Degree | Rows | LGES, conservative | LGES, safe | GES, standard BIC | GES | BOSS | PC | |---:|---:|---:|---:|---:|---:|---:|---:|---:| | 10 | 1 | 10,000 | 0.02 | 0.03 | 0.02 | 0.02 | 0.02 | 0.01 | | 20 | 1 | 10,000 | 0.04 | 0.04 | 0.03 | 0.03 | 0.04 | 0.02 | | 50 | 1 | 10,000 | 0.13 | 0.15 | 0.08 | 0.07 | 0.10 | 0.02 | | 100 | 1 | 10,000 | 0.51 | 0.56 | 0.22 | 0.21 | 0.29 | 0.05 | | 150 | 1 | 10,000 | 1.10 | 1.22 | 0.35 | 0.29 | 0.47 | 0.08 | | 10 | 2 | 10,000 | 0.03 | 0.03 | 0.03 | 0.03 | 0.04 | 0.01 | | 20 | 2 | 10,000 | 0.10 | 0.10 | 0.05 | 0.05 | 0.10 | 0.02 | | 50 | 2 | 10,000 | 0.39 | 0.38 | 0.14 | 0.13 | 0.36 | 0.03 | | 100 | 2 | 10,000 | 1.26 | 1.43 | 0.34 | 0.31 | 1.01 | 0.05 | | 150 | 2 | 10,000 | 2.71 | 2.82 | 0.57 | 0.47 | 1.48 | 0.08 | | 10 | 3 | 10,000 | 0.06 | 0.06 | 0.04 | 0.04 | 0.06 | 0.01 | | 20 | 3 | 10,000 | 0.13 | 0.13 | 0.06 | 0.07 | 0.17 | 0.02 | | 50 | 3 | 10,000 | 0.54 | 0.55 | 0.16 | 0.15 | 0.81 | 0.04 | | 100 | 3 | 10,000 | 1.90 | 2.02 | 0.40 | 0.37 | 2.76 | 0.07 | | 150 | 3 | 10,000 | 6.26 | 5.69 | 0.83 | 0.72 | 8.36 | 0.15 | | 10 | 2 | 1,000 | 0.03 | 0.03 | 0.02 | 0.02 | 0.03 | 0.01 | | 25 | 2 | 1,000 | 0.09 | 0.09 | 0.04 | 0.04 | 0.07 | 0.01 | | 50 | 2 | 1,000 | 0.32 | 0.34 | 0.10 | 0.09 | 0.26 | 0.02 | | 100 | 2 | 1,000 | 1.74 | 1.74 | 0.34 | 0.22 | 0.70 | 0.04 | Below, errors are compared by the 95% bootstrap interval of the paired difference in SHD, and times by that of the paired ratio of seconds, on the first 20 datasets of each setting. A method counts as having both fewer errors and less time in a setting only when the 20 fresh datasets repeat both. - **Against GES with the same score.** LGES made fewer errors than GES with the standard BIC in 15 of the 19 settings and as many in 4, under both rules; that GES took less time in all 19. - **Against GES at its default.** With ConservativeInsert, GES made fewer errors in 8 settings, as many in 9, and more in 2 (10 and 20 variables, degree 3, 10,000 rows); with SafeInsert, fewer in 11, as many in 6, and more in the same 2. GES took less time in all 19, a geometric mean of 1.1 to 8.0 times less per setting. It made fewer errors and took less time, repeated on the fresh datasets, in 7 settings with ConservativeInsert (50, 100, and 150 variables at degree 1 and 100 and 150 at degree 2, with 10,000 rows, and 50 and 100 variables with 1,000 rows) and in 11 with SafeInsert. - **Against BOSS.** BOSS made fewer errors than LGES in 13 settings with ConservativeInsert and 14 with SafeInsert, and as many in the others. It took less time in 8, about the same in 6 or 7, and more in 5 or 4, all of them at degree 3. It made fewer errors and took less time, repeated on the fresh datasets, in 6 settings with ConservativeInsert and 7 with SafeInsert. - **Against PC.** PC made fewer errors in 1 setting (100 variables, degree 2, 1,000 rows) under both rules, and LGES fewer in 15 with ConservativeInsert and 12 with SafeInsert. PC took less time in all 19. - **Where LGES leads.** Only at 20 variables, degree 3, with 10,000 rows did LGES make fewer errors than every method that took less time, under both rules. - **Against the empty graph.** Both rules, and the authors' code, made fewer errors than the empty graph in all 19 settings. ### LGES against its authors' code We ran the authors' code (CausalAILab/lges at commit 0fd41f7, unmodified, with Python 3.11.15, NumPy 1.26.4, and SciPy 1.13.1) on the same datasets in two forms: its released entry point, which runs LGES-0 in the released phase order (Andrey's `schedule="lges0_released"`), and its step functions called in Algorithm 1's order by a script of ours (Andrey's default `schedule="lges"`), since the code has no entry point for Algorithm 1. Both forms ran on all 20 datasets up to 50 variables; at 100 variables Algorithm 1 ran on 20 and the released entry point on 10, and at 150 variables both on 10. A fit was stopped at 1,800 s, or 3,600 s at 150 variables. Of 1,320 fits, 1,311 finished; the 9 others, 6 at 100 variables and 3 at 150, all at degree 3, are left out of every comparison. - With position ties (`andrey.config(tie_break="position")`), Andrey returned the CPDAG of the authors' code in all 1,311 finished fits, under both schedules and both insertion rules. - With the default rank ties, Andrey can read another DAG of the same class. Of the 76 comparisons (19 settings, two schedules, two rules), the paired difference in SHD had an interval containing 0 in 74. With `schedule="lges0_released"` and SafeInsert, Andrey made more errors at 150 variables, degree 2, on the first 10 datasets (+10.90 [0.20, 29.00]) and fewer on 10 fresh ones (-5.20 [-11.50, -0.60]), and fewer at 50 variables, degree 3 (-3.45 [-6.55, -1.05]), which we did not rerun. ### ConservativeInsert and SafeInsert We compared the two rules on the pre-release of November 25, 2026 (commit 117e0fd31), with the authors' generator and both schedules: 30 settings at an average degree of 1, 2, and 3, with 10, 20, 50, 100, and 150 variables and 1,000 and 10,000 rows, 50 datasets each, and 50 fresh datasets for each setting with a difference on the first ones. Both rules ran back to back in one process on one core; the CPU model was not recorded, so the times are read as paired ratios only. The table gives the mean SHD under the default schedule and the difference, ConservativeInsert minus SafeInsert, with its 95% bootstrap interval; a blank fresh entry is a setting not run again. | Variables | Degree | Rows | Empty graph | SafeInsert | ConservativeInsert | Difference | Fresh datasets | |---:|---:|---:|---:|---:|---:|---|---| | 10 | 1 | 1,000 | 4.8 | 1.06 | 0.60 | -0.46 [-0.80, -0.18] | -0.30 [-0.56, -0.10] | | 10 | 1 | 10,000 | 4.8 | 0.60 | 0.48 | -0.12 [-0.28, 0.00] | | | 20 | 1 | 1,000 | 9.5 | 2.92 | 2.00 | -0.92 [-1.30, -0.58] | -1.02 [-1.54, -0.58] | | 20 | 1 | 10,000 | 9.5 | 0.56 | 0.40 | -0.16 [-0.36, 0.00] | | | 50 | 1 | 1,000 | 23.7 | 19.08 | 11.06 | -8.02 [-9.74, -6.36] | -6.48 [-7.64, -5.34] | | 50 | 1 | 10,000 | 23.7 | 5.52 | 2.98 | -2.54 [-3.22, -1.88] | -2.58 [-3.30, -1.92] | | 100 | 1 | 1,000 | 49.4 | 70.30 | 46.74 | -23.56 [-26.50, -20.70] | -23.92 [-25.92, -22.00] | | 100 | 1 | 10,000 | 49.4 | 21.70 | 11.24 | -10.46 [-11.96, -8.96] | -10.56 [-11.98, -9.20] | | 150 | 1 | 1,000 | 74.3 | 152.76 | 115.52 | -37.24 [-39.94, -34.44] | -41.96 [-46.50, -37.74] | | 150 | 1 | 10,000 | 74.3 | 50.92 | 26.68 | -24.24 [-26.46, -22.06] | -22.96 [-25.26, -20.78] | | 10 | 2 | 1,000 | 10.0 | 2.10 | 1.88 | -0.22 [-0.58, 0.00] | 0.12 [-0.40, 0.98] | | 10 | 2 | 10,000 | 10.0 | 1.40 | 1.32 | -0.08 [-0.22, 0.00] | | | 20 | 2 | 1,000 | 19.6 | 5.98 | 4.90 | -1.08 [-1.84, -0.36] | -1.68 [-3.00, -0.64] | | 20 | 2 | 10,000 | 19.6 | 1.72 | 1.14 | -0.58 [-0.94, -0.26] | -0.50 [-1.34, 0.20] | | 50 | 2 | 1,000 | 48.5 | 20.32 | 12.16 | -8.16 [-10.26, -6.32] | -7.80 [-9.82, -6.06] | | 50 | 2 | 10,000 | 48.5 | 6.54 | 3.92 | -2.62 [-3.48, -1.84] | -2.76 [-3.60, -2.00] | | 100 | 2 | 1,000 | 97.5 | 68.90 | 51.00 | -17.90 [-20.26, -15.56] | -18.14 [-21.10, -15.34] | | 100 | 2 | 10,000 | 97.5 | 22.42 | 12.98 | -9.44 [-11.06, -7.86] | -10.10 [-11.98, -8.20] | | 150 | 2 | 1,000 | 148.1 | 148.66 | 118.18 | -30.48 [-34.24, -26.66] | -30.24 [-34.00, -26.48] | | 150 | 2 | 10,000 | 148.1 | 51.46 | 29.84 | -21.62 [-23.88, -19.18] | -22.58 [-24.90, -20.26] | | 10 | 3 | 1,000 | 15.2 | 8.44 | 8.28 | -0.16 [-1.22, 0.98] | | | 10 | 3 | 10,000 | 15.2 | 6.80 | 6.84 | 0.04 [0.00, 0.12] | | | 20 | 3 | 1,000 | 29.7 | 13.74 | 14.66 | 0.92 [-1.08, 3.38] | | | 20 | 3 | 10,000 | 29.7 | 9.58 | 10.12 | 0.54 [-1.04, 2.42] | | | 50 | 3 | 1,000 | 72.2 | 32.08 | 29.02 | -3.06 [-7.82, 2.54] | | | 50 | 3 | 10,000 | 72.2 | 16.60 | 14.02 | -2.58 [-4.28, -1.28] | -4.22 [-8.08, -1.60] | | 100 | 3 | 1,000 | 147.5 | 79.84 | 64.56 | -15.28 [-19.30, -11.34] | -13.82 [-18.40, -9.72] | | 100 | 3 | 10,000 | 147.5 | 30.78 | 22.14 | -8.64 [-11.16, -6.64] | -7.28 [-11.54, -2.82] | | 150 | 3 | 1,000 | 222.4 | 145.22 | 124.52 | -20.70 [-24.56, -17.16] | -25.72 [-31.22, -20.32] | | 150 | 3 | 10,000 | 222.4 | 54.10 | 35.58 | -18.52 [-24.70, -13.68] | -16.84 [-23.56, -11.24] | - ConservativeInsert made fewer errors in 20 of the 30 settings under Algorithm 1 and in 19 under `schedule="lges0_released"`, on the first and the fresh datasets. SafeInsert made fewer in none, here or at the denser degrees below. - On the first datasets, averaged over the 30 settings under Algorithm 1, ConservativeInsert drew fewer extra adjacencies (21.23 against 25.91 per fit) and reversed fewer edges (4.53 against 8.74), and missed about as many (0.41 against 0.42). - ConservativeInsert took less time in 21 of the 30 settings under Algorithm 1 and 20 under `schedule="lges0_released"`, and more in none; the median paired ratio of its time to SafeInsert's was 0.84 to 1.00. - With 1,000 rows on the sparsest graphs, a setting the paper did not run, LGES made more errors than the empty graph: at 100 variables, degree 1, with SafeInsert; at 150 variables, degree 1, with both rules; and at 150 variables, degree 2, with SafeInsert. Most of its errors there are extra adjacencies. - At degree 4 and 6, the density the paper's text gives (k times the variables in expected edges for ER-k), up to 100 and 50 variables with 20 and 20 fresh datasets, the rules tied in every setting but one, where ConservativeInsert made fewer errors (50 variables, degree 4, 10,000 rows, `schedule="lges0_released"`). At degree 6 both made more errors than the empty graph from 20 variables. ## Regime-PCMCI `andrey.rpcmci` is Regime-PCMCI (Saggioro et al., 2020), for one time series whose lagged links switch between a few persistent regimes. It is supported in 0.20.0. The [API reference](../api.md#supported-methods) describes it. We simulated the paper's six toy models: the five two-variable models of its Table 1 with two regimes (arrow direction, causal effect, lag, sign X1, and sign X1X2) and the three-regime model of its Table 4, 20 series of 3,000 steps each (the paper does not state the length for three regimes). Every fit used the paper's settings: partial correlation, `alpha_level=0.01`, `pc_alpha=0.2`, `tau_max=3`, the true number of regimes, `max_transitions=40` (the series have 33 to 43 switches), `max_iter=20`, `n_starts=50`, and `switch_threshold=0.5`. A start whose regime keeps too few steps for a test fails; it is counted, never scored. Andrey ran on the 0.20.0 pre-release of November 26, 2026 (commit d9e6efdde), one fit per AMD EPYC 7713 core with one BLAS thread. ### Regime-PCMCI against Tigramite We compared it with Tigramite 5.2.10.1's RPCMCI, the authors' code (Python 3.12.12), start by start on the first three series of each model: start `a` from seed `a`, five starts per series, each package one start per call. Every start that ran in both returned the same regime weights (the largest difference 4.5e-14), the same regime of each step, and the same graphs: | Model | Starts that ran in both | Same result | Differ | Ran in one only | Failed in both | |---|---:|---:|---:|---:|---:| | arrow direction | 15 | 15 | 0 | 0 | 0 | | causal effect | 15 | 15 | 0 | 0 | 0 | | lag | 15 | 15 | 0 | 0 | 0 | | sign X1 | 15 | 15 | 0 | 0 | 0 | | sign X1X2 | 15 | 15 | 0 | 0 | 0 | | three regimes | 10 | 10 | 0 | 0 | 5 | The number of weights each iteration changed agreed in 84 of the 85 starts; in the other, one iteration's count differs and the final weights, regimes, and graphs are the same. A fit with several starts keeps the start with the lowest objective, which Tigramite does not return, so we also called Tigramite once per series with five starts and compared the fit it returns with the start of the lowest objective by Andrey's rule (Andrey's single starts rerun on the pre-release of November 27, commit 5bf71fec6, gave the same results bit for bit). Tigramite returned that start's fit on 18 of the 18 series: the same start on 15, and on 3 a fit that several starts reached, Andrey's pick among them. ### Regime-PCMCI beside PCMCI on the whole series The table compares Regime-PCMCI with `andrey.pcmci` run on the whole series with the same test and `tau_max`, which returns one graph scored against every regime's. Regime accuracy is the share of steps from step `tau_max` in the right regime, under the best relabeling, beside a constant assignment to the largest regime. SHD counts the lagged-link errors summed over the regimes, beside the empty graph's and PCMCI's given the true regimes. Values are means over the 20 series, with the 95% bootstrap interval of the paired difference; seconds are medians per fit. | Model | Accuracy | Constant | SHD: Regime-PCMCI | PCMCI, whole series | Difference | Empty graph | PCMCI, true regimes | Failed starts of 50 | Fit, s: Regime-PCMCI | PCMCI | |---|---:|---:|---:|---:|---|---:|---:|---:|---:|---:| | arrow direction | 0.962 | 0.510 | 0.55 | 7.90 | -7.35 [-8.05, -6.60] | 6.00 | 0.15 | 0.0 | 94 | 0.007 | | causal effect | 0.534 | 0.510 | 2.95 | 2.80 | +0.15 [-0.60, +0.85] | 4.00 | 0.25 | 0.1 | 89 | 0.009 | | lag | 0.946 | 0.510 | 0.60 | 3.00 | -2.40 [-3.15, -1.75] | 6.00 | 0.20 | 0.1 | 130 | 0.007 | | sign X1 | 0.978 | 0.510 | 0.25 | 4.30 | -4.05 [-4.40, -3.75] | 4.00 | 0.10 | 0.7 | 88 | 0.007 | | sign X1X2 | 0.978 | 0.510 | 0.40 | 1.90 | -1.50 [-1.90, -1.00] | 6.00 | 0.25 | 1.1 | 87 | 0.007 | | three regimes | 0.946 | 0.347 | 0.60 | 4.15 | -3.55 [-4.20, -3.00] | 9.00 | 0.30 | 9.1 | 734 | 0.006 | - Where the regimes differ in the direction, the lag, or the sign of a link, Regime-PCMCI made fewer errors than PCMCI on the whole series, by the interval, in all five models. - In "causal effect", where only a link's strength changes, its regime accuracy was 0.534 against the constant assignment's 0.510, and its errors were the whole-series PCMCI's within the interval. - Every model's regime accuracy was above the constant assignment's and its SHD below the empty graph's, by the interval. - PCMCI on the whole series took under 0.01 s; Regime-PCMCI took 87 to 130 s with two regimes and 734 s with three, where 9.1 of the 50 starts failed per fit on average. Beside the paper's Tables 3 and 6 (100 series per model; ours 20, all links of lags 1 to 3 pooled over the series), with the regime error the share of wrongly assigned steps: | Model | Regime error, paper | Andrey | True positive rate, paper | Andrey | False positive rate, paper | Andrey | |---|---:|---:|---:|---:|---:|---:| | arrow direction | 3.0% | 3.8% | 1.00 | 1.000 | 0.02 | 0.031 | | causal effect | 43.0% | 46.6% | 0.81 | 0.912 | 0.11 | 0.130 | | lag | 6.0% | 5.4% | 0.98 | 1.000 | 0.04 | 0.033 | | sign X1 | 4.0% | 2.2% | 0.98 | 1.000 | 0.03 | 0.013 | | sign X1X2 | 3.0% | 2.2% | 0.99 | 1.000 | 0.01 | 0.022 | | three regimes | 4.0% | 5.4% | 0.98 | 0.994 | 0.05 | 0.020 | ## The GCM, wGCM, and PCM tests `indep_test="gcm"` is the generalized covariance measure (Shah and Peters, 2020), `"wgcm"` the weighted generalized covariance measure (Scheidegger, Hörrmann, and Bühlmann, 2022), and `"pcm"` the projected covariance measure (Lundborg, Kim, Shah, and Samworth, 2024). The wGCM and PCM are supported in 0.20.0, and the GCM stays experimental ([The tests in PC](#the-tests-in-pc)). The [API reference](../api.md) describes each, and the [0.19.0 card](0.19.0.md#the-gcm-wgcm-and-pcm-tests) has their agreement with the authors' code query by query. We measured the level of each test on the null designs of its paper, its power against the authors' code on the same draws, the GCM beside KCI and the wGCM beside the GCM, the paper's comparators, and PC with each test on the nonlinear data of the quality gate. Every test is at 0.05, the GCM and the wGCM with their default boosted trees and PCM with its default additive regression. The authors' code is GeneralisedCovarianceMeasure 0.2.0 (`gcm.test` with xgboost) and weightedGCM 0.1.2 (`wgcm.est`, and `wgcm.fix` with 7 weights), in R 4.6.1, run unmodified on the same draws. Andrey's p-values in the power, KCI level, and PC tables are those of the 0.20.0 pre-release of November 27, 2026 (commit 5bf71fec6). A rerun of Andrey's side on the later pre-release of that day (commit ab290b40b), on AMD EPYC 7713 cores with one BLAS thread, returned every one of the 3,600 draws' p-values bit for bit, and the same SHD and number of tests in the 40 PC fits with the GCM and the wGCM; its seconds are the ones shown. ### Level On the GCM paper's null designs (its Section 5.2) at 200 rows, Andrey's GCM and `gcm.test` share the draws of the 0.19.0 comparison, measured on 0.19.0 pre-release builds; KCI ran on 500 fresh draws per design and size. The table gives the share of true independences rejected: | Null design | Rows | Draws | GCM: Andrey | gcm.test | KCI | |---|---:|---:|---:|---:|---:| | (a) a = 2 | 200 | 500 | 8.6% | 7.4% | 5.6% | | (a) a = 2 | 400 | 500 | | | 5.8% | | (b) a = 4 | 200 | 500 | 11.4% | 8.8% | 93.6% | | (b) a = 4 | 400 | 500 | | | 99.6% | | (c) bivariate Z | 200 | 500 | 4.0% | 3.4% | 9.0% | | (c) bivariate Z | 400 | 500 | | | 6.6% | | (e) multiplicative noise | 200 | 500 | 4.2% | 4.0% | 6.2% | | (e) multiplicative noise | 400 | 500 | | | 9.0% | - Over the 36 comparisons of those records (12 null designs of the two papers, for the GCM and the wGCM's `"est"` and `"fix"`), Andrey rejected more often than the authors' code by the interval in 2, both GCM: design (b) at 200 rows (11.4% against 8.8%) and the wGCM paper's (1D) null over its grid at 200 rows (8.6% against 7.2%). Neither repeated on fresh draws, 500 and 1,000 of them: 10.6% against 9.4%, and 6.9% against 6.8%. The wGCM rejected less often than weightedGCM 0.1.2 in 2, `"est"` and `"fix"` on (1D) with (b1, b2) = (0, 0) at 400 rows (4.0% and 4.8% against 7.8% and 8.4%). - On design (b), KCI rejected 93.6% of the true independences at 200 rows and 99.6% at 400; it also rejected more than 5% by the Wilson interval on (c) at 200 rows and (e) at 400. - On the wGCM paper's (10D.NonAdd) null at 400 rows with (b1, b2) = (1/2, 1/2), 200 draws, Andrey's `"est"` rejected 8.0% (weightedGCM 5.0%), `"fix"` 6.0% (5.5%), and the GCM 5.0%; every difference has an interval containing 0. On the wGCM paper's Figure 3 grid at 400 rows, (1D) and (10D.Add) with (b1, b2) in $\{0, 1/3, 2/3, 1\}^2$, we ran Andrey alone (the 0.20.0 pre-release of November 24, 2026, commit 71a8155c1, on AMD EPYC 7713 cores), 500 draws per point. The share of true independences rejected: | b1 | b2 | (1D): GCM | wGCM, `"est"` | wGCM, `"fix"` | (10D.Add): GCM | wGCM, `"est"` | wGCM, `"fix"` | |---:|---:|---:|---:|---:|---:|---:|---:| | 0 | 0 | 5.4% | 7.8% | 6.4% | 4.2% | 5.4% | 5.6% | | 0 | 1/3 | 6.2% | 4.2% | 5.6% | 4.2% | 4.8% | 7.2% | | 0 | 2/3 | 5.6% | 6.0% | 6.0% | 2.6% | 3.8% | 3.8% | | 0 | 1 | 8.0% | 6.4% | 6.8% | 4.8% | 5.4% | 4.4% | | 1/3 | 0 | 4.0% | 6.2% | 3.0% | 4.4% | 4.0% | 4.2% | | 1/3 | 1/3 | 5.0% | 5.0% | 5.0% | 5.6% | 5.4% | 4.8% | | 1/3 | 2/3 | 6.2% | 7.4% | 7.4% | 5.4% | 5.8% | 4.2% | | 1/3 | 1 | 9.4% | 8.8% | 8.4% | 5.0% | 5.4% | 4.0% | | 2/3 | 0 | 6.8% | 5.4% | 5.6% | 4.2% | 4.8% | 4.4% | | 2/3 | 1/3 | 5.2% | 5.0% | 5.8% | 6.4% | 5.6% | 5.4% | | 2/3 | 2/3 | 8.0% | 6.2% | 7.0% | 4.2% | 4.2% | 4.6% | | 2/3 | 1 | 6.0% | 5.2% | 5.0% | 5.8% | 5.0% | 5.8% | | 1 | 0 | 7.4% | 8.2% | 4.8% | 6.6% | 6.4% | 4.2% | | 1 | 1/3 | 6.0% | 4.8% | 6.8% | 4.4% | 5.4% | 4.4% | | 1 | 2/3 | 6.4% | 5.6% | 6.0% | 3.8% | 4.8% | 5.2% | | 1 | 1 | 6.8% | 9.4% | 7.8% | 4.0% | 5.8% | 5.6% | Over the 8,000 draws of a design, the GCM rejected 6.40%, `"est"` 6.35%, and `"fix"` 6.09% on (1D), and 4.72%, 5.12%, and 4.86% on (10D.Add). On (1D), the Wilson interval of 4 of the 16 points lies above 5% for the GCM, 5 for `"est"`, and 4 for `"fix"`; on (10D.Add), none for the GCM and `"est"` and 1 for `"fix"`. PCM's level and power come from the 0.19.0 comparison with the PCM paper's code (its additive regressions, 500 draws per setting, on 0.19.0 pre-release builds), on its Section 6.1 designs and the Section 6.2 null at 500 rows, below the paper's 10,000 to 40,000: | Design | Rows | Draws | Andrey | Authors' code | Difference | |---|---:|---:|---:|---:|---| | Section 6.1, null | 250 | 500 | 0.4% | 0.6% | -0.2 [-1.0, +0.6] | | Section 6.1, null | 500 | 499 | 0.2% | 0.2% | +0.0 [-0.6, +0.6] | | Section 6.1, alternative 1 | 250 | 500 | 54.8% | 48.8% | +6.0 [+1.0, +10.8] | | Section 6.1, alternative 1 | 500 | 500 | 99.6% | 98.8% | +0.8 [-0.2, +2.0] | | Section 6.1, alternative 2 | 250 | 500 | 64.4% | 50.6% | +13.8 [+9.2, +18.6] | | Section 6.1, alternative 2 | 500 | 500 | 96.0% | 91.6% | +4.4 [+2.0, +6.8] | | Section 6.1, alternative 3 | 250 | 499 | 2.0% | 0.8% | +1.2 [-0.2, +2.6] | | Section 6.1, alternative 3 | 500 | 498 | 13.5% | 7.6% | +5.8 [+2.8, +9.0] | | Section 6.2, null | 500 | 500 | 97.6% | 95.6% | +2.0 [+0.2, +3.8] | The difference is in percentage points, with its 95% bootstrap interval on the same draws. On the Section 6.2 null, whose conditional means are not additive, both reject almost every draw at 500 rows; with `regression="forest"` at 10,000 rows Andrey rejected 2 and 0 of 20 draws there ([the PCM and KCI options](#the-pcm-and-kci-options)). ### Power against the authors' code On the GCM paper's Figure 5 alternatives, 200 draws each, the share of draws rejected: | Design | Rows | gcm.test | GCM: Andrey | KCI: Andrey | |---|---:|---:|---:|---:| | (a) a = 2 | 200 | 0.870 | 0.895 | 0.660 | | (a) a = 2 | 400 | 0.960 | 0.955 | 0.870 | | (b) a = 4 | 200 | 0.870 | 0.895 | 1.000 | | (b) a = 4 | 400 | 0.990 | 0.990 | 1.000 | | (c) bivariate Z | 200 | 0.715 | 0.705 | 0.330 | | (c) bivariate Z | 400 | 0.935 | 0.935 | 0.560 | | (e) multiplicative noise | 200 | 0.565 | 0.530 | 0.320 | | (e) multiplicative noise | 400 | 0.840 | 0.840 | 0.560 | On the wGCM paper's Figures 4 to 6 designs at 400 rows with (b1, b2) = (1/2, 1/2), 100 draws each: | Design | (c1, c2) | weightedGCM, `est` | wGCM, `"est"` | weightedGCM, `fix` | wGCM, `"fix"` | GCM | |---|---|---:|---:|---:|---:|---:| | (1D) | (1, 0) | 0.14 | 0.20 | 0.30 | 0.28 | 0.09 | | (1D) | (1/2, 1/2) | 0.93 | 0.91 | 0.98 | 0.99 | 0.98 | | (1D) | (1, 1) | 0.93 | 0.89 | 1.00 | 1.00 | 0.40 | | (10D.Add) | (1, 0) | 0.03 | 0.03 | 0.06 | 0.05 | 0.02 | | (10D.Add) | (1/2, 1/2) | 0.67 | 0.67 | 0.80 | 0.82 | 0.93 | | (10D.Add) | (1, 1) | 0.57 | 0.63 | 0.94 | 0.92 | 0.06 | | (10D.NonAdd) | (0, 1) | 0.90 | 0.93 | 1.00 | 1.00 | 1.00 | | (10D.NonAdd) | (1, 0) | 0.08 | 0.13 | 0.27 | 0.29 | 0.28 | | (10D.NonAdd) | (1/2, 1/2) | 0.08 | 0.09 | 0.04 | 0.07 | 0.14 | | (10D.NonAdd) | (1, 1) | 0.06 | 0.09 | 0.08 | 0.04 | 0.07 | With (c1, c2) = (0, 1), every test rejected all draws of (1D) and (10D.Add). Andrey's power was below the authors' code's by the interval of the paired difference in none of the 8 GCM settings and none of the 12 wGCM settings, for either variant. ### The GCM beside KCI and the wGCM beside the GCM - **GCM and KCI.** The GCM had more power than KCI in 6 of the 8 settings of Figure 5, by +0.085 to +0.375, and as much on design (b) at 400 rows. On design (b) at 200 rows KCI had more (1.000 against 0.895, and 0.095 more on 200 fresh draws), on a design whose true independences it rejects in 93.6% of draws. A KCI query took a median of 0.01 to 0.05 s and a GCM query 0.6 to 1.4 s: the ratio of their median times was 14 to 101. - **wGCM and GCM.** Where the covariance keeps one sign, or the interaction is weak, the GCM had more power than `"est"` in 4 of the 12 settings, on the first and on 100 fresh draws ((1D) and (10D.Add) with (c1, c2) = (1/2, 1/2), and (10D.NonAdd) with (0, 1) and (1, 0)), and than `"fix"` in 1 ((10D.Add), (1/2, 1/2)). Where the covariance changes sign, `"est"` and `"fix"` had more power than the GCM: (1D) with (1, 1), +0.49 and +0.60; (10D.Add) with (1, 1), +0.57 and +0.86; (1D) with (1, 0), +0.11 and +0.19. A GCM query took a median of 0.8 to 3.7 s, `"est"` 14.0 to 42.7 s, and `"fix"` 7.0 to 34.3 s: the GCM took 10.8 to 17.4 times less than `"est"` and 8.4 to 9.5 times less than `"fix"`. ### The tests in PC `andrey.pc` ran with each test on the quality gate's draws of `anm_er` and `nonmonotone_er` at 5 variables and 250 rows (seeds 0-9), where a child is a nonlinear function of its parents, in `nonmonotone_er` a nonmonotone one. The table gives the SHD of each draw, its median, and the median seconds of a fit; the empty graph's median SHD is 5 in both. KCI, CMIknn, and GPDC are the supported tests' recorded rows on the same draws. | Data | Test | SHD, seeds 0-9 | Median | Fit, s | |---|---|---|---:|---:| | `anm_er` | GCM | 1 0 0 0 1 4 0 3 0 2 | 0.5 | 10 | | `anm_er` | wGCM | 1 0 1 0 1 4 1 3 0 4 | 1 | 487 | | `anm_er` | PCM | 1 3 2 1 3 5 3 3 1 2 | 2.5 | 72 | | `anm_er` | KCI | 0 0 0 1 1 1 1 3 0 2 | 1 | | | `anm_er` | CMIknn | 1 0 1 0 1 5 1 1 2 3 | 1 | | | `anm_er` | GPDC | 1 0 0 0 0 5 1 3 0 2 | 0.5 | | | `nonmonotone_er` | GCM | 6 6 8 3 4 5 4 3 4 5 | 4.5 | 4 | | `nonmonotone_er` | wGCM | 6 6 8 3 4 5 5 5 4 5 | 5 | 76 | | `nonmonotone_er` | PCM | 4 4 5 3 4 5 4 4 4 5 | 4 | 28 | | `nonmonotone_er` | KCI | 3 2 4 5 3 2 4 4 3 5 | 3.5 | | | `nonmonotone_er` | CMIknn | 3 3 2 5 3 3 4 3 3 3 | 3 | | | `nonmonotone_er` | GPDC | 3 3 3 6 3 3 2 4 3 3 | 3 | | PCM's seconds are those of the pre-release of November 27 at commit 5bf71fec6, whose additive PCM code the later one did not change, on cores whose model was not recorded. On `nonmonotone_er` the wGCM's median equals the empty graph's, and on 20 more draws (seeds 10-29) so do the GCM's and the wGCM's (5), where PCM's is 4 and KCI's 3. With no conditioning variable the wGCM has no weight to estimate and is the GCM, a test of correlation. On the 50 true edges of the ten draws, with the empty conditioning set of PC's first step, the GCM and the wGCM rejected independence on 20 of the 50 and on none of the 22 whose two columns have a correlation below 0.1 in absolute value, PCM on 30 (8 of the 22), and KCI on 39 (14 of the 22); on `anm_er` the GCM, the wGCM, and KCI rejected on all 50 and PCM on 48. We ran this count after the table above. The fits of the table ran before PC's default collider rule became majority vote ([Collider rules in PC and FCI](#collider-rules-in-pc-and-fci)), under the separating sets. On the pre-release of November 29, 2026 (commit 87cd1efb7), which has the new default, PC with the GCM on `nonmonotone_er` had an SHD of 6 6 8 5 4 5 4 1 5 5 on seeds 0-9, a median of 5, the empty graph's, and with `collider_rule="sepsets"` it gave the table's row again; on `anm_er` its median was 0.5. The quality gate passes a supported test only when its median lies below the empty graph's, so the GCM stays experimental: it tests a covariance, and the cosine of `nonmonotone_er` can leave a child and its parent uncorrelated. Under majority vote PCM's median on `anm_er` fell from 2.5 to 1.5 (1 3 2 1 1 5 1 3 1 2), its median on `nonmonotone_er` stayed 4, and the wGCM's on `anm_er` stayed 1; the gate's baselines for the wGCM and PCM are those of majority vote. ### The PCM and KCI options `"pcm"` takes `regression` (`"additive"`, the default; `"forest"`, `"boosting"`, and `"linear"`) and `n_splits` (6, the default, averages the statistics of six random sample splits; 1 uses one). We ran every regression with 6 and with 1 split, and KCI at its defaults, on the PCM paper's Section 6.1 designs (seven conditioning variables; under the null, `x` nearly copies the conditional mean of `y`) at 250 and 500 rows with 100 draws and 1,000 rows with 20, and the forest and linear regressions on its Section 6.2 designs, whose conditional means are not additive, at 10,000 rows with 20 draws. The four null settings and alternative 3 at 250 rows ran again on fresh draws. The one-split statistic is the first of the six splits, so its time is not measured apart. The study ran on the 0.20.0 pre-release of November 27, 2026 (commit ab290b40b), on AMD EPYC 7713 cores with one BLAS thread; every query finished. Rejections of the Section 6.1 null, first draws / fresh draws: | Test | 250 rows, of 100 | 500 rows, of 100 | 1,000 rows, of 20 | |---|---:|---:|---:| | PCM, `"additive"`, 6 splits | 0 / 0 | 2 / 0 | 0 / 1 | | PCM, `"additive"`, 1 split | 9 / 7 | 14 / 7 | 0 / 2 | | PCM, `"forest"`, 6 splits | 100 / 100 | 97 / 94 | 9 / 5 | | PCM, `"forest"`, 1 split | 95 / 98 | 80 / 90 | 11 / 7 | | PCM, `"boosting"`, 6 splits | 96 / 98 | 81 / 87 | 15 / 16 | | PCM, `"boosting"`, 1 split | 85 / 87 | 80 / 72 | 13 / 13 | | PCM, `"linear"`, 6 splits | 100 / 100 | 100 / 100 | 20 / 20 | | PCM, `"linear"`, 1 split | 100 / 99 | 100 / 100 | 20 / 20 | | KCI | 88 / 88 | 100 / 100 | 20 / 20 | On the Section 6.2 null at 10,000 rows, of 20 draws, `"forest"` rejected 2 / 0 with 6 splits and 1 / 2 with 1, and `"linear"` 20 / 20 with both. - The additive default rejected at most 2 of 100 draws of the Section 6.1 null at 250 and 500 rows and at most 1 of 20 at 1,000, within the 5% level by the Wilson interval, and fewer than every other regression and KCI, on the first and the fresh draws. KCI rejected most true independences at every size, as the PCM paper reports for KCI on this design. - With one split the additive regression rejected more of that null than with six at 250 and 500 rows, on both sets of draws. On alternative 3 at 250 rows, where `y` depends on `x` through `0.4 x^2 z2`, one split had more power: 9 against 1 of 100 draws, and 14 against 4 on fresh ones. On alternatives 1 and 2 the two were within the intervals or one split rejected fewer. - At 10,000 rows on the Section 6.2 alternatives, `"forest"` rejected 6, 8, and 9 of 20 draws with 6 splits and 7, 7, and 11 with 1. - Median seconds per query on the Section 6.1 null: `"additive"` 7.3, 26.6, and 181.5 at 250, 500, and 1,000 rows; `"forest"` 18.9, 24.3, and 42.4; `"boosting"` 16.9, 25.1, and 46.6; `"linear"` under 0.05; KCI under 0.05, 0.1, and 0.6. `"forest"` took 460.4 s at 10,000 rows. In single timed queries before the study, one split took 1.2 s against six splits' 5.5 s for `"additive"` at 250 rows, and 68.2 s against 403.1 s for `"forest"` at 10,000 rows. The Section 6.2 settings at 20,000 and 40,000 rows, where the paper runs the forest, are measured for the next release and are not part of this card. ## Missing data `missing="em"` is supported in every method that takes it. 0.20.0 adds `xges`, `exact_search`, `dagma`, and `calm`, and `calm`'s `w_threshold` now defaults to 0.0, the value of its paper and the authors' code (Jin et al., 2026). We compared the first three with MissDAG's EM (Gao et al., 2022) run with the same search as its M-step. `calm` has no such reference, so we judged it against the empty graph and its fit on the complete data. We also compared `ges`, `boss`, and `grasp` with EM against Tetrad's EM covariance policy at 100 variables and under a third missingness mask, ran again on fresh datasets the settings where the alternating scheme of 0.17.0 had more errors than the earlier one, and ran MVPC again in the settings where some of its fits failed in 0.16.0. In every comparison, a method is better or worse than another in a setting when the 95% bootstrap interval of their paired difference in errors (SHD), over the datasets both finished, lies wholly on one side of zero, and tied otherwise. A worse setting counts only when it is worse again on 20 fresh datasets. A method is below the empty graph when the same interval of its SHD minus the empty graph's lies wholly below zero. A fit that timed out or raised an error is never scored as a graph. The data are linear-Gaussian. Values go missing completely at random (MCAR); at random through a logistic function of columns that are always observed (logistic MAR); or at random through one always-observed parent, with probability 0.9 when the parent is below a quantile and 0.01 otherwise (quantile MAR, the mask of Tu et al., 2019). A rate is the expected share of missing values in each column that can go missing. ### XGES, exact search, and DAGMA No package runs structural EM around XGES, an exact search, or DAGMA. MissDAG's EM calls any search that reads a covariance, but its release holds NOTEARS only, so the glue is ours: each search reads rows rebuilt from the expected covariance, and for the two BIC searches the weights handed back are least squares on the returned DAG. The searches are XGES 0.1.6, causal-learn 0.1.4.8's exact search, and DAGMA 1.1.1, unmodified, inside MissDAG at commit 3c1eeed8, with 10 EM iterations, as Andrey runs 10 rounds. causal-learn's exact search is not the A* authors' code; an exact search has one answer up to Markov equivalence, and the comparison scores equivalence classes. On every complete dataset each search gave the same SHD on the real rows and on the rebuilt ones: XGES on 100 of 100, the exact search on 60 of 60, and DAGMA on 80 of 80 (60 first and 20 fresh). The settings follow MissDAG's experiments: Erdos-Renyi graphs of mean degree 1 and 2 and scale-free graphs of mean degree 2, edge weights drawn uniformly from [-2, -0.5] and [0.5, 2], unit noise variances, and columns not standardized; MCAR at 10, 20, 30, 40, and 50% and logistic MAR at 10, 30, and 50% with 30% of the columns always observed, 8 settings per graph. `xges` and `exact_search` ran at `ebic_gamma=0.0`, the standard BIC, with 15 variables and 100 rows; `xges` also on Erdos-Renyi graphs of mean degree 2 with standardized columns, 50 variables, and 500 and 2,000 rows, under MCAR and logistic MAR at 10 and 30%. `dagma` ran at its defaults with 20 variables and 100 rows. Each setting has 20 datasets, and Andrey's EM and MissDAG's EM finished all of them. SHD counts the errors between equivalence classes for `xges` and `exact_search`, and between DAGs for `dagma`. | Method | Reference | Settings | Better | Tied | Worse | Worse again | Below the empty graph: Andrey | MissDAG's EM | Status | |---|---|---:|---:|---:|---:|---:|---:|---:|---| | `xges(missing="em")` | MissDAG's EM with XGES | 32 | 19 | 13 | 0 | 0 | 27 of 32 | 24 of 32 | Supported | | `exact_search(missing="em")` | MissDAG's EM with causal-learn's exact search | 24 | 15 | 9 | 0 | 0 | 19 of 24 | 12 of 24 | Supported | | `dagma(missing="em")` | MissDAG's EM with DAGMA | 24 | 4 | 19 | 1 | 0 | 23 of 24 | 21 of 24 | Supported | - **The one worse setting.** `dagma` with 50% MCAR on graphs of mean degree 1 had more errors than the reference on the first 20 datasets, +1.10 [+0.30, +1.90], and tied on 20 fresh ones, +0.15 [-1.40, +1.70]. With 50% logistic MAR on the same graphs the difference was +1.45 [-0.10, +2.85], a tie. - **Against the baselines.** All three made fewer errors than the same search on data filled with column means in every setting, and than the search on the complete rows in every setting that left enough of them to compare (9 for `xges`, 6 each for the other two). `dagma` made fewer errors than test-wise PC in 19 settings and as many in 5. Test-wise PC made fewer errors than `xges` in 5 of its 32 settings (both 10% settings and 40% MCAR on graphs of mean degree 1, and both 10% settings at 50 variables and 500 rows) and than `exact_search` in 4 of 24 (both 10% settings and 30% logistic MAR on graphs of mean degree 1, and 50% logistic MAR on scale-free graphs); elsewhere they tied it or made fewer errors. - **Larger graphs.** At 50 variables, `xges` with EM made fewer errors than `xges` on the complete data, for example 9.95 against 30.25 with 30% MCAR and 500 rows. On the complete data it returned 70.2 edges per fit at 500 rows and 58.9 at 2,000, against 50 true edges, and the XGES package returned the same graphs on all 40 complete datasets; with 30% MCAR the EM fits returned 56.1 and 54.2. - **Time.** In median CPU seconds of one core, a setting's fit with EM took 0.32 to 0.82 s for `xges` at 15 variables, 1.00 to 2.26 times its fit on the complete data (0.32 to 0.36 s), and 3.4 to 12.2 s at 50 variables, 8.24 to 33.61 times; 7.81 to 9.27 s for `exact_search`, 6.56 to 7.66 times; and 10.5 to 14.05 s for `dagma`, 7.21 to 8.74 times. With about 100 rows and half of the values missing, neither EM is below the empty graph on graphs of mean degree 2. The table gives the mean SHD in the settings where `xges` or `exact_search` with EM is not below the empty graph, beside MissDAG's EM with the same search; MissDAG's EM is not below it in any of them. On graphs of mean degree 1, the search on the complete data made 7.70 errors (`xges`) and 8.55 (`exact_search`) against the empty graph's 8. | Graph | Mask, rate | `xges` with EM | MissDAG's EM with XGES | `exact_search` with EM | MissDAG's EM with the exact search | Empty graph | |---|---|---:|---:|---:|---:|---:| | Erdos-Renyi, mean degree 1 | logistic MAR, 10% | 6.50 | 6.95 | 6.75 | 7.00 | 8.00 | | Erdos-Renyi, mean degree 2 | MCAR, 50% | 14.35 | 16.45 | 14.35 | 16.50 | 15.00 | | Erdos-Renyi, mean degree 2 | logistic MAR, 50% | 13.15 | 13.90 | 13.25 | 15.30 | 15.00 | | scale-free, mean degree 2 | MCAR, 50% | 13.50 | 16.30 | 13.00 | 17.00 | 14.00 | | scale-free, mean degree 2 | logistic MAR, 50% | 13.10 | 14.00 | 14.00 | 15.00 | 14.00 | On graphs of mean degree 1 both searches were below the empty graph at 50% under both masks. `dagma` was below it in every setting but 50% MCAR on scale-free graphs (18.55 errors against 19.00; MissDAG's EM with DAGMA 20.10). Andrey ran as pre-release 0.20.0 of November 25, 2026, on Python 3.14.4 with NumPy 2.4.6 and SciPy 1.17.1, one fit per core with one BLAS thread, on AMD EPYC 7713 and Intel Xeon Gold 5418Y nodes. MissDAG and its searches ran on Python 3.12.12 with NumPy 1.26.4. ### CALM MissDAG's EM with causal-learn's CALM as its M-step did not finish within 1,800 s of wall time on a trial dataset of 20 variables and 200 rows, nor of 10 variables and 100 rows, where one fit of causal-learn's CALM on the complete data took 547 to 848 s of wall time. So `calm` with EM has no reference, and we judged it against the empty graph and its fit on the complete data in the setting it claims: Erdos-Renyi graphs of mean degree 2, 20 variables, 200 rows, and standardized columns, with MCAR and logistic MAR at 10, 30, and 50%, 20 datasets per setting, scored by the SHD between DAGs. A setting where it is not below the empty graph counts only when it is not below again on 20 fresh datasets. At the former default, `w_threshold=0.3`, `calm` with EM was not below the empty graph with 50% missing under either mask, on the first datasets and again on fresh ones; with 50% MCAR its fits returned 0.35 edges on average, against 20 true edges. The CALM paper (we read its arXiv version) and the authors' code keep an edge wherever its gate reaches 0.5, with no weight threshold. At `w_threshold=0.0`, `calm` with EM was below the empty graph in 5 of the 6 settings on the first datasets, and in the sixth, 50% logistic MAR, on 20 fresh ones, and it was not worse than at 0.3 in any setting: | Mask, rate | SHD at 0.0 | SHD at 0.3 | Empty graph | 0.0 minus the empty graph [95%] | 0.0 minus 0.3 [95%] | Edges per fit at 0.0 | at 0.3 | |---|---:|---:|---:|---|---|---:|---:| | MCAR, 10% | 10.35 | 10.70 | 20.00 | [-11.10, -8.25] | -0.35 [-1.20, +0.55], tie | 18.2 | 15.4 | | MCAR, 30% | 14.40 | 15.80 | 20.00 | [-6.75, -4.40] | -1.40 [-2.60, -0.30], better | 15.0 | 11.3 | | MCAR, 50% | 18.25 | 20.05 | 20.00 | [-2.55, -1.05] | -1.80 [-2.60, -1.05], better | 5.6 | 0.35 | | logistic MAR, 10% | 10.20 | 10.65 | 20.00 | [-11.35, -8.40] | -0.45 [-1.40, +0.55], tie | 18.05 | 15.5 | | logistic MAR, 30% | 13.50 | 14.35 | 20.00 | [-7.85, -5.15] | -0.85 [-2.20, +0.40], tie | 15.2 | 12.15 | | logistic MAR, 50% | 18.85 | 19.35 | 20.00 | [-2.40, +0.10] | -0.50 [-1.25, +0.20], tie | 10.65 | 6.95 | | logistic MAR, 50%, fresh datasets | 17.70 | 19.25 | 20.00 | [-3.20, -1.45] | -1.55 [-2.35, -0.85], better | 9.45 | 6.65 | - **Against the baselines.** At 0.0, `calm` with EM made fewer errors than `calm` on data filled with column means in three settings (10% under both masks and 30% logistic MAR) and as many in the other three, and fewer on the fresh datasets of 50% logistic MAR, -2.30 [-3.75, -1.00]. With 50% missing it kept fewer edges than mean imputation, 5.6 against 16.15 per fit under MCAR and 10.65 against 17.35 under logistic MAR. Test-wise PC made fewer errors than `calm` with EM in the four settings at 30 and 50%, by 2.15 to 4.95 on average, and as many at 10%. Dropping the incomplete rows left enough rows to compare only at 10%, where `calm` with EM made fewer errors. - **On the complete data** the two values tie. On the 20 complete datasets of the setting, `calm` made 9.40 errors at 0.0 and 9.30 at 0.3 (+0.10 [-0.60, +0.80]), and 9.05 and 9.00 on 20 fresh ones (+0.05 [-0.50, +0.55]); between equivalence classes, 9.90 and 9.05 (+0.85 [-0.65, +2.40]) and 9.30 and 8.75 (+0.55 [-0.50, +1.60]). At 0.0 it returned 19.35 edges per fit, against 16.6 at 0.3 and 20 true edges. In the quality gate's two `calm` settings, 10 draws each, the median SHD was 4.5 and 4 at both values, and the paired differences, -0.7 [-1.5, 0.0] and -0.5 [-1.0, 0.0], are ties. - **Time.** A setting's median fit with EM at 0.0 took 123.73 to 249.89 CPU seconds of one core, 3.55 to 7.16 times the median fit on the complete data at 0.0, 34.88 s. The runs at 0.0 passed `w_threshold=0.0` to the pre-release of November 25, 2026, on AMD EPYC 7713 nodes, with the build and environment of the previous section; the 0.3 columns come from that section's run, on both CPU models. ### GES, BOSS, and GRaSP against Tetrad, up to 100 variables 0.17.0 compared `ges`, `boss`, and `grasp` with EM, at `ebic_gamma=0.0`, against Tetrad's FGES, BOSS, and GRaSP under its EM covariance policy, at two settings of the sample size its score counts: every row, its default, and the mean pairwise count. 0.20.0 extends that comparison, with the same settings of both packages, on Erdos-Renyi graphs of mean degree 2 and 4 with standardized columns: 100 variables and 2,000 rows under MCAR and logistic MAR at 10, 20, and 30%; and quantile MAR at 10, 20, 30% with 10, 20, and 50 variables and 100, 500, and 2,000 rows, and with 100 variables and 2,000 rows. Each setting has 20 datasets, and Andrey's EM and both Tetrad settings finished every fit, 20 datasets for each of the 216 settings x searches, 4,320 each. None of Andrey's settings is worse again: | Data | Settings | Settings x searches | Against every row: better / tied / worse | Against the mean pairwise count: better / tied / worse, then tied / worse again | |---|---:|---:|---|---| | 100 variables, mean degree 2, 2,000 rows, MCAR and logistic MAR | 6 | 18 | 18 / 0 / 0 | 18 / 0 / 0 / 0 | | 100 variables, mean degree 4, 2,000 rows, MCAR and logistic MAR | 6 | 18 | 18 / 0 / 0 | 14 / 4 / 0 / 0 | | quantile MAR, 10 variables | 18 | 54 | 15 / 39 / 0 | 7 / 44 / 3 / 0 | | quantile MAR, 20 variables | 18 | 54 | 45 / 9 / 0 | 28 / 25 / 1 / 0 | | quantile MAR, 50 variables | 18 | 54 | 52 / 2 / 0 | 43 / 11 / 0 / 0 | | quantile MAR, 100 variables, 2,000 rows | 6 | 18 | 18 / 0 / 0 | 13 / 5 / 0 / 0 | | All | 72 | 216 | 166 / 50 / 0 | 123 / 89 / 4 / 0 | The margins grow with the number of variables. The next table gives, per group, the best, median, and worst difference in mean SHD between Andrey and each Tetrad setting (negative favors Andrey), and in how many settings x searches each is below the empty graph and above it (its interval wholly above zero): | Data | Andrey minus Tetrad, every row | Andrey minus Tetrad, mean pairwise count | Below / above the empty graph: Andrey | Tetrad, every row | Tetrad, mean pairwise count | |---|---|---|---|---|---| | 100 variables, mean degree 2, MCAR and logistic MAR | -435.50, -124.90, -30.95 | -91.25, -38.05, -10.15 | 18 / 0 | 5 / 12 | 13 / 2 | | 100 variables, mean degree 4, MCAR and logistic MAR | -495.05, -101.65, -19.65 | -77.90, -23.40, +7.95 | 14 / 0 | 7 / 6 | 12 / 0 | | quantile MAR, 10 variables | -6.20, -0.65, +4.10 | -2.80, -0.25, +4.70 | 44 / 0 | 42 / 0 | 46 / 0 | | quantile MAR, 20 variables | -49.15, -7.20, +3.60 | -35.55, -2.75, +4.55 | 45 / 0 | 29 / 12 | 36 / 6 | | quantile MAR, 50 variables | -540.20, -51.02, +3.40 | -316.05, -15.93, +9.00 | 38 / 3 | 18 / 33 | 27 / 19 | | quantile MAR, 100 variables | -228.35, -89.15, -20.80 | -72.10, -25.02, -2.20 | 15 / 0 | 8 / 8 | 13 / 0 | | All | -540.20, -14.30, +4.10 | -316.05, -4.93, +9.00 | 174 / 3 | 109 / 71 | 147 / 27 | For example, at 100 variables of mean degree 2 with 30% MCAR, `grasp` with EM made 14.6 errors, Tetrad's GRaSP 447.75 with every row counted and 100.0 at the mean pairwise count, and the empty graph 100. Four settings had more errors than Tetrad at the mean pairwise count on the first 20 datasets, all under quantile MAR at 10 or 20 variables, and each tied on 20 fresh ones. Between two methods that do not differ, 432 comparisons, each with a 2.5% chance of a false "more errors", give about 11 such settings. | Search | Graph | Variables | Rows | Rate | First 20 datasets | 20 fresh datasets | |---|---|---:|---:|---:|---|---| | `boss` | mean degree 2 | 10 | 500 | 10% | +1.35 [+0.25, +2.65] | -0.40 [-2.10, +1.30] | | `boss` | mean degree 4 | 10 | 500 | 30% | +4.70 [+0.20, +9.40] | +2.20 [-2.95, +7.30] | | `ges` | mean degree 4 | 10 | 2,000 | 30% | +3.00 [+1.00, +5.60] | +1.35 [-0.60, +3.40] | | `grasp` | mean degree 4 | 20 | 2,000 | 20% | +4.55 [+0.35, +9.65] | -2.65 [-7.70, +1.85] | - **Where they tie.** With 10 variables most settings tie Tetrad: 39 of 54 against every row, and no setting of mean degree 4 is better than either Tetrad setting. At 50 variables the two ties against every row are `grasp` on graphs of mean degree 4 at 10%, with 500 rows (+3.40 [-7.10, +14.85]) and 2,000 rows (+2.50 [-8.50, +16.85]). At 100 variables of mean degree 4 and 10% MCAR, Tetrad's GRaSP at the mean pairwise count had the lower mean, 34.95 against 42.9, a tie (+7.95 [-7.05, +26.80]). - **Against the empty graph.** `ges` with EM at `ebic_gamma=0.0` made 148.05 to 170.65 errors on the graphs of 100 variables and mean degree 4, against the empty graph's 200, and tied it in 7 of those 9 settings; `boss` and `grasp` made 26.0 to 42.9 under MCAR and logistic MAR there. All three made more errors than the empty graph with 50 variables of mean degree 2, 100 rows, and 10% quantile MAR: 58.75 (`ges`), 57.2 (`boss`), and 54.6 (`grasp`) against 50.0, where Tetrad's settings made 91.5 to 157.4. - **Against the baselines.** Test-wise PC made fewer errors than the search with EM in 27 of the 72 settings of `ges`, 10 of `boss`, and 6 of `grasp`, and more in 5, 41, and 49. Mean imputation made more errors than EM in 212 of the 216 settings x searches and as many in 4. Dropping the incomplete rows left enough of them to compare in 159, where EM made fewer errors in 119 and as many in 40. - **The complete data.** At 100 variables of mean degree 2 with 2,000 rows, and MCAR and logistic MAR at 10 and 30%, each search on the complete datasets made 9.4 to 40.3 more errors than with EM on the datasets with missing values (`boss`: 54.85 on the complete data, 19.85 to 45.45 with EM), and tied Tetrad's same search on the complete data in all 12 settings x searches. Two settings were not compared: - **100 variables with 100 or 500 rows.** On a trial dataset per graph and row count with 30% MCAR, 8 of the 23 Tetrad EM fits that ran reached the cap of 1,800 s of wall time and 3 more took 1,171 to 1,381 s, while Andrey's EM fits of the trial took 5 to 112 s. - **The default `ebic_gamma=1.0`.** Andrey's extended BIC adds `2 * ebic_gamma * log C(d - 1, k)` for a variable with `k` parents. Tetrad 8.0.0's `EbicScore` adds `2 * k * gamma * log C(d - 1, k)`, which scales that term by the number of parents, so at any `gamma` above 0 it is another objective, and it handles missing values by test-wise deletion only. Andrey ran as pre-release 0.20.0 of November 26, 2026, on Python 3.14.4 with NumPy 2.4.6, SciPy 1.17.1, and OpenBLAS 0.3.31 with one thread, one fit per core on AMD EPYC 7713 nodes, beside tetrad-lib 8.0.0 on JDK 21.0.12. On this build, Andrey's and Tetrad's EM fits of two datasets of the 0.17.0 comparison returned the graphs recorded there. ### The alternating scheme on fresh datasets Since 0.17.0, `missing="em"` runs Friedman's alternating scheme (Friedman, 1997): before each search after the first, 5 parameter-only EM steps refit the current graph. In the 0.17.0 comparison it had fewer errors than the earlier scheme, one least-squares refit per round, in 64 settings and more in 16, and the 16 did not run again. On this build both schemes return the graphs recorded in 0.17.0 on every dataset of the 16. On 20 fresh datasets, 3 of the 16 had more errors again, 12 tied, and 1 had fewer (`ges` on graphs of 10 variables, mean degree 4, and 2,000 rows with 20% MCAR, -2.80 [-6.20, -0.30]). On another 20 fresh datasets none of the 3 had more errors. The difference is the SHD of the alternating scheme minus that of the earlier one: | Search | Graph | Variables | Rows | Mask, rate | First 20 datasets | 20 fresh datasets | 20 more fresh datasets | |---|---|---:|---:|---|---|---|---| | `boss` | mean degree 2 | 20 | 100 | logistic MAR, 10% | +0.55 [+0.10, +1.10] | +1.00 [+0.05, +2.10] | +0.50 [-0.05, +1.25] | | `ges` | mean degree 2 | 50 | 500 | MCAR, 20% | +1.60 [+0.40, +2.75] | +2.10 [+0.75, +3.60] | +0.25 [-1.05, +1.80] | | `grasp` | mean degree 4 | 50 | 100 | logistic MAR, 20% | +10.10 [+1.05, +19.30] | +10.45 [+1.55, +20.60] | -4.90 [-15.10, +4.85] | The 16 settings were chosen for having more errors on the first datasets, and the three that repeated on the first fresh datasets did not repeat on the second, so the 5 steps stay. With 20 rounds, the `boss` and `ges` fits returned the same graphs as with 10 in all 40 fits each. The `grasp` setting does not settle: the graph changed in the last of 10 rounds in all 20 fits on the first fresh datasets and on the second, with either scheme, and with 20 rounds in 20 and 19 of 20 fits. The status of each search is set against its reference, not against the earlier scheme, so none changes. The build and machine are those of the previous section. ### MVPC on this build In 0.16.0, `pc(missing="mvpc")` at `alpha=0.01` against the MVPC authors' R code had fits that raised an error on 1 to 3 of the 50 datasets in four settings with 100 rows, on a test left with too few observed rows, an error this build no longer raises. On this build Andrey finished all 50 datasets in each, and the results are as in 0.16.0. The data come from the authors' generator, with 20 variables (10 of them masked) and 50 variables (16 masked), and the MNAR mask and the authors' MCAR control of it, with the same number of missing values: | Variables | Mask | Andrey | R code | Difference [95%] | Result | Difference in 0.16.0 | Andrey fits failed: 0.16.0 | this build | |---:|---|---:|---:|---|---|---:|---:|---:| | 20 | MNAR | 18.28 | 18.44 | -0.16 [-0.46, +0.12] | tie | -0.16 | 1 | 0 | | 20 | MCAR control of MNAR | 18.18 | 18.28 | -0.10 [-0.42, +0.20] | tie | -0.10 | 2 | 0 | | 50 | MNAR | 41.96 | 43.18 | -1.22 [-1.70, -0.74] | better | -1.16 | 1 | 0 | | 50 | MCAR control of MNAR | 41.62 | 42.54 | -0.92 [-1.36, -0.48] | better | -0.87 | 3 | 0 | The regenerated data equal the recorded files on all 300 datasets, the R code returned its recorded graph in all 400 fits that finished in both runs, and Andrey returned the recorded graph in 1,341 of 1,357; the other 16 have the same SHD as recorded. The R code ran at commit e95160c0 with R 4.6.1, and Andrey as the pre-release of November 26, 2026, one fit per core; the logs of this run do not record the CPU model. ## Options and defaults 0.20.0 measures the values of the options that choose how a method behaves, each against the others and against the empty graph, on the data their papers name and on controls outside them. Two defaults change: `pc` and `fci` orient colliders by majority vote, and `rsmax2` restricts with IAMB and maximizes with tabu search. `igsp` and `ut_igsp` refuse the indicator invariance test with a partial-correlation test, and `exact_search` keeps one search strategy. The docstrings say what each value favors and what it gives up, without numbers; this section holds the numbers. Every setting ran on a first set of datasets and, where the values differed, again on fresh datasets from new seeds. We call a value better or worse in a setting only when the paired 95% bootstrap interval of the difference lies on the same side of zero in both runs. The tables give means over the first run unless they say otherwise. SHD counts the edge errors against the true CPDAG, or, for FCI and the methods that return a PAG, the endpoint errors against the true PAG; each table gives the empty graph's errors beside the methods'. Every fit finished unless a table says otherwise, and no failed fit is scored as a graph. ### Builds and machines | Comparison | Andrey build | Machine | Other packages | |---|---|---|---| | Collider rules, normal scores, `"student_t"`, environments, exact search, RSMAX2's phases, `invariance_test`, the mixed-data tests, BDeu and the multinomial BIC, the knowledge parts of tabu search and the blanket learners, the pair methods' and SkewD's `alpha`, the nonlinear tests, `robust`, CALM's options, VARMA-LiNGAM's options, `time_dummy`, and `fdr_method` | Pre-release 0.20.0, November 26, 2026 | One core of an AMD EPYC 7713, one BLAS thread | Tetrad (causal-cmd 1.12.0, tetrad-lib 7.6.3) on Temurin Java 21.0.12.1; bnlearn 5.2.1 on R 4.6.1; Tigramite 5.2.10.1 | | DirectLiNGAM's measures | Pre-release 0.20.0, November 25, 2026 | One core of an AMD EPYC 7713, one BLAS thread | none | | Required and forbidden paths in MMHC and RSMAX2 | Pre-release 0.20.0, November 25, 2026 | AMD EPYC 7713 and AMD EPYC 9534, one BLAS thread | bnlearn 5.2.1 on R 4.6.1 | | SkewD on a GPU | Development build of the GPU path on the 0.19.0 code, November 26, 2026 | AMD EPYC 9224 with an NVIDIA H100 NVL | PyTorch 2.14.1 (CUDA 12.6) | Andrey ran on Python 3.14 with NumPy 2.4.6 and SciPy 1.17.1, and on Python 3.13.11 with NumPy 2.5.5 for the paths in MMHC and RSMAX2. The seconds depend on the machine and the build, and several fits named here run faster in the release than in the build measured. Seconds are medians over a setting's datasets, and time ratios are medians of paired ratios on the same datasets. ### Collider rules in PC and FCI `pc` and `fci` now default to `collider_rule="majority"`, which orients an unshielded triple as a collider when its middle variable is in fewer than half of the separating sets found among the neighbors of its ends (Colombo and Maathuis, 2014); `collider_rule="sepsets"` gives the former result. `"conservative"` orients it only when no such set holds the middle variable (Ramsey et al., 2006). `gfci`, `boss_fci`, `grasp_fci`, `cdnod`, and `fci_jci` keep `"sepsets"`, and `pcmciplus` and `jpcmciplus` already voted. The data are linear-Gaussian. In the settings of Ramsey et al. (2006) the DAGs have as many edges as variables (sparse) or twice as many (dense), with every degree at most 10, weights uniform on $\pm[0.5, 1.5]$ (and on $\pm[0, 0.001]$ for 5% of the edges), 1,000 rows, and alpha 0.05. In those of Colombo and Maathuis (2014) the weights are uniform on $[0.1, 1]$ and the expected neighborhood size is 2 or 4: 50 variables with 1,000 rows (alpha 0.005 and 0.04), 1,000 variables with 50 rows (alpha 0.005), and, for FCI, 50 variables, some of them hidden, with 1,000 rows (alpha 0.005). There are 100 datasets per setting, 20 at 1,000 variables and 30 at 300 and 500. Each entry gives SHD / false arrowheads / true arrowheads. | Setting | Variables | Rows | Empty graph | `"sepsets"` | `"conservative"` | `"majority"` | |---|---:|---:|---:|---|---|---| | Ramsey, sparse | 20 | 1,000 | 20.0 | 5.54 / 2.11 / 11.16 | 4.62 / 0.69 / 11.68 | 4.65 / 0.94 / 11.74 | | Ramsey, sparse | 50 | 1,000 | 50.0 | 15.62 / 8.40 / 29.42 | 11.80 / 0.85 / 31.28 | 12.25 / 2.22 / 31.26 | | Ramsey, sparse | 100 | 1,000 | 100.0 | 42.83 / 29.04 / 58.98 | 31.94 / 1.80 / 64.89 | 34.27 / 7.57 / 64.03 | | Ramsey, dense | 20 | 1,000 | 40.0 | 28.52 / 8.70 / 12.64 | 27.65 / 4.84 / 12.77 | 27.21 / 5.94 / 13.52 | | Ramsey, dense | 50 | 1,000 | 100.0 | 57.47 / 18.06 / 43.26 | 51.95 / 6.86 / 46.79 | 51.76 / 10.94 / 47.78 | | Ramsey, dense | 100 | 1,000 | 200.0 | 101.98 / 31.33 / 97.95 | 89.34 / 10.38 / 107.41 | 88.95 / 16.91 / 109.13 | | Ramsey, dense | 300 | 1,000 | 600.00 | 254.77 / 101.30 / 354.87 | 201.70 / 13.17 / 394.53 | 205.90 / 42.07 / 395.37 | | Ramsey, dense | 500 | 1,000 | 1,000 | 405.13 / 185.63 / 630.43 | 324.47 / 14.50 / 687.27 | 332.57 / 77.43 / 690.27 | | Colombo, neighborhood 2 | 50 | 1,000 | 51.4 | 10.33 / 3.51 / 30.94 | 11.25 / 0.23 / 28.25 | 8.92 / 0.66 / 30.76 | | Colombo, neighborhood 4 | 50 | 1,000 | 98.4 | 38.04 / 10.94 / 57.09 | 35.47 / 2.35 / 57.75 | 35.54 / 7.05 / 58.90 | | Colombo, neighborhood 2 | 1,000 | 50 | 1,004.0 | 949.65 / 150.15 / 81.45 | 973.20 / 0.55 / 16.05 | 959.30 / 1.80 / 30.05 | | Colombo, hidden variables, FCI | 50 | 1,000 | 100.5 | 38.0 | 34.3 | 30.1 | On the nine PC settings from 20 to 1,000 variables and the FCI setting: - **`"majority"` against `"sepsets"`:** fewer false arrowheads in all nine and in FCI, and lower SHD in eight and in FCI. More true arrowheads in six: every Ramsey setting but the sparse one at 20 variables, and the Colombo setting with neighborhood 4. Higher SHD and fewer true arrowheads with 1,000 variables and 50 rows. - **`"conservative"` against `"sepsets"`:** fewer false arrowheads in all nine and in FCI. Lower SHD in the six Ramsey settings, the Colombo setting with neighborhood 4, and FCI; higher with 1,000 variables and 50 rows. Fewer true arrowheads in the Colombo setting with neighborhood 2, with 1,000 variables, and in FCI. - **`"majority"` against `"conservative"`:** more false arrowheads in all nine and in FCI. Lower SHD in the Colombo setting with neighborhood 2, with 1,000 variables, and in FCI; higher in the sparse Ramsey settings with 50 and 100 variables. - At 300 and 500 variables both votes had lower SHD, fewer false arrowheads, and more true arrowheads than `"sepsets"`, and `"majority"` more false arrowheads than `"conservative"`, on both runs. - **Time.** A vote tests each unshielded triple again. Where the median `"sepsets"` fit took 0.007 to 0.83 s, `"conservative"` and `"majority"` took 1.1 to 3.7 times as long in PC and 2.0 times in FCI; at 300 variables (`"sepsets"` 0.75 s) 2.4 times; at 500 variables (`"sepsets"` 1.797 s and 2.192 s on the two runs) 2.26 and 2.32 times for `"conservative"` and 2.22 and 2.31 times for `"majority"`, the two votes taking the same time as each other. `collider_order="p_value"`, the default, orients conflicting colliders by their p-values after Ramsey (2016); `"column"` orients them in column order, as PC does with `tie_break="position"`. Against `"p_value"`, `"column"` had higher SHD, more false arrowheads, and fewer true arrowheads in seven of the nine PC settings and was better in none; the two differed on 50 to 100% of the datasets. In GFCI, on the FCI setting's 100 datasets (empty graph 100.52), the three rules gave endpoint SHD / false arrowheads / true arrowheads of 39.87 / 9.55 / 30.62 (`"sepsets"`), 39.84 / 9.09 / 30.17 (`"conservative"`), and 39.66 / 9.41 / 30.61 (`"majority"`). `"conservative"` gave fewer false and fewer true arrowheads than the other two on both runs, with the same SHD; `"majority"` and `"sepsets"` were equal on all three, with graphs that differed on 14% of the datasets. In PCMCI+, on the paper's default simulation (Runge, 2020, Fig. 3: 5 series of 500 steps, 100 series), most same-step links under `"sepsets"` end in conflicting orientations and stay undirected. A pair that the lagged phase removed has no separating set, so the rule reads it as one whose set lacks the middle variable, as the paper's rule does; Tigramite 5.2.10.1's PCMCI+ with its standard rule gave the same same-step marks on the same 100 series. Per series, first run / second run (empty graph SHD 2.00): | Rule | SHD, same-step links | True arrowheads | Conflicts | |---|---|---|---| | `"sepsets"` | 1.48 / 1.53 | 0.56 / 0.52 | 1.23 / 1.25 | | `"conservative"` | 0.46 / 0.45 | 1.58 / 1.60 | 0.04 / 0.04 | | `"majority"`, the default | 0.45 / 0.47 | 1.59 / 1.58 | 0.05 / 0.06 | Between the two votes no difference repeated, false arrowheads included (0.01 to 0.05 per series under every rule). ### Normal scores `score_func="normal_scores"` and `indep_test="normal_scores"` read each column's normal scores, the Gaussian quantiles of its ranks, in place of the values, for data that are Gaussian after an unknown increasing transformation of each column (Harris and Drton, 2013). The score is supported in the 12 supported searches that take it (`lges` keeps its own status) and the test in 12 methods; in `lpcmci` the test stays experimental. In each of the 13 searches, `score_func="normal_scores"` gave the graph of `"bic"` on the normal scores of the data on 3 of 3 datasets (10 variables, 300 rows), and the test gave the graph of `"fisherz"` on them in 12 methods (the five that take both, with both set together). In LPCMCI it did on 2 of the 3: LPCMCI ranks each column of the lagged design over the rows its tests read, not each series over all its rows, and on one dataset one test's p-value was 0.0509 with the first ranking and 0.0483 with the second, on either side of alpha 0.05. PCMCI and PCMCI+ rank the same way and matched on 3 of 3. We measured them in GES and PC on linear DAGs with weights uniform on $(0.1, 1)$: 10 variables of expected degree 3 (100 datasets) and 100 of expected degree 6 (30 datasets), with 50 or 1,000 rows. The columns are transformed to $F(1, 1)$ marginals, or Gaussian, or the noise is drawn 80% from $N(0, 1)$ and 20% from a Cauchy distribution. The last column of each method fits `"bic"` or `"fisherz"` on the Gaussian data before the transformation. The table gives the mean SHD. | Data | Variables | Rows | Empty graph | GES, `"bic"` | GES, `"normal_scores"` | GES, untransformed | PC, `"fisherz"` | PC, `"normal_scores"` | PC, untransformed | |---|---:|---:|---:|---:|---:|---:|---:|---:|---:| | $F(1, 1)$ | 10 | 50 | 14.9 | 15.7 | 11.2 | 11.3 | 15.4 | 12.4 | 12.2 | | $F(1, 1)$ | 10 | 1,000 | 14.9 | 14.9 | 9.2 | 8.6 | 14.8 | 6.6 | 6.6 | | $F(1, 1)$ | 100 | 50 | 302.2 | 685.9 (29 of 30) | 280.3 | 270.6 | 343.0 (29 of 30) | 281.4 | 277.3 | | $F(1, 1)$ | 100 | 1,000 | 302.7 | 441.5 | 433.7 | 435.9 | 346.7 | 168.2 | 167.3 | | Gaussian | 10 | 50 | 14.6 | 11.4 | 11.3 | | 12.1 | 12.2 | | | Gaussian | 10 | 1,000 | 14.6 | 8.8 | 8.6 | | 6.4 | 6.4 | | | Gaussian | 100 | 50 | 304.2 | 274.3 | 281.3 | | 280.9 | 283.3 | | | Gaussian | 100 | 1,000 | 305.3 | 405.2 | 406.4 | | 179.8 | 179.0 | | | Cauchy-contaminated | 10 | 50 | 14.2 | 10.7 | 11.0 | | 11.9 | 11.4 | | | Cauchy-contaminated | 10 | 1,000 | 14.8 | 6.5 | 9.4 | | 8.1 | 7.3 | | | Cauchy-contaminated | 100 | 50 | 300.0 | 282.7 | 284.6 | | 300.5 | 285.9 | | | Cauchy-contaminated | 100 | 1,000 | 300.6 | 249.6 | 406.6 | | 250.7 | 180.9 | | On one dataset of 100 variables and 50 rows with $F(1, 1)$ marginals, GES and PC on the raw columns stopped with `CopiedColumnsError`; the means leave it out. Every normal-scores fit finished. - **The score.** Fewer errors than `"bic"` on the transformed data at 10 variables and at 100 variables with 50 rows on both runs, and at 100 variables with 1,000 rows on the second run only; below the empty graph wherever GES on the untransformed data is. It made more errors than `"bic"` on the Cauchy-contaminated data with 1,000 rows, from extra edges, and missed more edges on Gaussian data with 100 variables and 50 rows. With 100 variables of degree 6 and 1,000 rows, GES made more errors than the empty graph with every score, on the untransformed Gaussian data too. - **The test.** Fewer errors than `"fisherz"` in all four transformed settings and below the empty graph in all four, within 0.0 to 4.1 of PC on the untransformed data; fewer errors than `"fisherz"` on the Cauchy-contaminated data in all four settings. On Gaussian data with 100 variables and 50 rows it had more extra and more missed edges, with an SHD not worse on both runs, and on the Cauchy-contaminated data with 10 variables and 1,000 rows more extra edges, with a lower SHD. No other package was compared: the rank-based methods of the papers use Spearman's or Kendall's correlation, not normal scores. ### `"student_t"` and `"fisherz"` `"student_t"` reads the partial correlation with Student's t distribution, `"fisherz"` with Fisher's z-transform. On linear-Gaussian data with 10 to 20 variables and 20 to 1,000 rows (weights uniform on $(0.1, 1)$, alpha 0.05, 7 settings), PC with either test made the same errors within the margin in every setting, with means equal to one decimal. On 10,000 draws per row count and conditioning set size of a true independence, one run, both rejected it in 4.5 to 5.5% of draws at alpha 0.05. At alpha 0.01, with 12 to 15 rows, `"fisherz"` rejected it in 0.99 to 1.50% of draws (1.50% with 15 rows given 10 variables) and `"student_t"` in 0.83 to 1.15%; from 20 rows the two were within 0.25 points of each other. `"student_t"` stays for exact p-values when the rows barely exceed the conditioning set, and `rpcmci` keeps it as its default. ### Environments: `env` and `confounded_index` `env` names a column of environment labels, which the search treats as a variable that no data variable causes (Mooij et al., 2020). It is supported in `ges`, `hc`, `tabu`, `boss`, `grasp`, `gfci`, `boss_fci`, and `grasp_fci`. We drew Mooij et al.'s acyclic linear-Gaussian simulation with one context variable, 500 rows per environment, and the columns in random order, 100 datasets per setting: 4 or 10 system variables, changes of mechanism or perfect interventions, and, for the PAG searches, hidden common causes. In two controls one label column holds 11 environments that together shift every variable. The DAG searches' SHD counts the data variables against the graph the index identifies; the PAG searches' counts endpoints over the data variables against FCI-JCI1's PAG. Each entry gives `env` / the rows pooled. | Setting | Empty graph | `ges` | `hc` | `tabu` | `boss` | `grasp` | `cdnod` | |---|---:|---|---|---|---|---|---:| | 4 variables, mechanism changes | 2.83 | 0.73 / 1.40 | 0.90 / 1.83 | 0.43 / 1.37 | 0.44 / 1.45 | 0.45 / 1.31 | 0.66 | | 4 variables, perfect interventions | 2.77 | 0.65 / 1.49 | 0.70 / 1.77 | 0.39 / 1.40 | 0.34 / 1.45 | 0.46 / 1.50 | 0.58 | | 10 variables, mechanism changes | 11.14 | 4.41 / 4.63 | 4.99 / 6.81 | 3.60 / 4.89 | 1.87 / 2.87 | 1.42 / 2.07 | 3.15 | | 10 variables, one column for 11 environments | 10.97 | 7.76 / 4.76 | 8.29 / 6.35 | 7.12 / 4.58 | 5.68 / 2.32 | 5.59 / 2.45 | 5.63 | | Setting | Empty graph | `gfci` | `boss_fci` | `grasp_fci` | `fci_jci` | |---|---:|---|---|---|---:| | 4 variables, mechanism changes | 10.02 | 5.45 / 5.57 | 5.36 / 5.67 | 5.29 / 5.62 | 4.61 | | 4 variables, perfect interventions | 9.74 | 4.90 / 5.17 | 4.60 / 4.91 | 4.66 / 5.00 | 4.73 | | 10 variables, mechanism changes | 51.80 | 35.76 / 36.15 | 34.95 / 35.74 | 35.15 / 35.77 | 35.06 | | 10 variables, confounded environment | 51.28 | 35.40 / 36.41 | 34.58 / 35.69 | 35.17 / 36.05 | 34.90 | | 10 variables, one column for 11 environments | 51.84 | 34.02 / 33.08 | 33.57 / 32.52 | 33.22 / 32.20 | 33.37 | - **DAG searches.** Against pooling, `env` had lower SHD in the three settings with one environment column for `hc`, `tabu`, `boss`, and `grasp`, and for `ges` at 4 variables (at 10, on the second run only), more true arrowheads in all three for all five, and was worse on nothing there. - **PAG searches.** Lower SHD at 10 variables (`gfci` and `grasp_fci` with mechanism changes, all three with the confounded environment) and more true arrowheads in every setting but `grasp_fci` with the confounded environment; at 4 variables more false arrowheads, with an SHD not worse. - **One column for 11 environments.** All five DAG searches had higher SHD and more false arrowheads than pooling, and the PAG searches more false arrowheads (`gfci` and `grasp_fci` higher SHD too). We traced the loss in one further run on 100 datasets, not repeated on fresh seeds. Read as a number, the label misses shifts that do not follow its order, and the search adds edges to explain them; reading the labels as categories (`score_func="cond_gauss"`, `categorical=[]`) gave fewer extra edges than pooling in all five DAG searches, and with 2,000 rows per environment fewer errors in all five (`ges` -2.39 [-3.51, -1.30]). When every variable is shifted, the index identifies no direction beyond the pooled graph's. - **Time.** `env` took 1.1 to 2.0 times as long as pooling, on fits of 0.003 to 0.07 s. `confounded_index` keeps its default, `True`, which allows a hidden variable that drives both the environment and a data variable (FCI-JCI1), where `False` assumes environments assigned from outside (FCI-JCI123). The table gives the endpoint errors at the index, `False` / `True`, against the PAG of the assumptions that hold in each setting: | Setting | `gfci` | `boss_fci` | `grasp_fci` | `fci_jci` | |---|---|---|---|---| | 4 variables, mechanism changes | 0.84 / 1.86 | 0.82 / 1.85 | 0.86 / 1.89 | 0.86 / 1.91 | | 4 variables, perfect interventions | 1.02 / 2.05 | 1.00 / 2.03 | 1.00 / 2.03 | 1.04 / 2.06 | | 10 variables, mechanism changes | 1.32 / 2.28 | 1.30 / 2.26 | 1.30 / 2.24 | 1.42 / 2.39 | | 10 variables, confounded environment | 4.09 / 2.88 | 4.10 / 2.84 | 4.12 / 2.83 | 4.17 / 3.32 | | 10 variables, one column for 11 environments | 12.80 / 15.30 | 12.58 / 15.05 | 12.62 / 14.98 | 12.42 / 16.11 | In all four methods, `False` had lower SHD at the index and more true tails there where the environments were assigned from outside, and higher SHD and many more wrong tails where a hidden variable drives the environment (in `gfci` 6.58 against 5.00 wrong tails). Over the data variables the two differed by at most 0.01 in mean SHD with one environment column, and by at most 0.13 with 11 environments in it. ### RSMAX2's phases `rsmax2` now defaults to `restrict="iamb"` and `maximize="tabu"`; `restrict="mmpc", maximize="hc"` gives the former result, which is also `mmhc` (Tsamardinos et al., 2006). The data are linear-Gaussian with 20, 50, and 100 variables, mean degree 2 and 4, and 1,000 and 5,000 rows (50 datasets per setting), and 200 variables with degree 4 and 5,000 rows (20 datasets). The table gives the mean SHD and the median seconds of the former default. | Variables | Rows | Degree | Empty graph | `"mmpc"`, `"hc"` | `"iamb"`, `"hc"` | `"inter_iamb"`, `"hc"` | `"pc"`, `"hc"` | `"mmpc"`, `"tabu"` | `"iamb"`, `"tabu"` | `"pc"`, `"tabu"` | `"mmpc"`, `"hc"`, s | |---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:| | 20 | 1,000 | 2 | 20.0 | 6.8 | 5.6 | 5.6 | 7.0 | 4.4 | 2.7 | 4.4 | 0.04 | | 20 | 1,000 | 4 | 40.0 | 30.4 | 23.9 | 23.8 | 31.7 | 29.8 | 22.7 | 30.9 | 0.09 | | 20 | 5,000 | 2 | 20.0 | 5.0 | 4.5 | 4.5 | 5.1 | 2.9 | 2.0 | 2.8 | 0.04 | | 20 | 5,000 | 4 | 40.0 | 29.2 | 20.8 | 20.7 | 30.7 | 28.1 | 19.3 | 30.0 | 0.11 | | 50 | 1,000 | 2 | 50.0 | 12.4 | 10.6 | 10.6 | 12.8 | 9.6 | 6.9 | 10.0 | 0.09 | | 50 | 1,000 | 4 | 100.0 | 69.7 | 51.1 | 50.9 | 71.7 | 67.0 | 47.9 | 69.2 | 0.22 | | 50 | 5,000 | 2 | 50.0 | 10.6 | 9.5 | 9.5 | 11.1 | 7.1 | 5.5 | 7.6 | 0.11 | | 50 | 5,000 | 4 | 100.0 | 61.7 | 42.5 | 42.6 | 66.6 | 59.4 | 38.9 | 64.2 | 0.40 | | 100 | 1,000 | 2 | 100.0 | 24.9 | 22.6 | 22.5 | 24.9 | 20.5 | 17.5 | 20.8 | 0.23 | | 100 | 1,000 | 4 | 200.0 | 119.4 | 93.7 | 93.9 | 122.2 | 113.5 | 86.6 | 115.8 | 0.63 | | 100 | 5,000 | 2 | 100.0 | 20.8 | 18.4 | 18.3 | 21.4 | 14.9 | 12.9 | 15.5 | 0.34 | | 100 | 5,000 | 4 | 200.0 | 109.6 | 70.2 | 70.2 | 115.1 | 103.0 | 61.5 | 108.8 | 0.83 | | 200 | 5,000 | 4 | 400.0 | 194.7 | 130.2 | 131.1 | 199.5 | 181.9 | 116.5 | 187.3 | 2.45 | - **`"tabu"` against `"hc"`**, with each of the four restrict phases: lower SHD, more true arrowheads, and a better score in all 13 settings, and worse on nothing on both runs. It took 1.0 to 1.5 times as long on the grid and 0.99 to 1.06 times at 200 variables, where `"hc"` took 0.9 to 9 s. - **`"iamb"` against `"mmpc"`**, under `"hc"`: lower SHD in 10 of 13 settings (not the three smallest sparse ones), fewer missed edges in all 13, fewer extra edges and more true arrowheads in 12, and worse on nothing on either run. It took 0.8 to 1.7 times as long on the grid and 4.1 and 2.7 times on the two runs at 200 variables. - **`"inter_iamb"`** had the same results against `"mmpc"` (3.4 and 3.2 times as long at 200 variables). Against `"iamb"` it was equal on every measure in every setting but one, false arrowheads at 20 variables, degree 4, and 1,000 rows (+0.24 on the first run, equal on the second), though the two graphs differed on up to 0.9 of the datasets of a setting. - **`"pc"` against `"mmpc"`:** higher SHD in all six settings of degree 4 and better on nothing, at 0.28 to 0.44 times the time; its own median fit stayed under 1 s, 0.95 s at 200 variables. With `restrict="iamb"` the restrict phase reads the data alone, and the score search applies `knowledge`. At 300 variables, mean degree 4, and 5,000 rows (20 datasets), the blanket restricts made fewer errors and took longer, and the new default did not finish 2 of the 20 datasets within the 600 s a fit had on the first run; the second run, on fresh datasets, finished all 20. The table gives the first run's means over the datasets each finished. | Phases | Finished | SHD | Extra edges | Missed edges | s | |---|---:|---:|---:|---:|---:| | `"mmpc"`, `"hc"` | 20 of 20 | 253.600 | 22.650 | 156.500 | 3.893 | | `"mmpc"`, `"tabu"` | 20 of 20 | 233.400 | 22.550 | 156.250 | 4.041 | | `"iamb"`, `"hc"` | 18 of 20 | 189.778 | 1.722 | 114.389 | 12.031 | | `"iamb"`, `"tabu"`, the default | 18 of 20 | 169.833 | 1.778 | 114.000 | 12.297 | | `"inter_iamb"`, `"hc"` | 18 of 20 | 189.222 | 1.667 | 114.333 | 14.679 | | `"inter_iamb"`, `"tabu"` | 18 of 20 | 169.444 | 1.722 | 113.778 | 14.882 | | `"pc"`, `"hc"` | 20 of 20 | 254.050 | 28.850 | 154.100 | 1.727 | | `"pc"`, `"tabu"` | 20 of 20 | 234.650 | 28.750 | 153.900 | 1.829 | The empty graph's SHD is 600.00. On both runs, `"iamb"` and `"inter_iamb"` had lower SHD, fewer extra and missed edges, and fewer false and more true arrowheads than `"mmpc"`, and took 2.86 and 3.37 times as long on the first run and 2.96 and 3.42 on the second; `"pc"` took 0.41 and 0.42 times as long, with more extra edges. On the first run `"inter_iamb"` was equal to `"iamb"` on every measure. `"tabu"` had lower SHD and a better score than `"hc"` with each restrict phase, with no difference in time. ### `invariance_test` in IGSP and UT-IGSP `igsp` and `ut_igsp` (Wang et al., 2017; Squires et al., 2020) now raise `ValueError` for `invariance_test="indicator"` with `indep_test="fisherz"` or `"student_t"`, and name `"gaussian"`. A partial correlation against an indicator sees only a shift of a variable's mean, while `"gaussian"` also sees a change of its variance or of its weights. `"indicator"` stays for the categorical, mixed-data, and kernel tests, where `None` picks it. We ran Squires et al.'s simulations, where an intervention moves the mean (a shift of +1, or a perfect intervention to $N(1, 0.1)$, with 0 or 3 unknown off-target interventions, alpha $10^{-5}$), two controls that keep the mean (a doubled noise standard deviation and halved weights), and Yang et al.'s (2018) perfect, inhibiting, and imperfect interventions. Mean SHD against the true interventional equivalence class, first run / second run (empty graph 15 in Squires et al.'s settings and the controls, 8 in Yang et al.'s; 100 datasets per setting); a dash marks a setting that was not run again because the values did not differ. | Setting | Rows per setting | Mean moves | `ut_igsp`, `"gaussian"` | `ut_igsp`, `"indicator"` | `igsp`, `"gaussian"` | `igsp`, `"indicator"` | |---|---:|---|---|---|---|---| | Shift, no off-targets | 1,000 | yes | 1.61 / - | 1.60 / - | 1.62 / - | 1.62 / - | | Shift, 3 off-targets | 1,000 | yes | 1.51 / - | 1.47 / - | | | | Perfect, no off-targets | 1,000 | yes | 1.56 / 1.71 | 1.74 / 1.79 | 1.59 / 1.67 | 1.59 / 1.66 | | Perfect, 3 off-targets | 1,000 | yes | 1.28 / 1.41 | 1.39 / 1.48 | | | | Squires et al., four settings | 5,000 | yes | 0.11-0.25 / - | 0.11-0.24 / - | 0.19-0.20 / - | 0.19-0.20 / - | | Noise sd doubled | 1,000 | no | 0.99 / 0.92 | 2.63 / 2.92 | 1.05 / 1.04 | 2.27 / 2.10 | | Weights halved | 1,000 | no | 1.50 / 1.58 | 3.83 / 4.35 | 1.35 / 1.26 | 1.39 / 1.28 | | Yang et al., perfect, 8 settings | 10,000 | no | | | 0.66 / 0.77 | 0.89 / 0.96 | | Yang et al., inhibiting, 8 settings | 10,000 | no | | | 0.70 / 0.81 | 0.88 / 0.97 | | Yang et al., imperfect, 8 settings | 10,000 | no | | | 0.90 / 0.79 | 0.96 / 0.97 | - Where the intervention moves the mean, `"indicator"` was better nowhere. With perfect interventions, 3 off-targets, and 1,000 rows, `ut_igsp` with `"indicator"` missed more unknown targets (a mean of 0.13 and 0.12 on the two runs, against 0.00 and 0.00). - Where it keeps the mean, `"indicator"` had higher SHD in `ut_igsp` under both changes and in `igsp` under the variance change, and `ut_igsp` found the exact class less often (0.27 and 0.16 of the datasets against 0.66 and 0.64 under the variance change) and named fewer false targets (0.06 and 0.12 against 0.21 and 0.24 under the variance change, 0.05 and 0.12 against 0.22 and 0.27 under the weight change). In Yang et al.'s settings `igsp` had higher SHD with `"indicator"` at 8 settings and 10,000 rows for all three kinds, and no difference repeated at 2 settings or 1,000 rows. - `"indicator"` took 0.36 to 0.46 times as long in `ut_igsp` and 0.70 to 0.98 in `igsp`, on fits of 0.02 to 0.26 s. Under `indep_test="kci"` the two values gave the same graph on every dataset in both settings run: Yang et al.'s perfect interventions with 2 settings and 1,000 rows (40 datasets, SHD 1.825, empty graph 8.00), and 8 do-interventions on nonlinear additive-noise data with 10 variables and 1,000 rows per setting (100 datasets, SHD 1.02, empty graph 8.00), after Heinze-Deml et al. (2018). With one target per setting, IGSP asks only whether a variable's distribution differs from the observational rows, with no conditioning set, so that setting does not reach the conditional questions where the two tests could differ. ### Exact search: one strategy `exact_search` drops `search_method="dp"`, which now raises `ValueError`; A*, the default, remains. The two returned the same DAG on all 160 datasets compared, and neither differed from the other by our margins of 1.5 times in time or memory. On 20 datasets per size, the medians of each fit's peak memory above the process's size before it (about 164 MB) and of its seconds were: | Variables | A* peak, MB | Dynamic program peak, MB | Ratio | A*, s | Dynamic program, s | Ratio | |---:|---:|---:|---:|---:|---:|---:| | 12 | 1.28 | 1.02 | 0.80 | 0.157 | 0.140 | 0.89 | | 14 | 6.56 | 5.41 | 0.84 | 0.639 | 0.548 | 0.85 | | 16 | 27.76 | 23.26 | 0.83 | 3.746 | 2.939 | 0.80 | | 18 | 106.06 | 81.74 | 0.77 | 20.835 | 15.119 | 0.74 | | 20 | 413.47 | 274.33 | 0.67 | 79.741 | 62.489 | 0.79 | The ratios are medians of paired ratios, dynamic program over A*. Both peaks grew about three- to fivefold for every two added variables, and the dynamic program took a little less memory and time at every size. ### Mixed-data tests in PC and FCI `indep_test="degen_gauss"` and `"cond_gauss"` are supported in `pc` and `fci`; the other methods that take them keep them experimental. `None` still picks `"cond_gauss"` on data with declared categorical columns. We drew the data with Tetrad's own simulators, with the values of the papers' Appendix B: two conditional-Gaussian settings (Andrews et al., 2018, 2019), `"cond_gauss"`'s, and one in which the categorical variables stand for latent Gaussian variables (the Lee and Hastie model, Andrews et al., 2019), `"degen_gauss"`'s, each with 100 variables, mean degree 2, 1,000 rows, and alpha 0.001; and Andrey's mixed generator with 20 variables. There are 20 datasets per setting. The table gives SHD for PC and endpoint SHD for FCI, first run / second run; Tetrad's means are over the datasets it finished, given in brackets. | Data | Method | Empty graph | `"degen_gauss"` | `"cond_gauss"` | `"fisherz"` on the codes | Tetrad, DG test | Tetrad, CG test | |---|---|---|---|---|---|---|---| | Conditional Gaussian (2018) | PC | 100.00 / 99.90 | 58.00 / 58.75 | 57.05 / 53.65 | 72.50 / 71.65 | not run | 0 and 0 of 20 finished | | Conditional Gaussian (2018) | FCI | 199.60 / 198.40 | 130.50 / 131.45 | 124.80 / 123.25 | 152.00 / 150.35 | not run | 2 and 1 of 20 finished | | Conditional Gaussian (2019) | PC | 99.95 / 100.00 | 61.15 / 57.70 | 56.05 / 54.45 | 74.80 / 68.00 | not run | 2 and 2 of 20 finished | | Conditional Gaussian (2019) | FCI | 198.30 / 202.40 | 135.15 / 137.15 | 127.05 / 129.45 | 152.45 / 149.50 | not run | 4 and 1 of 20 finished | | Lee and Hastie | PC | 100.00 / 100.00 | 42.35 / 47.05 | 46.50 / 49.75 | 61.05 / 64.75 | 108.31 / 111.32 (16, 19) | 56.21 / 61.26 (19, 19) | | Lee and Hastie | FCI | 201.10 / 199.30 | 113.40 / 118.80 | 120.95 / 123.05 | 138.35 / 140.70 | 216.56 / 217.79 (16, 19) | 120.95 / 125.56 (19, 18) | | Andrey's mixed generator | PC | 20.00 / 20.00 | 8.25 / 6.50 | 5.60 / 5.30 | 9.85 / 9.40 | 16.80 / 18.30 (20, 20) | 5.33 / 7.89 (15, 18) | | Andrey's mixed generator | FCI | 39.10 / 39.30 | 18.20 / 15.15 | 15.05 / 13.35 | 20.85 / 18.75 | 29.50 / 31.80 (20, 20) | 14.50 / 13.93 (16, 15) | - **`"degen_gauss"`** made fewer errors than `"cond_gauss"` on the Lee and Hastie data, in PC and FCI on both runs, with fewer missed edges and more true arrowheads, and fewer than Tetrad's DG test on the datasets both finished. It made more errors than `"cond_gauss"` on the conditional-Gaussian data from 2019 and on Andrey's generator, in both methods, and on the 2018 data in FCI (in PC on the second run only), and more extra edges and false arrowheads wherever the two differed. - **`"cond_gauss"`** made fewer errors than `"fisherz"` on the category codes in every setting, in both methods and both runs, and fewer than the empty graph in its own settings. Tetrad's CG test, run by causal-cmd, stopped with an error on all but 0 to 4 of the 20 datasets of each of those settings and runs, too few to compare with. Where it finished on most datasets, on the Lee and Hastie data and Andrey's generator, `"cond_gauss"` made no more errors than it: fewer in PC on the Lee and Hastie data on both runs, and no difference elsewhere. - **Time.** At 100 variables the median fit with `"cond_gauss"` took 0.26 to 0.35 s, and `"degen_gauss"` 1.78 to 2.16 times as long. ### BDeu and the multinomial BIC in GES GES on categorical data takes `score_func="bdeu"`, the default, or `"discrete_bic"`. We drew random networks of 20 variables with 2 or 3 categories and the CHILD and ALARM networks with their own tables, 100 datasets per setting (20 at 100 variables), with an equivalent sample size of 1 and a structure prior of one expected parent per variable. Each entry gives SHD / extra edges / missed edges; datasets with a constant column, on which GES raises with either score, are left out (up to 5 of 100 in a setting). | Network | Rows | Empty graph | `"bdeu"` | `"discrete_bic"` | |---|---:|---:|---|---| | Random, 20 variables | 100 | 20.00 | 16.84 / 0.46 / 13.69 | 17.66 / 2.75 / 10.60 | | CHILD | 100 | 25.00 | 17.51 / 0.73 / 11.37 | 20.30 / 2.06 / 10.35 | | ALARM | 500 | 46.00 | 12.87 / 2.37 / 5.78 | 27.01 / 4.59 / 11.65 | | Random, 20 variables | 1,000 | 20.00 | 6.04 / 0.30 / 3.60 | 5.70 / 0.60 / 2.68 | | CHILD | 1,000 | 25.00 | 9.47 / 0.14 / 3.94 | 8.71 / 0.23 / 3.60 | | Random, 20 variables | 10,000 | 20.00 | 1.65 / 0.37 / 0.40 | 1.70 / 0.43 / 0.35 | | CHILD | 10,000 | 25.00 | 0.00 / 0.00 / 0.00 | 0.01 / 0.01 / 0.00 | | ALARM | 5,000 | 46.00 | 5.99 / 1.52 / 2.26 | 11.14 / 3.04 / 4.12 | | Random, 100 variables | 2,000 | 100.00 | 19.21 / 1.00 / 11.37 | 28.00 / 8.05 / 8.53 | - With 100 or 500 rows, `"discrete_bic"` had higher SHD and more extra edges on all three networks on both runs (on ALARM +14.14 and +13.93), and missed fewer edges on the random networks and CHILD. - With 1,000 rows it missed fewer edges and found more true arrowheads on both small networks, with slightly more extra edges, and had lower SHD on CHILD. - With 10,000 rows the two scores were equal on the random networks and CHILD on the first run, which was not repeated; on ALARM at 5,000 rows and on the random networks of 100 variables `"discrete_bic"` made more errors. - At 100 variables the median `"bdeu"` fit took 1.557 and 1.837 s on the two runs, and `"discrete_bic"` 1.04 and 1.03 times as long. ### Knowledge parts `required_paths` in `tabu` and `forbidden_paths` in `iamb`, `inter_iamb`, and `mmpc` are supported, with the differences below stated in their Limitations. We reran the knowledge-paths comparison of 0.17.0 on its datasets: simulated linear-Gaussian graphs of 10 to 50 variables, 500 and 2,000 rows, mean degree 2 and 4, with 5, 10, or 30% of the pairs as claims, seeds 0-19, and seeds 100-119 for any row worse on the first. The knowledge step passed its exactness check on all 30,424 graphs. - **`tabu` with `required_paths`.** With the required paths, `tabu` made fewer errors against the true DAG than without them in all 18 rows, and at its default score no more than bnlearn's `tabu` given the same edges. With the plain BIC (`ebic_gamma=0.0`), at 20 variables, 500 rows, degree 2, and 5% of the pairs, it made more errors against the true DAG than bnlearn's: +3.55 [+0.60, +7.40] and +3.15 [+0.35, +6.70] on the two seed blocks. Its start graph, tabu list, and stopping rule are bnlearn's, and with ties broken by column position (`tie_break="position"`) it returned bnlearn's DAG on 39 of the 40 datasets. With the default ties, which do not depend on the column order, the difference on 160 further datasets was -0.08 [-1.12, +0.93]. - **`iamb`, `inter_iamb`, and `mmpc` with `forbidden_paths`.** At 50 variables and degree 2, the fits with the claims were further, by 0.65 to 1.95 errors per dataset, from the class the claims define than the fits without them were, on both seed blocks pooled, while they were closer to the true DAG in every such row. The claims moved each graph toward that class (in `iamb` at 2,000 rows and 30%, -4.35 [-5.425, -3.275] errors), and the class moved further from the graph learned without them (+5.70). Most of the difference sits in graphs with conflicting orientations, which stand for no DAG and where the claims can direct only undirected edges: over 80 datasets `iamb` returned 20 such graphs, `mmpc` 29, and `pc` 5, and bnlearn's `iamb` and `inter.iamb` 19. `required_paths` is supported in `mmhc` and `rsmax2` too, and `forbidden_paths` was already. Both ran on 12 settings x 3 shares x 3 parts beside bnlearn's `mmhc` and `rsmax2`, and `rsmax2` with `restrict="mmpc", maximize="hc"`, its reference's phases, returned `mmhc`'s result on all 5,280 records. The table counts the rows (of 36) better, tied, and worse against the graph without the claims and against bnlearn's fit given the same edges; a worse row ran again on seeds 100-119. | Part | Without the claims: better / tied / worse | Against bnlearn, default score: better / tied / worse / worse again | Against bnlearn, `ebic_gamma=0.0`: better / tied / worse / worse again | |---|---|---|---| | `required_paths` | 33 / 3 / 0 | 10 / 26 / 0 / 0 | 2 / 30 / 4 / 4 | | `forbidden_paths` | 31 / 5 / 0 | 6 / 30 / 0 / 0 | 3 / 33 / 0 / 0 | | All parts | 35 / 1 / 0 | 8 / 26 / 2 / 0 | 0 / 29 / 7 / 4 | The four rows that repeated are the 10 and 30% shares at 50 variables, degree 2, with 500 and 2,000 rows, where the required edges name 49.0 to 50.0 of the 50 true edges. There, with the plain BIC, the fit made +1.20 [+0.40, +2.20] and +0.90 [+0.40, +1.40] more errors against the true DAG than bnlearn's on seeds 0-19 (+1.00 and +0.60 to +0.70 on seeds 100-119), all of it extra edges, while the default score made 1.1 to 3.7 fewer. The difference lies in the candidate search. Andrey tests each candidate against every subset of the current members, required ones included, as the MMPC paper defines; bnlearn's forward phase starts each target's candidate set from its required neighbors and tests only the sets that hold the last of them. Given bnlearn's candidate pairs, Andrey's hill climbing returned bnlearn's graph on all 20 datasets of each of those rows. The [comparison page][kp-page] and the [summary][kp-summary] have every row. ### The pair methods' `alpha` `anm`, `pnl`, and `loci` (Hoyer et al., 2009; Zhang and Hyvarinen, 2009; Immer et al., 2023) take `alpha=None`, the default, which names a direction on every pair, or a significance level, which draws an edge only when one direction passes the independence test and the other fails. We used the levels 0.02 for ANM, 0.01 for PNL, and 0.05 for LOCI, on pairs the model identifies, on linear-Gaussian pairs, and on independent pairs. The table gives the share of pairs named right and wrong, first run / second run, and why the level drew no edge. | Pairs | Rows | `None`, right | `None`, wrong | Level, right | Level, wrong | Level, no edge: both pass | Neither passes | |---|---:|---|---|---|---|---|---| | ANM | 300 | 0.80 / 0.83 | 0.20 / 0.17 | 0.22 / 0.29 | 0.00 / 0.00 | 0.78 / 0.71 | 0.00 / 0.00 | | ANM | 1,000 | 0.93 / 0.94 | 0.07 / 0.06 | 0.66 / 0.76 | 0.00 / 0.00 | 0.34 / 0.24 | 0.00 / 0.00 | | ANM, linear-Gaussian | 300 | 0.49 / 0.53 | 0.51 / 0.47 | 0.00 / 0.01 | 0.00 / 0.00 | 1.00 / 0.99 | 0.00 / 0.00 | | PNL | 500 | 0.98 / 0.98 | 0.02 / 0.02 | 0.81 / 0.82 | 0.00 / 0.00 | 0.17 / 0.14 | 0.02 / 0.04 | | PNL | 2,000 | 1.00 / 1.00 | 0.00 / 0.00 | 0.30 / 0.35 | 0.00 / 0.00 | 0.00 / 0.00 | 0.70 / 0.65 | | PNL, linear-Gaussian | 500 | 0.54 / 0.52 | 0.46 / 0.48 | 0.00 / 0.00 | 0.00 / 0.00 | 1.00 / 1.00 | 0.00 / 0.00 | | LOCI, Gumbel noise | 1,000 | 0.95 / 0.94 | 0.05 / 0.06 | 0.46 / 0.42 | 0.00 / 0.00 | 0.54 / 0.58 | 0.00 / 0.00 | | LOCI, Laplace noise | 1,000 | 0.91 / 0.93 | 0.09 / 0.07 | 0.52 / 0.53 | 0.02 / 0.00 | 0.44 / 0.43 | 0.02 / 0.04 | | LOCI, Gumbel noise | 2,000 | 0.99 / 0.99 | 0.01 / 0.01 | 0.79 / 0.79 | 0.00 / 0.00 | 0.21 / 0.19 | 0.00 / 0.02 | | LOCI, linear-Gaussian | 1,000 | 0.58 / 0.50 | 0.42 / 0.50 | 0.00 / 0.00 | 0.00 / 0.00 | 1.00 / 1.00 | 0.00 / 0.00 | On independent pairs `None` drew an edge on every pair and the level on 0.00 to 0.04 of them. On identifiable pairs the level named fewer directions right in every setting, and fewer wrong in four of the seven; in the other three `None` was rarely or never wrong. With few rows both directions pass; with many rows PNL rejects both on most pairs, the true one included. Neither value is better on both counts, so the default stays. `skewd` with `criterion="independence"` ran at the level 0.05 on 20 pairs per setting with 1,000 rows, with a cap of 1 hour per fit; a fit at the cap counts as not finished. The level's rows are read off the same fits, and on the 3 pairs we checked a fit with `alpha=0.05` gave the same graph and p-values. The table gives the first run / second run over the pairs that finished. | Pairs | Finished | `None`, right | `None`, wrong | Level, right | Level, wrong | Level, no edge | |---|---|---|---|---|---|---| | Identifiable, location-scale with Gumbel noise | 19 and 17 of 20 | 0.842 / 0.824 | 0.158 / 0.176 | 0.421 / 0.294 | 0.053 / 0.118 | 0.526 / 0.588 | | Linear-Gaussian | 20 and 20 of 20 | 0.450 / 0.450 | 0.550 / 0.550 | 0.000 / 0.000 | 0.000 / 0.000 | 1.000 / 1.000 | | Independent | 18 and 18 of 20 | | | | | 1.000 / 1.000 | On identifiable pairs the level named fewer directions right on both runs, and whether it named fewer wrong was not settled on either run. `None` drew an edge on every independent pair and named a direction on every linear-Gaussian pair, wrong on about half of them, where the level drew no edge. A median fit took 1,928.089 to 2,500.436 s. ### DirectLiNGAM's measures `direct_lingam` takes `measure="pwling"`, the default, `"tanh"`, or `"skew"` (Hyvarinen and Smith, 2013). We ran the paper's simulations at its sizes, 1,000 datasets per setting, with a second run of 1,000 for every setting but one, and two larger chains of 50 variables and 2,000 rows. The table counts the settings where each measure was better or worse than `"pwling"` on both runs, by SHD and by the share of true edges whose cause comes first in the order. | Simulation | Noise | Settings | `"tanh"` against `"pwling"` | `"skew"` against `"pwling"` | |---|---|---:|---|---| | Sim. 1: fully connected, 2 and 5 variables, 100 to 400 rows | logistic | 4 | better in 3 | worse in 4 | | Sim. 2: added measurement noise, 2 to 8 variables, 10,000 rows | logistic | 4 | better in 3 | worse in 4 | | Sim. 5: 5 to 20 variables, 500 and 900 rows | logistic | 5 | better in 3 | worse in 5 | | Chain, 50 variables, 2,000 rows | logistic | 1 | equal, at 0.16 of the time | worse | | Sim. 3: 2 and 5 variables, 100 and 200 rows | skewed with rare large values (5% from $N(3, 1)$) | 2 | worse in 1 | better in 1 | | Sim. 4: added measurement noise, 2 to 8 variables, 10,000 rows | the same | 4 | worse in 4 | better in 4 | | Sim. 3 | skewed (20% from $N(3, 1)$) | 2 | worse in 2 | worse in 2 | | Sim. 6: 5 to 20 variables, 500 and 900 rows | the same | 5 | worse in 5 | worse in 5 | | Chain, 50 variables, 2,000 rows | the same | 1 | worse | worse | | Controls: chains and fully connected graphs | uniform | 9 | worse in 9 | worse in 9 | | Controls: chains and fully connected graphs | symmetric two-component mixture | 9 | worse in 9 | worse in 9 | In the settings not counted, the two runs did not agree on a difference. The gains are small: with logistic noise at 5 variables and 100 rows, `"tanh"` ordered 69.6% of the edges right against 65.0% for `"pwling"` (SHD 4.38 against 4.80); with added noise at 8 variables, 94.8% against 92.6% (SHD 2.43 against 3.06); on the logistic chain of 50 variables, 97.0% against 96.9% (SHD 5.55 against 5.61) in a median 0.64 s against 3.89 s. With rare large values and added noise at 8 variables, `"skew"` ordered 97.8% against 95.5% (SHD 1.91 against 2.62). The losses are larger: with uniform noise at 5 variables and 400 rows, `"pwling"` ordered 100.0%, `"skew"` 46.1%, and `"tanh"` 9.6%. `"pwling"` ordered 90.3 to 100% of the edges right in every control. `multi_group_direct_lingam`, `varma_lingam`, and `longitudinal_lingam` share the measure code and were not run. ### SkewD on a GPU `skewd` and `skewd_mv` run their CMA-ES searches together on a GPU, with PyTorch in float64, when `andrey.config(backend="cuda")` pins it, and on PyTorch's CPU with `backend="cpu"`. Each search keeps its own distribution, random stream, and stopping rule, as on NumPy; the default, `"auto"`, and `optimizer="lbfgs"` keep the NumPy path, whose results do not change. In `skewd_mv`, PC's tests follow the pin too. We measured a build of the GPU path on the 0.19.0 code on one node with an AMD EPYC 9224 and an NVIDIA H100 NVL, with PC on NumPy in both versions of `skewd_mv`, so that a difference in a graph comes from SkewD's fits alone. The cases are the paper's pairs and graphs of the 0.19.0 card ([SkewD](0.19.0.md#skewd)), with 1,000 rows. The table gives wall seconds, CUDA start-up left out (0.5 to 0.9 s). | Case | CPU, 1 thread | CPU, 16 threads | GPU, `n_jobs=1` | GPU, `n_jobs=16` | CPU 1 / GPU 16 | CPU 16 / GPU 16 | CPU 16 / GPU 1 | |---|---:|---:|---:|---:|---:|---:|---:| | Pair, LSs at skewness 0.985, seed 0 | 1,442 | 172 | 68 | 59 | 24.4 | 2.9 | 2.5 | | Graph, 6 variables, seed 0 | 572 | 78 | 56 | 54 | 10.7 | 1.5 | 1.4 | | Graph, 10 variables, seed 18 | 1,608 | 232 | 168 | 185 | 8.7 | 1.3 | 1.4 | On the GPU with `n_jobs=1`, the conditional models of the 6-variable graph took 49 s in all against 556 s on one CPU thread, and those of the 10-variable graph 153 s against 1,584 s; PC took 6.7 to 18.1 s. Sixteen workers changed the GPU's wall time little (68 to 59 s for the pair, 168 to 185 s for the 10-variable graph), since they compete for the device. - **Same decisions.** On seed 0 of each of the eight pair sets, the GPU and 16 CPU threads named the same direction under both criteria on all eight, and on seed 0 of each graph size and seed 18 of the 10-variable size they returned the same graph (SHD 8, 14, and 12 on both). - **Same searches up to rounding.** Of the searches run on the same rows, penalties, and start in both, the GPU's best value differed from the CPU's by at most 2.3e-11, and none by more than 1e-6. The chosen penalties were equal in all but one direction of the LSs pair at 0.985, where that direction's log-likelihood differed by about 1 nat over the 1,000 rows, and one of 17 models of a 10-variable graph, which differed by 0.46. Elsewhere the final log-likelihoods differed by at most 1.1e-6 nats. - **Repeatable.** On the GPU, a fit returned the same log-likelihoods and search values with `n_jobs=1` and 16 and when run twice. On the 0.20.0 code, the CPU results are the release's bit for bit: on one AMD EPYC 7713, 30 fits of `skewd` and `skewd_mv` with both optimizers, both criteria, 1 and 4 workers, and the default and a `"numpy"` pin gave the same float values as without the GPU path. On an NVIDIA A100-SXM4-80GB and an NVIDIA L40S, a short `skewd_mv` fit with `backend="cuda"` ran PC's 15 KCI tests and the searches on the GPU and returned NumPy's DAG. The speed of `backend="cpu"` was not measured. ### Nonlinear conditional independence tests in PC `indep_test` takes four tests of conditional independence for nonlinear dependence: `"kci"` (Zhang et al., 2011), `"rcot"` (Strobl et al., 2019), `"cmiknn"` (Runge, 2018), and `"gpdc"` (Runge et al., 2019). We compared them in `pc` at alpha 0.05, with `"fisherz"` beside them, on additive nonlinear effects $x = \sum w\,(p + \sin p) + e$ with Gaussian noise $e$, and on non-monotone ones, with $\cos p$ in place of $p + \sin p$, which a partial correlation does not see. The graphs are Erdos-Renyi with average degree 2, the columns standardized and in random order. The table gives the mean SHD (the empty graph's equals the number of variables) and the median seconds. | Effects | Variables | Rows | Datasets | `"kci"` | `"rcot"` | `"cmiknn"` | `"gpdc"` | `"fisherz"` | |---|---:|---:|---:|---|---|---|---|---| | Additive | 5 | 200 | 30 | 1.60, 0.163 s | 1.90, 0.060 s | 1.83, 6.955 s | 1.37, 1.298 s | 1.93, 0.003 s | | Additive | 5 | 500 | 30 | 0.83, 1.544 s | 1.20, 0.115 s | 0.97, 24.736 s | 1.07, 13.963 s | 1.93, 0.003 s | | Additive | 10 | 200 | 30 | 5.03, 0.535 s | 4.90, 0.167 s | 5.40, 29.824 s | 4.90, 3.949 s | 5.20, 0.004 s | | Additive | 10 | 500 | 20 | 2.65, 5.532 s | 2.50, 0.270 s | 3.90, 91.131 s | 2.80, 38.492 s | 5.00, 0.004 s | | Additive | 20 | 200 | 20 | 11.70, 1.402 s | 10.90, 0.381 s | 13.45, 90.533 s | 9.70, 10.629 s | 10.55, 0.005 s | | Additive | 20 | 500 | 10 | 7.20, 18.115 s | 8.20, 0.705 s | 8.10, 326.070 s | 7.40, 125.216 s | 9.20, 0.006 s | | Non-monotone | 5 | 200 | 30 | 3.30, 0.150 s | 3.37, 0.066 s | 3.60, 4.383 s | 3.07, 1.988 s | 5.13, 0.005 s | | Non-monotone | 5 | 500 | 30 | 2.63, 1.068 s | 2.30, 0.105 s | 2.43, 17.356 s | 2.40, 13.258 s | 5.17, 0.002 s | | Non-monotone | 10 | 200 | 30 | 5.93, 0.369 s | 7.00, 0.130 s | 7.17, 18.379 s | 7.30, 3.449 s | 11.93, 0.004 s | | Non-monotone | 10 | 500 | 20 | 5.20, 5.379 s | 4.50, 0.248 s | 6.15, 82.877 s | 4.80, 57.083 s | 12.85, 0.004 s | | Non-monotone | 20 | 200 | 20 | 14.45, 0.804 s | 14.45, 0.236 s | 15.10, 47.841 s | 16.60, 7.553 s | 25.40, 0.004 s | | Non-monotone | 20 | 500 | 20 | 10.70, 11.009 s | 10.45, 0.591 s | 10.30, 215.572 s | 13.30, 103.088 s | 27.70, 0.005 s | Every fit finished, except that on the second run `"cmiknn"` finished 7 of the 10 datasets with additive effects, 20 variables, and 500 rows. Every one of the four tests made fewer errors than the empty graph in every setting on both runs; `"fisherz"` did not on the non-monotone effects. On both runs: - **`"kci"`** missed fewer edges than `"rcot"` (5 non-monotone settings), `"cmiknn"` (8, both kinds of effects), and `"gpdc"` (5 non-monotone). It found more true arrowheads than `"cmiknn"` (4 settings) and `"rcot"` (1), had lower SHD than `"gpdc"` (3 non-monotone settings) and `"cmiknn"` (1 additive), and had fewer extra edges than `"gpdc"` (2). On non-monotone effects it drew more false arrowheads than `"rcot"` and `"cmiknn"` (3 settings each) and more extra edges than `"cmiknn"` (2) and `"rcot"` (1). `"cmiknn"` and `"gpdc"` took longer than it in 7 settings each. - **`"rcot"`** missed more edges than `"kci"` in 5 non-monotone settings and than `"gpdc"` in 3 additive ones, and found fewer true arrowheads than `"kci"` in one setting and than `"gpdc"` in one. It had lower SHD and fewer missed edges than `"cmiknn"` in one additive setting. On non-monotone effects it drew fewer false arrowheads and fewer extra edges than `"kci"` in one setting each, and had lower SHD, fewer extra edges, and fewer false arrowheads than `"gpdc"` at 20 variables and 500 rows. - **`"cmiknn"`** missed more edges than `"kci"` (8 settings) and `"gpdc"` (6) on both kinds of effects, and than `"rcot"` in one additive setting, and found fewer true arrowheads than `"kci"` (4 settings), `"gpdc"` (3), and `"rcot"` (1). On non-monotone effects at 20 variables and 500 rows it had fewer extra edges and false arrowheads than `"kci"` and `"gpdc"`, and lower SHD than `"gpdc"`. It was the slowest (11 settings against `"gpdc"`, 7 against `"kci"`). - **`"gpdc"`** missed fewer edges than `"cmiknn"` (6 settings) and `"rcot"` (3 additive), found more true arrowheads than `"cmiknn"` (3) and `"rcot"` (1), and took less time than `"cmiknn"` (11 settings) and more than `"kci"` (7). On non-monotone effects it missed more edges than `"kci"` (5 settings), had more extra edges than `"kci"` (2), `"rcot"` (3), and `"cmiknn"` (2), and had higher SHD than `"kci"` (3 settings) and than `"rcot"` and `"cmiknn"` at 20 variables and 500 rows, where it also drew more false arrowheads than both. In one run of the tests alone, with 200 and 500 rows and conditioning sets of 0 to 3 variables, every test rejected a true independence in 3 to 9% of draws with no or one conditioning variable at alpha 0.05; with three, `"cmiknn"` rejected 12 and 13% and `"rcot"` 12.5 and 20.5% (Monte Carlo error 1.5%), `"kci"` 9 and 8%, and `"gpdc"` 2.5% at 200 rows and 8.5% at 500. ### `robust` in NOTEARS and DAGMA `robust=True` follows the first fit of `notears` and `dagma` with the likelihood path of Deng et al. (2024), for linear models whose noise variances differ across variables. We drew linear-Gaussian data with 1,000 rows, the columns in random order: in Deng et al.'s setting, weights on $\pm[0.5, 1.5]$ and noise standard deviations uniform on $[0.1, 0.7]$, on Erdos-Renyi and scale-free graphs with about twice as many edges as variables; and in Zheng et al.'s (2018), weights on $\pm[0.5, 2]$ and unit noise variances, on Erdos-Renyi graphs. The table gives the mean SHD against the CPDAG and the median seconds, on the columns in the simulation's units. | Setting | Graph | Variables | Datasets | Empty graph | `notears` | `notears`, `robust=True` | `dagma` | `dagma`, `robust=True` | |---|---|---:|---:|---:|---|---|---|---| | Unequal noise variances | Erdos-Renyi | 10 | 50 | 19.46 | 15.04, 0.63 s | 11.98, 60.47 s | 9.14, 2.71 s | 10.00, 14.80 s | | Unequal noise variances | Erdos-Renyi | 20 | 30 | 40.87 | 29.77, 4.09 s | 25.00, 97.59 s | 17.03, 4.25 s | 16.83, 26.04 s | | Unequal noise variances | Scale-free | 10 | 30 | 16.00 | 12.17, 0.53 s | 10.40, 61.36 s | 6.83, 2.72 s | 7.50, 14.25 s | | Unequal noise variances | Scale-free | 20 | 30 | 36.00 | 29.33, 2.97 s | 23.27, 84.16 s | 17.27, 4.16 s | 14.70, 24.50 s | | Equal noise variances | Erdos-Renyi | 10 | 20 | 19.95 | 3.75, 1.11 s | 5.25, 91.41 s | 0.55, 2.35 s | 5.00, 34.04 s | | Equal noise variances | Erdos-Renyi | 20 | 20 | 39.70 | 6.20, 4.18 s | 10.15, 111.17 s | 1.15, 3.26 s | 3.80, 32.93 s | On both runs, with unequal variances, `robust=True` missed fewer edges in both methods in all four settings, had lower SHD in `notears` in all four (not in `dagma`), and added more extra edges in `notears` in all four and in `dagma` on the Erdos-Renyi graphs. With equal variances it had higher SHD in `dagma` in both settings and in `notears` at 20 variables. It took about 5 to 13 times as long in `dagma` and about 12 to 25 times in `notears` at 20 variables. Neither value gives a result free of the columns' units: refit on z-scored columns, the CPDAG changed on many pairs under both, and on more pairs with `robust=True` in `notears` in all four settings with unequal variances (on the Erdos-Renyi graphs 11.76 and 25.80 pairs without it, 14.64 and 35.37 with it), and on fewer in `dagma` on the scale-free graphs. On z-scored columns the fits often made more errors than the empty graph, `dagma`'s in every setting, so the table reads the columns in their units. The 50-variable settings were not run. ### CALM's `use_moral_graph` and `standardize` `calm` (Jin et al., 2026) restricts its search to the moral graph by default (`use_moral_graph=True`) and fits the columns as given (`standardize=False`). We ran Erdos-Renyi graphs of 50 variables with mean degree 1 and 4, 1,000 rows, and noise variances from 1 to 16, on the columns as generated, with Andrey's default optimizer schedule. Each entry gives SHD / extra edges / missed edges and the median seconds. | Graph | Datasets | Empty graph | Moral graph, as given (default) | No moral graph, as given | Moral graph, standardized | No moral graph, standardized | |---|---:|---:|---|---|---|---| | Mean degree 1 | 30 | 49.73 | 23.87 / 5.73 / 8.57, 25.07 s | 24.70 / 11.37 / 7.00, 59.90 s | 19.10 / 1.53 / 10.10, 27.96 s | 33.57 / 9.93 / 14.27, 59.83 s | | Mean degree 4 | 20 | 199.10 | 166.60 / 35.15 / 115.20, 96.24 s | 249.70 / 140.00 / 101.55, 100.48 s | 178.70 / 15.70 / 141.55, 92.20 s | 216.55 / 37.25 / 163.15, 113.14 s | On both runs the moral graph gave fewer extra edges in both settings with either `standardize`, lower SHD on the denser graphs and on standardized columns, and more missed edges on the columns as given; without it the fits on the denser graphs made more errors than the empty graph, and on the sparser ones took about twice as long. `standardize=True` gave fewer extra edges in 3 of the 4 comparisons and more missed edges in 3 of 4; its SHD was lower on the sparser graphs with the moral graph and on the denser ones without it, and higher in the other two. The 100-variable setting was not run. ### VARMA-LiNGAM's `prune`, `criterion`, and `structural_ma` We drew 5-variable models at the sizes of Hyvarinen et al. (2010), Section 5.4: an instantaneous matrix with 4 of its 10 possible entries nonzero, each lag matrix with 10 of 25, weights uniform on $\pm[0.05, 0.5]$, and non-Gaussian noise $\mathrm{sign}(z)|z|^c$ with $c$ uniform on $[1.5, 2]$; a VAR(1) model, a VARMA(1, 1) model, the same with every entry of every matrix nonzero, and a VARMA(2, 1) model. The link error counts the missed and extra links of the instantaneous and lagged graphs, and the empty graph's equals the number of true links; the weight errors are mean squared errors of the autoregressive (AR) and moving-average (MA) matrices. | Model | Rows | Datasets | True links | Link error: default | `prune=True` | Missed / extra: default | `prune=True` | AR error: default | `prune=True` | MA error: default | `prune=True` | |---|---:|---:|---:|---:|---:|---|---|---:|---:|---:|---:| | VAR(1) | 100 | 100 | 11.99 | 14.71 | 9.05 | 1.77 / 12.94 | 5.99 / 3.06 | 0.146 | 0.036 | 0.325 | 0.077 | | VAR(1) | 300 | 50 | 11.78 | 13.20 | 5.62 | 0.86 / 12.34 | 3.78 / 1.84 | 0.095 | 0.017 | 0.196 | 0.033 | | VAR(1) | 1,000 | 50 | 12.08 | 12.34 | 3.90 | 0.32 / 12.02 | 2.44 / 1.46 | 0.058 | 0.009 | 0.119 | 0.017 | | VARMA(1, 1) | 100 | 50 | 12.08 | 15.04 | 9.32 | 2.04 / 13.00 | 5.10 / 4.22 | 0.102 | 0.042 | 0.240 | 0.101 | | VARMA(1, 1) | 300 | 50 | 12.06 | 12.98 | 6.32 | 0.82 / 12.16 | 3.46 / 2.86 | 0.041 | 0.014 | 0.093 | 0.030 | | VARMA(1, 1) | 1,000 | 30 | 11.967 | 12.400 | 4.233 | 0.167 / 12.233 | 1.700 / 2.533 | 0.016 | 0.007 | 0.037 | 0.017 | | VARMA(1, 1), dense | 300 | 50 | 30.00 | 2.40 | 6.68 | 2.22 / 0.18 | 6.54 / 0.14 | 0.009 | 0.012 | 0.036 | 0.027 | On both runs `prune=True` had fewer extra links, a lower link error, and lower AR and MA errors in all six sparse settings, and more missed links in all seven; on the dense model its link error and AR error were higher. Without pruning the link error is at or above the empty graph's in every sparse setting. The two took the same time. `criterion` chooses the order from a grid by AIC, BIC, or HQIC; without it the model fits the largest order given. With the grid up to order (2, 2), the table gives the link error and the share of datasets whose order was chosen exactly (20 datasets per setting); the default call fits order (1, 1) with no criterion. | Model | Rows | True links | Order (2, 2), no criterion | AIC | BIC | HQIC | Default | |---|---:|---:|---|---|---|---|---| | VAR(1) | 300 | 12.00 | 32.95, 0.000 | 12.75, 0.950 | 12.75, 0.950 | 12.75, 0.950 | 12.95, 0.000 | | VAR(1) | 1,000 | 12.30 | 32.30, 0.000 | 12.25, 1.000 | 12.25, 1.000 | 12.25, 1.000 | 12.30, 0.000 | | VARMA(1, 1) | 300 | 11.80 | 33.40, 0.000 | 13.30, 0.900 | 12.15, 0.050 | 12.65, 0.350 | 13.45, 1.000 | | VARMA(1, 1) | 1,000 | 11.85 | 32.60, 0.000 | 13.65, 0.950 | 12.40, 0.650 | 13.65, 0.950 | 12.65, 1.000 | | VARMA(2, 1) | 300 | 19.90 | 25.05, 0.000 | 25.05, 0.900 | 23.70, 0.000 | 24.10, 0.400 | 21.00, 0.000 | | VARMA(2, 1) | 1,000 | 20.50 | 23.90, 0.000 | 23.90, 1.000 | 23.60, 0.600 | 23.90, 0.950 | 20.60, 0.000 | On both runs, where the true order lies below the grid's largest, each criterion had fewer extra links, a lower link error, lower weight errors, and the exact order more often than fitting order (2, 2), and BIC missed more links in 2 settings. AIC chose the exact order more often than BIC (3 settings) and missed fewer links, and kept more extra links, with larger weight errors; HQIC lay between them. Each criterion fits every order of the grid, so it took longer: a median of 67.519 to 194.984 s against 21.273 to 58.300 s for order (2, 2) without a criterion. On the default grid, up to order (1, 1), the three criteria also differed. With the true order at the grid's largest, no choice made fewer link errors than the empty graph. `structural_ma=True` gave the same order, AR weights, and links as `False` on every dataset; its MA error was lower on the VARMA(1, 1) models with 300 rows on both runs (0.087 against 0.093, and 0.020 against 0.036 on the dense model), lower on the first run only with 100 rows, and not distinguishable with 1,000. The weights it was scored against are those of the model as we drew it, on independent noise terms; we did not open Kawahara et al. (2011), the source of the option. ### J-PCMCI+'s `time_dummy` `jpcmciplus` (Gunther et al., 2023) adds the dummy of the time step, which stands in for hidden time contexts, whenever the datasets allow it (`time_dummy=None`, the default); `False` leaves it out. We ran the paper's model as its code draws it, with 2 time and 2 space contexts, 5 system variables unless stated, `tau_max=2`, and alpha 0.05: M datasets of T steps each, with half the contexts hidden, a time context among them, or with every context observed. We judged the datasets on which the paper's Assumption 3 holds. The table gives SHD / extra links (10 true links, 20 with 10 system variables). | Contexts | M | T | Datasets | `time_dummy=True` | `False` | |---|---:|---:|---:|---|---| | Half hidden | 10 | 20 | 98 | 5.653 / 1.122 | 9.245 / 2.939 | | Half hidden | 10 | 50 | 98 | 5.000 / 1.378 | 10.612 / 4.245 | | Half hidden | 10 | 100 | 98 | 4.020 / 1.378 | 12.224 / 5.255 | | Half hidden | 10 | 200 | 98 | 4.510 / 1.684 | 14.449 / 6.490 | | Half hidden | 20 | 10 | 98 | 6.327 / 1.153 | 8.224 / 2.071 | | Half hidden | 50 | 10 | 98 | 5.510 / 1.347 | 8.551 / 2.857 | | All observed | 10 | 50 | 100 | 4.300 / 1.080 | 4.460 / 1.200 | | All observed | 10 | 200 | 100 | 3.580 / 1.220 | 4.040 / 1.450 | | All observed, 10 system variables | 10 | 100 | 100 | 9.220 / 3.550 | 9.400 / 3.650 | The rows with the dummy are `time_dummy=True`. On both runs, leaving the dummy out gave higher SHD and more extra links in all six settings with hidden contexts and in the long series with every context observed, and was better in none. The fits took under 1 s; with 15 system variables, 10 datasets, and 200 steps, where the two gave the same SHD (17.240), the median fit took 9.712 s with the dummy and 6.279 s without, a median paired ratio of 0.92, on one run. Memory was not measured. ### Regime-PCMCI's `fdr_method` `rpcmci` keeps each p-value as tested by default (`fdr_method="none"`, as the authors' code does); `"fdr_bh"` corrects them for the false discovery rate. We ran the five 2-variable models of Saggioro et al. (2020), Table 1, with 3,000 steps, 2 regimes, `tau_max=3`, and alpha 0.01, and a 10-variable model of Section 4.4 at a fifth of the paper's length, 3,000 steps, with `tau_max=4` and alpha 0.05. The table gives the link error, the extra links, and the time steps placed in the wrong regime. | Model | Datasets | True links | `"none"` | `"fdr_bh"` | |---|---:|---:|---|---| | Table 1, arrow | 30 | 6 | 0.267 / 0.267 / 100.133 | 0.133 / 0.133 / 100.267 | | Table 1, effect | 30 | 4 | 3.567 / 3.133 / 1409.367 | 2.367 / 1.900 / 1414.933 | | Table 1, lag | 20 | 6 | 0.300 / 0.300 / 164.800 | 0.300 / 0.300 / 161.700 | | Table 1, sign of $X_1$ | 20 | 4 | 0.900 / 0.900 / 67.500 | 0.200 / 0.200 / 67.050 | | Table 1, signs of $X_1$ and $X_2$ | 20 | 6 | 0.450 / 0.450 / 63.850 | 0.300 / 0.300 / 64.150 | | 10 variables, 3,000 steps | 30 (28 for `"fdr_bh"`) | 80 | 157.467 / 122.367 / 1373.167 | 91.179 / 54.393 / 1140.893 | On both runs `"fdr_bh"` had fewer extra links in 4 settings and a lower link error in 3, and put fewer steps in the wrong regime in the 10-variable model; missed links did not differ, nor did the time. The five 2-variable models share their regime paths and noise at a seed, so they are not independent settings. In the 10-variable model both values made more link errors than the empty graph. The model of Table 4 and the 10-variable model at the paper's length did not finish within the cap a fit had and were not run. `"fdr_bh"` finished 28 of the 30 datasets of the 10-variable model on the first run and 27 on the second, and on the second run alone it put more steps in the wrong regime in two of the 2-variable models. ## FGES `andrey.fges` is fast greedy equivalence search (Ramsey et al., 2017), new in 0.20.0 and experimental. It runs the search of GES (Chickering, 2002) in three passes. In the first, a forward phase adds an edge between two variables only when the graph of that one edge scores better than the empty graph, the paper's one-edge faithfulness assumption, and a backward phase follows. The second pass covers the unshielded noncolliders the first left. The third, by default, scans every pair as GES does, which drops the assumption; `one_edge_faithfulness=True` keeps the assumption and skips the third pass. It takes the scores of `andrey.ges` and returns a CPDAG. The [API reference](../api.md#experimental-methods) describes it. The default drops the assumption because the assumption cost accuracy. With it, FGES made more errors than GES under the paper's score at 1,000, 2,000, and 4,000 variables, and again on fresh datasets, and the true adjacencies it missed were the pairs the one-edge screen skips ([The one-edge screen](#the-one-edge-screen)). Without it, FGES made no more errors than GES in any setting, fewer in most settings with mean degree 4, and no more than Tetrad's FGES without the assumption, fewer in most settings. It took less time than GES on average in every setting, least so at 1,000 variables and mean degree 4 ([Time and memory](#time-and-memory)). At 8,000 variables no Andrey method finished within the hour a fit had ([At 8,000 variables](#at-8000-variables)). We ran the simulation of the FGES paper: linear Gaussian structural equation models on Erdos-Renyi DAGs with as many edges as variables or twice as many (mean degree 2 and 4), coefficients drawn uniformly from 0.5 to 1.5 in absolute value with random signs, Gaussian noise, and 1,000 rows, with the columns standardized and in random order, 10 datasets per setting. We used two scores: the paper's, the BIC with 4 times the penalty and no extended-BIC term (`penalty_discount=4.0`, `ebic_gamma=0.0`), and Andrey's default (`penalty_discount=1.0`, `ebic_gamma=1.0`). Each FGES mode is compared with `andrey.ges` under the same score and, under the paper's score, with Tetrad 7.6.10's FGES, the authors' code, with `faithfulnessAssumed` true (the screen and the cover of unshielded noncolliders, as `one_edge_faithfulness=True`) and false (a further pass over every pair, as Andrey's default). Tetrad's extended BIC scales its term by the number of parents, another objective, so Andrey's default score has no Tetrad counterpart. Every fit ran on one core with one BLAS thread, Tetrad's on one thread, on an AMD EPYC 7713, except the fits on Intel Xeon processors at 8,000 variables noted below. The fits of one dataset ran one after another on the same core, with 3 to 16 of our fits at once on a machine, so a ratio between two methods compares fits on the same core under the same load, while sizes ran under different loads. A fit had one hour from the start of its process. A fit that did not finish is reported as not finished and is not scored, as the empty graph or otherwise. A method that did not finish a fit in a setting was not run at the larger sizes of that setting: Tetrad's FGES without the assumption ran all 10 datasets at 2,000 variables and mean degree 4, finished 3, and was not run at 4,000 there; at mean degree 2 its first fit at 4,000 did not finish, and the other nine datasets were not run. SHD counts the edge errors of the CPDAG against the true CPDAG, and the empty graph's SHD is the number of true edges. A difference is the mean over the datasets of the per-dataset difference in SHD, with its 95% percentile bootstrap interval (10,000 resamples); a method counts as worse than GES only when the interval lies above 0 on these datasets and again on 10 fresh ones. The paper's score, mean SHD over the first 10 datasets of each setting. `fges` is the default, `one_edge_faithfulness=False`; "assumed" is Tetrad's `faithfulnessAssumed` true: | Variables | Mean degree | `fges` | `one_edge_faithfulness=True` | GES | Tetrad, assumed | Tetrad, not assumed | Empty graph | `fges` - GES | |---:|---:|---:|---:|---:|---:|---:|---:|---| | 1,000 | 2 | 1.6 | 21.7 | 3.9 | 35.5 | 16.1 | 1,000 | -2.3 [-6.1, +0.4] | | 1,000 | 4 | 52.6 | 232.3 | 73.2 | 244.3 | 65.7 | 2,000 | -20.6 [-45.3, -5.2] | | 2,000 | 2 | 4.8 | 39.4 | 6.8 | 56.1 | 22.3 | 2,000 | -2.0 [-7.6, +1.8] | | 2,000 | 4 | 49.5 | 419.8 | 78.2 | 451.1 | 61.7 (3 of 10 finished) | 4,000 | -28.7 [-42.3, -13.2] | | 4,000 | 2 | 12.2 | 66.6 | 12.0 | 99.0 | 0 of 1 finished | 4,000 | +0.2 [+0.0, +0.6] | | 4,000 | 4 | 111.2 | 910.2 | 123.8 | 952.0 | not run | 8,000 | -12.6 [-38.6, +8.2] | On 10 fresh datasets at 1,000 variables, `fges` made 2.6 and 52.7 errors at mean degree 2 and 4, GES 2.6 and 63.8 (+0.0 [+0.0, +0.0] and -11.1 [-21.6, -2.5]), and Tetrad's FGES without the assumption 13.2 and 64.6. Andrey's default score, mean SHD over the first 10 datasets of each setting: | Variables | Mean degree | `fges` | `one_edge_faithfulness=True` | GES | Empty graph | `fges` - GES | `one_edge_faithfulness=True` - GES | |---:|---:|---:|---:|---:|---:|---|---| | 1,000 | 2 | 27.5 | 20.1 | 28.9 | 1,000 | -1.4 [-3.4, +0.0] | -8.8 [-13.1, -5.6] | | 1,000 | 4 | 74.7 | 92.9 | 89.4 | 2,000 | -14.7 [-25.4, -5.2] | +3.5 [-7.4, +12.9] | | 2,000 | 2 | 46.5 | 35.3 | 46.9 | 2,000 | -0.4 [-1.2, +0.0] | -11.6 [-14.8, -8.4] | | 2,000 | 4 | 99.5 | 136.9 | 113.9 | 4,000 | -14.4 [-26.6, -3.6] | +23.0 [+9.2, +36.7] | | 4,000 | 2 | 92.4 | 71.1 | 92.4 | 4,000 | +0.0 [+0.0, +0.0] | -21.3 [-26.0, -17.1] | | 4,000 | 4 | 171.9 | 273.9 | 205.2 | 8,000 | -33.3 [-55.3, -14.9] | +68.7 [+52.5, +84.5] | On 10 fresh datasets at 1,000 variables, `fges` made 26.4 and 73.2 errors at mean degree 2 and 4, against GES's 27.0 and 85.7 (-0.6 [-1.8, +0.0] and -12.5 [-19.8, -5.4]). - **No more errors than GES.** In no setting, under either score, did the interval of `fges` - GES lie above 0. At mean degree 4, `fges` made fewer errors than GES in every setting except the paper's score at 4,000 variables, where the interval includes 0. At mean degree 2 it made as many: at 4,000 variables under the paper's score, it differed from GES on one dataset of ten, with 16 errors against 14. - **Against Tetrad.** On the same datasets under the paper's score, `fges` made fewer errors than Tetrad's FGES without the assumption: -14.5 [-21.2, -8.5] and -13.1 [-23.0, -2.6] at 1,000 variables and mean degree 2 and 4, -10.6 [-17.6, -4.1] on the fresh datasets at mean degree 2, and -17.5 [-26.5, -10.0] at 2,000 variables and mean degree 2. On the fresh datasets at mean degree 4 the interval includes 0: -11.9 [-25.2, +3.3]. At mean degree 4 and 2,000 variables Tetrad finished 3 of 10 datasets within the hour, where `fges` made 26.3 fewer errors on average; at 4,000 variables its first fit did not finish. Those are fits that did not finish, not errors. - **With the assumption.** Under the paper's score, `one_edge_faithfulness=True` made more errors than GES in every setting, and again on 10 fresh datasets at 1,000 and 2,000 variables. It made fewer errors on average than Tetrad's FGES with the same assumption in every setting. Under Andrey's default score, it made more errors than GES at mean degree 4 from 2,000 variables, again on fresh datasets at 2,000, and fewer at mean degree 2 at every size, where a larger share of the edges it drew were true: a median adjacency precision of 0.991 to 0.993 against GES's 0.985 to 0.989, at a recall of 0.998 to 0.999 against 1.000. ### The one-edge screen The screen scores each pair's one-edge graph against the empty graph under the plain BIC at the given `penalty_discount`, and the first forward phase skips a pair whose one-edge graph does not score better. Under the paper's score, nearly every true adjacency that `one_edge_faithfulness=True` missed is one the screen skipped; the cover of unshielded noncolliders brought some of them back at mean degree 4. Tetrad's FGES with the assumption missed about as many, and the pass over every pair brought them back in both implementations. Mean per dataset, the paper's score, the first 10 datasets of each setting: | Variables | Mean degree | True adjacencies the screen skips | Missed: `one_edge_faithfulness=True` | Of them skipped | `fges` | GES | Tetrad, assumed | Tetrad, not assumed | |---:|---:|---:|---:|---:|---:|---:|---:|---:| | 1,000 | 2 | 19.9 | 18.7 | 18.5 | 0.3 | 0.5 | 19.3 | 0.8 | | 1,000 | 4 | 210.7 | 161.8 | 156.3 | 7.2 | 12.9 | 162.5 | 7.6 | | 2,000 | 2 | 34.2 | 33.1 | 32.9 | 0.5 | 1.2 | 34.1 | 1.3 | | 2,000 | 4 | 416.6 | 357.3 | 352.9 | - | 17.2 | 358.7 | - | A dash marks a count we did not make over the 10 datasets: Tetrad without the assumption finished 3 of them, and we counted `fges`'s misses only on those 3. At 1,000 variables, the mean adjacency recall was 0.981 and 0.919 at mean degree 2 and 4 for `one_edge_faithfulness=True` and for Tetrad's FGES with the assumption, against 1.000 and 0.996 for `fges`, 0.999 and 0.996 for Tetrad without the assumption, and 1.000 and 0.994 for GES. The paper's score skips more pairs than Andrey's default, whose screen uses `penalty_discount=1.0`: there the screen skipped 2.1 and 56.4 true adjacencies per dataset at 1,000 variables and mean degree 2 and 4, and 3.5 and 102.1 at 2,000, of which `one_edge_faithfulness=True` missed 1.5 and 23.2, and 2.9 and 58.7. ### Time and memory Time is the median wall time of the search call over the datasets, in seconds; Tetrad's is the search inside the Java virtual machine, including building its score. The ratio GES / `fges` is the geometric mean of the per-dataset ratios, with its 95% bootstrap interval. The paper's score: | Variables | Mean degree | `fges` | `one_edge_faithfulness=True` | GES | Tetrad, assumed | Tetrad, not assumed | GES / `fges` | |---:|---:|---:|---:|---:|---:|---:|---| | 1,000 | 2 | 9.07 | 6.34 | 12.4 | 17.2 | 81.7 | 1.39x [1.36, 1.43] | | 1,000 | 4 | 24.6 | 19.7 | 26.5 | 109 | 446 | 1.08x [1.04, 1.12] | | 2,000 | 2 | 71.5 | 56.0 | 114 | 60.7 | 474 | 1.61x [1.59, 1.63] | | 2,000 | 4 | 209 | 173 | 289 | 349 | 3,382 (3 of 10 finished) | 1.38x [1.37, 1.40] | | 4,000 | 2 | 780 | 658 | 1,309 | 219 | 0 of 1 finished | 1.58x [1.50, 1.67] | | 4,000 | 4 | 1,421 | 1,175 | 2,467 | 1,243 | not run | 1.82x [1.70, 1.97] | Andrey's default score: | Variables | Mean degree | `fges` | `one_edge_faithfulness=True` | GES | GES / `fges` | |---:|---:|---:|---:|---:|---| | 1,000 | 2 | 10.3 | 7.47 | 13.8 | 1.37x [1.33, 1.40] | | 1,000 | 4 | 29.8 | 25.9 | 33.6 | 1.11x [1.05, 1.17] | | 2,000 | 2 | 69.0 | 54.5 | 111 | 1.61x [1.59, 1.63] | | 2,000 | 4 | 150 | 130 | 221 | 1.47x [1.45, 1.48] | | 4,000 | 2 | 975 | 886 | 1,774 | 1.75x [1.67, 1.82] | | 4,000 | 4 | 1,436 | 1,280 | 2,099 | 1.52x [1.44, 1.61] | GES took longer than `fges` on average in every setting, and the margin was smallest at 1,000 variables and mean degree 4: 1.08x under the paper's score, and 1.03x [1.00, 1.07] on the fresh datasets, about the same time. The pass over every pair took `fges` 1.08 to 1.43 times the time of `one_edge_faithfulness=True` (paired, the same way). Tetrad's FGES with the assumption took more time than every Andrey mode at 1,000 variables, less than `fges` at 2,000 variables and mean degree 2 and at 4,000 and mean degree 4, and less than every Andrey mode at 4,000 and mean degree 2. Without the assumption, Tetrad took the most time in every setting it finished. Peak memory is the largest resident memory of the fit's process and its children, sampled every 0.2 s, in GiB; the median over the datasets, the paper's score. The default score gave peaks within 0.1 GiB of these for the Andrey modes and GES. The fits above ran on a build of November 26, 2026; 0.20.0 also changes how GES's forward phase keeps the candidates it scored, which cuts its memory and leaves its results unchanged, and that change came after this build: | Variables | Mean degree | `fges` | `one_edge_faithfulness=True` | GES | Tetrad, assumed | Tetrad, not assumed | |---:|---:|---:|---:|---:|---:|---:| | 1,000 | 2 | 0.378 | 0.143 | 0.425 | 0.455 | 1.02 | | 1,000 | 4 | 0.392 | 0.146 | 0.433 | 0.546 | 1.19 | | 2,000 | 2 | 1.41 | 0.234 | 1.52 | 0.870 | 3.69 | | 2,000 | 4 | 1.42 | 0.289 | 1.51 | 1.03 | 3.97 (3 of 10 finished) | | 4,000 | 2 | 4.67 | 0.638 | 4.96 | 1.10 | 0 of 1 finished | | 4,000 | 4 | 4.68 | 0.689 | 4.87 | 1.09 | not run | On this build, the pass over every pair took the memory of `fges` close to GES's. On a build with that change, on the first dataset at 4,000 variables and mean degree 2 under the paper's score, one fit each, `fges`, `one_edge_faithfulness=True`, and GES returned the same graphs as on the build of November 26, in 775, 657, and 999 s against 739, 655, and 1,023 s, with peaks of 0.760, 0.600, and 0.797 GiB against 4.61, 0.616, and 4.91. ### At 8,000 variables At 8,000 variables we ran the first dataset of each setting, each method on its own core, with the one-hour limit and a memory limit of 40 GiB per fit: | Score | Mean degree | `fges` | `one_edge_faithfulness=True` | GES | Tetrad, assumed | |---|---:|---|---|---|---| | The paper's | 2 | not finished | not finished | not finished | 694 s, SHD 202 (empty graph 8,000), 1.48 GiB | | The paper's | 4 | not finished | not finished | not finished | not finished | | Andrey's default | 2 | not finished | not finished | not finished | no counterpart | | Andrey's default | 4 | not finished | not finished | not finished | no counterpart | `fges`, `one_edge_faithfulness=True`, and GES reached the one-hour limit in every setting, on the build of November 26 and again, under the paper's score, on a build with 0.20.0's change to GES's memory, on one core of an Intel Xeon Gold 5418Y (mean degree 2) and 6542Y (mean degree 4). With no finished fit there is nothing to score at this size; these fits are reported as not finished, not as empty graphs. Tetrad's FGES without the assumption was not run: it had stopped at 2,000 variables at mean degree 4 and at 4,000 at mean degree 2. Tetrad's FGES with the assumption finished one of its two settings, on one thread, computing covariances as needed (`precomputeCovariances` false, which we set above 5,000 variables). Up to the limit, `fges` held about as much memory as `one_edge_faithfulness=True`, 2.2 to 2.5 GiB on the build of November 26, against GES's 18.7 to 19.3 GiB, and 1.7 to 1.9 GiB against GES's 2.6 GiB on the build with the change; these are the largest readings before the limit, so the peaks are at least these. That `fges` held about as much as `one_edge_faithfulness=True` suggests it had not reached its pass over every pair, so on one core the hour ran out in the passes the two modes share. We have not measured FGES with several worker processes (`n_jobs` above 1) at these sizes. **Builds.** The tables above ran on pre-release 0.20.0 builds of November 26, 2026 that differ from one another only in docstrings, with `one_edge_faithfulness` passed in each call, except the fresh datasets at 2,000 variables with the assumption, which ran on an earlier build of the same day, before the option existed, when the assumption was the default. The fits with 0.20.0's change to GES's memory, at 4,000 and 8,000 variables, ran on a pre-release build of November 27, 2026. Andrey ran on Python 3.14.4 with NumPy 2.4.6 and SciPy 1.17.1, in one process (`n_jobs=1`), with one untimed warm-up fit per process. Tetrad ran as tetrad-lib 7.6.10 on Java 21. ## Other changes in 0.20.0 Andrey 0.20.0 needs newer versions of several dependencies ([Dependency floors](#dependency-floors)). `skewd` and `skewd_mv` run their searches on a GPU when `andrey.config(backend="cuda")` pins it ([SkewD on a GPU](#skewd-on-a-gpu)), and `required_paths` is supported in `tabu`, `mmhc`, and `rsmax2` and `forbidden_paths` in `iamb`, `inter_iamb`, and `mmpc` ([Knowledge parts](#knowledge-parts)). The fixes of this release change the outputs of the cases they describe, and the [changelog](../changelog.md) lists every change. ## Reproduce Find environment setup, campaign drivers, and scores in the [benchmark harness guide][harness]. To rerun a comparison, install Andrey (andrey-core) in the harness's environment. Times will differ with the hardware and build; the errors should match closely. A dash marks a check without a time cap. | Comparison | Driver | Sizes | Datasets x repeats | Wall cap (s) | |---|---|---|---|---:| | The same output of every supported method, before and after a change | `qa/identity.py`, and `--workers 4` for the worker methods | the fixed datasets of each method | 1 fit per dataset | - | | The wGCM and PCM tests in PC | `python -m qa.quality_gate` | `anm_er` and `nonmonotone_er`, the wGCM on `anm_er` only, 5 variables, 250 rows | 10 x 1 | - | | LGES beside GES, BOSS, and PC, and against its authors' code | `lges_cpu.py` | 10 to 150 variables, degree 1 to 3, 10,000 rows, and 10 to 100 variables, degree 2, 1,000 rows | 20 x 1, and 20 fresh x 1 for 13 settings | 1,800; 3,600 for the authors' code at 150 variables | | Regime-PCMCI beside PCMCI on the whole series, and against Tigramite | `rpcmci_cpu.py` | 6 models, 3,000 steps | 20 x 1, and the first 3 series start by start, 5 starts | 3,600 | | The level and power of the GCM, wGCM, and PCM tests against the authors' code, and the PCM and KCI options | `regression_ci_draws.py` | GCM 200 and 400 rows, wGCM 400 rows, PCM 250 to 1,000 rows (Section 6.1) and 10,000 rows (Section 6.2) | 200 draws per GCM and 100 per wGCM power cell, 500 per KCI level cell, 20 to 100 per PCM cell | - | | Required and forbidden paths in MMHC and RSMAX2, beside bnlearn | `knowledge_paths.py` | 10 to 50 variables, 500 and 2,000 rows, mean degree 2 and 4, with 5, 10, or 30% of the pairs as claims | 20 x 1, and 20 fresh x 1 for a worse row | 1,800 | The speed and memory benchmark, the comparisons of missing data, the rest of the options study, and the FGES comparison are not harness lanes and have no script in the repository yet. `lges_cpu.py` draws the datasets of the LGES tables with the authors' generator and runs their code in the environment of `benchmarks/start_lges.sh`; `--first-seed 320` takes the fresh datasets. `rpcmci_cpu.py` runs the Regime-PCMCI series and, in the environment of `benchmarks/start_tigramite.sh`, Tigramite's starts; `--arms` takes `best5` for the five-start call. `regression_ci_draws.py` draws the power cells of the GCM and the wGCM, KCI's level cells, and the PCM and KCI options cells, and its PCM cells fit Andrey alone. The level cells of the 0.19.0 comparison, the Figure 3 grid, and PCM beside its authors' code are not in it; `benchmarks/regression_ci_agreement.py` compares the authors' PCM code query by query. The quality gate does not fit the experimental GCM; its rows in PC are `andrey.pc(x, indep_test="gcm")` on the gate's draws, `qa.quality_gate.draws("anm_er_d5")` and `draws("nonmonotone_er_d5")`. ## References - Andrews, B., Ramsey, J., and Cooper, G. F. (2018). Scoring Bayesian networks of mixed variables. *International Journal of Data Science and Analytics* 6(1), 3-18. - Andrews, B., Ramsey, J., and Cooper, G. F. (2019). Learning high-dimensional directed acyclic graphs with mixed data-types. *Proceedings of Machine Learning Research* 104, 4-21. - Chickering, D. M. (2002). Optimal structure identification with greedy search. *JMLR* 3, 507-554. - Colombo, D., and Maathuis, M. H. (2014). Order-independent constraint-based causal structure learning. *JMLR* 15, 3921-3962. - Deng, C., Bello, K., Ravikumar, P., and Aragam, B. (2024). Markov equivalence and consistency in differentiable structure learning. *NeurIPS* 37. - Ejaz, A., and Bareinboim, E. (2025). Less greedy equivalence search. *NeurIPS* 2025. [arXiv:2506.22331](https://arxiv.org/abs/2506.22331). - Friedman, N. (1997). Learning belief networks in the presence of missing values and hidden variables. *Proceedings of the 14th International Conference on Machine Learning*, 125-133. - Gao, E., Ng, I., Gong, M., Shen, L., Huang, W., Liu, T., Zhang, K., and Bondell, H. (2022). MissDAG: Causal discovery in the presence of missing data with continuous additive noise models. *NeurIPS* 35. - Gunther, W., Ninad, U., and Runge, J. (2023). Causal discovery for time series from multiple datasets with latent contexts. *UAI*, PMLR 216, 766-776. - Harris, N., and Drton, M. (2013). PC algorithm for nonparanormal graphical models. *JMLR* 14, 3365-3383. - Heinze-Deml, C., Peters, J., and Meinshausen, N. (2018). Invariant causal prediction for nonlinear models. *Journal of Causal Inference* 6(2). - Hoyer, P. O., Janzing, D., Mooij, J. M., Peters, J., and Scholkopf, B. (2009). Nonlinear causal discovery with additive noise models. *NeurIPS* 21, 689-696. - Hyvarinen, A., and Smith, S. M. (2013). Pairwise likelihood ratios for estimation of non-Gaussian structural equation models. *JMLR* 14, 111-152. - Hyvarinen, A., Zhang, K., Shimizu, S., and Hoyer, P. O. (2010). Estimation of a structural vector autoregression model using non-Gaussianity. *JMLR* 11, 1709-1731. - Immer, A., Schultheiss, C., Vogt, J. E., Scholkopf, B., Buhlmann, P., and Marx, A. (2023). On the identifiability and estimation of causal location-scale noise models. *ICML*, PMLR 202. - Jin, K., Ng, I., Zhang, K., and Huang, B. (2026). Revisiting differentiable structure learning: inconsistency of l1 penalty and beyond. *AAAI* 40(27), 22399-22407. [doi:10.1609/aaai.v40i27.39398](https://doi.org/10.1609/aaai.v40i27.39398). The comparisons here read the arXiv version, [arXiv:2410.18396](https://arxiv.org/abs/2410.18396). - Kawahara, Y., Shimizu, S., and Washio, T. (2011). Analyzing relationships among ARMA processes based on non-Gaussianity of external influences. *Neurocomputing* 74(12-13), 2212-2221. - Lundborg, A. R., Kim, I., Shah, R. D., and Samworth, R. J. (2024). The projected covariance measure for assumption-lean variable significance testing. *Annals of Statistics* 52(6), 2851-2878. [doi:10.1214/24-AOS2447](https://doi.org/10.1214/24-AOS2447). - Mooij, J. M., Magliacane, S., and Claassen, T. (2020). Joint causal inference from multiple contexts. *JMLR* 21(99), 1-108. - Ramsey, J. (2016). Improving accuracy and scalability of the PC algorithm by maximizing P-value. [arXiv:1610.00378](https://arxiv.org/abs/1610.00378). - Ramsey, J., Glymour, M., Sanchez-Romero, R., and Glymour, C. (2017). A million variables and more: the Fast Greedy Equivalence Search algorithm for learning high-dimensional graphical causal models, with an application to functional magnetic resonance images. *International Journal of Data Science and Analytics* 3(2), 121-129. - Ramsey, J., Zhang, J., and Spirtes, P. (2006). Adjacency-faithfulness and conservative causal inference. *UAI*, 401-408. - Runge, J. (2018). Conditional independence testing based on a nearest-neighbor estimator of conditional mutual information. *AISTATS*, PMLR 84, 938-947. - Runge, J. (2020). Discovering contemporaneous and lagged causal relations in autocorrelated nonlinear time series datasets. *UAI*, PMLR 124, 1388-1397. - Runge, J., Nowack, P., Kretschmer, M., Flaxman, S., and Sejdinovic, D. (2019). Detecting and quantifying causal associations in large nonlinear time series datasets. *Science Advances* 5(11), eaau4996. - Saggioro, E., de Wiljes, J., Kretschmer, M., and Runge, J. (2020). Reconstructing regime-dependent causal relationships from observational time series. *Chaos* 30(11), 113115. [doi:10.1063/5.0020538](https://doi.org/10.1063/5.0020538). - Scheidegger, C., Hörrmann, J., and Bühlmann, P. (2022). The weighted generalised covariance measure. *JMLR* 23(273), 1-68. [jmlr.org](https://jmlr.org/papers/v23/21-1328.html). - Shah, R. D., and Peters, J. (2020). The hardness of conditional independence testing and the generalised covariance measure. *Annals of Statistics* 48(3), 1514-1538. [doi:10.1214/19-AOS1857](https://doi.org/10.1214/19-AOS1857). - Squires, C., Wang, Y., and Uhler, C. (2020). Permutation-based causal structure learning with unknown intervention targets. *UAI*, PMLR 124, 1039-1048. - Strobl, E. V., Zhang, K., and Visweswaran, S. (2019). Approximate kernel-based conditional independence tests for fast non-parametric causal discovery. *Journal of Causal Inference* 7(1), 20180017. - Tsamardinos, I., Brown, L. E., and Aliferis, C. F. (2006). The max-min hill-climbing Bayesian network structure learning algorithm. *Machine Learning* 65(1), 31-78. - Tu, R., Zhang, C., Ackermann, P., Mohan, K., Kjellstrom, H., and Zhang, K. (2019). Causal discovery in the presence of missing data. *AISTATS*, PMLR 89, 1762-1770. - Wang, Y., Solus, L., Yang, K. D., and Uhler, C. (2017). Permutation-based causal inference algorithms with interventions. *NeurIPS* 30. - Yang, K. D., Katcoff, A., and Uhler, C. (2018). Characterizing and learning equivalence classes of causal DAGs under interventions. *ICML*, PMLR 80, 5537-5546. - Zhang, K., and Hyvarinen, A. (2009). On the identifiability of the post-nonlinear causal model. *UAI*, 647-655. - Zhang, K., Peters, J., Janzing, D., and Scholkopf, B. (2011). Kernel-based conditional independence test and application in causal discovery. *UAI*, 804-813. - Zheng, X., Aragam, B., Ravikumar, P., and Xing, E. P. (2018). DAGs with NO TEARS: Continuous optimization for structure learning. *NeurIPS* 31, 9472-9483. [harness]: https://github.com/Abel-ai-lab/Andrey/blob/main/benchmarks/README.md [kp-page]: https://github.com/Abel-ai-lab/Andrey/blob/main/benchmarks/comparisons/knowledge-paths.md [kp-summary]: https://github.com/Abel-ai-lab/Andrey/blob/main/benchmarks/published/0.20.0/knowledge-paths.json