Trust Your ∇ : Gradient-based Intervention Targeting for Causal Discovery
Abstract
Inferring causal structure from data is a challenging task of fundamental importance in science.
Observational data are often insufficient to identify a system’s causal structure uniquely.
While conducting interventions (i.e., experiments) can improve the identifiability, such samples are usually challenging and expensive to obtain.
Hence, experimental design approaches for causal discovery aim to minimize the number of interventions by estimating the most informative intervention target.
In this work, we propose a novel Gradient-based Intervention Targeting method, abbreviated GIT , that ’trusts’ the gradient estimator of a gradient-based causal discovery framework to provide signals for the intervention acquisition function.
We provide extensive experiments in simulated and real-world datasets and demonstrate that GIT performs on par with competitive baselines, surpassing them in the low-data regime.
Introduction
Estimating causal structure from data, commonly known as causal discovery or causal structure learning, is central to the progress of science [28].
Methods for causal discovery have been successfully deployed in various fields, such as biology [31, 42, 15], medicine [36, 5, 44], earth system science [11], or neuroscience [32].
In general, real-world systems can often be explained as a modular composition of smaller parts connected by causal relationships.
Knowing the underlying structure is crucial for making robust predictions about the system after a perturbation (or treatment) is applied [29].
Moreover, such knowledge decompositions are shown to enable sample-efficient learning and fast adaptation to distribution shifts by only updating a subset of parameters [3, 34].
To identify a system’s causal structure uniquely, observational data (i.e., obtained directly from the system, without interference) are, in general, insufficient and only allow recovery of the causal structure up to the Markov Equivalence Class (MEC) [37, 30].
Such a class contains multiple graphs that explain the observational data equally well.
To overcome the limited identifiability, causal discovery algorithms commonly leverage interventional data [17, 4, 20], which are acquired by manipulating a part of the system [38, 28].
Without an experimental design strategy, intervention targets (i.e. variables on which the manipulation is performed) are usually chosen at random before conducting an experiment.
While collecting enough interventional samples under a random strategy enables identification [10, 8], such an acquisition technique neglects the current evidence and can be wasteful, as acquiring interventional data might be costly (e.g. additional experiments in the chemistry lab) [30].
Consequently, the field of experimental design [23, 27, 41] is concerned with the acquisition of interventional data in a targeted manner to minimize the number of required experiments.
[Figure]
In this work, we introduce a simple yet effective approach to actively choose intervention targets, called
Gradient-based Intervention Targeting, or GIT for short, see Figure 1.
GIT is a scoring-based method (i.e., the intervention with the highest score is selected) that relies on „imaginary” interventional data, and is simple to implement on top of existing gradient-based causal discovery methods.
GIT requires access to a parametric causal graph model and a loss function, typically based on interventional or fused (observational and interventional) data.
The model and loss function can be defined exclusively for GIT purposes or provided by the underlying gradient-based causal discovery framework.
With that, the GIT scores reflect the expected magnitudes of gradients of the loss function with respect to the model structural parameters.
Intuitively, GIT selects an intervention on which the model is the most mistaken, i.e., the one that can lead to the largest model update.
Our contributions include:
• We introduce GIT , a method for active intervention targeting in gradient-based causal discovery, which can be applied on top of various causal discovery frameworks.
• We conduct extensive experiments on synthetic and real-world graphs.
We demonstrate that, compared against competitive baselines, our method typically reduces the amount of interventional data needed to discover the causal structure.
GIT is particularly efficient in the low-data regime and thus recommended when access to interventional data is limited.
• We perform additional analyses which suggest that the good performance of GIT stems from its ability to focus on highly informative nodes.
Preliminaries 2.1 Structural Causal Models and Causal Structure Discovery
Causal relationships can be formalized using structural causal models (SCM) [30].
Each of the endogenous variables X
=
X 1 , . .
, X n } is expressed as a function X i =
f i ( PA i , U i ) of its direct causes PA
i ⊆
X and an external independent noise U i .
It is assumed that the assignments are acyclic and thus associated with a directed acyclic graph G =
( V, E ) .
The nodes V = { 1 , . . .
, n } represent the random variables and the edges correspond to the direct causes, that is ( i, j
) ∈ E
if and only if
X i ∈ PA j .
The joint distribution is Markovian to the graph G , which means that:
[Equation]
Causal structure discovery aims to recover the graph G .
Without any additional restrictive assumptions, and having access to only observational data, the solution to such a problem is not unique and can be determined only up to a Markov Equivalence Class [38, 30].
To improve identifiability, data from additional experiments, called interventions, need to be gathered.
An intervention on X i replaces the conditional distribution P ( X i | PA i ) with a new distribution (cid:101) P ( X i | PA i ) .
The node i ∈ V is called the intervention target .
An intervention that removes the dependency of a variable X i on its parents, yielding (cid:101) P ( X i | PA i ) = (cid:101) P ( X i ) , is called hard.
In this paper, we assume access to data gathered from distributions induced by performing hard interventions.
2.2 ENCO Framework
ENCO [24] is a gradient-based causal discovery framework that maintains a parameterized distribution over graph structures and a set of parameters modeling the functional dependencies.
The graph parameters { ρ i,j } i,j and functional parameters { ϕ i } i are updated by iteratively alternating between two optimization stages — the distribution fitting stage and the graph fitting stage.
The goal of the distribution fitting stage is to learn functions
f ϕ i ’s, which model the conditional density f
ϕ
i
( x i | PA ( i,C ) ) of P ( X i | PA ( i,C ) ) .
The set of parents PA ( i,C ) is defined by the graph structure induced by adjacency matrix C , sampled from the current graph distribution.
The training objective is a standard log-likelihood loss, described in detail in Appendix C.1.
The graph fitting stage aims to update the parametrized edge probabilities.
To this end, ENCO selects the intervention target I uniformly at random from the graph nodes and collects a data sample from the interventional distribution (cid:101) P I 2 .
The graph parameters are optimized by minimizing:
[Equation]
ENCO applies REINFORCE-based gradient estimators to get the signal for updating the structural parameters.
For a detailed description of the method and the estimators, please refer to Appendix C.1.
2.3 Online Causal Discovery and Targeting Methods
Input: causal discovery algorithm A , intervention targeting function F , number of data acquisition rounds T , observational dataset D obs 1: D int ← ∅ 2: Fit φ 0 with algorithm A on D obs 3: for round
i = 1 , 2 , . .
, T do 4:
I ← intervention targets generated by F 5:
D Iint ← query for data from interventions I 6:
D int ← D int ∪ D Iint 7:
Fit φ i with algorithm A on D int and D obs return φ T
In this work, we consider an online causal discovery procedure outlined in Algorithm 1.
Initially, the graph model φ 0 is fitted using observational data D obs .
Following, batches of interventional samples are acquired and used to improve the belief about the causal structure (line 7).
Intervention targets are chosen by some function F to optimize the overall performance, taking into account the current belief about the graph structure encoded in φ i − 1 .
In this paper we describe our new method GIT in Section 3 and compare against two of other possible choices: AIT and CBED, described in detail in Appendix D.
GIT method
GIT aims to choose the intervention target which induces the largest update of the parameters modeling the causal structure.
Consequently, GIT scores intervention candidates using a gradient norm, which is a proxy for the update magnitude.
In the ideal scenario, we would calculate target scores using corresponding interventional data, leading to a good gradient estimation.
This approach, which we call GIT -privileged, performs well (which we show in Section 4) and can be used as a soft upper bound.
However, GIT -privileged requires gathering real interventional data for each node, which is hugely wasteful and thus infeasible in practice.
GIT solves this problem by approximating the gradients using imaginary interventions taken from its running causal model.
In Section 4, we show that we can indeed ’trust’ such gradients: GIT not only achieves results similar to GITprivileged, but also performs favorably compared with other methods.
Our method requires access to a gradient-based causal discovery model and a loss function.
These objects can be tailor-made for the GIT method, see Appendix B, or supplied by a causal discovery method that uses interventional data.
Virtually any existing gradient-based causal discovery method fulfills these requirements.
Our algorithm scores interventions based on imaginary data generated by the current graph distribution.
Formally, for the intervention i ∈ V , its score s i is given by
[Equation]
where P ρ is the distribution over graphs specific to the given method and P G,i are data generated assuming graph G and intervention, that is
[Equation]
where (cid:101) P denoted the interventional distribution, ϕ are functional parameters
and we make explicit dependence on G .
In Algorithm 2, we approximate s i using Monte-Carlo sampling, see line 3.
In
GIT -privileged, we use the real intervention data instead of sampling from P ρ,i .
3.1 GIT with ENCO
We choose to use ENCO as the gradient-based causal discovery framework A in our main experiments (recall Algorithm 1) due to its strong empirical results and good computational performance on GPUs.
Note, however, that our method can work with any framework with a structural gradient estimator.
In
Appendix F.1, we present a description for the DiBS framework.
In ENCO, the structural parameters for an edge ( i, j ) are represented by two parameters
ρ i,j =
[ θ i,j , γ i,j ] .
Intuitively, γ i,j corresponds the existence of the edge, while θ i,j = − θ j,i is associated with the direction of the edge (see Appendix C.1).
Let ∇ θ L ( D ) and ∇ γ L ( D ) be the gradients for structural parameters θ, γ on data D that are computed by ENCO method.
We incorporate information from both of these gradients and use ||∇ γ L ( D G,i ) ||
2 + ||∇
θ
L
( D G,i ) ||
2 as a score for the intervention
i in line 3.
Note that we concentrate on structural gradients, and do not include gradients of functional parameters in our score.
In order to sample DAGs from the current graph distribution (line 1), we use a two-phase sampling procedure as proposed in [33].
Experiments
We compare GIT against the following baselines: AIT, CBED, Random, and GIT -privileged.
AIT and CBED are competitive intervention acquisition methods for gradient-based causal discovery (described in Appendix D).
The Random method selects interventions uniformly in a round-robin fashion 4 .
The last approach, GIT -privileged, is the oracle method described in Section 3.
Our main result is that GIT brings substantial improvement in the low data regime, being the best among benchmarked methods in all considered synthetic graph classes and half of the considered real graphs in terms of the EAUSHD metric, see Section 4.2.
On the remaining real graphs, our approach performs similarly to the baseline methods.
This result is accompanied by an in-depth analysis of the relationships between different strategies and the distributions of the selected intervention targets presented in Appendix F.4.
Additional results in DiBS framework are presented in Appendix F.1.
AIT
CBED
Random
GIT (ours)
GIT -privileged mean SHD 10 (4 + 6) 7 (4 + 3) 22 (12 + 10) 17 (10 + 7) 24 (12 + 12) mean AUSHD 6 (2 + 4) 6 (4 + 2) 12 (5 + 7)
(11 + 7) 24 (12 + 12)
4.1 Experimental Setup
We evaluate the different intervention targeting methods in online causal discovery, see Algorithm 1.
We utilize an observational dataset of size 5000 .
We use T = 100 rounds, in each one acquiring an interventional batch of 32 samples.
We distinguish two regimes: regular, with all 100 batches ( N = 3200 interventional samples), and low, with 33 batches ( N = 1056 interventional samples).
We use synthetic and real-world datasets.
The synthetic dataset consists of bidiag , chain , collider , jungle , fulldag and random DAGs with 25 nodes.
The variable distributions are categorical, with 10 categories 5 .
The real-world dataset consists of child , earthquake , cancer , asia , alarm and sachs graphs, taken from the BnLearn repository [35].
The chosen graphs, both synthetic and real-world, are commonly used as benchmarking datasets [20, 24, 33].
Metrics We use the Structural Hamming Distance (SHD) [43] between the predicted and the ground truth graph as the main metric.
SHD between two directed graphs is defined as the number of edges that need to be added, removed, or reversed in order to transform one graph into the other.
More precisely, for two DAGs represented as adjacency matrices c and c ′ we have SHD ( c, c ′ ) :
= (cid:80)
i
[Equation]
( c ij + c ji ̸ = c ′ ij + c ′ ji or c ij ̸ = c ′ ij ) .
To aggregate SHD values over different data regimes, we introduce the area under the SHD curve:
[Equation]
where m is the used method, T is the number of interventional data batches, c gt is the ground truth graph, and c m,t is the graph fitted by the method m using t interventional data batches.
AUSHD captures both the speed and quality of the causal discovery process, smaller values indicate a better method.
For better visualization, we also use a measure that we call EAUSHD, that for a given method m reports its negative distance from the mean AUSHD result of the Ranodm method (see
Appendix E.1).
Higher values of EAUSHD indicate a better method.
We approximate the expected values of SHD, AUSHD, and EAUSHD by empirical mean.
4.2 Main Result: GIT ’s Performance on Synthetic and Real-World Graphs
We evaluate GIT on 24 training setups: twelve graphs (synthetic and real-world, six in each category) and two data regimes ( N = 1056 and N = 3200 ).
The performance is measured as described in
Section 4.1.
In the description below, we mainly focus on AUSHD.
GIT is the best or comparable to other non-privileged methods in 18 cases according to mean AUSHD (or 17 cases according to mean
SHD), see Table 1.
Similarly, the distribution of AUSHD for GIT has most frequently the smallest standard deviation among non-privileged methods (11 out of 24 cases) 6 .
This can be also observed in Figure 2 and Figure 3 where the distribution of GIT is relatively concentrated as compared with other methods (except for the fulldag graph).
In terms of pairwise comparison with other methods ( 2 × 12 × 4 = 96 pairs in total), GIT is better in 45 cases and comparable in 35 cases, see Table 6 in Appendix F.2.1.
Interestingly, GIT ’s performance for graphs with fewer nodes ( cancer , earthquake ) is less impressive.
We hypothesize that this is because in these cases the corresponding Markov Equivalence Class is a singleton (see Figure 10).
Consequently, they require less interventional data to converge (see training curves in Appendix E.3), which diminishes the impact of different intervention strategies.
GIT performs particularly well in the low data regime, where it is better or comparable to all the other non-privileged methods for 11 out of 12 graphs (except for cancer , where AIT is the best), see
[Figure]
GIT
[Figure] [Figure]
Table 1.
This phenomenon can be seen in Figure 2 and Figure 3, where the left-hand side of the GIT violin plot tends to display the most favorable properties among AIT, CBED, and Random methods.
GIT also fares better in pairwise comparison for the small data regime, see Table 6 in Appendix F.2.1.
This suggests that GIT could be a good choice when access to interventional data is limited or costly.
In the regular data regime ( N = 3200 ), GIT is at least as good as the other methods in 7 cases.
GIT gets outmatched by the Random method on collider , fulldag , and asia , by CBED on earthquake , and by AIT on cancer , although most methods struggle in these cases.
It also turns out that for collider and fulldag , GIT has long left tail.
We also notice that the performance of MI-based approaches (CBED and AIT) is worse than the one of GIT , sometimes converging to the significantly higher SHD values (see Figure 5 and Figure 6 in the Appendix).
We hypothesize this is because of approximation errors and model mismatches.
In order to compute the scores for considered acquisition methods, a DAG sampling procedure based on the current graph belief is needed.
Such procedure is an approximated sampling from the belief and hence can exacerbate approximation errors in methods relying on mutual information estimation.
GIT -privileged performed the best, as it was at least comparable with all other methods for each graph and data regime (see Table 1).
Similarly, GIT -privileged dominates the pairwise comparison with other methods (see Table 6 in Appendix F.2.1), victorious 57 out of 96 times.
This strong performance is also visible in Figure 2 and Figure 3, where the mass of the method consistently occupies the favorable regions of the EAUSHD metric.
These results solidify the perception of GIT -privileged as a soft upper-bound.
Importantly, GIT follows it quite closely: the methods are equivalent in 10 cases in the low data regime ( alarm , bidiag , cancer , chain , child , eqarthquake , fulldag , jungle , random , sachs ), and in 5 cases in the regular data regime ( bidiag , cancer , chain , child , jungle ).
Furthermore, the choices of GIT and GIT -privileged correlate highly (Spearman correlation equal 73%), see Appendix F.3.
These results provide additional evidence in favor of GIT soundness and suggest that using data sampled from the model to compute GIT ’s scores does not lead to severe performance deterioration.
Conclusions
In this paper, we consider the problem of experimental design for causal discovery.
We introduce a novel Gradient-based Intervention Targeting ( GIT ) method, which leverages the gradients of gradientbased causal discovery objectives to score intervention targets.
We demonstrate that the method is particularly effective in the low-data regime, outperforming competitive baselines.
We also perform several analyses of the method, confirming that GIT typically selects informative targets.
Acknowledgments and Disclosure of Funding
We gratefully acknowledge the compute from Berzelius cluster and the Swedish National Supercomputer Centre.
This research was supported by the PL-Grid Infrastructure.
Our experiments were managed using neptune.ai .
We would like to thank the Neptune team for providing us access to the team version and technical support.
The work of Piotr Miło´s was supported by the Polish
National Science Center grant UMO-2017/26/E/ST6/00622 and UMO-2019/35/O/ST6/03464.
The work of Aleksandra Nowak was carried out within the research project Bio-inspired artificial neural network (grant no. POIR.04.04.00-00-14DE/18-00) within the Team-Net program of the Foundation for Polish Science co-financed by the European Union under the European Regional Development
Fund.
Checklist
The checklist follows the references.
Please read the checklist guidelines carefully for information on how to answer these questions.
For each question, change the default [TODO] to [Yes] , [No] or [N/A] .
You are strongly encouraged to include a justification to your answer , either by referencing the appropriate section of your paper or providing a brief inline description.
For example:
• Did you include the license to the code and datasets?
[Yes] See Section ?? .
• Did you include the license to the code and datasets?
[No] The code and the data are proprietary.
• Did you include the license to the code and datasets?
[N/A]
Please do not modify the questions and only use the provided macros for your answers.
Note that the
Checklist section does not count towards the page limit.
In your paper, please delete this instructions block and only keep the Checklist section heading above along with the questions/answers below.
For all authors... (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
[Yes] (b) Did you describe the limitations of your work?
[Yes] We describe limitations in Appendix G. (c) Did you discuss any potential negative societal impacts of your work?
[N/A] (d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
[Yes] 2.
If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?
[Yes] (b) Did you include complete proofs of all theoretical results?
[Yes] 3.
If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[Yes] We provide the code and instructions in the supplementary materials.
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] We provide description in Section 4.1.
For details, check Appendix E (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[Yes] We include confidence intervals for all experimental results.
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[Yes] We provide this information in Appendix E.2.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?
[Yes] (b) Did you mention the license of the assets?
[Yes] We include licence in the supplementary materials together with the imported code.
(c) Did you include any new assets either in the supplemental material or as a URL?
[Yes] We include the code than allows to run our method in ENCO framework.
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating?
[N/A] We work on publicly available mathematical models of synthetic and real-world causal graphs only.
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content?
[N/A] We work on publicly available mathematical models of synthetic and real-world causal graphs only.
If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
[N/A] (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[N/A] (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
[N/A]
Appendix A Related Work
B Mathematical Formalism for MLE-based GIT Scoring Function
B.1 Formal Model . . . .
B.2 MLE-based Scoring Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C Details about Employed Causal Discovery Frameworks
C.1 ENCO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C.2 DiBS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
D
Details about Intervention Acquisition Methods
E Additional Experimental Details
E.1 EAUSHD metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
E.2 Compute details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
E.3 Synthetic Graphs Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
E.4 ENCO Hyperparameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
E.5 DiBS Hyperparameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
F
Additional Experimental Results
F.
Experiments in DiBS Framework . . . . . . . . . . . . . . . . . . . . . . . . . . .
F.
Performance in ENCO Framework - All Results . . . . . . . . . . . . . . . . . . .
[Table]
Ranking Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
[Table]
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
[Table]
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
[Table]
Curves . .
[Table]
- Correlation Scores . .
[Table]
Investigating GIT ’s intervention target distributions . . . . . . . . . . . . . . . . .
[Table]
ENCO - Intervention Targets Distribution . .
F
[Table] [Table]
ENCO - Obtained Synthetic Graphs . .
F
[Table]
[Table]
Discussion on Small Real-World Graphs . . . . . . . . . . . . . . . . . .
[Table]
ENCO - Experiments with Pre-Initialization . . . . . . . . . . . . . . . . . . . . .
G Limitations and future work
A Related Work
Experimental Design / Intervention Design.
There are two major classes of methods for selecting optimal interventions for causal discovery.
One class of approaches is based on graph-theoretical properties.
Typically, a completed partially directed acyclic graph (CPDAG), describing an equivalence class of DAGs, is first specified.
Then, either substructures, such as cliques or trees, are investigated and used to inform decisions [18, 9, 39, 16], or edges of a proposed graph are iteratively refined until reaching a prescribed budget [14, 13, 21, 22].
The most severe limitation of graph-theoretical approaches is that misspecification of the CPDAG at the beginning of the process can deteriorate the final solution.
Another class of methods is based on Bayesian Optimal Experiment Design [23], which aims to select interventions with the highest mutual information (MI) between the observations and model parameters.
MI is approximated in different ways: AIT [33] uses F-score inspired metric to implicitly approximate MI; CBED [40] incorporates BALD-like estimator [19]; ABCD [1] uses estimator based on weighted importance sampling.
Although theoretically principled, computing mutual information suffers from approximation errors and model mismatches.
Therefore, in this work, we explore using scores based on different principles.
Gradient-based Causal Structure Learning.
The appealing properties of neural networks have sparked a flurry of gradient-based causal structure learning methods.
The most prevalent approaches are unsupervised formulations that optimize a data-dependent scoring metric (for instance, penalized log-likelihood) to find the best causal graph G .
Existing unsupervised methods that are capable (or can be extended) to incorporate interventional data can be categorized based on the underlying optimization formulation into: (i) frameworks with a joint optimization objective [4, 26, 6, 2, 12, 7] and (ii) frameworks with alternating phases of optimization [3, 20, 24].
While structural and functional parameters are optimized under a joint objective in the former, the latter splits the optimization into two phases with separate objectives.
All the aforementioned methods allow evaluation of gradient with respect to the structural and functional parameters with a batch of (real or hypothesized) interventional samples and can serve as a base framework for our proposed gradient-based intervention acquisition strategy.
B Mathematical Formalism for MLE-based GIT Scoring Function B.1 Formal Model
In what follows we identify a graph with its adjacency matrix c .
We will also consider c ’s that do not include self loops, i.e. c ii = 0 for every i .
Below p ϕ,ψ,β stands for the joint density of the model (paremeterized by ϕ , ψ , and β ), and let p j,ϕ j represent some density functions.
The definition of p ϕ,ψ,β is slightly complex since (a) it covers the intervention and no-intervention cases, and (b) it covers the case when c is not a DAG (which formally results in the appearance of an additional term, Λ c,ı ).
Definition 1.
For a given graph c and intervention ı ∈ { 0 , 1 , . . . , n } we define the (conditional) joint probability as
[Equation]
where u ψ , p j,ϕ are density functions, and
[Equation]
The case ı = 0 is interpreted as no intervention.
For brevity, we will not emphasize the dependence of p on ϕ, ψ, β .
Remark 2.
The expression for p ( x, c | ı ) defines a proper density function, i.e. (cid:80) x (cid:80)
c p ( x, c | ı ) = 1 .
Indeed, for ı ∈ { 1 , . . . , n } (and analogously for ı = 0 ), (cid:88)
[Equation]
Remark 3.
If c is a DAG, Λ ı,c
= 1 .
Notice that for ı ∈ { 1 , . . . , n } ,
[Equation]
B.2 MLE-based Scoring Function
MLE-based scoring function is based on some approximation of E X ∼P [log p ( X | ı )] for each intervention ı , where the choice of a distribution of X ∼ P , is a design decision.
This quantity is difficult to evaluate and contains intraceble elements ( Λ c,ı ), hence we will make a series of simplifying assumptions.
Using Jensen’s inequality
[Equation]
we get:
[Equation]
The right-hand side of the above inequality can be expressed as
[Equation]
The dependence of the last term in the above expression on β is untraceble, hence we will omit it.
The item of interest is thus the following expected value:
[Equation]
Taking the expression in equation 6 and letting P corrsepond p ( x | ı )
[Equation]
one can formulate several scoring function that are in the GIT spirit
[Equation]
The computation of derivatives for each method is similar, with the first item on the list being maybe slightly more complex.
For that reason, we provide the furhter computations for this case.
Denoting the term under the expectation in equation 6 as G ( X, C, ı ) , we can expand this expression as
[Equation]
Consequently, for any k and l ̸ = ı
[Equation]
the partial derivative with respect to β kl takes the following form:
[Equation]
Using the law of total probability and grouping the terms, the right-hand side of equation 7 can be further simplified as
[Equation]
The above formulas can be interpreted in the following way.
Remark 4.
The coefficient next to G ( X, C, ı ) in the last expression in equation 7 has zero mean and variance equal 2 . 2.
The expression G ( X, C, ı ) is large, e.g., when p j ( X j | C, ı ) are small.
This suggests that, picking the intervention ı for which the model is incorrect and where we wish to improve it.
ENCO objective is similar to that of equation 6, with P defined as the ground truth interventional distribution, the term u ( X ı ) replaced with p ( X ı | PA Cı ) , and additional regularizing term added.
Sometimes it is assumed that β ’s factorize into existential and directional edge parameters θ ij and γ ij : β ij = σ ( θ ij ) σ ( γ ij ) , where σ is a sigmoid function, see also
Appendix C.
The derivatives with respect to parameters γ and θ can be easily computed from the above formulas via a chain rule.
C Details about Employed Causal Discovery Frameworks C.1 ENCO
We extend the description of the ENCO framework [24] from Section 2.2.
Structural Parameters.
ENCO learns a distribution over the graph structures by associating with each edge ( i, j ) , for which i ̸
= j , a probability p i,j = σ ( γ i,j ) σ ( θ i,j ) .
Intuitively, the γ i,j parameter represents the existence of the edge, while θ i,j = − θ j,i is associated with the direction of the edge.
The parameters γ
i,j and θ i,j are updated in the graph fitting stage.
Distribution Fitting Stage.
The goal of the distribution fitting stage is to learn the conditional probabilities P ( X i | PA ( i,C ) ) for each variable X i given a graph represented by an adjacency matrix
C , sampled from C i,j ∼ Bernoulli ( p i,j ) .
Note that self-loops are not allowed and thus p i,i = 0 .
The conditionals are modeled by neural networks
f ϕ i with an input dropout-mask defined by the adjacency matrix.
In consequence, the negative log-probability of a variable can be expressed as
L C ( X i ) =
− log f ϕ i ( PA ( i,C ) )
( X i ) , where PA ( i,C ) is obtained by computing C · ,i ⊙ X , with ⊙ denoting the element-wise multiplication.
The optimization objective for this stage is defined as minimizing the negative log-likelihood (NLL) of the observational data over the masks C · ,i .
Under the assumption that the distributions satisfy the Markov factorization property defined in Equation 1, the NLL can be expressed as:
[Equation]
X i )] .
Graph Fitting Stage and Implementation of Interventions.
The graph fitting stage updates the structural parameters θ and γ defining the graph distribution.
After selecting an intervention target I ,
ENCO samples the data from the postinterventional distribution (cid:101) P I .
In experiments in the current paper the variables are assumed to be categorical.
The intervention is implemented by changing the target node’s conditional to uniform over the set of node’s categories.
As the loss, ENCO uses the graph strcuture loss L G defined in Equation 2 in the main text plus a regularization term λL sparseγ,θ that influences the sparsity of the generated adjacency matrices, where λ is the regularization strength.
Gradients Estimators.
In order to update the structural parameters γ and θ ENCO uses
REINFORCE-inspired gradient estimators.
For each parameter γ
i,j the gradient is defined as:
[Equation]
where E X ,C − ij denotes all of the three expectations in Equation 2 (in the main text), but excluding the edge ( i, j ) from C .
The term L X i ̸→
X j ( X j ) describes the negative log-likelihood of the variable
X j under the adjacency matrix C − ij , while L X i → X j ( X j ) is the negative log-likelihood computed by including the edge ( i, j ) in C − ij .
For parameters θ i,j the gradient is defined as:
[Equation]
where p ( I i ) is the probability of intervening on node i (usually uniform) and E
I
i , X ,C − ij is the same expectation as E X ,C − ij but under the intervention on node i .
C.2 DiBS
DiBS [26] is a Bayesian structure learning framework which performs posterior inference over graphs with gradient based variational inference.
This is achieved by parameterising the belief about the presence of an edge between any two nodes with corresponding learnable node embeddings.
This turns the problem of discrete inference over graph structures to inference over node embeddings, which are continuous, thereby opening up the possibility to use gradient based inference techniques.
In order to restrict the space of distributions to DAGs, NOTEARS constraint [45] which enforces acyclicity is introduced as a prior through a Gibbs distribution.
Formally, for any two nodes ( i, j ) , the belief about the presence of the edge from i to j is paramerised as:
[Equation]
Here, g ij is the random variable corresponding to the presence of an edge between i to j , α is a tunable hyperparameter and u i , v j ∈ R k are embeddings corresponding to node i and j .
The entire set of learnable embeddings, i.e. U = { u i } di =1 , V = { v i } di =1 and Z =
[ U , V ] ∈ R 2 ×
d × k form the latent variables for which posterior inference needs to be performed.
Such a posterior can then be used to perform Bayesian model averaging over corresponding posterior over graph structures they induce.
DiBS uses a variational inference framework and learns the posterior over the latent variables
Z using
SVGD [25].
SVGD uses a set of particles for each embedding u i and v j , which form an empirical approximation of the posterior.
These particles are then updated based on the gradient from Evidence
Lower Bound (ELBO) of the corresonding variational inference problem, and a term which enforces diversity of the particles using kernels.
The prior over the latent variable Z is given by a Gibbs distribution with temperature β which enforces soft-acyclicty constraint:
[Equation]
Here, h is the DAG constraint function given by NOTEARS [45].
D Details about Intervention Acquisition Methods
In this section we briefly introduce other intervention acquisition methods used for comaprison in this work.
Active Intervention Targeting (AIT) Assume that the structural graph distribution maintained by the causal discovery algorithm can be described by some parameters ρ .
Consider a set of graphs
G = {G j } sampled from this distribution.
AIT assigns to each possible intervention target i ∈
V a discrepancy score that is computed by measuring the variance between the graphs ( V BG ) and variance within the graphs ( V WG ).
The V BG i for intervention i is defined as:
[Equation]
where µ j,i is the mean of all samples drawn from graph G j under the intervention on target i , and µ i is the mean of all samples drawn from graphs under intervention on target i .
The variance within graphs is described by:
[Equation]
where [ S j,i ] k is the k -th sample from graph G j under the intervention on target i .
The AIT score is then defined as the ratio D i
= V BG
i V WG i .
The method selects then the intervention attaining the highest score D i .
CBED Targeting Bayesian Optimal Experimental Design for Causal Discovery (BOECD) selects the intervention with the highest information gain obtained about the graph belief after observing the interventional data.
Let the tuple ( j, v ) define the intervention, where j ∈ V describes the intervention target, and v represents the change in the conditional distribution of variable X j .
Specifically, this means that the new conditional distribution of X j is a distribution with point mass concentrated on v .
Moreover, let Y ( j,v ) denote the interventional distribution under the intervention ( j, v ) , and let ψ denote the current belief about the graph structure (i.e. the random variable corresponding to the structural and distributional parameters ψ = ( ρ, ϕ ) ).
BOECD selects the intervention that maximizes [40]:
[Equation]
where D are the observational data.
The above formulation necessities the use of an MI estimator.
One possible choice is a BALD-inspired estimator [40, 19]:
[Equation] [Equation]
with H ( · ; · ) denoting the cross-entropy.
Note that this approach allows to select not only most informative target, but also the value of the intervention.
E Additional Experimental Details E.1 EAUSHD metric
For better visualization, we also use a measure that we call EAUSHD, that for a given method m reports its negative distance from the mean AUSHD result of the Ranodm method
[Equation]
where the expectation averages all randomness sources (e.g. stemming from the initialization).
Higher values of EAUSHD indicate a better method.
E.2 Compute details
To conduct our experiments we have been using internal CPU and GPU clusters (with mostly NVIDIA
A100 graphics cards).
Each causal discovery process takes approximately 5 GPU-hours or
CPU-hours (4 days of 14 core cpu time).
The times vary with respect to graph size and acquisition method.
We estimate total GPU-time to be 40K GPU-hours and total CPU-time to be 2M CPU-hours.
E.3 Synthetic Graphs Details
The synthetic graph structure is deterministic and is specified by the name of graph ( chain , collider , jungle , fulldag ), except for random , where the structure is sampled.
Following (author?)
[24], we set the only parameter of sampling procedure, edge_prob , to 0 . 3 .
The ground truth conditional distributions of the causal graphs are modeled by randomly initialized
MLPs.
Additionally, a randomly initialized embedding layer is applied at the input to each MLP that converts categorical values to real vectors.
We used the code provided by (author?)
For more detailed explanation, refer to (author?)
[24, Appendix C.1.1].
E.4 ENCO Hyperparameters
For experiments on ENCO framework we used exactly the same parameters as reported by (author?)
[24, Appendix C.1.1].
We provide them here for the completeness of our report.
[Table]
layers, hidden size 64, LeakyReLU
( α = 0 .
[Table]
E.5 DiBS Hyperparameters
In Table 3, we present hyperparameters used for the DiBS framework.
[Table]
Choice of Kernel
[Equation] [Equation]
σ Z σ Θ
Optimizer
RMSProp
Learning rate Optimizer 0 .
F Additional Experimental Results F.1 Experiments in DiBS Framework
Experimental setup The experimental setup closely follows the one from [40].
In the experiments, 10 batches of 50 data-points each are acquired.
Each batch can contain various intervention targets.
The acquisition method chooses intervention targets and values.
For some of the methods, the
GP-UCB strategy is used to select a value for a given intervention; see [40] for details.
We compare the following methods:
• Soft GIT (ours) : gradient magnitudes corresponding to different interventions are normalized by the maximum one, then passed to the softmax function (with temperature 1 ).
Obtained scores are used as probabilities to sample a given intervention in the current batch.
GP-UCB is used for value selection.
• Random (fixed values) : Intervention targets are chosen uniformly randomly.
The intervention value is fixed at 0 .
• Random (uniform values) : Intervention targets are chosen uniformly randomly.
The intervention value is chosen uniformly randomly from the variable support.
• Soft AIT : Intervention targets are chosen from the softmax probabilities of AIT scores [33], with the temperature 2 .
GP-UCB is used for value selection.
• Soft CBED :
Intervention targets are chosen from the softmax probabilities of CBED scores [40], with the temperature 0 .
GP-UCB is used for value selection.
The results are presented in Figure 4.
We can see the performance of Soft GIT is comparable to that of Random (uniform values) in both considered graph classes.
In contrast, Soft AIT performs worse on Erdos-Renyi graphs, while Soft CBED performs worse on Scale-Free graphs.
[Figure]
F.2 Performance in ENCO Framework - All Results F.2.1 Ranking Statistics
AIT
CBED
Random
GIT (ours)
GIT -privileged
Best 0 (0 + 0)
(0 + 0) 2 (0 + 2) 8 (
[Table]
[Table]
Best or comparable 6 (2 + 4) 6 (4 + 2) 12 (5 + 7)
(11 + 7) 24 (12 + 12)
AIT
CBED
Random
GIT (ours) priv.
GIT
Best 1 (0 + 1) 1 (0 + 1) 2 (1 + 1) 1 (1 + 0) 3 (1 + 2)
Best or comparable 10 (
[Table] [Table]
[Table] [Table]
F.2.3 SHD Tables
[Table]
[Table] [Table]
[Table]
F.2.4 ENCO - Training Curves
[Figure] [Figure]
F.3 ENCO - Correlation Scores
In Figure
[Figure]
we present the correlation of scores of the tested targeting methods.
Importantly, the high correlation of GIT and GIT -privileged supports the hypothesis that imaginary gradients are a credible proxy of the true gradients and thus validates GIT .
Otherwise, correlations are relatively small, suggesting that the studied methods use different decision mechanisms.
Understanding this phenomenon is an interesting future research direction
[Figure] [Figure]
Below, we provide more details about computing the correlations.
Let us denote by s mb,i the score produced by method m for the batch b and the node i .
In order to eliminate effects such as changing scores scales during the discovery process, we normalize the scores as ¯ s mb,i :=
s mb,i (cid:80) Nj =1 s mb,j .
For every pair of methods m , m ′ and node i , we compute Spearman’s rank correlation score r s (
¯ s m · ,i , ¯ s m ′ · ,i ) .
We average over the nodes to get the scalar correlation value corr ( m, m ′ ) :
= (cid:80) Nj =1 r s (¯ s m · ,i , ¯ s m ′ · ,i ) N .
In addition, we present Pearson’s correlations in Figure 8.
Conclusions from the analysis of the
Spearman’s rank correlation hold; in particular, the correlation between GIT and GIT -privileged is high.
F.4 Investigating GIT ’s intervention target distributions
In order to gain a qualitative understanding of the GIT ’s performance, we analyze the node distributions generated by respective methods on the BnLearn graphs in Figure 10.
First, we observe that
GIT typically concentrates on fewer nodes than the other methods, which is confirmed by the low entropy of the distributions.
The entropy of GIT is usually smaller in comparison to other approaches (consider earthquake , cancer , and asia ).
In some cases, such as sachs and child , the distributions of CBED seem to be more concentrated.
However, notice that results obtained for CBED are significantly worse than for GIT (recall Figure 3 or see Figure 6 in the Appendix).
We speculate that GIT strikes a better balance between exploration and exploitation during the causal discovery process.
Additionally, we observe that GIT often selects nodes with high out-degree, as visible in the earthquake , cancer , sachs , and child graphs.
Intuitively, interventions on such nodes bring much information, as they affect multiple other nodes.
Note also that even though earthquake and cancer share the same graph structure, their probability distributions are different.
Hence, the interventional target distributions differ as well.
In particular, we observe that for these graphs,
GIT opts to perform interventions that allow gathering data points that are hard to acquire in the observational setting (see the conditional distributions and discussion in Appendix F.5.2).
Finally, we also observe that the most frequently selected nodes in the sachs , child and asia graphs are also often adjacent to the edges for which there exists a graph in the Markov Equivalence
Class that has the corresponding connection reversed (indicated by the green color in Figure 10).
Establishing the directionality of such an edge ( v, w ) requires performing interventions on nodes v, w .
Soundness of GIT.
We further explore the interventional targets and verify that GIT is able to target the most uncertain regions of the graph.
In the considered setup, we select a node v in the graph.
Let E v be edges adjacent to v .
We set the structural parameters corresponding to edges e / ∈ E v to the
For example, in the ENCO framework the directionality parameter θ ij can be reliably detected from the data obtained by
X or X i [ j un g l e 1 2 3 680 1 2 3 4 5 6 7 8 9 0.
b i
d i a g 1 2 3 680 1 2 3 4 5 6 7 8 9 0.
[Figure]
c o lli d e r 1 2 3 680 1 2 3 4 5 6
[Figure]
[Figure] [Figure]
[Figure]
ground truth values and initialize in the standard way the parameters for e ∈ E v .
Such a model is only unsure about the connectivity around v , while the rest of the solution is given.
We then run the
ENCO framework with GIT and report the intervention target distributions in Figure 11.
The interventions concentrate on v (red color) and its parents (green color).
This indicates the soundness and efficiency of our approach, as these are most relevant to discovering the graph structure.
Indeed, to recover the solution, only the parameters for e ∈ E v need to be found.
Intervening on v changes the distributions of its descendants, providing information on the existence of edges between these variables.
The remaining variables are either the predecessors of v or are not directly connected with v .
In the former case, an intervention on the parent node is needed to uncover its relation with v .
F.5 ENCO - Intervention Targets Distribution
In this section, we provide additional histograms and plots with regard to the interventional target distributions obtained by different intervention methods as discussed in Section F.4 in the main text.
In Figure 9, we present the histograms of the target distributions for the real graphs for each of the intervention acquisition methods.
Note that those histograms represent the same information as the node coloring in Figure 10.
It may be observed that the distributions obtained by GIT concentrate on fewer nodes than those obtained by the AIT and CBED approaches.
The only exceptions being the sachs and child datasets, for which the entropy of CBED approach is smaller (recall Figure 10).
Note, however, that CBED underperforms on those graphs (recall Figure 3 in the main text or see
Figure 6).
This is in contrast to GIT , which maintains good performance.
Finally, in Figure 12, we present the interventional target distribution on the alarm graph.
We observe that each method intervenes on at least one node incident to the critical edges in the Markov
Equivalence Class (as indicated by the green color in the plot).
However, both AIT and CBED struggle to achieve convergence and suffer low performance, as can be observed in Figure 6.
F.5.1 ENCO - Obtained Synthetic Graphs
In addition, we present the results obtained for the synthetic graphs in Figure 13 and the corresponding histograms in Figure 14.
Note that in this case the results are also averaged by different ground truth distributions, which means that any regularities in selecting the nodes come rather from the graph structure than from data distribution.
Interestingly, we may observe that for the jungle and chain graphs GIT often intervenes on the nodes which are the first ones in the topological order (as indicated by low node numbers in the plots).
This is again intuitive, as intervening on those nodes can impact more variables lower in the hierarchy.
In addition, note that for the chain graph, knowing its MEC class and setting the directionality of an edge automatically makes it possible to determine the directionality of edges for all subsequent nodes in the topological order.
Hence intervening on the nodes which are the first ones in the ordering may convey more information and is desired.
We may also observe that the CBED seems to focus only on the first nodes in the topological order, despite the data distribution, which in some graphs (as the chain graph) may be desired, but in others seems to be an oversimplified solution.
Note that CBED often struggles to converge – this may be observed in Figure 5.
F.5.2 Discussion on Small Real-World Graphs
We provide a more detailed discussion on the differences between the earthquake and cancer graph distributions and the way it affects the GIT method.
Consider Figure 10 in the main text.
Note that the middle node in the earthquake graph corresponds to setting off a burglary alarm, an event very unlikely to happen in observational data but which, when occurs, triggers a change in the distributions of the nodes lower in the hierarchy (see
[Table]
the conditional distributions in Table 11).
The chance of starting an alarm is also very high in case a burglary has happened (the left-most node in the graph).
Hence the GIT concentrates on those two nodes as they have the largest impact on the entailed distribution.
A similar situation can be observed for the cancer graph, where the middle node corresponds to a binary variable indicating the probability of developing the illness.
Even though the two parents of the cancer variable (pollution and smoke, represented by nodes 0 and 1, respectively) share a causal relationship with cancer, their impact on the cancer variable is limited.
In other words, the chances of developing cancer, no matter whether being subject to high or low pollution or being a smoker or not, remain rather small (see the conditional distributions for cancer variable in Table 12).
Hence, the only way in which one can gather more information about the impact of having cancer on the distributions of its child variables (nodes 3 and 4) is by performing an intervention.
In consequence, it may be observed that GIT prefers to select nodes that allow to gather data that otherwise would be hard to acquire in the purely observational setting.
F.6 ENCO - Experiments with Pre-Initialization
In addition to the discussion on the target distributions in the case of pre-initializing parts of the graph with the ground truth solution (presented in the main text for synthetic graphs in Section F.4), we
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
a s i a    4  0 1 2 3 4 5 6 7 0.
present results of the same experiment computed on the real-world graphs.
The results are presented in Figure 15.
Similarly as for the synthetic graphs, here we also observe that the GIT concentrates either on the selected node v or on its parents (denoted respectively by red and green colors in the plots).
G Limitations and future work
Method Requirements.
GIT makes some assumptions about the underlying causal discovery method (access to a distribution over graphs, possibility of sampling data from the current belief, access to the gradients of the loss function).
Performance in Higher Data Regimes.
Our method significantly outperforms other methods in low data regime.
In future work, we plan to understand this better, and, in particular, try to achieve similar effects in the other regimes.
Targeting Granularity.
GIT only selects the intervention target.
Setting additionally the value on the intervened node might be also useful.
Use of Heuristics.
Existing approaches to intervention targeting either rely on heuristics or heavy use of approximations, potentially limiting performance and interpretability.
We think a promising avenue for future research would be developing solutions based on learning.