Release cards

0.14.0 release card: interventional data#

Release card

Interventional data

0.14.0

This card measures the methods 0.14.0 makes supported against their authors’ code: GnIES, UT-IGSP, and IGSP on simulated data mixing observation and experiments, ICP on environments that leave one variable’s mechanism alone, CAM-UV on nonlinear data with hidden variables, and DYNOTEARS on vector autoregressions. Each result holds for the measured conditions; it depends on the data, settings, and hardware.

0.14.0 makes six methods supported, and we compared each with the code its authors released, on data simulated the way their papers do. GnIES, UT-IGSP, and IGSP learn from experiments mixed with observation, ICP finds the causes of one variable across environments, CAM-UV handles nonlinear data with hidden variables, and DYNOTEARS learns from time series.

Summary#

Method

Reference

Comparisons

Better

Tie

Worse

Speed against the reference

GnIES

gnies 0.3.3

21 settings x 2 errors

3

39

0

34x faster

UT-IGSP

graphical-model-learning 0.1a8

56 settings x 2 errors

1

111

0

1.7x slower

ICP

InvariantCausalPrediction 0.8 (R)

3 settings x 2 tests

0

6

0

41x to 760x faster

CAM-UV

lingam 1.13.0, causal-learn 0.1.4.8

9 settings x 3 references

0

27

0

2.1x to 3.1x faster than lingam, 7.4x to 13.5x than causal-learn

DYNOTEARS

CausalNex 0.12.2

38 settings

5

32

1

1.1x to 3.4x faster in CPU time

IGSP

graphical-model-learning 0.1a8

87 settings, 114 comparisons

2

112

0

1.3x faster to 8.0x slower

Andrey matches every reference in almost every comparison, and in the few that differ it is more often better than worse. Here is how to read it:

  • The speed is the median, over the datasets, of the reference’s fit time divided by Andrey’s on the same dataset, written as how many times faster or slower Andrey is.

  • A comparison is better or worse when the 95% interval of the mean paired difference in errors lies entirely below or above 0.

  • A better result has to hold twice. It counts only where a rerun on fresh seeds, which played no part in choosing Andrey’s defaults, agreed. A comparison better on the first seeds alone counts as a tie, and so do 17 UT-IGSP comparisons that were lower on the first seeds and on the seeds that chose its default, since those seeds are not fresh.

  • Andrey must also beat doing nothing wherever the reference does, making fewer errors than the empty estimate: the empty graph, or for a target error no targets beyond those given. Where the reference does not beat it either, the floor is reported and not judged. The floor is judged on the first seeds; a rerun’s floor only confirms a failure there.

How we measured#

Every dataset was simulated with andrey.data and given to both packages, so each comparison pairs Andrey’s error with the reference’s on the same data. D in the tables is the mean of those paired differences, Andrey’s error minus the reference’s, with its 95% bootstrap interval.

  • GnIES, UT-IGSP, and IGSP ran one fit at a time on one core of an AMD EPYC 7713 with one BLAS thread.

  • ICP, CAM-UV, and DYNOTEARS ran four fits at a time, each on one core of an Intel Core i7-7820X with one thread.

  • GnIES and UT-IGSP run each package at its defaults, and Andrey’s defaults were chosen on seeds of their own before the comparison. The other references run at the comparison’s settings, given in each method’s section below.

GnIES#

GnIES learns a graph from environments that change the noise of some variables, without being told which. Andrey is about 34 times faster than gnies 0.3.3 and as accurate: of the 8 comparisons better on seeds 0 to 19, 3 were better again on seeds 20 to 39, and the rest tie.

  • The graphs are Erdos-Renyi DAGs on 10 variables, with linear equations and Gaussian noise.

  • One environment is observational; each of the others changes the noise variance of its targets, and neither package is told the targets.

  • Each environment has 10 to 1,000 rows, standardized on the pooled rows, with 20 datasets per setting.

  • Both packages run at their defaults.

  • We count two errors: the structural Hamming distance (SHD) of the returned interventional essential graph to the true one, and the target error, the targets missed plus the targets named wrongly.

Over the 420 datasets in the claim, Andrey took a median 0.030 times the reference’s fit time (quartiles 0.027 and 0.033). At 10 variables Andrey’s median fit took 0.29 to 1.33 s per setting, the reference’s 9.1 to 48.6 s.

GnIES against gnies 0.3.3, targets unknown

SHDTarget error
AndreygniesEmpty graphDifferenceAndreygniesNo targetsDifference
3 experiments, 1 target each
10 rows each11.3514.4014.00-3.05[-4.85, -1.20]better1.852.453.00-0.60[-1.00, -0.30]better
100 rows each4.956.0014.00-1.05[-3.30, +0.80]0.500.453.00+0.05[-0.20, +0.35]
1,000 rows each2.052.1514.00-0.10[-0.60, +0.30]0.250.303.00-0.05[-0.15, +0.00]
Denser graph, mean degree 4
10 rows each20.0021.9520.00-1.95[-3.55, -0.45]better2.702.903.00-0.20[-0.70, +0.25]
100 rows each16.4515.8520.00+0.60[-0.50, +1.80]1.001.203.00-0.20[-0.50, +0.05]
1,000 rows each12.4511.9020.00+0.55[-0.40, +1.95]1.551.453.00+0.10[+0.00, +0.30]
3 targets per experiment
10 rows each11.3012.7514.00-1.45[-2.90, -0.20]lower, first seeds only4.354.709.00-0.35[-0.90, +0.15]
100 rows each3.004.0514.00-1.05[-2.55, -0.05]lower, first seeds only0.650.459.00+0.20[-0.10, +0.65]
1,000 rows each1.801.7014.00+0.10[+0.00, +0.30]0.300.359.00-0.05[-0.15, +0.00]
Smaller change, variance x3 to x4
10 rows each11.9014.3014.00-2.40[-3.55, -1.35]lower, first seeds only3.003.253.00-0.25[-0.65, +0.15]
100 rows each7.458.0014.00-0.55[-1.05, -0.15]lower, first seeds only1.051.103.00-0.05[-0.15, +0.00]
1,000 rows each2.351.7514.00+0.60[-0.30, +2.10]0.300.403.00-0.10[-0.30, +0.00]
No observational environment
100 rows each3.504.0014.00-0.50[-1.20, +0.15]0.400.554.00-0.15[-0.40, +0.00]
1,000 rows each1.751.9514.00-0.20[-0.50, +0.00]0.400.404.00+0.00[+0.00, +0.00]
9 experiments
10 rows each10.2511.0514.00-0.80[-2.80, +1.35]7.707.559.00+0.15[-0.05, +0.35]
100 rows each1.652.0014.00-0.35[-0.65, -0.10]lower, first seeds only0.600.709.00-0.10[-0.30, +0.00]
1,000 observed rows
experiments of 100 rows2.653.2514.00-0.60[-1.65, +0.30]0.450.353.00+0.10[+0.00, +0.25]
Fewer experiments
1 experiment2.452.5514.00-0.10[-0.25, +0.00]0.300.301.00+0.00[+0.00, +0.00]
2 experiments3.702.7014.00+1.00[-0.30, +3.25]0.550.302.00+0.25[-0.05, +0.65]
Weights of either sign
100 rows each3.503.7014.00-0.20[-1.00, +0.75]0.250.353.00-0.10[-0.25, +0.00]
1,000 rows each1.401.4014.00+0.00[+0.00, +0.00]0.300.303.00+0.00[+0.00, +0.00]
Means over 20 datasets, seeds 0 to 19, on 10 variables; each experiment multiplies its targets' noise variance by 5 to 10 unless noted. The difference is Andrey's mean error minus gnies's, with its 95% interval, marked better only where seeds 20 to 39 agreed; unmarked is a tie. No targets is the target error of naming none: the number of true targets.

UT-IGSP#

UT-IGSP learns from experiments whose targets it is told only in part, or not at all, and also learns those targets. At Andrey’s defaults it ties the authors’ library in 111 of 112 comparisons and is better in one: the SHD with perfect interventions and 1 off-target, lower on seeds 0 to 19 and again on fresh seeds 2000 to 2019. 17 more were lower on seeds 0 to 19 and on seeds 4000 to 4019, the seeds of the run that chose the default, which favor it, so they count as ties. Run at Andrey’s level, one over the observational rows, the library ties Andrey in 107 of the 112.

  • The graphs are Erdos-Renyi DAGs on 20 variables with mean degree 1.5.

  • An observational environment comes with 5 experiments. Each hits one designed target and 0 to 3 off-targets the fit is not told, in six groups of settings built from mean shifts, perfect interventions, variance changes, and weight changes.

  • Each experiment has 1,000 to 5,000 rows, with 20 datasets per setting and 5 draws each.

  • Both packages run at their defaults.

  • We count the SHD of the returned interventional essential graph to the true one, and the target error.

UT-IGSP is slower than the library. At 20 variables its median fit took 0.24 s against the library’s 0.14 s, a median ratio of 1.68 per dataset (quartiles 1.47 and 1.93). At 50 variables it took 1.7 s against 0.9 s, and at 100 variables 15.2 s against 16.8 s. A later change in this release makes UT-IGSP prepare the rows about 1.2 times faster on large data (one core, 20 variables, 5 single-target experiments); these comparisons were not rerun after it.

UT-IGSP against the authors' library, at Andrey's defaults

SHDTarget error
AndreyLibraryEmpty graphDifferenceAndreyLibraryGiven targetsDifference
Mean shift of 1
0 off-targets1,000 rows each0.061.0815.00-1.02[-1.63, -0.47]lower, first seeds and the default's seeds0.140.200.00-0.06[-0.20, +0.08]
0 off-targets2,000 rows each0.090.1415.00-0.05[-0.22, +0.11]0.070.050.00+0.02[-0.09, +0.15]
0 off-targets3,000 rows each0.100.0615.00+0.04[-0.09, +0.18]0.100.000.00+0.10[+0.00, +0.25]
0 off-targets4,000 rows each0.020.0415.00-0.02[-0.12, +0.06]0.050.000.00+0.05[+0.00, +0.15]
0 off-targets5,000 rows each0.020.0415.00-0.02[-0.12, +0.06]0.000.000.00+0.00[+0.00, +0.00]
1 off-target1,000 rows each0.281.1815.00-0.90[-1.42, -0.42]lower, first seeds and the default's seeds0.250.575.00-0.32[-0.57, -0.07]lower, first seeds only
1 off-target2,000 rows each0.300.4415.00-0.14[-0.40, +0.07]0.170.185.00-0.01[-0.08, +0.07]
1 off-target3,000 rows each0.180.2515.00-0.07[-0.39, +0.17]0.140.115.00+0.03[-0.15, +0.20]
1 off-target4,000 rows each0.010.0815.00-0.07[-0.20, +0.02]0.050.035.00+0.02[-0.07, +0.15]
1 off-target5,000 rows each0.000.1615.00-0.16[-0.44, +0.00]0.000.075.00-0.07[-0.20, +0.00]
2 off-targets1,000 rows each0.471.2715.00-0.80[-1.35, -0.26]lower, first seeds only0.491.3610.00-0.87[-1.80, -0.15]lower, first seeds only
2 off-targets2,000 rows each0.320.4215.00-0.10[-0.36, +0.15]0.260.3310.00-0.07[-0.25, +0.12]
2 off-targets3,000 rows each0.350.3515.00+0.00[-0.29, +0.30]0.300.2810.00+0.02[-0.19, +0.24]
2 off-targets4,000 rows each0.150.2515.00-0.10[-0.28, +0.00]0.200.2110.00-0.01[-0.14, +0.13]
2 off-targets5,000 rows each0.200.2315.00-0.03[-0.24, +0.15]0.250.1910.00+0.06[-0.12, +0.30]
3 off-targets1,000 rows each0.181.2215.00-1.04[-1.79, -0.40]lower, first seeds only0.351.2915.00-0.94[-1.65, -0.35]lower, first seeds only
3 off-targets2,000 rows each0.460.2015.00+0.26[-0.09, +0.69]0.390.2915.00+0.10[-0.30, +0.48]
3 off-targets3,000 rows each0.350.1515.00+0.20[+0.00, +0.43]0.410.2015.00+0.21[+0.01, +0.45]higher, first seeds only
3 off-targets4,000 rows each0.240.1115.00+0.13[-0.04, +0.36]0.350.1615.00+0.19[+0.00, +0.43]
3 off-targets5,000 rows each0.250.1015.00+0.15[-0.06, +0.48]0.260.1615.00+0.10[-0.04, +0.32]
Perfect intervention
0 off-targets1,000 rows each0.101.0415.00-0.94[-1.57, -0.37]lower, first seeds only0.100.200.00-0.10[-0.29, +0.06]
0 off-targets2,000 rows each0.140.1415.00+0.00[-0.12, +0.14]0.090.050.00+0.04[-0.03, +0.15]
0 off-targets3,000 rows each0.100.0615.00+0.04[-0.09, +0.18]0.100.000.00+0.10[+0.00, +0.25]
0 off-targets4,000 rows each0.000.0415.00-0.04[-0.12, +0.00]0.050.000.00+0.05[+0.00, +0.15]
0 off-targets5,000 rows each0.000.0415.00-0.04[-0.12, +0.00]0.000.000.00+0.00[+0.00, +0.00]
1 off-target1,000 rows each0.100.8915.00-0.79[-1.35, -0.30]better0.100.385.00-0.28[-0.61, +0.00]
1 off-target2,000 rows each0.120.1415.00-0.02[-0.15, +0.12]0.080.065.00+0.02[-0.07, +0.15]
1 off-target3,000 rows each0.100.0515.00+0.05[-0.08, +0.20]0.100.015.00+0.09[-0.02, +0.25]
1 off-target4,000 rows each0.010.0415.00-0.03[-0.12, +0.03]0.050.015.00+0.04[-0.03, +0.15]
1 off-target5,000 rows each0.000.0415.00-0.04[-0.12, +0.00]0.000.015.00-0.01[-0.03, +0.00]
2 off-targets1,000 rows each0.101.0815.00-0.98[-1.71, -0.39]lower, first seeds and the default's seeds0.221.0410.00-0.82[-1.65, -0.16]lower, first seeds only
2 off-targets2,000 rows each0.050.2515.00-0.20[-0.49, +0.05]0.050.1310.00-0.08[-0.23, +0.05]
2 off-targets3,000 rows each0.100.1315.00-0.03[-0.24, +0.14]0.100.0610.00+0.04[-0.11, +0.21]
2 off-targets4,000 rows each0.000.0815.00-0.08[-0.24, +0.00]0.050.0410.00+0.01[-0.12, +0.15]
2 off-targets5,000 rows each0.000.0815.00-0.08[-0.24, +0.00]0.000.0410.00-0.04[-0.12, +0.00]
3 off-targets1,000 rows each0.080.7815.00-0.70[-1.16, -0.33]lower, first seeds and the default's seeds0.160.9815.00-0.82[-1.53, -0.27]lower, first seeds only
3 off-targets2,000 rows each0.050.1915.00-0.14[-0.41, +0.07]0.000.2315.00-0.23[-0.59, +0.00]
3 off-targets3,000 rows each0.100.0715.00+0.03[-0.14, +0.19]0.100.0615.00+0.04[-0.13, +0.20]
3 off-targets4,000 rows each0.000.0615.00-0.06[-0.18, +0.00]0.050.0615.00-0.01[-0.18, +0.15]
3 off-targets5,000 rows each0.000.0315.00-0.03[-0.09, +0.00]0.000.0315.00-0.03[-0.09, +0.00]
Mean shift of 2
0 off-targets1,000 rows each0.000.8415.00-0.84[-1.41, -0.34]lower, first seeds only0.050.320.00-0.27[-0.56, -0.01]lower, first seeds and the default's seeds
3 off-targets1,000 rows each0.200.9815.00-0.78[-1.38, -0.25]lower, first seeds only0.281.5615.00-1.28[-2.34, -0.37]lower, first seeds only
Perfect, variance 0.01
0 off-targets1,000 rows each0.101.0415.00-0.94[-1.55, -0.39]lower, first seeds and the default's seeds0.190.200.00-0.01[-0.11, +0.11]
3 off-targets1,000 rows each0.080.7815.00-0.70[-1.16, -0.33]lower, first seeds and the default's seeds0.141.0015.00-0.86[-1.58, -0.29]lower, first seeds only
Noise doubled
0 off-targets1,000 rows each0.201.0115.00-0.81[-1.43, -0.27]lower, first seeds and the default's seeds0.100.120.00-0.02[-0.17, +0.13]
0 off-targets5,000 rows each0.060.0415.00+0.02[+0.00, +0.05]0.000.000.00+0.00[+0.00, +0.00]
3 off-targets1,000 rows each0.200.8715.00-0.67[-1.08, -0.32]lower, first seeds and the default's seeds0.150.7415.00-0.59[-1.14, -0.14]lower, first seeds only
3 off-targets5,000 rows each0.010.0315.00-0.02[-0.09, +0.03]0.000.0215.00-0.02[-0.06, +0.00]
Mean shift of 1, no targets given
0 off-targets1,000 rows each0.100.9515.00-0.85[-1.37, -0.37]lower, first seeds and the default's seeds0.100.135.00-0.03[-0.17, +0.10]
0 off-targets5,000 rows each0.020.0415.00-0.02[-0.12, +0.06]0.000.005.00+0.00[+0.00, +0.00]
3 off-targets1,000 rows each0.181.0515.00-0.87[-1.55, -0.34]lower, first seeds only0.351.2220.00-0.87[-1.58, -0.29]lower, first seeds only
3 off-targets5,000 rows each0.250.1715.00+0.08[-0.20, +0.45]0.260.1920.00+0.07[-0.10, +0.31]
Parent weights halved
0 off-targets1,000 rows each1.003.0615.00-2.06[-3.12, -1.18]lower, first seeds and the default's seeds0.110.110.00+0.00[-0.09, +0.13]
0 off-targets5,000 rows each0.080.3915.00-0.31[-0.62, -0.03]lower, first seeds and the default's seeds0.010.190.00-0.18[-0.37, -0.04]lower, first seeds and the default's seeds
3 off-targets1,000 rows each1.583.5615.00-1.98[-2.77, -1.26]lower, first seeds and the default's seeds3.155.6715.00-2.52[-3.81, -1.39]lower, first seeds and the default's seeds
3 off-targets5,000 rows each0.100.5115.00-0.41[-0.74, -0.11]lower, first seeds and the default's seeds0.121.5015.00-1.38[-2.55, -0.38]lower, first seeds and the default's seeds
Means over 20 datasets, seeds 0 to 19, 5 draws each, on 20 variables with an observational environment and 5 experiments. Each experiment intervenes on one target it names and on off-targets it does not. The difference is Andrey's mean error minus the library's, with its 95% interval, marked better only where the rerun on fresh seeds, 2000 to 2019, agreed; one lower on the first seeds and on the seeds that chose the default, 4000 to 4019, is noted and counts as a tie; unmarked is a tie. Given targets is the target error of the named targets alone.

IGSP#

IGSP learns from experiments whose targets are known. At Andrey’s defaults, on fresh seeds, it is worse than the authors’ library in none of 114 comparisons and lower in 17. Two of those count as better: at 1,000 rows the default level is 1e-3, so seeds 0 to 19 at that level measured the same comparison, and they agreed. With both packages at the same one of three fixed levels, no row of 684 is worse once rerun, and 13 are better.

  • The graphs are the 7-variable DAG of Wang et al. (2017) and Erdos-Renyi DAGs on 10 or 20 variables with mean degree 1.5, with linear equations and Gaussian noise.

  • An observational environment comes with settings whose targets are known, hit by perfect, inhibiting, or imperfect interventions, at the sizes of Wang et al. (2017) and Yang et al. (2018).

  • Each setting has 1,000 to 100,000 rows, with 20 datasets per setting and 5 draws each.

  • Andrey’s default level is one over the observational rows, as UT-IGSP’s. The library runs at its defaults but for the level.

  • Where a setting has two or more targets, Andrey is also compared with a copy of the library whose I-contradicting test follows Definition 4.2 of Yang et al.; the library’s own test inverts that definition’s conditions.

  • We count the SHD of the returned interventional essential graph to the true one.

IGSP is slower than the library in 84 of the 87 settings of its claim. Per setting its median fit took 0.74 to 8.0 times as long: a median of 1.8 times at 1,000 rows per setting, 4.3 at 10,000, and 3.5 at 100,000, and at most about 2 s. These times were measured at alpha 1e-3 before the faster row preparation in this release, and were not rerun after it. Out of claim, at 100 variables and 1,000 rows, the library finished 1 of 10 datasets within 3,600 s and used up to 72 GB of memory; Andrey took a median 33 s and at most 0.5 GB.

IGSP against the authors' library, at Andrey's defaults

AndreyLibraryLibrary, Definition 4.2
SHDDifferenceSHDDifference
Wang et al., Figure 2: 1 setting
10 variables1,000 rows per setting2.243.04-0.80[-1.54, +0.00]2.36-0.12[-0.34, +0.08]
10 variables10,000 rows per setting0.902.00-1.10[-1.83, -0.38]lower, first seeds only0.80+0.10[-0.04, +0.26]
10 variables100,000 rows per setting0.601.92-1.32[-1.99, -0.64]lower, first seeds only0.38+0.22[+0.00, +0.56]
20 variables1,000 rows per setting3.605.38-1.78[-2.64, -0.86]better3.41+0.19[-0.21, +0.61]
20 variables10,000 rows per setting0.964.31-3.35[-4.15, -2.54]lower, first seeds only1.74-0.78[-1.32, -0.33]lower, first seeds only
20 variables100,000 rows per setting0.353.59-3.24[-4.11, -2.36]lower, first seeds only0.57-0.22[-0.67, +0.15]
Wang et al., Figure 2: 2 settings
10 variables1,000 rows per setting1.892.71-0.82[-1.70, +0.08]1.95-0.06[-0.23, +0.12]
10 variables10,000 rows per setting0.752.00-1.25[-2.03, -0.46]lower, first seeds only0.62+0.13[-0.02, +0.31]
10 variables100,000 rows per setting0.301.68-1.38[-2.09, -0.63]lower, first seeds only0.32-0.02[-0.06, +0.00]
20 variables1,000 rows per setting3.585.69-2.11[-2.85, -1.37]better3.28+0.30[-0.15, +0.77]
20 variables10,000 rows per setting0.984.56-3.58[-4.34, -2.82]lower, first seeds only1.70-0.72[-1.34, -0.23]lower, first seeds only
20 variables100,000 rows per setting0.253.52-3.27[-4.21, -2.33]lower, first seeds only0.62-0.37[-0.87, +0.00]
Wang et al., Figure 3: targets 4
weights from 0.11,000 rows per setting1.201.15+0.05[+0.00, +0.15]--
weights from 0.110,000 rows per setting0.300.25+0.05[-0.15, +0.30]--
weights from 0.1100,000 rows per setting0.000.05-0.05[-0.15, +0.00]--
weights from 0.251,000 rows per setting0.200.26-0.06[-0.16, +0.00]--
weights from 0.2510,000 rows per setting0.000.05-0.05[-0.15, +0.00]--
weights from 0.25100,000 rows per setting0.000.05-0.05[-0.15, +0.00]--
weights from 0.51,000 rows per setting0.000.00+0.00[+0.00, +0.00]--
weights from 0.510,000 rows per setting0.000.05-0.05[-0.15, +0.00]--
weights from 0.5100,000 rows per setting0.000.05-0.05[-0.15, +0.00]--
Wang et al., Figure 3: targets 5
weights from 0.11,000 rows per setting1.000.85+0.15[+0.00, +0.45]--
weights from 0.110,000 rows per setting0.250.25+0.00[-0.15, +0.15]--
weights from 0.1100,000 rows per setting0.000.05-0.05[-0.15, +0.00]--
weights from 0.251,000 rows per setting0.150.21-0.06[-0.16, +0.00]--
weights from 0.2510,000 rows per setting0.000.05-0.05[-0.15, +0.00]--
weights from 0.25100,000 rows per setting0.000.05-0.05[-0.15, +0.00]--
weights from 0.51,000 rows per setting0.000.00+0.00[+0.00, +0.00]--
weights from 0.510,000 rows per setting0.000.05-0.05[-0.15, +0.00]--
weights from 0.5100,000 rows per setting0.000.05-0.05[-0.15, +0.00]--
Wang et al., Figure 3: targets 4 and 5
weights from 0.11,000 rows per setting0.901.00-0.10[-0.30, +0.10]0.85+0.05[+0.00, +0.15]
weights from 0.110,000 rows per setting0.250.25+0.00[-0.15, +0.15]0.25+0.00[-0.15, +0.15]
weights from 0.1100,000 rows per setting0.000.05-0.05[-0.15, +0.00]0.05-0.05[-0.15, +0.00]
weights from 0.251,000 rows per setting0.150.21-0.06[-0.16, +0.00]0.21-0.06[-0.16, +0.00]
weights from 0.2510,000 rows per setting0.000.05-0.05[-0.15, +0.00]0.05-0.05[-0.15, +0.00]
weights from 0.25100,000 rows per setting0.000.05-0.05[-0.15, +0.00]0.05-0.05[-0.15, +0.00]
weights from 0.51,000 rows per setting0.000.00+0.00[+0.00, +0.00]0.00+0.00[+0.00, +0.00]
weights from 0.510,000 rows per setting0.000.05-0.05[-0.15, +0.00]0.05-0.05[-0.15, +0.00]
weights from 0.5100,000 rows per setting0.000.05-0.05[-0.15, +0.00]0.05-0.05[-0.15, +0.00]
Yang et al.: perfect interventions
1 single-target setting1,000 rows per setting1.401.25+0.15[-0.22, +0.58]--
1 single-target setting10,000 rows per setting0.300.30+0.00[+0.00, +0.00]--
2 single-target settings1,000 rows per setting1.101.14-0.04[-0.42, +0.34]--
2 single-target settings10,000 rows per setting0.400.21+0.19[-0.18, +0.75]--
4 single-target settings1,000 rows per setting1.281.64-0.36[-1.16, +0.35]--
4 single-target settings10,000 rows per setting0.150.45-0.30[-0.65, -0.06]lower, first seeds only--
6 single-target settings1,000 rows per setting1.461.44+0.02[-0.51, +0.51]--
6 single-target settings10,000 rows per setting0.530.60-0.07[-0.26, +0.11]--
8 single-target settings1,000 rows per setting1.551.37+0.18[-0.28, +0.67]--
8 single-target settings10,000 rows per setting0.800.79+0.01[-0.20, +0.26]--
10 single-target settings1,000 rows per setting1.761.74+0.02[-0.35, +0.34]--
10 single-target settings10,000 rows per setting1.301.20+0.10[-0.13, +0.37]--
Every variable, 20 variables1,000 rows per setting3.193.51-0.32[-1.07, +0.31]--
Every variable, 20 variables10,000 rows per setting1.882.37-0.49[-1.14, +0.11]--
Every pair of variables1,000 rows per setting1.891.92-0.03[-0.58, +0.47]1.69+0.20[-0.25, +0.71]
Every pair of variables10,000 rows per setting1.201.60-0.40[-0.80, -0.01]lower, first seeds only1.13+0.07[-0.20, +0.36]
Yang et al.: inhibiting interventions
1 single-target setting1,000 rows per setting1.231.25-0.02[-0.36, +0.32]--
1 single-target setting10,000 rows per setting0.300.30+0.00[+0.00, +0.00]--
2 single-target settings1,000 rows per setting1.051.14-0.09[-0.76, +0.48]--
2 single-target settings10,000 rows per setting0.400.21+0.19[-0.18, +0.75]--
4 single-target settings1,000 rows per setting1.391.64-0.25[-0.94, +0.38]--
4 single-target settings10,000 rows per setting0.450.37+0.08[-0.10, +0.32]--
6 single-target settings1,000 rows per setting1.481.44+0.04[-0.73, +0.73]--
6 single-target settings10,000 rows per setting0.700.61+0.09[-0.13, +0.32]--
8 single-target settings1,000 rows per setting1.651.41+0.24[-0.08, +0.55]--
8 single-target settings10,000 rows per setting0.890.78+0.11[-0.25, +0.55]--
10 single-target settings1,000 rows per setting1.901.78+0.12[-0.18, +0.45]--
10 single-target settings10,000 rows per setting1.161.22-0.06[-0.32, +0.22]--
Every variable, 20 variables1,000 rows per setting3.313.50-0.19[-1.15, +0.58]--
Every variable, 20 variables10,000 rows per setting1.702.45-0.75[-1.32, -0.21]lower, first seeds only--
Every pair of variables1,000 rows per setting1.621.92-0.30[-0.84, +0.17]1.59+0.03[-0.29, +0.37]
Every pair of variables10,000 rows per setting1.051.53-0.48[-0.92, -0.08]lower, first seeds only1.13-0.08[-0.30, +0.16]
Yang et al.: imperfect interventions
1 single-target setting1,000 rows per setting1.151.25-0.10[-0.46, +0.24]--
1 single-target setting10,000 rows per setting0.300.36-0.06[-0.18, +0.00]--
2 single-target settings1,000 rows per setting1.551.42+0.13[-0.20, +0.47]--
2 single-target settings10,000 rows per setting0.150.21-0.06[-0.18, +0.00]--
4 single-target settings1,000 rows per setting1.881.72+0.16[-0.45, +0.78]--
4 single-target settings10,000 rows per setting0.900.55+0.35[-0.25, +0.98]--
6 single-target settings1,000 rows per setting1.251.43-0.18[-0.84, +0.39]--
6 single-target settings10,000 rows per setting0.630.64-0.01[-0.23, +0.23]--
8 single-target settings1,000 rows per setting1.441.44+0.00[-0.25, +0.29]--
8 single-target settings10,000 rows per setting1.101.04+0.06[-0.30, +0.47]--
10 single-target settings1,000 rows per setting1.721.84-0.12[-0.67, +0.34]--
10 single-target settings10,000 rows per setting1.251.31-0.06[-0.47, +0.36]--
Every variable, 20 variables1,000 rows per setting3.233.53-0.30[-0.79, +0.19]--
Every variable, 20 variables10,000 rows per setting2.062.61-0.55[-1.13, -0.03]lower, first seeds only--
Every pair of variables1,000 rows per setting1.731.80-0.07[-0.59, +0.42]1.80-0.07[-0.59, +0.42]
Every pair of variables10,000 rows per setting1.251.40-0.15[-0.58, +0.24]1.22+0.03[-0.23, +0.27]
Mean SHD over 20 datasets, seeds 6000 to 6019, 5 draws each. Andrey runs at its defaults: 10 starts, at a level of one over the observational rows, 1e-3 at 1,000 rows, 1e-4 at 10,000, and 1e-5 at 100,000. The library runs 5 times at 1e-3. Definition 4.2 is a copy of the library whose I-contradicting test follows Yang et al.'s definition, run where a setting has two or more targets. The difference is Andrey's mean minus the library's, with its 95% interval, marked better only where seeds 0 to 19 agreed at 1,000 rows, the one size where both levels match; unmarked is a tie.

IGSP at three levels, both packages at the same one

AgainstRowsBetterTieWorse
alpha 1e-4, 5 startsLibrary870870
alpha 1e-4, 5 startsLibrary, Definition 4.2270270
alpha 1e-4, 10 startsLibrary871860
alpha 1e-4, 10 startsLibrary, Definition 4.2270270
alpha 1e-3, 5 startsLibrary870870
alpha 1e-3, 5 startsLibrary, Definition 4.2270270
alpha 1e-3, 10 startsLibrary8710770
alpha 1e-3, 10 startsLibrary, Definition 4.2270270
alpha 1e-2, 5 startsLibrary871860
alpha 1e-2, 5 startsLibrary, Definition 4.2270270
alpha 1e-2, 10 startsLibrary871860
alpha 1e-2, 10 startsLibrary, Definition 4.2270270
The 684 rows of the 87 settings above at three levels inside the authors' sweep, the library running 5 times, on seeds 0 to 19. Better and worse count only where a rerun on fresh seeds agreed.

ICP#

ICP returns the causal parents of one target, so both packages fit the same datasets and we compare the fits one by one. Pooled over each setting’s sizes, every comparison ties, and Andrey is 41 to 760 times faster.

  • The data follow linear Gaussian equations on 5 to 40 variables, as in the ICP paper’s Appendix G, in two environments of 100 to 500 rows.

  • A second design applies do-interventions on 6 or 10 variables in 3 or 4 environments of 200 rows.

  • Both packages run at alpha 0.05 and test every set of the other variables on every row.

  • We count the target’s parents missed plus the variables named wrongly as parents.

With two environments the approximate test accepted the same sets as R on all 5,220 paired fits. Every other difference, 2,112 fits, traces to one of two choices, each rebuilt from the rows. With three or more environments Andrey corrects the approximate test by the number of environments, K, as the paper does, where R uses K - 1; and R’s exact test uses a larger residual variance.

Split by size, two rows differ. One approximate-test row is worse: with do-interventions on 6 variables, the K correction gives Andrey 0.024 more errors per fit (interval +0.002 to +0.046), all from parents it does not name. Andrey follows the paper’s K there, so the row is allowlisted as correct by the paper. One exact-test row is lower: on 9 variables with two environments, Andrey makes 0.012 fewer errors per fit (interval -0.022 to -0.003), on one set of seeds and not rerun.

ICP against InvariantCausalPrediction 0.8, the same fits

Errors in the parentsFWERSame accepted sets
AndreyREmpty setDifferenceAndreyR
Approximate test
5 to 12 variables2 environments0.9640.9641.070+0.00[+0.00, +0.00]0.00800.00805,000 of 5,000
Do-interventions, 6 or 10 variables3 or 4 environments1.0061.0011.250+0.01[-0.01, +0.02]0.00900.0150584 of 1,000
16 or 21 variables, at most 3 parents2 environments0.8750.8751.100+0.00[+0.00, +0.00]0.01000.0100200 of 200
Exact test
5 to 12 variables2 environments0.8890.8921.070+0.00[-0.01, +0.00]0.00640.00563,568 of 5,000
Do-interventions, 6 or 10 variables3 or 4 environments1.1751.1771.250+0.00[-0.01, +0.01]0.01400.0110813 of 1,000
16 or 21 variables, at most 3 parents2 environments0.8350.8351.100+0.00[+0.00, +0.00]0.01000.0100131 of 200
Means over the paired fits at alpha 0.05: 50 datasets of each of 100 scenarios with 5 to 12 variables, 50 of each of 20 with do-interventions, and 20 of each of 10 with 16 or 21 variables. The errors count the variables missing from or added to the target's true parents; the FWER is the share of fits that name a variable outside them. The difference is Andrey's mean errors minus R's, with its 95% interval; unmarked is a tie.

ICP's FWER at alpha 0.05, every fit

Approximate testExact test
FWER95% intervalSuccessFWER95% intervalSuccess
In the claim
5 to 12 variables100,000 fits0.00700.0065 to 0.00750.4770.00630.0058 to 0.00680.494
Do-interventions, 6 or 10 variables4,000 fits0.00950.0067 to 0.01300.4980.01230.0091 to 0.01620.422
16 or 21 variables, at most 3 parents4,000 fits0.00750.0051 to 0.01070.4940.00650.0043 to 0.00950.544
40 variables, at most 3 parents1,000 fits0.00300.0006 to 0.00870.4970.00100.0000 to 0.00560.500
Out of the claim
Interventions that hit the target11,000 fits0.18430.1771 to 0.19160.4080.11460.1087 to 0.12070.433
A hidden parent of the target4,000 fits0.01180.0086 to 0.01560.5410.01820.0143 to 0.02290.565
A nonlinear parent of the target4,000 fits0.00300.0016 to 0.00520.0040.01000.0072 to 0.01360.002
The FWER is the share of fits that name a variable outside the target's true parents, with its 95% Clopper-Pearson interval; success is the share whose estimate equals them. In the claim the environments leave the target's own mechanism alone; out of it they do not, or a hidden or nonlinear parent breaks the linear model.

ICP’s guarantee holds in the claim, where the environments leave the target’s own mechanism alone: the FWER stays well below alpha in every setting, at most 0.0123, and no scenario’s FWER is above alpha beyond sampling error. Where an intervention can hit the target, a set holding a child of the target stays nearly invariant and is accepted, and the FWER rises to 0.18 and 0.11; R gives the same on the same fits (0.1936 and 0.1227). Given the targets, targets leaves the environments that hit the target out of the fit.

With the approximate test at 9 to 15 variables and 1,000 rows, Andrey’s median fit took 0.010 to 0.24 s against R’s 0.72 to 58 s, 72 to 241 times faster. With the exact test, which reads the same matrices in Andrey and solves a system per environment and set in R, it was 458 to 1,554 times faster. Over the paired fits the median ratio ran from 41 to 760.

CAM-UV#

CAM-UV learns nonlinear graphs where some variables are hidden. Every setting ties each reference once rerun, lingam at its default set size included. The two settings of the paper’s simulation were better on seeds 0 to 19 and tied on seeds 20 to 39.

  • The data have nonlinear additive effects on 4 to 50 observed variables, in the paper’s simulation, with one node in five or in ten hidden, or with none hidden.

  • Each dataset has 500 to 2,000 rows, with 20 datasets per setting.

  • The references search sets of up to 3 variables, the paper’s size and Andrey’s default; lingam also runs at its default of 2.

  • We count the directed-edge errors against the edges CAM-UV can identify as direct, 2 for a reversed edge.

With one hidden variable in five, no implementation beats the empty graph. At 8 observed and 2 hidden variables, Andrey made 1.50 more errors per graph than the empty graph on seeds 0 to 19 (interval +0.30 to +2.75) and 1.20 more on seeds 20 to 40 (-0.20 to +2.60); lingam and causal-learn made 1.85 to 1.90 more and 1.20 to 1.30 more. The empty graph is a floor only for a setting where the reference’s own interval against it lies below 0, so these settings are judged against the references alone.

Andrey’s graph differs from lingam’s on 217 datasets. We traced 202 of them, every one below 50 observed variables, to five documented choices: the visiting order, the HSIC test, the regressions, phase 2, and the cycle drop. The other 15, at 50 observed variables, are not traced.

CAM-UV ran 2.1 to 3.1 times faster than lingam and 7.4 to 13.5 times faster than causal-learn, each searching sets of up to 3 variables, and 1.9 to 3.2 times faster than lingam at its default set size of 2. At 50 observed variables its median fit took 91 s against lingam’s 296 s and causal-learn’s 964 s.

CAM-UV against lingam and causal-learn

Directed-edge errorsAndrey minus
Andreylingamcausal-learnEmpty graphlingamcausal-learn
One in five hidden
4 observed + 1 hidden2,000 rows1.951.851.801.70+0.10[-0.30, +0.55]+0.15[-0.30, +0.60]
8 observed + 2 hidden2,000 rows5.055.455.403.55-0.40[-1.15, +0.25]-0.35[-1.15, +0.35]
12 observed + 3 hidden2,000 rows7.357.707.956.05-0.35[-1.80, +1.00]-0.60[-2.00, +0.70]
One in ten hidden
10 observed + 1 hidden1,000 rows6.606.757.057.00-0.15[-1.35, +1.05]-0.45[-1.80, +0.85]
20 observed + 2 hidden1,000 rows10.4012.0510.8515.30-1.65[-3.55, +0.20]-0.45[-2.30, +1.45]
50 observed + 5 hidden1,000 rows27.9028.9030.0539.60-1.00[-5.70, +3.80]-2.15[-6.55, +2.40]
The paper's simulation
10 observed + 4 hidden500 rows6.907.958.109.35-1.05[-2.00, -0.25]lower, first seeds only-1.20[-2.10, -0.40]lower, first seeds only
10 observed + 4 hidden1,000 rows5.557.557.009.35-2.00[-3.35, -0.80]lower, first seeds only-1.45[-2.65, -0.45]lower, first seeds only
Nothing hidden
20 observed1,000 rows11.5510.2510.8520.00+1.30[-0.95, +3.60]+0.70[-1.70, +3.10]
Mean directed-edge errors over 20 datasets, seeds 0 to 19: a missing or extra edge costs 1 and a reversed one 2, against the edges CAM-UV can identify. lingam and causal-learn search sets of up to 3 variables, as Andrey does; lingam at its default set size of 2 ties Andrey in every setting too. The difference is Andrey's mean errors minus the reference's, with its 95% interval, marked better only where seeds 20 to 39 agreed; unmarked is a tie.

DYNOTEARS#

DYNOTEARS learns the links within and across time steps of a time series. At 500 steps every setting whose noise has mean 0 ties CausalNex, with an F1 of at least 0.968 for both packages. With exponential noise of mean 1, as the paper’s simulations draw it, CausalNex cannot fit the series’ mean, and Andrey made fewer errors at every size at 500 steps and at 5 variables at 50 steps. On seeds 20 to 39, five of those six were better again; at 100 variables and 500 steps the rerun’s interval reaches 0, so that setting counts as a tie.

  • The series are linear vector autoregressions with one lag, from the DYNOTEARS paper, on Erdos-Renyi or Barabasi-Albert graphs with Gaussian or exponential noise.

  • They have 5 to 100 variables and 50 or 500 steps, with 20 series per setting.

  • Both packages run at the paper’s settings for each length. CausalNex fits without a threshold and then keeps the weights above the paper’s thresholds.

  • We count the SHD over the same-step and the lagged edges.

One setting is worse: exponential noise of mean 0 at 100 variables and 50 steps, by 3.20 errors per series on seeds 0 to 19 and 4.15 on seeds 20 to 39 (interval +1.30 to +7.10). It comes from centering. Andrey fits each column around its own mean, the same as an intercept, which the paper’s loss leaves out. Refitted without centering, Andrey ties CausalNex there once rerun. Centering costs errors on short series whose noise has mean 0, and removes 2.3 to 11.1 errors per series at 500 steps when the noise has mean 1.

DYNOTEARS used 1.1 to 3.4 times less CPU time than CausalNex, per setting the median ratio over the paired series, on one core of an Intel Core i7-7820X. At 100 variables and 500 steps its median fit took 299 s against CausalNex’s 393 s.

DYNOTEARS against CausalNex 0.12.2

SHD over lags 0 and 1
AndreyCausalNexEmpty windowDifference
Gaussian noise, 500 steps
5 variables0.150.1513.5+0.00[+0.00, +0.00]
10 variables1.751.8029.3-0.05[-0.15, +0.00]
20 variables1.351.3057.6+0.05[+0.00, +0.15]
50 variables1.201.75144.6-0.55[-1.60, +0.05]
100 variables3.153.35283.2-0.20[-0.75, +0.20]
Gaussian noise, 50 steps
5 variables5.005.3513.5-0.35[-0.80, +0.00]
10 variables12.3512.2029.3+0.15[-0.30, +0.55]
20 variables21.6520.8057.6+0.85[+0.05, +1.65]higher, first seeds only
50 variables59.6059.00144.6+0.60[-0.15, +1.35]
100 variables143.95137.05283.2+6.90[+4.30, +9.55]higher, first seeds only
Exponential noise of mean 0, 500 steps
5 variables0.150.1513.5+0.00[+0.00, +0.00]
10 variables1.351.3029.3+0.05[+0.00, +0.15]
20 variables1.351.3557.6+0.00[-0.20, +0.20]
50 variables2.101.95144.6+0.15[-0.05, +0.35]
100 variables6.256.30283.2-0.05[-0.85, +0.55]
Exponential noise of mean 0, 50 steps
5 variables5.405.2513.5+0.15[-0.05, +0.35]
10 variables12.9512.7529.3+0.20[-0.25, +0.70]
20 variables23.5523.4057.6+0.15[-0.50, +0.75]
50 variables59.4558.80144.6+0.65[-0.75, +2.00]
100 variables148.95145.75283.2+3.20[+0.10, +6.00]worse
Barabasi-Albert and block-model graphs, 500 steps
5 variables0.750.7514.7+0.00[+0.00, +0.00]
10 variables0.200.2531.4-0.05[-0.15, +0.00]
20 variables0.550.5567.8+0.00[+0.00, +0.00]
50 variables1.851.95176.6-0.10[-0.30, +0.10]
Barabasi-Albert and block-model graphs, 50 steps
5 variables6.105.8514.7+0.25[+0.00, +0.55]
10 variables10.3510.0031.4+0.35[+0.05, +0.65]higher, first seeds only
20 variables24.2023.4067.8+0.80[-0.65, +3.00]
50 variables88.4587.80176.6+0.65[-0.65, +2.00]
Exponential noise of mean 1, 500 steps
5 variables0.154.8513.5-4.70[-6.40, -3.25]better
10 variables1.3512.4529.3-11.10[-16.00, -6.50]better
20 variables1.358.5057.6-7.15[-10.25, -4.30]better
50 variables2.156.90144.6-4.75[-8.15, -2.30]better
100 variables6.208.70283.2-2.50[-4.75, -0.75]lower, first seeds only
Exponential noise of mean 1, 50 steps
5 variables5.406.5513.5-1.15[-2.10, -0.20]better
10 variables13.0014.9029.3-1.90[-3.90, +0.10]
20 variables23.5523.5057.6+0.05[-1.70, +1.95]
50 variables59.4062.05144.6-2.65[-5.65, +0.20]
100 variables148.70147.45283.2+1.25[-3.10, +5.50]
Means over 20 series, seeds 0 to 19, at the paper's settings for 500 and for 50 steps. The empty window is the SHD of returning no edge. The difference is Andrey's mean SHD minus CausalNex's, with its 95% interval, marked better or worse only where a rerun on seeds 20 to 39 agreed; unmarked is a tie.

Other changes in 0.14.0#

The changelog measures the other changes: the interventional simulator (SCM.do, hard, soft, and envs=), env and targets on every method that learns from environments (gies’s interventions and cdnod’s domain_index still work in this release, with a deprecation warning), the tie rank that ignores offsets, and the faster categorical tests.

Limits#

Each result holds for the settings above. These are the places where the methods, or both packages, fall short:

  • GnIES was measured on 10 variables, linear-Gaussian data, and environments that change only the noise variance of their targets. With 10 rows per environment neither package beats the empty graph in every setting: in B10 neither does, and in D10 Andrey does not on either seed set while the reference does on the rerun seeds only, so the floor, judged on the first seeds, does not apply there. Hard interventions, mean shifts, weight changes, non-Gaussian noise, nonlinear effects, and 20 to 100 variables lie outside the claim; the comparison page reports them without judging.

  • UT-IGSP was measured on 20 variables and 5 experiments of 1,000 to 5,000 rows. At 50 variables with mean degree 5 and 3 experiments, neither package beats the empty graph. With 100 rows per experiment and no off-targets, Andrey names false targets more often than the library.

  • IGSP was measured on linear Gaussian data with 7 to 20 variables, known targets, and 1,000 to 100,000 rows per setting. Out of claim, with 100 rows per setting on 10 variables, Andrey made 0.60 more errors than the library on one set of seeds, and at 400 variables it finished no dataset within 3,600 s. A target without causes keeps its distribution under these interventions, so its experiment changes nothing. The I-contradicting test still marks the true arcs out of it, and Andrey reverses 823 of those 3,960 arcs, the library 838, and GIES 16.

  • ICP was measured on linear Gaussian data with 5 to 40 variables and 2 to 4 environments of 100 to 500 rows. Its guarantee needs environments that leave the target’s mechanism alone; where they do not, the FWER reaches 0.18, in R too, so pass the known targets. A hidden parent of the target raised the FWER to 0.018, and 0.145 in one scenario of 20. With at most 3 parents searched on 40 variables, it found almost none of them.

  • CAM-UV was measured on 4 to 50 observed variables and 500 to 2,000 rows. With one variable in five hidden, no package makes fewer errors than the empty graph: at 8 observed and 2 hidden variables Andrey makes 1.50 more on seeds 0 to 19 (interval +0.30 to +2.75) and 1.20 more on seeds 20 to 40 (interval -0.20 to +2.60), and lingam and causal-learn 1.85 to 1.90 and 1.20 to 1.30 more. With nothing hidden every marked pair is false, and each package marks 3.2 to 3.6 pairs per graph.

  • DYNOTEARS was measured on linear vector autoregressions with one lag, 5 to 100 variables, and 50 or 500 steps, at the paper’s settings for each length. With noise of mean 0, centering costs errors on short series: at 100 variables and 50 steps, about 3 per series more than CausalNex. At its defaults on 50 steps, both packages make more errors than the empty window from 20 variables on.

Reproduce#

You can find environment setup, campaign drivers, and scores in the benchmark harness guide. Times will differ with the hardware and build; graphs should match closely.

Comparison

Lane

Sizes

Datasets x repeats

Wall cap (s)

GnIES against gnies 0.3.3

gnies_cpu.py

d 10; 10 to 1,000 rows per environment

20 x 1

1,800

UT-IGSP against graphical-model-learning 0.1a8

ut_igsp_cpu.py

d 20; 1,000 to 5,000 rows per setting

20 x 5

1,800

IGSP against graphical-model-learning 0.1a8

igsp_cpu.py

7 to 20 variables; 1,000 to 100,000 rows per setting

20 x 5

1,800

ICP against InvariantCausalPrediction 0.8

icp_cpu.py

5 to 40 variables; 2 to 4 environments of 100 to 500 rows

50 to 1,000 per scenario x 1

none

CAM-UV against lingam 1.13.0 and causal-learn 0.1.4.8

camuv_cpu.py

4 to 50 observed and 0 to 5 hidden variables; 500 to 2,000 rows

20 x 1

3,600

DYNOTEARS against CausalNex 0.12.2

dynotears_ts.py

5 to 100 variables; 50 and 500 steps

20 x 1

3,600