Title: Demystifying amortized causal discovery with transformers
Venue: NeurIPS 2024
Accepted: no
Keywords: causal discovery

amortized inference

transformers

identifiability
Abstract: Supervised learning approaches for causal discovery from observational data often achieve competitive performance despite seemingly avoiding explicit assumptions that traditional methods make for identifiability. In this work, we investigate CSIvA \citep{ke2023learning}, a transformer-based model promising to train on synthetic data and transfer to real data. First, we bridge the gap with existing identifiability theory and show that constraints on the training data distribution implicitly define a prior on the test observations. Consistent with classical approaches, good performance is achieved when we have a good prior on the test data, and the underlying model is identifiable. At the same time, we find new trade-offs. Training on datasets generated from different classes of causal models, unambiguously identifiable in isolation, improves the test generalization. Performance is still guaranteed, as the ambiguous cases resulting from the mixture of identifiable causal models are unlikely to occur (which we formally prove). 
Overall, our study finds that amortized causal discovery still needs to obey identifiability theory, but it also differs from classical methods in how the assumptions are formulated, trading more reliance on assumptions on the noise type for fewer hypotheses on the mechanisms.

Abstract

Supervised learning approaches for causal discovery from observational data often achieve competitive performance despite seemingly avoiding explicit assumptions that traditional methods make for identifiability. In this work, we investigate CSIvA [1], a transformer-based model promising to train on synthetic data and transfer to real data. First, we bridge the gap with existing identifiability theory and show that constraints on the training data distribution implicitly define a prior on the test observations. Consistent with classical approaches, good performance is achieved when we have a good prior on the test data, and the underlying model is identifiable. At the same time, we find new trade-offs. Training on datasets generated from different classes of causal models, unambiguously identifiable in isolation, improves the test generalization. Performance is still guaranteed, as the ambiguous cases resulting from the mixture of identifiable causal models are unlikely to occur (which we formally prove). Overall, our study finds that amortized causal discovery still needs to obey identifiability theory, but it also differs from classical methods in how the assumptions are formulated, trading more reliance on assumptions on the noise type for fewer hypotheses on the mechanisms.

1 Introduction

Causal discovery aims to uncover the underlying causal relationships between variables of a system from pure observations, which is crucial for answering interventional and counterfactual queries when experimentation is impractical or unfeasible [2, 3, 4]. Unfortunately, causal discovery is inherently ill-posed [5]: unique identification of causal directions requires restrictive assumptions on the class of structural causal models (SCMs) that generated the data [6, 7, 8]. These theoretical limitations often render existing methods inapplicable, as the underlying assumptions are usually untestable or difficult to verify in practice [9].

Recently, supervised learning algorithms trained on synthetic data have been proposed to overcome the need for specific hypotheses, which restrains the application of classical causal discovery methods

to real-world problems [1, 10, 11, 12, 13].

Seminal work from Lopez-Paz et al. [10] argues that this learning-based approach to causal discovery would allow dealing with complex data-generating

processes and would greatly reduce the need for explicitly crafting identifiability conditions a-priori:

despite this ambitious goal, the output of these methods is generally considered unreliable, as no

theoretical guarantee is provided. A pair of non-identifiable structural causal models can be associated

with different causal graphs G ̸ = ˜ G , while entailing the same joint distribution p on the system's 32

variables. It is thus unclear how a learning algorithm presented with observational data generated from 33

p would be able to overcome these theoretical limits and correctly identify a unique causal structure. 34

However, the available empirical evidence seems not to care about impossibility results, as these 35

methods yield surprising generalization results on several synthetic benchmarks. Our work aims to 36

bridge this gap by studying the performance of a transformer architecture for causal discovery through 37

the lens of the theory of identifiability from observational data. Specifically, we analyze the CSIvA 38 (Causal Structure Induction via Attention) model for causal discovery [1], focusing on bivariate graphs, 39 as they offer a controlled yet non-trivial setting for the investigation. As our starting point, we provide 40 closed-form examples that identify the limitations of CSIvA in recovering causal structures of linear 41 non-Gaussian and nonlinear additive noise models, which are notably identifiable, and demonstrate the 42 expected failures through empirical evidence. These findings suggest that the class of structural causal 43 models that can be identified by CSIvA is inherently dependent on the specific class of SCMs observed 44 during training. Thus, the need for restrictive hypotheses on the data-generating process is intrinsic 45 to causal discovery, both in the traditional and modern learning-based approaches: assumptions on 46 the test distribution either are posited when selecting the algorithm (traditional methods) or in the 47 choice of the training data (learning-based methods). To address this limitation, we theoretically and 48 empirically analyze when training CSIvA on datasets generated by multiple identifiable SCMs with 49 different structural assumptions improves its generalization at test time. In summary: 50

51

52

53

54

We show that the class of structural causal models that CSIvA can identify is defined by the class of SCMs observed through samples during the training. We reinforce the notion that identifiability in causal discovery inherently requires assumptions, which must be encoded in the training data in the case of learning-based approaches.

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

To overcome this limitation, we study the benefits of CSIvA training on mixtures of causal models. We analyze when algorithms learned on multiple models are expected to identify broad classes of SCMs (unlike many classical methods). Empirically, we show that training on samples generated by multiple identifiable causal models with different assumptions on mechanisms and noise distribution results in significantly improved generalization abilities.

Closely related works and their relation with CSIvA. In this paper, we study amortized inference of causal graphs , i.e. optimization of an inference model to directly predict a causal structure from newly provided data. This is the first work that attempts to understand the connection between identifiability theory and amortized inference, while several algorithms have been proposed. In the context of purely observational data, Lopez-Paz et al. [10] defines a distribution regression problem [14] mapping the kernel mean embedding of the data distribution to a causal graph, while Li et al. [11] relies on equivariant neural network architectures. More recently, Lippe et al. [12] and Lorch et al. [13] proposed learning on interventional data, in addition to observations (in the same spirit as CSIvA). Despite different algorithmic implementations, the target object of estimation of most of these methods is the distribution over the space of all possible graphs, conditional on the input dataset (similarly, the ENCO algorithm in Lippe et al. [12] models the conditional distribution of individual edges). This justifies our choice of restricting our study to the CSIvA architecture (despite this being a clear limitation), as in the infinite observational sample limit, these methods approximate the same distribution. Methods necessarily requiring interventional data [15, 16, 17], and learning-based algorithms unsuitable for amortized inference [18, 19, 20, 21, 22] are out of the scope of this work.

2 Background and motivation

We start introducing structural causal models (SCMs), an intuitive framework that formalizes causal relations. Let X be a set of random variables in R defined according to the set of structural equations:

N i ∈ R are noise random variables. The function f i is the causal mechanism mapping the set of direct causes X PA G i of X i and the noise term N i , to X i 's value. The causal graph G is a directed acyclic graph (DAG) with nodes X = { X 1 , . . . , X k } , and edges { X j → X i : X j ∈ X PA G i } , with PA G i indices of the parent nodes of X i in G . The causal model induces a density p X over the vector X .

2.1 Causal discovery from observational data

Causal discovery from observational data is the inference of the causal graph G from a dataset 83 of i.i.d. observations of the random vector X . In general, without restrictive assumptions on the 84 mechanisms and the noise distributions, the direction of edges in the graph G is not identifiable, i.e. 85 it can not be found from the population density p X . In particular, it is possible to identify only a 86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

Markov equivalence class, which is the set of graphs encoding the same conditional independencies as the density p X . To clarify with an example, consider the causal graph X 1 → X 2 associated with a structural causal model inducing a density p X 1 ,X 2 . If the model is not identifiable, there exists an SCM with causal graph X 2 → X 1 that entails the same joint density p X 1 ,X 2 . The set { X 1 → X 2 , X 2 → X 1 } is the Markov equivalence class of the graph X 1 → X 2 , i.e. the set of all graphs with X 1 , X 2 mutually dependent. Clearly, in this setting, even the exact knowledge of p X 1 ,X 2 cannot inform us about the correct causal direction.

Definition 1 (Identifiable causal model) . Consider a structural causal model with underlying graph G and p X joint density of the causal variables. We say that the model is identifiable from observational data if the density p X can not be entailed by a structural causal model with graph ˜ G ̸ = G .

We define the post-additive noise model (post-ANM) as the causal model with the set of equations:

with f 2 ,i invertible map and mutually independent noise terms. When f 2 ,i is a nonlinear function, the post-ANM amounts to the identifiable post-nonlinear model (PNL) [8]. When f 2 ,i is the identity function and f 1 ,i nonlinear, it simplifies to the nonlinear additive noise model (ANM)[7, 23], which is known to be identifiable, and is described by the set of structural equations:

If, additionally, we restrict the mechanisms f 1 ,i to be linear and the noise terms N i to a non-Gaussian distribution, we recover the identifiable linear non-Gaussian additive model or LiNGAM [6]:

2.2 Motivation and problem definition

Causal discovery from observational data relies on specific assumptions, which can be challenging to verify in practice [9]. To address this, recent methods leverage supervised learning for the amortized inference of causal graphs [1, 10, 11, 12, 13, 16, 24], optimizing an inference model to directly predict a causal structure from a provided dataset. While these approaches aim to reduce reliance on explicit identifiability assumptions, they often lack a clear connection to the existing causal discovery theory, making their outputs generally unreliable. We illustrate this limitation through an example.

Example 1. We consider the CSIvA transformer architecture proposed by Ke et al. [1], which can learn a map from observational data to a causal graph. The authors of the paper show that, in the infinite sample regime, the CSIvA architecture exactly approximates the conditional distribution p ( ·|D ) over the space of possible graphs, given a dataset D . Identifiability theory in causal discovery tells us that if the class of structural causal models that generated the observations is sufficiently constrained, then there is only one graph that can fit the data within that class. For example, consider the case of a dataset that is known to be generated by a nonlinear additive noise model, and let p ( ·|D , ANM ) be the conditional distribution that incorporates this prior knowledge on the SCM: then p ( ·|D , ANM ) concentrates all the mass on a single point G ∗ , the true graph underlying the D observations. Instead, in the absence of restrictions on the structural causal model, all the graphs in a Markov equivalence class are equally likely to be the correct solution given the data. Hence, p ( ·|D ) , the distribution learned by CSIvA, assigns equal probability to each graph in the Markov equivalence class of G ∗ .

Our arguments of Example 1 are valid for all learning methods that approximate the conditional distribution over the space of graphs given the input data [1, 10, 11, 12, 13], and suggest that these algorithms are at most informative about the equivalence class of the causal graph underlying the observations. However, the available empirical evidence does not seem to highlight these limitations, as in practice these methods can infer the true causal DAG on several synthetic benchmarks. Thus, further investigation is necessary if we want to rely on their output in any meaningful sense. In this work, we analyze these "black-box" approaches through the lens of established theory of causal discovery from observational data (causal inference often lacks experimental data, which we do not consider). We study in detail the CSIvA architecture [1] (see Appendix A), a variation of the transformer neural network [25] for the supervised learning of algorithms for amortized causal discovery. This model is optimized via maximum likelihood estimation, i.e. finding Θ that minimizes -E G , D [ln ˆ p ( G|D ; Θ)] ,

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

where ˆ p ( G|D ; Θ) is the conditional distribution of a graph G given a dataset D parametrized by Θ . We limit the analysis to CSIvA as it is a simple yet competitive end-to-end approach to learning causal models. While this is clearly a limitation of the paper, our theoretical and empirical conclusions exemplify both the role of theoretical identifiability in modern approaches and the new opportunities they provide. Additionally, it fits well within a line of works arguing that specifically transformers can learn causal concepts [26, 27, 28] and identify different assumptions in context [29].

3 Experimental results through the lens of theory

In this section, we present a comprehensive analysis of causal discovery with transformers and its relation to the theoretical boundaries of causal discovery from observational data. We show that suitable assumptions must be encoded in the training distribution to ensure the identifiability of the test data, and we additionally study the effectiveness of training on mixtures of causal models to overcome these limitations, improving generalization abilities.

3.1 Experimental design

Weconcentrate our research on causal models of two variables, causally related according to one of the two graphs X → Y , Y → X . Bivariate models are the simplest non-trivial setting with a well-known theory of causality inference [7, 8, 23], but also amenable to manipulation. This allows for comprehensive training and analysis of diverse SCMs and facilitates a clear interpretation of the results.

Datasets. Unless otherwise specified, in our experiments we train CSIvA on a sample of 15000 synthetically generated datasets, consisting of 1500 i.i.d. observations. Each dataset is generated according to a single class of SCMs, defined by the mechanism type and the noise terms distribution. The coefficients of the linear mechanisms are sampled in the range [ -3 , -0 . 5] ∪ [0 . 5 , 3] , removing small coefficients to avoid close-to-unfaithful effects [30]. Nonlinear mechanisms are parametrized according to a neural network with random weights, a strategy commonly adopted in the literature of causal discovery [1, 9]. The post-nonlinearity of the PNL model consists of a simple map z ↦→ z 3 . Noise terms are sampled from common distributions and a randomly generated density that we call mlp , previously adopted in Montagna et al. [9], defined by a standard Gaussian transformed by a multilayer perceptron (MLP) (Appendix B.2). We name these datasets mechanism-noise to refer to their underlying causal model. For example, data sampled from a nonlinear ANM with Gaussian noise are named nonlineargaussian . More details on the synthetic data generation schema are found in Appendix B.2. All data are standardized by their empirical variance to remove opportunities to learn shortcuts [31, 32, 33].

Metric and random baseline. As our metric we use the structural Hamming distance (SHD), which is the number of edge removals, insertions or flips to transform one graph to another. In the context of bivariate causal graphs with a single edge, this is simply an error count, so correct inference corresponds to SHD = 0 , and an incorrect prediction gives SHD = 1 . Additionally, we define a reference random baseline, which assigns a causal direction according to a fair coin, achieving SHD = 0 . 5 in expectation. Each architecture we analyze in the experiments is trained 3 times, with different parameter initialization and training samples: the SHD presented in the plots is the average of each of the 3 models on 1500 distinct test datasets of 1500 points each, and the error bars are 95% confidence intervals.

We detail the training hyperparameters in Appendix B.1. Next, we analyze our experimental results, starting by investigating how well CSIvA generalizes on distributions unseen during training.

3.2 Warm up: is CSIvA capable of in and out-of-distribution generalization?

In-distribution generalization. First, we investigate the generalization of CSIvA on datasets sampled from the structural casual model that generates the train distribution, with mechanisms and noise distributions fixed between training and testing. We call this in-distribution generalization . As a benchmark, we present the performance of several state-of-the-art approaches from the literature on causal discovery: we consider the DirectLiNGAM, and NoGAM algorithms [34, 35], respectively designed for the inference on LiNGAM and nonlinear ANM generated data 1 . The results of Figure 1

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

Noise distributions beta

uniform

0.4

0.0

0.2

0.4

SHD

exp

mlp

0.0

0.2

0.4

SHD

0.0

0.2

SHD

CSIvA

benchmark

0.0

0.2

0.4

SHD

beta

exp

gamma

gumbel

mlp

uniform

Noise distributions

0.0

0.2

0.4

SHD

0.0

0.2

0.4

SHD

CSIvA

benchmark

(a) Linear

0.0

0.2

0.4

SHD

beta

exp

gamma

gumbel

mlp

uniform

Noise distributions

0.0

0.2

0.4

SHD

0.0

0.2

0.4

SHD

CSIvA

benchmark

(b) Nonlinear

0.0

0.2

0.4

SHD

beta

exp

gamma

gumbel

mlp

uniform

Noise distributions

0.0

0.2

0.4

SHD

0.0

0.2

0.4

SHD

CSIvA

benchmark

(c) PNL

1

show that CSIvA can properly generalize to unseen samples from the training distribution: the majority of the trained models present SHD close to zero and comparable to the relative benchmark algorithm.

Out-of-distribution generalization. In practice, we generally do not know the SCM defining the test distribution, so we are interested in CSIvA's ability to generalize to data sampled from a class of causal models that is unobserved during training. We call this out-of-distribution generalization (OOD). We study OOD generalization to different noise terms, analyzing the network performance on datasets generated from causal models where the mechanisms are fixed with respect to the training, while the noise distribution varies (e.g., given linear-mlp training samples, testing occurs on linear-uniform data). Orthogonally to these experiments, we empirically validate CSIvA's OOD generalization over different mechanism types (linear, nonlinear, post-nonlinear), while leaving the noise distribution (mlp) fixed across test and training. In Figure 2a, we observe that CSIvA cannot generalize across the different mechanisms, as the SHD of a network tested on unseen causal mechanisms approximates that of the random baseline. Further, Figure 2b shows that out-of-distribution generalization across noise terms does not work reliably, and it is hard to predict when it might occur.

Implications. CSIvA generalizes well to test data generated by the same class of SCMs used for training, in line with the findings in Ke et al. [1], which validates our implementation and training procedure. However, it struggles when the test data are out-of-distribution, not generated by causal models with the same mechanisms and noise terms it was trained on. While training on a wider class of SCMs might overcome this limitation, it requires caution. The identifiability of causal graphs indeed results from the interplay between the data-generating mechanisms and noise distribution. However, as we argue in our Example 1, the class of causal models that a supervised learning algorithm can identify is generally not clear. In what follows, we investigate this point and its implications for CSIvA, showing that the identifiability of the test samples can be ensured by imposing suitable assumptions on the class of SCMs generating the training distribution.

3.3 How does CSIvA relate to identifiability theory for causal graphs?

The CSIvA algorithm does not make structural assumptions about the causal model underlying the input data. This implies that the output of this method is unclear: as CSIvA targets the conditional distribution p ( ·|D ) over the space of graphs, in the absence of restrictions on the functional mechanisms

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

linear

nonlinear

pnl

Training dataset

0.0

0.2

0.4

0.6

SHD

linear

nonlinear

pnl

linear

nonlinear

pnl

Training dataset

0.0

0.2

0.4

0.6

0.8

SHD

beta

gamma

gumbel

exp

mlp

uniform

(a) Mechanisms

linear

nonlinear

pnl

Training dataset

0.0

0.2

0.4

0.6

SHD

linear

nonlinear

pnl

linear

nonlinear

pnl

Training dataset

0.0

0.2

0.4

0.6

0.8

SHD

beta

gamma

gumbel

exp

mlp

uniform

(b) Noise distributions

and the distribution of the noise terms, the causal graph X → Y is indistinguishable from Y → X , as they are both equally likely to underlie the joint density p X,Y generating the data. As we discuss in Example 1, the graphical output of the trained architecture could at most identify the equivalence class of the true causal graph. Yet, our experiments of Section 3.2 show that CSIvA is capable of good indistribution generalization, often inferring the correct DAG at test time. We explain this seeming contradiction with the following hypothesis, which motivates the analysis in the remainder of this section.

Hypothesis 1. The class of structural causal models that can be identified by CSIvA is defined by the class of structural causal models underlying the generation of the training data.

To support and clarify our statement, we present the following example, adapted from Hoyer et al. [7].

Example 2. Consider the causal model Y = f ( X ) + N, where f ( X ) = -X and p X , p N are Gumbel densities p X ( x ) = exp( -x -exp( -x )) and p N ( n ) = exp( -n -exp( -n )) . This model satisfies the assumptions of the LiNGAM, so it is identifiable, in the sense that a backward linear model with the same distribution does not exist. However, in this special case, we can build a backward nonlinear additive noise model X = g ( Y ) + ˜ N with independent noise terms: taking p Y ( y ) = exp( -y -2 log(1 + exp( -y ))) to be the density of a logistic distribution, p ˜ N (˜ n ) = exp( -2˜ n -exp( -˜ n )) and g ( y ) = log(1 + exp( -y )) ; we see that p X,Y can factorize according to two opposite causal directions, as p X,Y ( x, y ) = p N ( y -f ( x )) p X ( x ) = p ˜ N ( x -g ( y )) p Y ( y ) . Given a dataset D of observations from the forward linear model, causal discovery methods like DirectLiNGAM [34] can provably identify the correct causal direction X → Y , assuming that sufficient samples are provided. Instead, the behavior of CSIvA seems hard to predict: given that the network approximates the conditional distribution p ( ·|D ) over the possible graphs, for D with arbitrary many samples we have p ( X → Y |D ) = p ( Y → X |D ) = 0 . 5 . On the other hand, given the prior knowledge that the data-generating SCM is a linear non-gaussian additive noise model, we have p ( X → Y |D , LiNGAM ) = 1 , because the LiNGAM is identifiable. In this sense, the class of structural causal models that CSIvA correctly infers appears to be determined by the structural causal models underlying the generation of the training data. Under our Hypothesis 1, training CSIvA exclusively on LiNGAM-generated data is equivalent to learning the distribution p ( ·|D , LiNGAM ) , such that the network should be able to identify the forward linear model, whereas it could only infer the equivalence class of the causal graph if its training datasets include observations from a nonlinear additive noise model.

The empirical results of Figure 3a show that CSIvA behaves according to our hypothesis: when training exclusively occurs on datasets {D i, → } i generated by the forward linear-gumbel model of Example 2, the network can identify the causal direction of test data generated according to the same SCM. Similarly, the transformer trained on datasets {D i, ← } i from the backward nonlinear model of the example can generalize to test data coming from the same distribution. According to our claim, instead, the network that is trained on the union of the training samples {D i, → } i ∪ {D i, ← } i from the forward and backward models ( 50:50 ratio in Figure 3a) displays the same test SHD (around 0 . 5 ) as a random classifier assigning the causal direction with equal probability.

ation

100:0

test (linear gauss)

50:50

0:100

ear:nonlinear training datasets

0:100

33:67

50:50

67:33

100:0

Ratio of linear:nonlinear training datasets

0.00

0.25

0.50

0.75

SHD

linear invertible

nonlinear invertible

(a)

Invertible

data

100:0

50:50

0:100

Ratio of linear:nonlinear training datasets

0

0.25

0.5

SHD

validation

test (linear gauss)

(b) Linear Gaussian test data

Further, we investigate CSIvA's relation with known identifiability theory by training and testing the architecture on data from a linear Gaussian model, which is well-known to be unidentifiable. Not surprisingly, the results of Figure 3b show that none of the algorithms that we learn can infer the causal order of linear Gaussian models with test SHD any better than a random baseline.

Implications. Our experiments show that CSIvA learns algorithms that closely follow identifiability theory for causal discovery. In particular, while the method itself does not require explicit assumptions on the data-generating process, the chosen training data ultimately determines the class of causal models identifiable during inference. Notably, previous work has argued that supervised learning approaches in causal discovery would help with "dealing with complex data-generating processes and greatly reduce the need of explicitly crafting identifiability conditions a-priori", Lopez-Paz et al. [10]. In the case of CSIvA, this expectation does not appear to be fulfilled, as the assumptions still need to be encoded explicitly in the training data. However, this observation opens two new important questions: (1) Can we train a single network to encompass multiple (or even all) identifiable causal structures? (2) How much ambiguity might exist between these identifiable models?

3.4 A low-dimensions argument in favor of learning from multiple causal models

Example 2 of the previous section shows that elements of distinct classes of identifiable structural causal models, such as LiNGAM and nonlinear ANM, may become non-identifiable when we consider their union. In this section, we show that in the class of post-additive noise models given by equation (2) (obtained as the union of the LiNGAM, the nonlinear ANM, and the post-nonlinear model), the set of distributions that is non-identifiable is negligible. Our proposition extends the results of Hoyer et al. [7], which are limited to the case of linear and nonlinear additive noise models, and Zhang and Hyvärinen [8], which provides the conditions of identifiability of the post-ANM without bounding the set of non-identifiable distributions.

Let X,Y be a pair of random variables generated according to the causal direction X → Y and the post-additive noise model structural equation:

where N Y and X are independent random variables, and f 2 is invertible. If the SCM is nonidentifiable, the data-generating process can be described by a backward model with the structural equation:

N X independent from Y , and g 2 invertible. We introduce the random variables ˜ X, ˜ Y , such that the forward and backward equations can be rewritten as

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

SHD

0.75

0.50

0.25

0.00

0:100

33:67

50:50

67:

Ratio of linear:nonlinear trai linear invertible

no

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

301

302

303

304

305

306

307

308

Training datasets

0

0.25

0.5

SHD

all

nl

pnl

0

0.25

0.5

SHD

nl, pnl

all

pnl

0

0.25

0.5

SHD

nl, pnl

all

nl

mixed

single

in-distribution

0

0.25

0.5

SHD

all

nl

pnl

Training datasets

0

0.25

0.5

SHD

nl, pnl

all

pnl

0

0.25

0.5

SHD

nl, pnl

all

nl

(a) Linear test data

0

0.25

0.5

SHD

all

nl

pnl

Training datasets

0

0.25

0.5

SHD

nl, pnl

all

pnl

0

0.25

0.5

SHD

nl, pnl

all

nl

(b) Nonlinear test data

0

0.25

0.5

SHD

all

nl

pnl

Training datasets

0

0.25

0.5

SHD

nl, pnl

all

pnl

0

0.25

0.5

SHD

nl, pnl

all

nl

(c) PNL test data

We note that this implies that the following invertible additive noise models on ˜ X, ˜ Y hold: 277

Proposition 1 (Adapted from Hoyer et al. [7]) . Let p N Y , h X , h Y be fixed, and define ν Y := log p N Y , ξ := log p ˜ X . Suppose that p N Y and p ˜ X are strictly positive densities, and that ν Y , ξ, f 1 , f 2 , g 1 , and g 2 are three times differentiable. Further, assume that for a fixed pair h Y , ν Y exists ˜ y ∈ R s.t. ν ′′ Y (˜ y -h Y (˜ x )) h ′ Y (˜ x ) = 0 is satisfied for all but a countable set of points ˜ x ∈ R . Then, the set of all densities p ˜ X of ˜ X such that both equations (5) and (6) are satisfied is contained in a 2-dimensional space.

̸

Implications. Our result is closely related to Theorem 1 of Hoyer et al. [7], which we simply generalize to the post-ANM. Intuitively, it says that the space of all continuous distributions such that the bivariate post-ANM is non-identifiable is contained in a 2-dimensional space. As the space of continuous distributions of random variables is infinite-dimensional, we conclude that the post-ANM is generally identifiable, which suggests that the setting of Example 2 is rather artificial. Our results provide a theoretical ground for training causal discovery algorithms on datasets generated from multiple identifiable SCMs. This is particularly appealing in the case of CSIvA, given the poor OOD generalization ability observed in our experiments of Section 3.2.

3.5 Can we train CSIvA on multiple causal models for better generalization?

In this section, we investigate the benefits of training over multiple causal models, i.e. on samples generated by a combination of classes of identifiable SCMs characterized by different mechanisms and noise terms distribution. Our motivation is as follows: given that our empirical evidence shows that CSIvA is capable of in-distribution generalization, whereas dramatically degrades the performance when testing occurs out-of-distribution, it is thus desirable to increase the class of causal models represented in the training datasets. We separately study the effects of training over multiple mechanisms and multiple noise distributions and compare the testing performance against architectures trained on samples of a single SCM.

Mixture of causal mechanisms. We consider four networks optimized by training of CSIvA on datasets generated from pairs (or triples) of distinct SCMs, with fixed mlp noise and which differ in terms of their mechanisms type: linear and nonlinear; nonlinear and post-nonlinear; linear and postnonlinear; linear, nonlinear and post-nonlinear. The number of training datasets for each architecture is fixed ( 15000 ) and equally split between the causal models with different mechanism types. The results of Figure 4 show that the networks trained on mixtures of mechanisms all present significantly better test SHD compared to CSIvA models trained on a single mechanism type. We find that learning on multiple SCMs improves the SHD from ∼ 0 . 5 to ∼ 0 . 2 both on linear and nonlinear test data (Figures 4a and 4b), and even better accuracy is achieved on post-nonlinear samples, as shown in Figure 4c.

mixed mixed

mixed single

single single

in-distribution in-distribution

in-distribution

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

Test noise beta

Test noise

Test noise uniform

0.75

0.00

0.25

0.50

0.75

SHD

exp

mlp

0.00

0.25

0.50

0.75

SHD

0.00

0.25

0.50

0.75

SHD

all distributions

only mlp

0.00

0.25

0.50

0.75

SHD

beta

gamma

gumbel

exp

mlp

uniform

Test noise

0.00

0.25

0.50

0.75

SHD

0.00

0.25

0.50

SHD

all distributions

only mlp

(a) Linear test data

0.00

0.25

0.50

0.75

SHD

beta

gamma

gumbel

exp

mlp

uniform

0.00

0.25

0.50

0.75

SHD

0.00

0.25

0.50

SHD

all distributions

only mlp

(b) Nonlinear test data

0.00

0.25

0.50

0.75

SHD

beta

gamma

gumbel

exp

mlp

uniform

0.00

0.25

0.50

0.75

SHD

0.00

0.25

0.50

0.75

SHD

all distributions

only mlp

(c) PNL test data

0.75

Mixture of noise distributions. Next, we analyze the test performance of three CSIvA networks optimized on samples from structural causal models that have different distributions for their noise terms, while keeping the mechanism types fixed. Figure 5 shows that training over different noises (beta, gamma, gumbel, exponential, mlp, uniform) always results in a network that is agnostic with respect to the noise distributions of the SCM generating the test samples, always achieving SHD < 0 . 1 , with the exception of datasets with mlp error terms ( 0 . 2 average SHD on nonlinear and pnl data).

Implications. We have shown that learning on mixtures of SCMs with different noise term distributions and mechanism types leads to models generalizing to a much broader class of structural causal models during testing. Hence, combining datasets generated from multiple models looks like a promising framework to overcome the limited out-of-distribution generalization abilities of CSIvA observed in Section 3.2. However, it is easier to incorporate prior assumptions on the class of causal mechanisms (linear, non-linear, post-non-linear) compared to the noise distributions (which are potentially infinite). This introduces a trade-off between amortized inference and classical methods for causal discovery: for example, RESIT, NoGAM, and CAM [23, 35, 36] algorithms require no assumptions on the noise type, but only work for a limited class of mechanisms (nonlinear).

4 Conclusion

In this work, we investigate the interplay between identifiability theory and supervised learning for amortized inference of causal graphs, using CSIvA as the ground of our study. Consistent with classical algorithms, we demonstrate that good performance can be achieved if (i) we have a good prior on the structural causal model generating the test data (ii) the setting is identifiable. In particular, prior knowledge of the test distribution is encoded in the training data in the form of constraints on the structural causal model underlying their generation. With these results, we highlight the need for identifiability theory in modern learning-based approaches to causality, while past works have mostly disregarded this connection. Further, our findings provide the theoretical ground for training on observations sampled from multiple classes of identifiable SCMs, a strategy that improves test generalization to a broad class of causal models. Finally, we highlight an interesting new trade-off regarding identifiability: traditional methods like LiNGAM, RESIT, and PNL require strong restrictions on the structural mechanisms underlying the data generation (linear, nonlinear or post-nonlinear) while generally being agnostic relative to the noise terms distribution. Training on mixtures of causal models instead offers an alternative that is less reliant on assumptions on the mechanisms, while incorporating knowledge about all possible noise distributions in the training data is practically impossible to achieve. We leave it to future work to reproduce our analysis on a wider class of architectures, as well as extending our study to interventional data with more than two nodes.

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

362

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

383

384

385

References

Nan Rosemary Ke, Silvia Chiappa, Jane X. Wang, Jorg Bornschein, Anirudh Goyal, Melanie Rey, Theophane Weber, Matthew Botvinick, Michael Curtis Mozer, and Danilo Jimenez Rezende. Learning to Induce Causal Structure. In International Conference on Learning Representations , September 2022. URL https://openreview.net/forum?id=hp_RwhKDJ5 .

Jonas Peters, Dominik Janzing, and Bernhard Schölkopf. Elements of Causal Inference: Foundations and Learning Algorithms . Adaptive Computation and Machine Learning. The MIT Press, Cambridge, Mass, 2017. ISBN 978-0-262-03731-0.

Judea Pearl. Causality . Cambridge University Press, Cambridge, 2nd edition, 2009.

Peter Spirtes. Introduction to causal inference. Journal of Machine Learning Research , 11(54): 1643-1662, 2010. URL http://jmlr.org/papers/v11/spirtes10a.html .

Clark Glymour, Kun Zhang, and Peter Spirtes. Review of causal discovery methods based on graphical models. Frontiers in Genetics , 10, 2019. ISSN 1664-8021. doi: 10.3389/fgene.2019. 00524. URL https://www.frontiersin.org/articles/10.3389/fgene.2019.00524 .

Shohei Shimizu, Patrik O. Hoyer, Aapo Hyvärinen, and Antti Kerminen. A linear non-gaussian acyclic model for causal discovery. Journal of Machine Learning Research , 7:2003-2030, dec 2006. ISSN 1532-4435.

Patrik Hoyer, Dominik Janzing, Joris M Mooij, Jonas Peters, and Bernhard Schölkopf. Nonlinear causal discovery with additive noise models. In D. Koller, D. Schuurmans, Y. Bengio, and L. Bottou, editors, Advances in Neural Information Processing Systems , volume 21. Curran Associates, Inc., 2008. URL https://proceedings.neurips.cc/paper/2008/file/ f7664060cc52bc6f3d620bcedc94a4b6-Paper.pdf .

Kun Zhang and Aapo Hyvärinen. On the identifiability of the post-nonlinear causal model. In Proceedings of the Twenty-Fifth Conference on Uncertainty in Artificial Intelligence , UAI '09, page 647-655, Arlington, Virginia, USA, 2009. AUAI Press. ISBN 9780974903958.

Francesco Montagna, Atalanti Mastakouri, Elias Eulig, Nicoletta Noceti, Lorenzo Rosasco, Dominik Janzing, Bryon Aragam, and Francesco Locatello. Assumption violations in causal discovery and the robustness of score matching. In A. Oh, T. Neumann, A. Globerson, K. Saenko, M. Hardt, and S. Levine, editors, Advances in Neural Information Processing Systems , volume 36, pages 47339-47378. Curran Associates, Inc., 2023. URL https://proceedings.neurips.cc/paper_files/paper/2023/file/ 93ed74938a54a73b5e4c52bbaf42ca8e-Paper-Conference.pdf .

David Lopez-Paz, Krikamol Muandet, Bernhard Schölkopf, and Ilya Tolstikhin. Towards a learning theory of cause-effect inference. In Proceedings of the 32nd International Conference on International Conference on Machine Learning - Volume 37 , ICML'15, page 1452-1461. JMLR.org, 2015.

Hebi Li, Qi Xiao, and Jin Tian. Supervised Whole DAG Causal Discovery, June 2020.

Phillip Lippe, Taco Cohen, and Efstratios Gavves. Efficient neural causal discovery without acyclicity constraints. In International Conference on Learning Representations , 2022. URL https://openreview.net/forum?id=eYciPrLuUhG .

Lars Lorch, Scott Sussex, Jonas Rothfuss, Andreas Krause, and Bernhard Schölkopf. Amortized inference for causal structure learning. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho, editors, Advances in Neural Information Processing Systems , 2022. URL https://openreview.net/forum?id=eV4JI-MMeX .

Zoltan Szabo, Bharath Sriperumbudur, Barnabas Poczos, and Arthur Gretton. Learning theory 386 for distribution regression. Journal of Machine Learning Research , 17:1-40, 09 2016. 387

388

389

390

391

392

393

394

395

396

397

398

399

400

401

402

403

404

405

406

407

408

409

410

411

412

413

414

415

416

417

418

419

420

421

422

423

424

425

426

427

428

429

430

431

432

433

434

435

436

437

Philippe Brouillard, Sébastien Lachapelle, Alexandre Lacoste, Simon Lacoste-Julien, and Alexandre Drouin. Differentiable causal discovery from interventional data. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems , volume 33, pages 21865-21877. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/file/ f8b7aa3a0d349d9562b424160ad18612-Paper.pdf .

Nan Rosemary Ke, Olexa Bilaniuk, Anirudh Goyal, Stefan Bauer, Hugo Larochelle, Bernhard Schölkopf, Michael Curtis Mozer, Christopher Pal, and Yoshua Bengio. Neural causal structure discovery from interventions. Transactions on Machine Learning Research , 2023. ISSN 2835-8856. URL https://openreview.net/forum?id=rdHVPPVuXa . Expert Certification.

Nino Scherrer, Olexa Bilaniuk, Yashas Annadani, Anirudh Goyal, Patrick Schwab, Bernhard Schölkopf, Michael C. Mozer, Yoshua Bengio, Stefan Bauer, and Nan Rosemary Ke. Learning neural causal models with active interventions, 2022.

Sébastien Lachapelle, Philippe Brouillard, Tristan Deleu, and Simon Lacoste-Julien. Gradientbased neural dag learning. In International Conference on Learning Representations , 2020. URL https://openreview.net/forum?id=rklbKA4YDS .

Ignavier Ng, AmirEmad Ghassami, and Kun Zhang. On the role of sparsity and dag constraints for learning linear dags. In Proceedings of the 34th International Conference on Neural Information Processing Systems , NIPS '20, Red Hook, NY, USA, 2020. Curran Associates Inc. ISBN 9781713829546.

Xun Zheng, Bryon Aragam, Pradeep Ravikumar, and Eric P. Xing. Dags with no tears: Continuous optimization for structure learning. In Neural Information Processing Systems , 2018. URL https://api.semanticscholar.org/CorpusID:53217974 .

Zhen Zhang, Ignavier Ng, Dong Gong, Yuhang Liu, Ehsan M Abbasnejad, Mingming Gong, Kun Zhang, and Javen Qinfeng Shi. Truncated matrix power iteration for differentiable DAG learning. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho, editors, Advances in Neural Information Processing Systems , 2022. URL https://openreview.net/ forum?id=I4aSjFR7jOm .

Kevin Bello, Bryon Aragam, and Pradeep Kumar Ravikumar. DAGMA: Learning DAGs via m-matrices and a log-determinant acyclicity characterization. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho, editors, Advances in Neural Information Processing Systems , 2022. URL https://openreview.net/forum?id=8rZYMpFUgK .

Jonas Peters, Joris M. Mooij, Dominik Janzing, and Bernhard Schölkopf. Causal discovery with continuous additive noise models. J. Mach. Learn. Res. , 15(1):2009-2053, jan 2014. ISSN 1532-4435.

Sindy Löwe, David Madras, Richard S. Zemel, and Max Welling. Amortized causal discovery: Learning to infer causal graphs from time-series data. In CLEaR , 2020. URL https://api. semanticscholar.org/CorpusID:219955853 .

Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems , volume 30. Curran Associates, Inc., 2017. URL https://proceedings.neurips.cc/paper_files/paper/2017/file/ 3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf .

Zhijing Jin, Yuen Chen, Felix Leeb, Luigi Gresele, Ojasv Kamal, Zhiheng Lyu, Kevin Blin, Fernando Gonzalez Adauto, Max Kleiman-Weiner, Mrinmaya Sachan, et al. Cladder: A benchmark to assess causal reasoning capabilities of language models. Advances in Neural Information Processing Systems , 36, 2024.

Jiaqi Zhang, Joel Jennings, Agrin Hilmkil, Nick Pawlowski, Cheng Zhang, and Chao Ma. Towards causal foundation model: on duality between causal inference and attention, 2024.

Meyer Scetbon, Joel Jennings, Agrin Hilmkil, Cheng Zhang, and Chao Ma. Fip: a fixed-point 438 approach for causal generative modeling, 2024. 439

440

Shantanu Gupta, Cheng Zhang, and Agrin Hilmkil. Learned causal method prediction, 2023.

441

442

443

444

445

446

447

448

449

450

451

452

453

454

455

456

457

458

459

460

461

462

463

464

465

466

467

468

469

470

471

472

477

Caroline Uhler, G. Raskutti, Peter Bühlmann, and B. Yu. Geometry of the faithfulness assumption in causal inference. The Annals of Statistics , 41, 07 2012. doi: 10.1214/12-AOS1080.

Robert Geirhos, Jörn-Henrik Jacobsen, Claudio Michaelis, Richard Zemel, Wieland Brendel, Matthias Bethge, and Felix Wichmann. Shortcut learning in deep neural networks. Nature Machine Intelligence , 2:665-673, 11 2020. doi: 10.1038/s42256-020-00257-z.

Alexander G. Reisach, Christof Seiler, and Sebastian Weichwald. Beware of the simulated dag! causal discovery benchmarks may be easy to game. In Neural Information Processing Systems , 2021. URL https://api.semanticscholar.org/CorpusID:239998404 .

Francesco Montagna, Nicoletta Noceti, Lorenzo Rosasco, and Francesco Locatello. Shortcuts for causal discovery of nonlinear models by score matching, 2023.

Shohei Shimizu, Takanori Inazumi, Yasuhiro Sogawa, Aapo Hyvarinen, Yoshinobu Kawahara, Takashi Washio, Patrik Hoyer, and Kenneth Bollen. DirectLiNGAM: A direct method for learning a linear non-gaussian structural equation model. Journal of Machine Learning Research , 12, 01 2011.

Francesco Montagna, Nicoletta Noceti, Lorenzo Rosasco, Kun Zhang, and Francesco Locatello. Causal discovery with score matching on additive models with arbitrary noise. In 2nd Conference on Causal Learning and Reasoning , 2023. URL https://openreview.net/forum?id= rVO0Bx90deu .

Peter Bühlmann, Jonas Peters, and Jan Ernest. CAM: Causal additive models, high-dimensional order search and penalized regression. The Annals of Statistics , 42(6), dec 2014. URL https://doi.org/10.1214%2F14-aos1260 .

Jannik Kossen, Neil Band, Clare Lyle, Aidan Gomez, Tom Rainforth, and Yarin Gal. Selfattention between datapoints: Going beyond individual input-output pairs in deep learning. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems , 2021. URL https://openreview.net/forum?id= wRXzOa2z5T .

Juan Lin. Factorizing multivariate function classes. In M. Jordan, M. Kearns, and S. Solla, editors, Advances in Neural Information Processing Systems , volume 10. MIT Press, 1997. URL https://proceedings.neurips.cc/paper_files/paper/1997/ file/8fb21ee7a2207526da55a679f0332de2-Paper.pdf .

A Learning to induce: causal discovery with transformers

A.1 A supervised learning approach to causal discovery

First, we describe the training procedure for the CSIvA architecture, which aims to learn the dis473 tribution of causal graphs conditioned on observational and/or interventional datasets. We omit 474 interventional datasets from the discussion as they are not of interest to our work. Training data are 475 generated from the joint distribution p G , D between a graph G and a dataset D . First, we sample a set 476 of directed acyclic graphs {G i } n i =1 with nodes X 1 , . . . , X d , from a distribution p G . Then, for each graph we sample a dataset of m observations of the graph nodes D i = { x j 1 , . . . , x j d } j m =1 , i = 1 , . . . , n . 478

The CSIvA model defines a distribution ˆ p G|D ( · ; Θ) of graphs conditioned on the observational data and parametrized by Θ . Given an invertible map G ↦→ A from a graph to its binary adjacency matrix

480

481

482

483

484

485

486

487

488

489

490

491

492

493

494

495

496

497

498

499

500

501

502

503

504

505

506

507

508

509

510

511

512

513

514

515

516

517

518

519

520

521

522

523

524

525

representation of d × d entries (where A ij = 1 iff X i → X j in G ), we consider an equivalent estimated distribution ˆ p A |D ( · ; Θ) , which has the following autoregressive form:

where σ ( · ; ρ ) is a Bernoulli distribution parametrized by ρ . ρ itself is a function of f Θ defined by the encoder-decoder transformer architecture, taking as input previous elements of the matrix A (here represented as a vector of d 2 entries) and the dataset D . Θ is optimized via maximum likelihood estimation, i.e. Θ ∗ = argmin Θ -E G , D [ln ˆ p ( G|D ; Θ)] , which corresponds to the usual cross-entropy loss for the Bernoulli distribution. Training is achieved using stochastic gradient descent, in which each gradient update is performed using a pair ( D i , A i ) , i = 1 . . . , d . In the infinite sample limit, we have ˆ p G|D ( · ; Θ ∗ ) = p G|D ( · ) , while in the finite-capacity case, it is only an approximation of the target distribution.

A.2 CSIvA architecture

In this section, we summarize the architecture of CSIvA, a transformer neural network that can learn a map from data to causally interpreted graphs, under supervised training.

Transformer neural network. Transformers [25] are a popular neural network architecture for modeling structured, sequential data data. They consist of an encoder , a stack of layers that learns a representation of each element in the input sequence based on its relation with all the other sequence's elements, through the mechanism of self-attention, and a decoder, which maps the learned representation to the target of interest. Note that data for causal discovery are not sequential in their nature, which motivates the adaptations introduced by Ke et al. [1] in their CSIvA architecture.

CSIvA embeddings. Each element x j i of an input dataset is embedded into a vector of dimensionality E . Half of this vector is allocated to embed the value x j i itself, while the other half is allocated to embed the unique identity for the node X i . We use a node-specific embedding because the values of each node may have very different interpretations and meanings. The node identity embedding is obtained using a standard 1D transformer positional embedding over node indices. The value embedding is obtained by passing x j i , through a multi-layer perceptron (MLP).

CSIvA alternating attention. Similarly to the transformer's encoder, CSIvA stacks a number of identical layers, performing self-attention followed by a nonlinear mapping, most commonly an MLP layer. The main difference relative to the standard encoder is in the implementation of the self-attention layer: as transformers are in their nature suitable for the representation of sequences, given an input sample of D elements, self-attention is usually run across all elements of the sequence. However, data for causal discovery are tabular, rather than sequential: one option would be to unravel the n × d matrix of the data, where n is the number of observations and d the number of variables, into a vector of n · d elements, and let this be the input sequence of the encoder. CSIvA adopts a different strategy: the self-attention in each encoder layer consists of alternate passes over the attribute and the sample dimensions, known as alternating attention [37]. As a clarifying example, consider a dataset { ( x i 1 , x i 2 ) } n i =1 of n i.i.d. samples from the joint distribution of the pair of random variables X 1 , X 2 . For each layer of the encoder, in the first step (known as attention between attributes ), attention operates across all nodes of a single sample ( x i 1 , x i 2 ) to encode the relationships between the two nodes. In the second step ( attention between samples ), attention operates across all samples ( x 1 k , . . . , x n k ) , k ∈ { 1 , 2 } of a given node, to encode information about the distribution of single node values.

CSIvA encoder summary. The encoder produces a summary vector s i with H elements for each node X i , which captures essential information about the node's behavior and its interactions with other nodes. The summary representation is formed independently for each node and involves combining information across the n samples. This is achieved with a method often used with transformers that involves a weighted average based on how informative each sample is. The weighting is obtained using the embeddings of a summary "sample" n + 1 to form queries, and embeddings of node's samples { x j i } n j =1 to provide keys and values, and then using standard key-value attention.

526

527

528

529

530

531

532

533

534

535

536

537

538

539

540

541

542

543

544

545

546

547

548

549

550

551

552

553

554

555

556

557

558

CSIvA decoder. The decoder uses the summary information from the encoder to generate a prediction of the adjacency matrix A of the underlying G . It operates sequentially, at each step producing a binary output indicating the prediction ˆ A i,j of A i,j , proceeding row by row. The decoder is an autoregressive transformer, meaning that each prediction ˆ A i,j is obtained based on all elements of A previously predicted, as well as the summary produced by the encoder. The method does not enforce acyclicity, although Ke et al. [1] shows that in cyclic outputs genereally don't occur, in practice.

B Training details

B.1 Hyperparameters

In Table 1 we detail the hyperparameters of the training of the network of the experiments. We define an iteration as a gradient update over a batch of 5 datasets. Models are trained until convergence, using a patience of 5 (training until five consecutive epochs without improvement) on the validation loss - this always occurs before the 25 -th epoch (corresponding to ≈ 150000 iterations). The batch size is limited to 5 due to memory constraints.

B.2 Synthetic data

In this section, we provide additional details on the synthetic data generation, which was performed with the causally 2 Python library [9]. Our data-generating framework follows that of Montagna et al. [9], an extensive benchmark of causal discovery methods on different classes of SCMs.

Causal mechanisms. The nonlinear mechanisms of the PNL model and the nonlinear ANM model are generated by a neural network with one hidden layer with 10 hidden units, with a parametric ReLU activation function. The network weights are randomly sampled according to a standard Gaussian distribution. The linear mechanisms are generated by sampling the regression coefficients in the range [ -3 , -0 . 5] ∪ [0 . 5 , 3] .

Distribution of the noise terms. We generated datasets from structural causal models with the following distribution of the noise terms: Beta, Gamma, Gaussian (for nonlinear data), Gumbel, Exponential, and Uniform. Additionally, we define the mlp distribution by nonlinear transformations of gaussian samples from a guassian distribution centered at zero and with standard deviation σ uniformly sampled between 0 . 5 and 1 . The nonlinear transformation is parametrized by a neural network with one hidden layer with 100 units, and sigmoid activation function. The weights of the network are uniformly sampled in the range [ -1 . 5 , 1 . 5] . We additionally standardized the output of each mlp sample by the empirical variance computed over all samples.

Data are standardized with their empirical variance, which removes the presence of shortcuts which could be learned by the network, notably varsortability [32] and score-sortability [33].

559

560

561

562

563

564

565

566

567

568

569

570

571

572

573

574

575

576

577

578

579

580

581

582

583

584

585

586

587

588

589

590

B.3 Computer resources

Our experiments were run on a local computing cluster, using any and all available GPUs (all NVIDIA). For replication purposes, GTX 1080 Ti's are entirely suitable, as the batch size was set to match their memory capacity, when working with bivariate graphs. All jobs ran with 10GB of RAM and 4 CPU cores. The results presented in this paper were produced after 145 days of GPU time, of which 68 were on GTX 1080 Ti's, 13 on RTX 2080 Ti's, 11 on A10s, 19 on A40s, and 35 on RTX 3090s. Together with previous experiments, while developing our code and experimental design, we used 376 days of GPU time (for reference, at a total cost of 492 . 14 Euros), similarly split across whichever GPUs were available at the time: 219 on GTX 1080 Ti's, 38 on RTX 2080 Ti's, 18 on A10s, 63 on RTX 3090s, 31 on A40s, and 6 on A100s.

C Further experiments

We present our experimental results on one further question, to help clarify the results in the main text of the paper. Our aim is to understand when to make tradeoffs between computational resources, and having models that have been trained on a wider variety of SCMs. We compare training on multiple SCMs to single-SCM training, when all models see the same amount of training data from each SCM type as a non-mixed model (i.e. a mixed network trains on 15 , 000 linear datasets and 15 , 000 PNL datasets, instead of 15 , 000 divided between the two SCM types).

In the main text of this paper, we compare neural networks trained on a mix of structural causal models (e.g. noise distributions, or mechanism types), to models trained on a single mechanism-noise combination, where all models have the same amount of training data, 15 , 000 datasets. In mixed training, we split these evenly, so a "lin, nl" model is trained on 7 , 500 datasets from linear SCMs, and 7 , 500 from nonlinear SCMs. Our results in this framework are promising, and show that for many combinations of SCM types, we can train one model instead of two, and achieve good progress, while making a 50% savings on training costs. However, if our training budget is high/unlimited, we should also ask whether there is a downside to mixed training - can we achieve the same performance as a model trained on a single SCM type? Fig. 6 shows good results in this direction - the models trained with the same number of datasets per SCM type as an unmixed model had similar (or even better, for PNL data) performance as the un-mixed model trained on the same SCM type as the test data. These mixed models are also significantly more useful than having 2 or 3 separate models per SCM type, as they have good across-the-board performance. However, if we used the same computational resources to train 3 separate networks (one for each mechanism type) and wanted to use them for causal discovery on a dataset with unknown assumptions, we would be left with the rather difficult task of deciding which model to trust.

mixed (15k each)

mixed (15k each)

mixed (15k each)

mixed mixed

mixed single

single single

in-distribution in-distribution

in-distribution

0

0.25

0.5

SHD

all

nl

pnl

0

0.25

0.5

SHD

nl, pnl

all

pnl

0

0.25

0.5

SHD

nl, pnl

all

nl

mixed (15k each)

mixed

single

in-distribution

0

0.25

0.5

SHD

all

nl

pnl

Training datasets

0

0.25

0.5

SHD

nl, pnl

all

pnl

0

0.25

0.5

SHD

nl, pnl

all

nl

(a) Linear test data

0

0.25

0.5

SHD

all

nl

pnl

Training datasets

0

0.25

0.5

SHD

nl, pnl

all

pnl

0

0.25

0.5

SHD

nl, pnl

all

nl

(b) Nonlinear test data

0

0.25

0.5

SHD

all

nl

pnl

Training datasets

0

0.25

0.5

SHD

nl, pnl

all

pnl

0

0.25

0.5

SHD

nl, pnl

all

nl

(c) PNL test data

Training datasets

592

593

594

595

596

597

598

599

600

601

602

603

604

605

606

607

608

D Theoretical results and proofs

Before stating the proof of Proposition 1, we show under which condition the pair of random variables X,Y satisfies the forward and backward models of equations (5), (6): this is relevant for our discussion, as the proof of Proposition 1 consists of showing that this condition is almost never satisfied.

Notation. We adopt the following notation: ν X := log p N X , ν Y := log p N Y , ξ := log p ˜ X , η := log p ˜ Y , and π := log p ˜ X, ˜ Y .

̸

Theorem 1 (Theorem 1 of Zhang and Hyvärinen [8]) . Assume that X,Y satisfies both causal relations of equations (5) and (6) . Further, suppose that p N Y and p ˜ X are positive densities on the support of N Y and ˜ X respectively, and that ν Y , ξ, f 1 , f 2 , g 1 , and g 2 are third order differentiable. Then, for each pair (˜ x, ˜ y ) satisfying ν ′′ Y (˜ y -h Y (˜ x )) h Y (˜ x ) = 0 , the following differential equation holds:

and h X is constrained in the following way:

where the arguments of the functions have been left out for clarity.

Proof of Theorem 1. We demonstrate separately the two statements of the theorem.

Part 1. Given that equations (5) and (6) hold, this implies that the forward and backward models on ˜ X, ˜ Y of equations (7) and (8) are also valid, namely that:

These are the structural equations of two causal models, associated with the forward ˜ X → ˜ Y and backward ˜ Y → ˜ X graphs, respectively. Applying the Markov factorization of the distribution according to the forward direction, we get:

which implies 609

From (11), we have that: 611

which implies 612

for any ˜ x, ˜ y . Similarly, the Markov factorization on the backward model implies: 610

Computing the same set of partial derivatives from (10), we find: 613

from which follows: 614

615

616

617

618

where we drop the input arguments for conciseness. The equality with 0 is given by the equality with (12). Manipulating the above expression, the first claim follows.

Part 2. Next, we prove the constraint derived on h X . To do this, we exploit the fact that ˜ Y is independent of N X , which implies the following condition [38]:

for any (˜ y, n x ) . According to equations (7), (8), we have that: 619

such that we can define an invertible map Φ : (˜ y, n x ) ↦→ (˜ x, n Y ) . It is easy to show that the Jacobian of the transformation has determinant | J Φ | = 1 , such that

where (˜ x, n Y ) = Φ -1 (˜ y, n X ) . Thus, being ˜ X,N Y independent random variables, we have that:

Given that ˜ X = h X ( ˜ Y ) + N X , we have that

while N Y = ˜ Y -h Y ( ˜ X ) implies

such that

which must be equal to zero, being equal to the LHS of (13). Thus, we conclude that

proving the claim. 620

D.1 Proof of Proposition 1 621

Proof. Under the hypothesis that equations (5), (6) hold, i.e. when the data generating process satisfy 622 both a forward and a backward model, by Theorem 1 we have that: 623

where 624

Define z := ξ ′′′ , such that the above equation can be written as z ′ (˜ x ) = z (˜ x ) G (˜ x, ˜ y ) + H (˜ x, ˜ y ) . 625 given that such function z exists, it is given by: 626

̸

Let ˜ y such that ν ′′ Y (˜ y -h Y (˜ x )) h ′ Y (˜ x ) = 0 holds for all but countable values of ˜ x . Then, z is determined by z (˜ x 0 ) , as we can extend equation (15) to all the remaining points. The set of all functions ξ satisfying the differential equation (14) is a 3-dimensional affine space, as fixing ξ (˜ x 0 ) , ξ ′′ (˜ x 0 ) , ξ ′′ (˜ x 0 ) for some point ˜ x 0 completely determines the solution ξ . Moreover, given ν Y , h X , h Y fixed, ξ ′′ is specified by (9) of theorem 1, which implies:

which confines ξ solutions of (14) to a 2-dimensional affine space. 627

NeurIPS Paper Checklist

1. Claims

Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?

Answer: [Yes]

Justification: Supervised learning models in causal discovery do not provide connections with the known identifiability theory. In the abstract, we present this open problem, and highlight our main empirical findings and how they connect to the theory of identifiability in causality. The content of the paper (mostly Section 3) unravels the abstract claims in all of their details.

Guidelines:

The answer NA means that the abstract and introduction do not include the claims made in the paper.

The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers.

The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.

It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.

2. Limitations

Question: Does the paper discuss the limitations of the work performed by the authors?

Answer: [Yes]

Justification: We discuss the limitations of our work in Section 1, paragraph "Closely related works and their relation with CSIvA", regarding the use of CSIvA as our only architecture for the experiments. Additionally, in the same paragraph, we remark that the scope of this study is limited to the context of causal discovery on observational data. Finally, in Section 2.2, we discuss our choice of limiting the empirical study to the case of bivariate graphs.

Guidelines:

The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.

The authors are encouraged to create a separate "Limitations" section in their paper.

The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be.

The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.

The authors should reflect on the factors that influence the performance of the approach. For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.

The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.

If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.

While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best

judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.

3. Theory Assumptions and Proofs

Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?

Answer: [Yes]

Justification: Proposition 1 is proved in detail in Appendix D.1, which is based on Theorem 1 of Zhang and Hyvärinen [8], which we report in the Appendix together with its proof. We do not provide an explicit sketch of the proof of our Proposition 1 in the main text, as we already detail the intuition behind it in the content of Section 3.3.

Guidelines:

The answer NA means that the paper does not include theoretical results.

All the theorems, formulas, and proofs in the paper should be numbered and crossreferenced.

All assumptions should be clearly stated or referenced in the statement of any theorems.

The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition.

Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.

Theorems and Lemmas that the proof relies upon should be properly referenced.

4. Experimental Result Reproducibility

Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?

Answer: [Yes]

Justification: We have specified our data generation methods in Appendix B.2, as well as the CSIvA method (which is a previously published model) in Appendix A, and our hyperparameters for training in Appendix B.1. We will also release our implementation of CSIvA, our data generation code (which is a thin wrapper around the causally https: //causally.readthedocs.io/en/latest/ Python library), and our experimental code.

Guidelines:

The answer NA means that the paper does not include experiments.

If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.

If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.

Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.

While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example

(a) If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm.

733

734

735

736

737

738

739

740

741

742

743

744

745

746

747

748

749

750

751

752

753

754

755

756

757

758

759

760

761

762

763

764

765

766

767

768

769

770

771

772

773

774

775

776

777

778

779

780

781

782

783

784

(b) If the contribution is primarily a new model architecture, the paper should describe the architecture clearly and fully.

(c) If the contribution is a new model (e.g., a large language model), then there should either be a way to access this model for reproducing the results or a way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).

(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.

5. Open access to data and code

Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?

Answer: [Yes]

Justification: We will release our implementation of CSIvA, our data generation code (which is a thin wrapper around the causally https://causally.readthedocs.io/ en/latest/ Python library), and our experimental code.

Guidelines:

The answer NA means that paper does not include experiments requiring code.

Please see the NeurIPS code and data submission guidelines ( https://nips.cc/ public/guides/CodeSubmissionPolicy ) for more details.

While we encourage the release of code and data, we understand that this might not be possible, so 'No' is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark).

The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines ( https: //nips.cc/public/guides/CodeSubmissionPolicy ) for more details.

The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.

The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only a subset of experiments are reproducible, they should state which ones are omitted from the script and why.

At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).

Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted.

6. Experimental Setting/Details

Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?

Answer: [Yes]

Justification: Yes, we provide these details in Section 3.1 and Appendix B.

Guidelines:

The answer NA means that the paper does not include experiments.

The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them.

The full details can be provided either with the code, in appendix, or as supplemental material.

7. Experiment Statistical Significance

Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?

Answer: [Yes]

Justification: For each plot, we provide error bars in the form of 95% confidence intervals computed on 1.5k points (hence, it's reasonable to apply the central limit theorem to argue that the confidence intervals are valid).

Guidelines:

The answer NA means that the paper does not include experiments.

The authors should answer "Yes" if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.

The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions).

The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)

The assumptions made should be given (e.g., Normally distributed errors).

It should be clear whether the error bar is the standard deviation or the standard error of the mean.

It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified.

For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates).

If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.

8. Experiments Compute Resources

Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?

Answer: [Yes]

Justification: We provide all details on our computer resources in Appendix B.3.

Guidelines:

The answer NA means that the paper does not include experiments.

The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.

The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute.

The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper).

9. Code Of Ethics

Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines ?

Answer: [Yes]

Justification: We do not believe any of the concerns in the Code of Ethics apply to our work.

Guidelines:

The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.

If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics.

The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction).

10. Broader Impacts

Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?

Answer: [NA]

Justification: Our work is about assessing and studying pre-existing causal discovery models. As we release no new model, there is no societal impact that could be caused by our work.

Guidelines:

The answer NA means that there is no societal impact of the work performed.

If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact.

Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.

The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.

The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.

If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).

11. Safeguards

Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?

Answer: [NA]

Justification: The data and models in this paper do not have high risk for misuse.

Guidelines:

The answer NA means that the paper poses no such risks.

Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.

Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.

We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.

12. Licenses for existing assets

Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?

Answer: [Yes]

Justification: We cite the authors of all papers we build our work on. Additionally, we provide the URL to all previously existing code we rely on, which is available in the form of public GitHub repository under MIT license.

Guidelines:

The answer NA means that the paper does not use existing assets.

The authors should cite the original paper that produced the code package or dataset.

The authors should state which version of the asset is used and, if possible, include a URL.

The name of the license (e.g., CC-BY 4.0) should be included for each asset.

For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.

If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset.

For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.

If this information is not available online, the authors are encouraged to reach out to the asset's creators.

13. New Assets

Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?

Answer: [Yes]

Justification: As our work is an analysis of pre-existing methods of causal discovery, we do not release new assets other than the code strictly needed for reproducing our experimental results. This code is attached to this submission to facilitate the reproducibility of our results. All the documentation necessary for reproducing our results is provided in the main manuscript.

Guidelines:

The answer NA means that the paper does not release new assets.

Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.

The paper should discuss whether and how consent was obtained from people whose asset is used.

At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.

14. Crowdsourcing and Research with Human Subjects

Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?

Answer: [NA]

Justification: We do not work with human subjects or crowdsourcing.

Guidelines:

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper.

According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.

941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959

15. Institutional Review Board (IRB) Approvals or Equivalent for Research with Human Subjects

Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?

Answer: [NA]

Justification: We do not work with human subjects or crowdsourcing.

Guidelines:

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.

We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution.

For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper studies the level of generalization achievable when training a predictor to classify “X causes Y” vs. “Y causes X” from observational data. Motivated by recent works performing causal discovery using a pretrained transformer model, the works explores which cases result in predictors that generalize to graph-dataset pairs generated from unseen types of SCM models. This is mostly achieved through a set of empirical experiments on synthetic 2-node SCM data. The work derives a corollary of Hoyer et al [7] to argue why training on multiple identifiable classes of synthetic SCM instances may help generalization amortized causal discovery methods.\n\nSTRENGTHS:\nThe paper takes a first step towards analysing why amortized causal discovery performs well in practice and often significantly better than classical approaches. This is generally an important direction and of interest to the field.\n\nWEAKNESSES:\nWhile the motivation of this work is generally well-grounded, the contribution and argument of the work itself have several weaknesses that, in my opinion, do not justify many of the claims made in the abstract, introduction, and throughout the paper.\n\nFirst, a major aspect of amortized causal discovery with transformers (referenced in the title) is that of solving structure learning tasks in *high dimensions*. Lopez [10] already provide theoretical and empirical analyses of the bivariate case. Recent work showed that this idea can generalize to (very) large systems -- the literature of works on causal discovery with transformers cited in the paper all study significant large-dimensional problems (ranging from 20-100 variables). Despite this, the present paper limits its entire analysis to the bivariate case. Thus, it is misleading to claim the paper “demystifies amortized causal discovery with transformers”. No part of the analysis concerns multivariate causal discovery or transformers. The paper should be upfront and highlight much more clearly what its contributions are beyond Lopez et al [10], which already study the bivariate amortized causal discovery case.\n\nThe paper repeatedly states it analyses CSIvA. However, none of the algorithmic components of CSIvA, such as e.g. the auxiliary loss it is trained on or the architecture of the predictive model, are part of the analysis. The loss function studied here (p.3, l. 133) is the same as e.g. used by [13]. Hence, it would be more truthful to claim the analysis concerns general predictors trained on the classification task of X->Y vs X<-V, as in [10].\n\nA major component of causal discovery performance is not only identifiability of the graph from the observational distribution, but also the intractably large search problem incurred by classical score- and constrained-based methods. The question is: do transformers outperform classical methods in large problem sizes because 1) (parts of) the graphs are identifiable to it, or 2) a prediction-based approach is better at finding the identifiable edges in a large system (as opposed to doing a search)? This question motivates amortizing causal discovery in the first place, but the two-variable special case studied here is ill-suited for answering it. Since the work only studies the bivariate case, the title and claims throughout the paper, as well as their ties to the (large-scale) transformer literature have to be recalibrated.\n\nSection 3.2 seems unnecessary. The section only studies the generalization ability of CSIvA, which is no contribution. The takeaways (lines 195-) that “CSIvA generalizes well to test data generated by the same class of SCMs used for training” and that “it struggles when the test data are [from different SCMs]” are obvious and well-studied by CSIva or related works with the same approach. The same applies to the insight that “training […] exclusively on LiNGAM-generated data is equivalent to learning the distribution p(.|D, LiNGAM)”, implying identifiability.\n\nQUESTIONS:\nIn the experiments, is the data standardized? Standardization can affect identifiability (see Reisach, 2021, “Beware of the simulated DAG! Causal Discovery Benchmarks May Be Easy To Game”).\n\nLIMITATIONS:\n-\tThe “theoretical result” (Proposition 1) is a simple corollary of Hoyer et al [7]. The paper makes otherwise no theoretical contribution to the problem underlying amortized causal discovery itself.\n\n-\tIt is unclear whether “randomly initialized MLPs” are sensible nonlinear functions to use for constructing nonlinear mechanisms and non-Gaussian noise distributions. The fact that a few prior works used it is not a good reason. The shape and scale of randomly initialized neural network functions depends heavily on the activation function and weights distribution. The functions in these experiments could be anything from approximately constant or linear to very jumpy. Please provide additional motivation or evidence for why this is a good choice, and what hyperparameters are used, or consider as an alternative, e.g., samples from a GP, which are smooth and have an interpretable length-scale parameter, also in high dimensions.", "TITLE": "Official Review", "RECOMMENDATION": 3, "REVIEWER_CONFIDENCE": 5, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2024-06-28"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper explores why causal discovery from observational data, particularly with CSIvA, a transformer-based model, can achieve competitive performance despite seemingly avoiding the explicit assumptions that traditional methods make for identifiability. The authors demonstrate that constraints on the training data distribution implicitly define a prior on the test observations. When this prior is well-suited, the underlying model can be identifiable. In other words, prior knowledge of the test distribution is encoded in the training data through constraints on the structural causal model governing data generation.\n\nAdditionally, they provide a theoretical basis for training on observations sampled from multiple classes of identifiable SCMs, a strategy that enhances test generalization to a wide range of causal models. They show that training on mixtures of causal models offers an alternative approach that is less reliant on assumptions about the mechanisms.\n\nSTRENGTHS:\nThis paper bridges the gap between existing theoretical results on identifiability and practical observations. More importantly, it moves away from classical causality settings and quite restricted models, shifting towards more mainstream and modern models like transformers. This opens a pathway for causality research to integrate with large language models (LLMs), which represent the state-of-the-art in a wide range of applications.\n\nWEAKNESSES:\nThe presentation can be significantly improved. Since the paper aims to offer novel insights, it is crucial to organize the arguments, theoretical results, and experimental findings effectively to support these insights.\n\nQUESTIONS:\nraining on data from multiple causal mechanisms and/or noises intuitively improves generalization, as the model is exposed to more changes and diverse data. This phenomenon is also observed and theoretically analyzed in domain adaptation. Domain adaptation is simpler because there is a meta-distribution or meta-process that governs how distributions change across domains. Similarly, large language models (LLMs) benefit from training on diverse and vast data sources and their underlying generating processes. I wonder if the authors have theoretical results or insights on this aspect with causal models training on vast data generated by diverse causal mechanisms potentially without a common meta-process.\n\nLIMITATIONS:\nn.a.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 2, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-11"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper studies the behaviour of amortised (supervised) causal discovery methods based on different training data distributions and its relation to more traditional causal discovery and the related identifiability theory. The authors empirically validate the intuitions about supervised causal discovery and generalisation of supervised learning methods.\n\nSTRENGTHS:\n- The paper studies the behaviour of amortised causal discovery methods which have previously been unstudied.\n- The empirical insights generally validate the intuition about identifiability and generalisation. Some examples give interesting insights into the identifiability and performance in the case of mixed assumptions.\n\nWEAKNESSES:\n- The paper is a purely empirical study of the generalisation behaviour of supervised causal discovery methods, validating general intuition without thorough novel insights.\n- Given the empirical nature of this paper, I'd have expected to see a more thorough comparison, e.g. setting up a leave-one-out generalisation study or more in-depth analyses of the prediction on interesting individual SCMs such as the non-identifiable example or the performance of the prediction from new samples from a training set SCM.\n\nQUESTIONS:\n- You seem to be surprised that supervised causal discovery methods can infer graphs when trained on mixed data. Isn't that somewhat obvious after results from [29] that show that transformers can identify valid assumptions from data?\n- You make fairly strong statements about classical methods not being applicable because the underlying assumptions cannot be verified. I'd disagree with this as they still turn out to be useful in practice.\n- How do you think [1] relates to the behaviour of supervised causal discovery methods, given that transformers can perform approximate Bayesian inference [2].\n\n[1] Dhir, Anish, Samuel Power, and Mark van der Wilk. \"Bivariate Causal Discovery using Bayesian Model Selection.\" Forty-first International Conference on Machine Learning.\n[2] Hollmann, Noah, et al. \"TabPFN: A Transformer That Solves Small Tabular Classification Problems in a Second.\" The Eleventh International Conference on Learning Representations.\n\nLIMITATIONS:\nn/a", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2024-07-11"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper conducts an empirical study of the performance of supervised causal discovery methods, its generality, and the learnability vs. causal structure identifiability. The scope is the bivariate case, and with controlled mechanism and noise to establish the SCM for training and testing data. \n\nIn my opinion, this paper gives two findings:\n\n1) a previous claim (Lopez-Paz et al. [10]) said that, by using the supervised learning based approach, the performance of causal discovery can exceed the boundary of identifiability. which is not true\n\n2) by using diverse training data (diverse = diverse mechanisms + diverse noise), supervised based causal discovery can achieve better OOD performance.\n\nSTRENGTHS:\n1 - the study of supervised causal learning, especially the DNN-based approach, is timely and important. \n\n2 - the experiment setup, is a good starting point. To my knowledge, this is the first paper study the performance, boundary of supervised-based causal discovery methods, setting the bivariate case, with the configuration in terms of mechanism + noise is valid.\n\n3 - some findings are interesting, which can potentially benefit the community for further algorithm design.\n\nWEAKNESSES:\n1 - part of the study can be summarized as learnability vs. identifiability, or in my opinion, one question within this category is \"when and how can learnability exceeds the boundary of identifiability?\". in this regard, the current findings are still very limited, need to be further consolidated.\nin this regard, a related work [1] is missing, I think it is helpful for this work.\n\n2 - although not explicitly claimed, this paper suggests that \"CSIvA is capable of in-distribution generalization', is this true? or is this true just for bivariate case or generaly applicable?\n\n3 - I suggest to use the term supervised-based approach, or supervised causal learning (SCL), rather than amortized causal discovery, which is more to the point.\n\n4 -  one claim \"we conclude that the post-ANM is generally identifiable, which suggests that the setting of Example 2 is rather artificial\"\nI disagree. Although the space of all continuous distributions such that the bivariate post-ANM is non-identifiable is contained in a 2-dimensional space, thus it is a submanifold of the entire distribution space, thus its measure is 0. This is only a mathematical claim but lacks real-world relevance. I would argue that the setting of example 2 is quite valid in real-world setting, or the linear gaussian setting, is also commonly adoped in real-world, but had not been discussed in this work.\n\n5 - potential conflict between section 3.3 and 3.4:\n3.3 shows that when mixed two training dataset (different setting) together, would significantly compromise the SCL's performance; however, section 3.4 shows that the more diverse of the training data, the more gain on OOD setting.\n\n\n[1] Dai, H., Ding, R., Jiang, Y., Han, S., & Zhang, D. (2023). Ml4c: Seeing causality through latent vicinity. In Proceedings of the 2023 SIAM International Conference on Data Mining (SDM) (pp. 226-234). Society for Industrial and Applied Mathematics.\n\nQUESTIONS:\nIs Figure 3 a) and b) reversed?\n\nLIMITATIONS:\nN/A", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2024-07-13"}