Deep Backtracking Counterfactuals for Causally Compliant Explanations
Authors: Klaus-Rudolf Kladny
Julius von Kügelgen
Bernhard Schölkopf
Michael Muehlebach
Venue: Accepted by TMLR ()

Abstract: Counterfactuals answer questions of what would have been observed under altered circumstances and can therefore offer valuable insights. Whereas the classical interventional interpretation of counterfactuals has been studied extensively, backtracking constitutes a less studied alternative where all causal laws are kept intact. In the present work, we introduce a practical method called deep backtracking counterfactuals (DeepBC) for computing backtracking counterfactuals in structural causal models that consist of deep generative components. We propose two distinct versions of our method—one utilizing Langevin Monte Carlo sampling and the other employing constrained optimization—to generate counterfactuals for high-dimensional data. As a special case, our formulation reduces to methods in the field of counterfactual explanations. Compared to these, our approach represents a causally compliant, versatile and modular alternative. We demonstrate these properties experimentally on a modified version of MNIST and CelebA.

Published in Transactions on Machine Learning Research (07 (024))
Deep Backtracking Counterfactuals for Causally Compliant Explanations
Klaus-Rudolf Kladny
kkladny@tue. mpp.ttueeeppppe....e.... de
Mar Planck Institute for Intelligent Systems, Tübingen, Germany
Julius Küggelgnn
juléus. hwt.:s.wwwnuueegeeee@ddaaaaa.aa. etha.ch
ETH Zurich, Switzerland
Bernhard Schölkopf
bs@tue. mmg..e
Max Planck Institute for Intelligent Systems, Tübingen, Germony
Michael Muehlebach
michaebm@tuu.mpp.cc de
Max Planck Instätute for Intelligent Systems, Tübingen, Germany
Reviewed on OpenReview: https: // openreview. net/ forun? id- Br5esc2CXR
Abstract
Counterfactuals answer questions of what would have been observed under altered circum- stances and can therefore offer valuable insights. Whereas the classical interventional in- terpretation of counterfactuals has been studied extensively, backtracking constitutes less studied alternative where all causal laws are kept intact. In the present work, we introduce a practical method called deep backtracking counterfactuals (DeepBC) for computing back- tracking counterfactuals structural causal models that consist of deep generative compo- nents. We propose two distinct versions of our method one utilizing Langevin Monte Carlo sampling and the other employing constrained optimization to generate counterfacluals for high- sich-dimensional data. As special case, our formulation reduces to methods in the field of counterfactual explanations. Compared to these, our approach represents a causally com- pliant, versatile and modular alternative. We demonstrate these properties experimentally on a modified version of MNIST and CelebA.
1 Introduction
In recent years, there has been surge in the use of deep learning for causal modeling (Sanchez & Tsaftaris, 2022; Pawlowski et al., 2020; Kocaoglu al., 2018; Goudet et al., 2018; Javaloy et al., 2023; Khemakhem et al., 2021; Taylor-Melanson et al., 2024). The integration of deep learning in causal modeling combines the potential to effectively operate on high-dimensional distributions, a strength inherent to deep neural networks, with the capability to answer inquiries of a causal nature, thus going beyond statistical associa- tions. At the apex of such inquiries lies the ability to generate scenarios of a counterfactual nature-alteree altered worlds where variables differ from their factual realizations, hence aptly termed counter to fact (Pearl, 2009; Barcinboim et al., 2022). Counterfactuals are doeply ingrained in human reasoning (Rocse, 1997), as evident from phrases such "Had it rained, the grass would be greener now" or "Had invested in bilcoin, would have become rich"
Constructing counterfactuals necessitates two fundamental components: (i) sufficiently accurate world model with mechanistic semantics, such as a utructural causal model (SCM; Pearl, 2009); and (ii) a sound procedure for deriving the distribution all variables that are not subject to explicit alteration. The latter component has been subject of dobate: While the classical literature in causality constructs counterfactuals by actively manipulating causal relationships (interventional counterfactuals), this approach has been con- tested by some psychologists and philosophers (Rips, 2010; Gerstenberg et al., 2013; Lucas & Kemp, 2015).

---

Published in Transactions on Machine Learning Research (07/2024)
" "What would have been, had the intensity (i) been higher?"
WT
UT
t
fT
t
U1
fI
*
I
Ving dimg
Vmg
SImE
Img
Figure 1: Visualization of DeepBC for Morpho-MNIST. We generale a counterfactual (green) image img" and thickness t* with antecedent intensity i for the factual, observable realizations (filled blue) img, t, i. Our approach finds new latent variables u" that are close with respect to distances d, to the factual latents u, subject to rendering the antecedent i* true. The causal mechanisms in the factual world remain unaltered in the counterfactual world. In this specific distribution, thickness and intensity are positively related, thus rendering the image both more intense and thicker in the counterfactual. Dependence of fi on graphical parents is omitted for simplifying visual appearance.
Instead, they have proposed an account of counterfactuals where alternate worlds are derived by tracing changes back to background conditions while leaving all causal mechanisms intact. This type of counter- factual is termed backtrucking counterfactual (Lewis, 1979; Khoo, 2017). Due to the preservation of causal mechanisms, backtracking counterfactuals allow for gaining faithful insights into the structural relationships of the data generating process, which render them a promising opportunity in practical domains such as medical imaging (Sudlow et al., 2015), biology (Yang et al., 2021a) and robotics (Ahmed et al., 2021).
Recently, von Kügelgen et al. (2023b) have formalized backtracking counterfactuals within the SCM frame- work. However, implementing this formalization for deep structural causal models (Pawlowski et al., 2020) poses computational challenges due to steps such as marginalizations and the evaluation of distributions that are intractable. The present work addresses these challenges and offers a computationally efficient imple- mentation by framing the generation of counterfactuals as constrained sampling problem. Specifically, we propose a Markov Chain Monte Carlo scheme in the structured latent space of causal model, based on the overdamped Langevin dynamics (Parisi, 1981). We also propose a simplified method where a single, "most likely" counterfactual is obtained as the solution
constrained optimization problem.
The present work further serves a bridge between causal modeling and practical methods in the field of counterfactual explanations (Wachter et al., 2017; Beckers, 2022). As causally grounded approach applica- ble to high-dimensional data, our method fills gap in the exist.ng literature between non-causal explanation tools, built for complex data such as images (e.g., Goyal et al., 2019; Boreiko et al., 2022), and causal meth- ods that have only been applicd to simple (assuming additive noisc), low-dimensional scttings (Bynum et al., 2024; von Kügelgen et al., 2023b; Crupi et al., 2022).
We summarize our main contributions as follows:
We introduce Be, a tractable method for computing backtracking counterfactuals in deep SCMs 3). We propose two variants, stochastic DeepBC (S 3.1.1) and mode DeepBC (6 3.1.2). The former
2

---

Published in Transactions on Machine Learning Research (07/2024)
allows for sampling counterfactuals via Langevin Monte Carlo ($ 3.3.1.. The latter constitutes a simplified version for generating point estimates using constrained optimization ($ 3.3.2). Our methodology exhibits multiple favorable properties, which are causal compliance, versatility and modularity ($ 3.5).
We highlight connections to the field of counterfactual explanations, and elucidate how our method can be understood as a general form of the popular method proposed by Wachter et al. (2017) ($ 3.2).
We demonstrate the applicability and distinct advantages our method in comparison to interventional counterfactuals and counterfactual explanation methods through experiments on the Morpho-MNIST and the CelebA data sets (S 4).
Overview. Section 2 introduces structural causal models ($ 2.1), the deep generative models that are employed subsequently ($ 2.2), interventional and backtracking counterfactuals ($ 2.3) and counterfactual explanations ($ 2.4). The section therefore sets the stage for presenting our method called deep backtracking counterfactuals (DeepBC) in Section $ 3, where we also discuss its relation to methods in the field of counterfactual explanations ($ 3.2), its algorithmic implementation ($ 3.3) and extensions for categorical variables and sparse solutions (5 3.4). In Section Š 4, show experimental results performed on Morpho- MNIST ($ 4.1) and CelebA ($ 4.2) that highlight the causal compliance, versatility and modularity of our method. Related work is presented in Section $ 5. We then discuss limilations and future work in Section $ 6 and conclude with a short summary in Section $ 7
2 Setting& & Preliminaries
The following section introducees (deep) structural causal models and backtracking counterfactuals. These concepts present the building blocks for method, presented in Section
Throughout the article, upper case X denotes a scalar multivariate continuous random variable, and lower case realization thereof. Bold X denotes a collection of such random variables with realizations x. The components of x are denoted by x;, We denote the probability density of X by p(r).
2.1 Structural Causal Models
Let X = (X1, X,,..,, be a collection of potentially high-dimensional observable "endogenous" random variables. For instance, these variables could be high-dimensional objects such images (e.g., the MNIST image in Fig. 1) or scalar feature variables (such X; are specified by a directed acyclic graph G that is known. A structural cansal model (Pearl, 2009) is characterized by collection of structural equations X; + fi(X pa(s), Ui), for i = 1,2,..., where X Xpa(t) are the causal parents X, as specified by G and U = (U1, U2.., Un) are exogenous latent variables'. The acyclicity of G ensures that for all i, we can recursively solve for X, to obtain deterministic expression terms of U. Thus, there exists unique function that maps U X, which we denote by F,
and i in Fig. 1). The causal relationships among the
X F(U,,
(1)
and which is known as the reduced--on expression. We see that F induces a distribution over observables X, for any given distribution over the latents U. For the remainder of this work, we assume causal sufficiency (no unobserved confounders) (Spirtes, 2010), which implies joint independence of the components of U.
2.2
Deep Invertible Structural Causal Models
In this work, we make the simplifying assumption that (x -) is invertible for any fixed Xpa(t)² 2 such that can write
U, = f;= X,), i= 1,2, n.
We note that by definition, the exogenous variables are not cansally related each other. Plsoo known as bijective generation mechanism (see, e.g., Nasr-Fsfahany al., 2023).
3

---

Published in Transactions on Machine Learning Research (07/2024)
Under this assumption, the inverse F of the mapping in (1) is guaranteed to exist, and can write
U F=F (X).
(2)
We assume that all fi are given as conditional deep generative models, differentiable with respect to for each Xpa(t), trained separately for each structural assignment (Pawlowski et al., 2020). We consider the following two classes of models, both of which operate on latent variables with a standard Gaussian prior.
Conditional normalizing flows (Rezende & Mohamed, 2015; Winkler et al., 2019) are constructed composition of invertible functions, hence rendering the entire function fi invertible in u, In addition, they are chosen such that the delerminant of the Jacobian can be computed efficiently. These two altributes facilitate efficient training of fi via maximum likelihood.
Conditional variational auto-encoders (Kingma & Welling, 2014; Sohn et al., 2015) consist of sepa- rate encoder e; and decoder d: networks. These modules parameterize the mean of their respective condi- tional distributions, i.c. U (p()) 24 ~ (X(e((xm())) zt), di)g()))))) and X,)xpa(t)= 24 ~ (X(((x uz), Ioî). Through joint training of es, di and the variance vector o using variational inference, e, and di become interoonnected. The decoder variance oî is fixod a priori. Thcorctical insights by Reizinger al. (2022) support the use of an approximation, where the decoder effectively inverts the encoder, that is,
T3 = fi(Xpa(t): J, (xpatt) x:)) Fo di(Xpa(t) e (x(xxaaa) (Xp))))
We use this approximation throughout the present work and do not explicitly model the encoder and decoder variances post training. The reason is that inverlability is crucial to the simplification of the backtracking procedure, as derived in App. A.2.
2.3 Interventional and Backtracking Counterfactuals
Given a factual observation x (bluc in Fig. 2) and a so-called antecedent x3s = (xf E S) (filled green in
Fig. 2) for a given subset C m.,,...,, we define a counterfactual as some x' (x x. .... x/)) consistent with x5. We view x* as an answer the verbal query
"What values (x") had X taken instead of the given (observed) x, had X taken the values x3s rather than xs?"
In the present work, we consider interventional and backtracking counterfactuals. Both generate distributions over counterfactuals whose random variables we refer to as X* (green in Fig. 2). We only provide a concep- tual notion and refer the reader to App. A.1 for a more rigorous formalism for both types of counterfactuals.
Interventional counterfactuals render the antecedent true via modification of the structural assignments (f1, .2.. fn), which leads to a new collection assignments (ff ...... fi). Specifically, these new structural assignments are constructed such that the causal dependence on the causal parents of all antecedent variables X3 removod: f x; for i E S and f fs otherwise. Such modification can be understood as a hard intervention the underlying structural relations (indicated by the hammer in Fig. 2).
Backtracking counterfactuals leave all structural assiguments unchanged. In order to set the antecedent X # xs true, they trace differences to the factual realization back (ideally small) changes in the latent variables U. These modified latent variables are represented by a new collection of variables U* that depend U via given backtracking conditional p"( |u) (red in Fig. 2) (von Kügelgen al., 2023b), which represents a probability density for computing similarity between u and u' and which we assume to be decomposable, or factorized:
p u) = II
p B
(1l u.).
4

---

Published in Transactions on Machine Learning Research (07 2024)
causal model
interventional counterfactual
backtracking counterfactual
X1
U1
1
U1
Xi
U1
Uf
Xi
T
X
U2
22
22
2
22
U2
U2
322
X3
U3
3
U3
X
CB
U3
U3
X
Figure Difference between interventional and backtracking counterfactuals on a concrete example. Variables that are conditioned on correspond to filled circles. Interventional counterfactuals perform a hard intervention (indicated by hammer) X +- 42 with antecedent z (i.e., S = {2)) in the counterfactual world (green). Backtracking counterfactuals, on the contrary, construct this counterfactual world via introducing a new set of latent variables U that depend on U via a backtracking conditional (red).
By marginalizing over U*, we obtain the distribution of X* x'g,x. Throughout the manuscript, we will write
p (ul us) x exp (-d( u:)}
where the d; are diffcrentiable with respect to v/. The functions di (u4,, uz) can be interpreted as distances that penalize deviations of the counterfactual latent variables to their factual realizations.
Backtracking counterfactuals fulfill an intuitive notion of causal compliance, which we will elaborate on the example shown in Fig. 2. To simplify the exposition, we only consider the modes (sce 3.1.2) of the backtracking variables (denoted by wi, uzy uğ, si, vn and æz)) and note that only the latent variables Uf and U2, which are upstream (in the causal graph) of the antecedent variable X2, can contribute in realizing 22 A x2. Thus, we generally have ot o in and u² j u2, i.e., the counterfactual modes differ from the factual realizations. The downstream latent variable Ug. in contrast, does not have causal influence on X2. In order to minimize the distance dg (uğ, ua), uğ is thus left unchanged from the factual W3, i.e., nz ug- The inequality 2ل a x3 is then solely a consequence of the downstream effect of the antecedent æ # 22. We will demonstrate these propertics experimentally in Section $ 4.
This section concludes by introducing so-called counterfactual explanations. This allows us to compare our method against this formulation in Section $ 3.2.
2.4 Counterfactual Explanations
A wealth of prior work in machine learning concerned with explaining the prediction á of a classifier fy with I (x) through the generation of new example x² which is close to x, yet predicted as y", where y" is label that differs from the (factual) prediction ÿ. The intuitive idea is that contrasting x² with æ yields an interpretable answer as to why x is classified as rather than y". Formally (sce Wachter et al. (2017)), I" can be obtained as the solution of
arg min do (x', x)) subject to fx(x') '²; x²
where d, represents a distance function between observed variables. In the present work, we generally refer to methods implementing a variant of (4) as counterfactual explanations. We stress that Y is the prediction of model (fy)) and thus always an effect of X. In general, the structural assignment fy different from fy (the assignment of the true variable that is not predicted). For instance, Y might be a cause of or might be confounded with X. We revisit. the difference between Y and & in Section $ 3.2.
5

---

Published in Transactions on Machine Learning Research (07 2024)
3 Deep Backtracking Counterfactuals (DeepBC)
The main contribution of the present work is to derive formulations and algorithms to efficiently compute backtracking counterfactuals for deep SCMs. In Section $ 3.1, we lay down the objectives underlying the two
variants of DeepBC that we propose the present work: (i) stochastic DeepBC' ($ 3.1.1) aims at sampling from counterfactual distribution; (ii) mode DeepBC ($ 3.1.2) constrains the counterfactual distribution its mode, thus (deterministically) generating only single solution. We provide rigorous derivations of the formulations in Section 3.1 from the theoretical formalization given by Kügelgen al. (2023b) in App. A.2. We propose practical algorithms for attaining solutions to the given objectives in Section 3.3.
3.1 Objectives
3.1.1
Objective for Stochastic DeepBC
We sample from a distribution over counterfactuals X x2g, x for the factual realization x, antecedent x and (known) backtracking conditional p" This distribution is characterized by the density
p(x' x) x 6xg (Xs) II p (171(x)) F (x)) & 6xz (x's) exp Σ (x), F7 E77(0))
(5)
where 6xz(1 (.) refers to the dirac delta at X Intuitively, we can understand this distribution as describing counterfactuals that likely given in terms of latent components (p²), while fullfilling the constraint of being compliant both with the antecedent x3 (6x;) and with the causal laws F. We further note that (5) is equivalent to a sampling problem within the structured latent space, i.e.,
p(u' x u) x deg (u))) II pe (vl us) a dzg (Fs(u')) exp { - E--Cdit dilulh ui) wi).
(6)
The distribution of X* x x in (5) is obtained as the push-forward of (6) by F, for x = F(u).
3.1.2 Objective for Mode DeepBC
We compute the mode of p(x' x)) in (5), i.c., single "most likely" counterfactual x" for the factual realization as solution to the following constrained optimization problem:
arg min Σ de (F F. (x)(
subject to X's = -x..
(7)
Intuitively, we can understand this optimization as finding a solution x" that close the factual real- ization in terms of its latent components. This situation is visualized the Morpho-MNIST example in Fig. 1. We further note that (7) is equivalent to an optimization problem within the structured latent space,
arg min Σd de (14, Us) subject to Fs(u') = x == (xx)
(8)
i=1
We obtain the solution of (7) by inserting the solution of (8) into F.
3.2 Relation to Counterfactual Explanations
We can recover counterfactual explanations ($ 2.4) as special form of mode DeepBC (7). To this end, we assume access to two variables with the following structural equations
X (Ux) and + (X),
(9)
In contrast the reduced form, the backtracking conditional is not learned from data, but be specified explicitly.

---

Published in Transactions on Machine Learning Research (07/2024)
"What values would X and Z have taken,
(a)
underlying causal model
(b)
causal model corresponding to counterfactual explanations
Y
Y
X
Z
X
Z
had? Y laken different value?"
had the prediction Ý of a classifier fy laken a different value?"
Figure Backtracking interpretation of counterfactual explanations on a concrete example.
DeepBC aims al modeling the true structural relationships between variables, exemplified by the causal graph in (a). Counterfactual explanations in the sense of Wachter et al. (2017) have backtracking interpretation in that they instoad use predictive model fy such as classifier or regressor as structural equation (9), leading the causal graph shown in (b). In general, the true variable Y, unlike the prediction Y, may not be the effect of the covariates X and Z (X and Z may in addition be causally interrelated, shown in (a)). Consequently, the counterfactuals made by counterfactual explanation methods must be interpreted differently in comparison to those made by our approach. Specifically, DeepBC intents to erplain the true underlying variables rather than being confined to the prediction of a model, as can be read off of the coutterfctual queries in the figure. For clarity, the latent variables U are omitted.
where we note that Y not subject additional randomness Uy- In this specific case, observe that the mode DeepBC optimization problem (7) reduces to
arg min dx (xx) (x subject to fz(x') y",
(10)
which can be interpreted governed by fx. Under the assumption that fx is modeled as deep invertible generative model ($ 2.2), we the refer to (10) as deep counterfactual erplanation. For example, z could be a high-dimensional image, [x an (unconditional) variational autoencoder and label of the image. From this viewpoint, we can interpret DeepBC as a general form of counterfactual explanations in two ways: Firstly, it accommodates non-deterministic relations among variables, taking into account the influence of noise on all variables. In the aforementioned instance (9), this can be modeled by Y + (X, Up) (demonstrated in Fig. 12 (b) of App. D.2). Secondly, DeepBC accounts for multiple variables with more general underlying causal relationships. For example, there could be third variable Z related to both X and Y in (10) that could be modeled as well, as depicted in Fig. 3 (a). Rather than treating Z as a new dimension in the predictor input fy in (9) (resulting in (X, Z), see Fig. (b)), DeepBC allows for explicitly modeling the true causal relations between Z, X and Y (see Fig. 3 (a)) via (deep) structural equations, as outlined in Scction 2.1. The benefit of DeepBC is that intends to answer queries regarding the true underlying variables (see query in Fig. 3 (a)) rather than being confined model predictions that generally do not model the causal mechanisms according to the true relationships (see query in Fig. (b)). We elaborate further the benefits of our approach in Scction 3.5.
instance of (4), where distance is measured in unstructured latent space,
In the next section ($ 3.3), we propose algorithms to generate backtracking counterfactuals in practice, based on the formulations presented in (5) and (7).
'Typically, such methods do explicitly model other variables besides o: and y.
7

---

Published in Transactions on Machine Learning Research (07 (024))
Algorithm mode DeepBC
Algorithm 2 stochastic Crrchastic_DeppCC
Require: Xş: W, F, X, T u - (x)
Require: x, X33, W, F. X, T, " u'[0] f- mode mwdem Deede_DeepC(x,,, X W, F,
for f = 0, ....,,
do
for /= = 0, o,.,...,
do
Js - Js('
b[l N0 I)
X + x Js (u'
u'[++] u' V C(ult) u, x.x5)+ b[d]
u' +| + (W JJ (Wu +J533)
end for return (7)
end for return u'[]]
3.3 Algorithms
We rely on a penalty formulation to approximate (6) and (8) in order to account for the dirac measure and the constraint, respectively. Specifically, we consider the following energy (loss) function with respect to u':
Llu': x,) = Edid, us) + A F[(Fs(u)) - x
(11)
where À > 0 is a sufficiently large penalty parameter and u F=1(x).
3.3.1 Algorithm for Stochastic DeepBC
We propose to sample counterfactuals from X" x's, by leveraging Langevin Monte Carlo (Parisi, 1981). and therefore consider the time-dependent variable (t),, generated by the stochastic differential equation
(U)(t) = -Vv u, xsx + v2d((t)
(12)
where B()) denotes Brownian motion. It can be shown that U' admits stationary distribution with probability density
(u') x exp (-L(u'; u, x,))),
and hence we can use (12) to generate approximate samples from the desired distribution (6). In practice, we apply an Euler-Maruyama discretization (Saner, 2013) of (12). It is given as
U'lt+ + +[++ V'. u,x3) + 2n B(J,
B[J fid N(O,I),
(13)
for some step size > 0 and discrete time steps denoted by square brackets. The stationary distribution of U' docs not depend on the initialization, which is why we initialize the sampling algorithm (13) at the mode of U F>]) x5, generated by mode DeepBC (see 3.3.2). The algorithm for generating a single sample is specified in Alg, 2.
3.3.2 Algorithm for Mode DeepBC
We approximately compute the mode of X* x5, x by directly minimizing the energy C(u'; u, u,x3) (11) with respect to u', where F-'(x). Rather than performing gradient descent the original objective, we empirically observe that using first-order Taylor approxination of Fs at ū is beneficial when minimizing the distance
(14,, uz) w. | uzll2
1
with w; > 0. Specifically, we consider the approximation
Fs(u') (ū(ū) + +Js( ū),
8

---

Published in Transactions on Machine Learning Research (07/2024)
where u is the linearization point and Js(ū)= (u) denotes the Jacobian matrix. As result of this approximation, (11) is a convex quadratic function in u' and can therefore be solved for its minimum o² in closed form:
û' -W (i))s(())ss())) (Wa (ū)x3),
(14)
where
= 1 (ū
and W diag(w;) is a diagonal matrix containing the distance weights w,. By default, we set w, 1, for all i. A different choice of weights may be useful to encode the notion that certain noise variables are more stable (where large w; corresponds to high stability) due to application-specife requirements. A detailed derivation of (14) is provided in App. A.3.
Solving (14) once, starting from the initial condition ú = u, does not accurately fulfill the constraint due to the constraint lincarization, except for special cases. We thus apply an iterative algorithm similar to the Levenberg- Marquurrdd method (e.g., Moré (2006)), based on (14) that is specified in Alg. 1. Empirically, we observe Alg. to converge after much fewer iterations than gradient descent algorithms (see App. B.1 for more implementation details and experiments).
3.4 Extensions
Categorical Variables. The main challenge presented by categorical variables is that parameterizations which are both invertible and differentiable in Ug are not straightforward to obtain. To address this cir- cumstance, we propose an approach that roughly inspired by the reparameterization trick for discrete variables (Jang et al., 2017). For K classes, we assume that z; corresponds to a one-hot vector with x; =1 for its realized class and x; 0, for all + k. We then approximate the distribution of X, follows:
cxp (x Ut)/T}
if E {1, K -1,,
explc/T} + K- exp {g (x (pa(i))U,)/TT cxp(c/T}
x Xpa(1) (xpa(t); U.)
if K.
exp(c/T} + EK-1 exp
U.)/T}
(15)
where e > 0 is constant and > is a temperature parameter. The smaller we choose 7, the better the approximation in (15) becomes. The function g corresponds to a conditional normalizing flow that was trained on the logits output by a classifier, obtained either by regressing on Xpa(f) or Timg (such as the MNIST image in Fig. 1). We see that f, indoed fulfills the conditions of being both invertible and differentiable in Ug thus enabling the application of DeepBC.
Sparsity. We further employ variant of DeepBC that encourages sparse solutions, where sparsity is measured in u rather than x. Specifically, we use sparse DeepBC to obtain solutions where only few elements in u² differ from u, i.e,
de uz) ||44 10--m uillo
for all where || llo denotes the number of nonzero elements. We apply greedy approach similar to the one presented in Mothilal et al. (2020), where we start by fixing an integer M 0 for which we desire that ||u' uulo < M. We then apply DeepBC twice: In a first step, we solve for u* using mode DeepBC. Then, we use the M elements of the solution vector with largest. [|u uillz and apply DeepBC again only on these elements, while fixing the others to u,
Other distance functions. In general, any combination of differentiable distance functions d, (3) can be used when applying gradient descent-based methods for mode DeepBC.
9

---

Published in Transactions on Machine Learning Research (07 (204))
3.5 Properties in the Context of Counterfactual Explanations
We highlight the main contributions of our work in the context of counterfactual explanations, which we demonstrate experimentally in Section & and App. D:
1. Causal Compliance. By construction, DeepBC generates counterfactuals that adhere to causal laws (fi, fa) by ensuring the preservation of these laws during the generation process: Tt delineates similarity between data points x, x' in terms of their latent representations u, u' that correspond to the pull-back through the causal laws as encoded by the reduced form, i.e., u = F (x) and u' = = (x)). This way, the laws are guaranteed to be retained in the generated counter fal, independent of the used backtracking conditional. This contrasts counterfactual explanations methods (4), which do not model the true causal mechanisms explicilly and thus may violate causal relationships (see Fig. (b) and Fig. 6).
2. Versatility. DocpBC naturally supports dealing with complex causal relationships between multiple variables that are potentially high dimensional (e.g., images or scalar attributes). This goes beyond the instance-label setup (4) presented in $ 2.4, and thus naturally supports flexible choices of antecedent variables (Fig. 12 (a)). This contrasts counterfactual explanation methods that are typically limited to antecedents with respect to one single output of a predictive model. DeepBC further allows for sampling (S 3.1.1) and varying the distance functions de in (7) to obtain counterfactuals with different properties, such as noise preservation (Fig. 11 in App. D.1) or sparsity (Fig. 6).
3. Modularity. The structural equations or mechanisms f2. fu) encoding the causal relations between variables may change across different domains, for example, as the result of interventions or environmental changes. It has been postulated that such changes tend to manifest sparsely, meaning that only few of the modules fi change at time, while the others remain fixed (Schölkopf et al., 2021; Perry et al., 2022). By explicitly modeling the individual structural equations (as deep generative components), DecpBC exhibits a natural modularity. As a result, adapting to new domains only requires adjusting those components which undergo a domain shift while all other modules can be re-used. This contrasts with counterfactual explanation methods (4), which do not incorporate such replaceable modules and thus require relearning the entire model to handle domain shifts.
4 Experiments
In our experiments, we contrast DeepBC with existing ideas and showcase the propertics and abilitics outlined in Section $ 3.5. As showing a single example per counterfactual is more illust than sampling multiple examples, we mainly focus on mode DeepBC (8 1.1.2,5 $ 3.3.2) and refer to this variant when using the term DC from this point on. When referring to stochastic DeepBC, we always explicitly write stochastic DeepBC. Technical details about the implementation are provided in App. B.
4.1 Morpho-MNIST
Experimental Setup. We use MorDH--MNIST, a modified version of MNIST proposed by Castro et al. (2019), to showcase how deep backtracking contrasts with its interventional counterpart (Pawlowski et al., 2020) and how the generated results depend on the correct causal graph (S 2.1). The data set consists of three variables, two continuous scalars and an MNIST image of a handwritten digit, which all correspond to the observable variables (see 2.1), depicted in Fig. 1. The first scalar variable T describes the thickness and the second variable I describes the intensity of the digit. They have non-linear relationship and are positively correlated, as can be seen in Fig. 4 (a) (ii), where the obsorvational density of thickness and intensity is shown in blue. The known causal relationship between thickness and intensity is depicted in Fig. 4 (top left); the true structural equations are listed in App. C. We train a normalizing flow for thickness and one for intensity conditionally on thickness, and model the image given T and I via a conditional 3- V-V (Higgins et al., 2017). We here use (u/,, 4)) = w, l|ug - -ull with w, 1, Vi as the default distance function and note that the i, correspond to ur, ur and Wimg-
10

---

Published in Transactions on Machine Learning Research (07 (07/2024)
a
(i)
antecedent intensity
iii
antecodent intensity
(iii)
antecedent thickness
2
(thickness)
(thicknoss)
2
UT 0
22
-2
2
-3
2
(intensity)
(intensity)
latent
observable
antecedent thickness
antecedent thickness
antecedent thickness
(thickness)
(thickness)
(thickness)
0
2
-3
i (intensity)
i (intensity)
(intensity)
sparse DeepBC
3 (ul )r) (uly - u2)
(ul ) + 10 (u) - =2)
observable
DeepBC
interventional counterfactual
factual realization
DeepBC w. wrong graph
Figure Counterfactual Scalar Variables on MorphOMNIST. The blue shaded areas indicate the probability density of the data. (a) (i) Given factual realization (red dot), varying the values of the antecedent i' changes both of and the reat variable un- Since interventional counterfactuals do not perturb the latents, only the backtracking solution (grey dots) is shown. (ii) Interventional counterfactu- als (green dots), in contrast to backtracking counterfactuals, leave t" unchanged when the effect variable intensity taken as antecendent. (iii) When treating thickness as the antecedent, counterfactual and (b) For the correct graph, DeepBC counterfactuals for antecedent thickness do not change as the backtracking conditional (corresponding distance function shown under each subplot) is changed. When we performing DeepBC with the wrong graph compliance as described in $ 2.3 is violated.
backtracking counterfactuals yield identical solutions.
T), causal
Results. Our results in Fig. (a) and Fig. 5 illustrate distinctive properties of the backtracking approach, in comparison to interventional counterfactuals. When choosing the effect variable intensity the an- tecedent, backtracking preserves the causal laws and thus changes the upstream (cause) variable thickness accordingly lo match the change in intensity as shown in Fig. (ii) and Fig. 5. This leads to counterfaclu- als that resemble images from the original data set, where thickness and intensity change simultaneously, as shown in the top row of Fig. 5. DeepBC arrives at these uounterfactuals, since it + i can cither be achieved by choosing different ut # uy or by changing the upstream latent wi * ur (because i' also depends on the realization t", which, in turn, depends on w As minimize the sum of squared latent perturbations
11

---

In contrast, the interventional approach breaks the causal link from thickness to intensity when intensity is the antecedent and thus always leaves thickness unchanged, see the green dots in Fig. (ii). This results in counterfactual images with high-intensity but atypically low thickness, high thicknoss, as shown in the second row of Fig. 5. In terms of generating counterfactuals that yield Published in Transactions on Machine Learning Research (07/2024)
antecedent intensity i*
-2.0
-15
0.0
1.5
2.0
interv. DeepBC
2 2 2
22222
Figure 5: Counterfactual Morpho-MNIST Images: Backtracking vs. Interventional. DeepBC (top row) changes intensity alongside thickness, since their causal relation is preserved. Interventional counterfactuals (bottom row), on the contrary, solely change the intensity value, resulting in images that violate the causal laws and can be considered out-of-distribution w.r.t. the original data set.
dr(ur, u7) + + (us, DeepBC tends to change both latent variables from their factual realizations, as can be seen in Fig. 4 (1).
low intensity but typically
faithful insights into the causal relationships underlying the data, this can be considered a weakness of the interventional approach.
However, interventional and backtracking counterfactuals can also be identical, as shown in Fig. 4 (iii). where the thickness variable T used as antecedent. If the antecedent is a root node of the causal graph G, as is the case for T, the change in t* # cannot be traced back to any latent variable other than ur, which is why both u7 ur and "ing- VIng: analogously to interventional counterfactuals. The change in the value i* as function of t* then solely corresponds to the causal effect of t*, for both counterfactuals (Fig. 4 (iii)).
DeepBC depends on the reduced form that is learned from data (1), which in turn depends on the causal graph that is assumed ($ 2.).. In Fig. 4, counterfactuals for the true graph are compared to those from a model that was trained in the same way, with the only difference that the arrow from thickness was reversed. For the correct causal graph (T- + I), we observe that the counterfactuals for antecedent thickness must be invariant with respect to the choice of backtracking conditional (corresponding distance functions are shown below each subplot). This is because intensity is downstream of thickness and so (as mentioned in the previous paragraph and described in 2.3) it must hold that ui ur, for any choice of backtracking conditional. However, when using the wrong causal graph (I + T), we see that the solutions are different and causally incompliant (in the sense of $ 2.3). This is because U, is causally upstream of T' in the wrong graph and thus u; contributes to the realization of the antecedent t", in ways that depend on the choice of the backtracking conditional.
As presented in Scction $ 3, DeepBC further supports sampling via stochastic DeepBC (S 3.1.1, $ 3.3.1), which is demonstrated in Fig. 10. We also present additional experimental results for antecedent intensily using mode DeepBC in Fig. 11, using different distance functions and weightings ($ 3.4).
4.2 CelebA
Experimental Setup. We also investigate generating counterfactual celebrity images the CelebA data set (Liu et al., 2015). The images have a resolution of 128 x 128 and are annotated with binary attributes {Age, Gender, Beard, Bald]. Both the image and the attributes correspond to the observable variables. We adopt the causal graph assumed by Yang et al. (2021b), which is shown in Fig. (top right). We focus on generating counterfactuals that manipulate the considered variables sparsely. Since our optimization algorithms assume differentiability of in u (S 3.3), we preprocess the data use the standardized logits of classifiers that trained to predict each attribute from the image (5 3.4). Analogously to $ 4.1, we
12

---

Published in Transactions on Machine Learning Research (07 (07/2024)
counterfactual methods that render sparse changes
full causal graph
What would have been, had this person had beard?"
Age
Geader
factual
sparse DeepBC
tabular explanation
interventional
Age
Ganker
Age
Ago
Gander
Age
Gunder
Beaze
Bald
Beard
Bald
Benrd
Bald
Beard
Bold
Buld
Imsag
legend
violated relationship
value differs from factual
Figure DeepBC for CelebA. DeepBC preserves causal relationships, in contrast to other methods: Both sparse DeepBC and the endogenous sparsity method alter gender to add a beard to the elderly woman of the factual realization, while keeping age unchanged. Only sparse DoepBC respocts the causal down- stream: baldness increases as gender changes, In contrast, the method measuring sparsity in x leaves the variable bald unchanged, thereby ignoring the causal relationship by which age and gender affect baldness for typical example.
then train conditional normalizing flow for each attribute given its parents in the causal graph, and use conditional 3-VAE for the image given all four attributes.
Baselines & Ablations. In addition to comparing DeepBC with the interventional approach, also consider the following baselines and ablations in generating sparse counterfactuals:
1) Tabular non-causal explanation: Prior work the field of counterfactual explanations have measured distance directly in terms of (4), typically for tabular data such as the low-dimensional attributes of the CelebA data set (c.g., Mothilal et al., 2020; Lang al., 2023). In the style of these (non-causal) methods (see (4)), we train new regressor that predicts an altribute from all other altributes (not including the image). We do so for each attribute separately. We then employ sparse DeepBC ($ 3.4) on this regressor, but mcasure distance directly in the attributes of instead of mcasuring distance in u. In order to generate a counterfactual image in Fig. 6, we use the conditional variational auto-encoder that was trained for DeepBC and condition the auto-encoder on the counterfactual attribute values, while keeping the realizations uimg from the factual example, i.e., "ing WImg
2) Wrong causal graph: We assess how choosing a different causal graph (see Fig. 12 (d) in App. D.2) changes the result of the counterfactual. This baseline assesses the impact of model misspecification on the result.
We note that deep counterfactual explanation methods (10) are not applicable for rendering sparse changes, because they cannot identify the underlying attribute variables that the counterfactuals should be sparse in.
Results. DecpBC preserves all causal relationships, in contrast to other methods: Fig. 6 shows sparse DeepBC (sparsity threshhold M 2, see 3.4) and other approaches that are able to generate counterfac- tuals that render sparse changes with respect to the considered attributes. As can seen from the causal graph, the elderly woman from the factual image could develop a beard by changing gender and age. Both the sparse tabular explanation method and sparse DeepBC choose only gender (it much more dependent beard than age), leaving the value of age fixed. For sparse DeepBC, despite the latent variable uBald
13

---

Published in Transactions on Machine Learning Research (07 (07/2024)
Beard
Beard
What would have been, had this person had a beard, a different domain ?"
Age
Gender
factual
DeepBC
Beard
Bald
Image
Figure 7: Modularity of DeepBC. DeepBC allows for exchanging causal mechanisms, hence allowing for out-of-distribution counterfactuals. In this example, the learned mechanism by which gender and age affect beard (JBeard) exchanged for manually constructed one where being female is highly associated with having a beard (fBeard).
"What would have been, had this person been male?" ?
factual
stochastic DeepBC samples
Figure 8: Stochastic DeepBC for CelebA. Five counterfactual image samples, generated using stochas- tic DeepBC ($ 3.1.1, 3.3.1). It can be seen that the approach facilitates the generation of diverse set of counterfactuals that fulfill the antecedent condition reliably and resemble the factual image.
not being updated, the realization of bald æBald is automatically modified a downstream effect as encoded by the SCM (being old and male often leads to baldness). This lics in contrast to mcasuring sparsity in terms of directly, without the causal model, where this causal relationship is not taken into account. As result, the factual value of bald is kept unchanged for the tabular explanation method (baseline 1).
DeepBC is inherently modular, as demonstrated in Fig. 7.5 In this figure, the mechanism by which age and gender affect beard is manually replaced by a different one. The resulting counterfactual can be interpreted as am out-of- distribbttnnn counterfactual, because this replaced mechanism does not correspond the one that was learned from the in-distribution data.
In App. 1, we further demonstrate the property of DeepBC to take into account antecedents that consist of more than single variable. We also demonstrate quantitative experiments and their results in App. D.2.2.
5 Related Work
This section is organized into two lines of prior work. The first line encompasses methods that incorporate causality into the field of counterfactual explanations. However, we note that the general field of coun- terfactual explanations has made many significant advances that are not directly related to causality. For comprehensive overviews over these developments, we refer for example Guidotti (2022) and Verma al.
5rhhi with coutteraactual explanation methods specifically.
14

---

Published in Transactions on Machine Learning Research (07/2024)
(2020). The second line discusses how deep neural networks have been used within the context of SCMs, to facilitate counterfactual computation.
Causality in Counterfactual Explanations. A prominent line of work raises the importance of cansal- ity to ensure actionability of counterfactual explanations in a sense that an alternative outcome could have been achieved by performing alternative actions or interventions, without violating the remaining causal relationships (Karimi et al., 2020; 2021). These works fundamentally differ from ours in that the considered interventions actively break some of the causal relationships, which lies in stark contrast to the backtracking approach (sce Fig. 2). The latter seeks to trace back counterfactuals to changes in latent variables rather than changes in causal relationships. However, this line of research is related to ours in that it argues for respecting the causal structure and mechanisms in generating counterfactuals.
The most similar cxisting work to ours is that of Mahajan et al. (2019). Similarly to the present work, the authors also employ deep generative models and measure the distance bet ween factual and counterfactual examples in a latent space. The most distinctive difference to our work is that Mahajan et al. (2019) impose causal constraints via a causal prozimity loss in the observable variables x that assumes additive Gaussian noise, thereby restricting the types of causal mechanisms f. under consideration. The causal prorimity loss approach is at odds with the backtracking philosophy (Lewis, 1979) that we follow. In our approach, all changes are traced back solely to latent variables u that are embedded into the deep causal model, such that all causal constraints are satisfied automatically by construction ($ 3.5). This obviates the need for an additional loss and straightforwardlyy allows for general noise dependencies (see App. C). At the same time, our approach is more versatile as any subsct of the given variables could be used as antecedent, whercas the method of Mahajan et al. (2019) only supports a specific label variable (see (4)), similar to the vast majority of counterfactual explanation methods.
Counterfactuals in Deep Structural Causal Models. The integration of deep generative components such as normalizing flows and variational auto-encoders into SCMs can be traced back at least to the works of Kocaoglu et al. (2018); Goudet et al. (2018); Pawlowski et al. (2020) and others. Subsequently, this approach has been adopted in various works for computing counterfactuals in applications such as natural language processing (Hu & Li, 2021) and bias reduction (Dash et al., 2022). Other recent works have ex- plored the use of graph neural networks (Sanchez-Martin et al., 2022), normalizing flows (Khemakhem al., 2021; Javaloy et al., 2023) and diffusion probabilistic models (Sanchez & Tsaftaris, 2022) to construct SCMs.
In the present work, we employ variational auto-encoders and normalizing flows to construct deep SCMs (as outlined in $ 2.2). Nevertheless, we regard the design choices within our implementation as orthogonal to various choices of architecture. Specifically, we believe that our approach is applicable to any deep SCM architecture that yields a reduced form which is both (approximately) invertible and differentiable. We believe that this is true because no further assumptions are imposed.
6 Discussion & Limitations
Identifiability of the Reduced Form. In general, neither the structural equations nor the reduced form (see $ 2.1) are identifiable from observational data (Hyvärinen et al., 2024; Karimi et al., 2020; Locatello et al., 2019). However, under certain conditions, it has been shown that the structural equations (and therefore the reduced form) can be identified, up simple transformations (Javaloy et al., 2023; Nasr- Esfahany et al., 2023). If the causal graph and/or underlying variables are not known either (i.e., we only have access to the high-dimensional images), the problem becomes even worse because both the graph and underlying attributes (c.g., the variables beard, gender, etc. in & 4.2) can also not be identified, in general. Recent works have established numerous conditions under which identifiability of variables and/or graph holds up to certain indeterminancies (e.g., Lachapelle et al., 2022; Buchholz et al., 2023; Lippe et al., 2023; Liang et al., 2023; von Kügelgen et al., 2023a). We view solutions and results to identifying the causal graph and/or or the reduced form as complementary our proposed method and note that the learned mechanisms of DeepBC generally only correspond to approximations of the true mechanisms.
15

---

Published in Transactions on Machine Learning Research (07 (07/2024)
Non-Invertible Generative Models. A potential avenue for future research could be to explore how backtracking could be implemented for generative models whose latent variables cannot be inferred deter- ministically from the factual realization, such as diffusion probabilistic models (Sohl-Dickstein et al., 2015; Ho et al., 2020) and generative adversarial networks (Goodfellow et al., 2014), both of which are not invert- ible general (although approxinately invertible variants like DDIMs (Song et al., 2021) do exist). One conceivable solution might be to adapt (6)/(8) as to jointly sample/optimize over and u' or to employ variational inference techniques.
Model Misspecification. The dimensionality of the latent variables for variational autoencoders plays role in the generated counterfactuals." Typically, one assumes this dimensionality to be lower than the dimensionality of the data, motivated by the assumption that the data lives on low-dimensional manifold (Reizinger et al., 2022; Bonheme & Grzes, 2022; Pope et al., 2021). Another source of model misspecification that may render DeepBC counterfactuals incorrect stems from the non-invertibilitty of the true underlying mechanisms, While this invertibility is a fairly common assumption in the literature (e.g., Pawlowski et al. (2020); Javaloy et al. (2023); Nast-Esfahany et al. (2023); Hoyer et al. (2008)), it does not hold in general" and can also not be ruled out from data alone. A remedy for this restriction may be to extend our method to non-invertible generative models, as outlined above.
Limitations of Non- Causal Counterfactual Methods. The explicit access to the reduced form of a causal model (or at least a good approximation thereof) allows for obtaining causally compliant solutions for varying choices of distance function ($ 3.5, 4). We note, however, that many non-causal counterfactual methods exist (corresponding different variants of (4)) that do not rely on knowledge of underlying causal variables and their causal relationships (sce e.g., Guidotti (2022)). Based on theoretical results in indepen- dent component analysis (Hyvärinen & Pajunen, 1999), suspect that for certain types of backtracking conditional (c.g., rotationally invariant ones) alongside further assumptions on the generative process (c.g.. Timg is a conformal map of all latents u) and dimensionality of u, deep counter factual explanations (10) on Ting may be able to perform causally compliant backtracking implicitly. In the general setting, however, our empirical results ($ 4) show that this is not the case. This can be made concrete on the Morpho-MNIST example ($ 4.1): Neither the underlying variables intensity and thickness, nor their causal relationship can (in general) be implicitly identified (as discussed in the first paragraph of this section), for example by using a deep counterfactual explanation method applied to the image representation (10). In fact, the experiments in Fig. 4 (b) clcarly show that backtracking counterfactuals depend on the true causal graph between thickness and intensity.
7 Conclusion
In this work, we presented DeepBC,, a practical framework for computing backtracking counterfactuals for deep SCMs. We compared DeepBC to interventional counterfactuals and the main formulations employed in the field of counterfactual explanations. We found that, compared to prior work in counterfactual explana- tions, DeepBC is: compliant with respect to the given causal model; versatile in that it supports unrestricted, complex causal relationships; and modular in that it enables generalization to out-of-distribution set tings.ss. In fact, DeepBC can be seen as a general method for computing counterfactuals that measures distances between factual and counterfactual the structured latent space of an underlying deep causal model. We empirically demonstrated the merits of our approach in comparison to prior work, where we highlight the importance of (aking causal renstionships into account. We hope that our approach will contribute to future developments of deep explanation methods that provide more faithful insights into the data generating process.
For normalizing flows, contrast variational autocncoders, the latent space must have the dimeusionality as the observed space.
? A simple example is the assignment. X + 02.
16

---

Published in Transactions on Machine Learning Research (07/2024)
Reproducibility Statement
Our source code is available at wttggg/tw.coommtoooilllliia//a// ducing all experiments are provided in the README md file at the top level of the repository. All parameters can be found the config folders within the respective subfolders. In addition, we provide a detailed description of the optimization parameters in App. B.1, training procedures in App. B.3.1 and model archi- tectures in App. B.3.2.
Detailed instructions for repro-
Acknowledgements
The authors are grateful for valuable discussions with Valentyn Boreiko, Partha Ghosh, and Luigi Gresele. The authors acknowledge the support provided by the German Research Foundation. The authors thank the International Max Planck Research School for Intelligent Systems (IMPRS-IS) for supporting Klaus-Rudol. Kladny.
References
Ossama Ahmed, Frederik Träuble, Anirudh Goyal, Alexander Neitz, Yoshua Bengio, Bernhard Schölkopf, Manuel Wüthrich, and Stefan Bauer. CausalWorld: A Robotic Manipulation Benchmark for Causal Structure and Transfer Learning. International Conference on Learning Representations, 2021. 2
Elias Bareinboim, Juan D. Correa, Duligur lbeling, and Thomas Ieard. On Pearl's Hierarchy and the Foundations of Causal Inference. Probabilistic and Causal Inference: The Works of Judea Pearl, pp. 507- 556, 2022.
Sander Beckers. Causal Explanations and XAI. Conference on Causal Learning and Reasoning, 140:90 109, 2022. 2
Lisa Bonheme and Marek Grzes. FONDUE: an algorithm to find the optimal dimensionality of the latent representation of variational autoencoders. arXiv preprinl arXiv:2209. 12806, 2022. 16
Valentyn Boreiko, Maximilian Augustin, Francesco Croce, Philipp Berens, and Matthias Hein. Sparse Visual
Counterfactual Explanations in Image Space. German Conference on Pattern Recognition, 13485:133-14 2022. 2
Simon Buchholz, Goutham Rajendran, Elan Rosenfeld, Bryon Aragam, Bernhard Schölkopf, and Pradoop Ravikunar. Learning Linear Causal Representations from Interventions under General Nonlinear Mixing. Advances in Neural Information Processing Systems, 11445119455466 2023. 15
Lucius EJ Bynum, Joshua R Loftus, and Julia Stoyanovich. A New Paradigm for Counterfactual Reasoning in Fairnoss and Recourse. arXiv preprint arXiv:2401.13988 2024. 2
Daniel C. Castro, Jeremy Tan, Bernhard Kainz, Ender Konukoglu, and Ben Glocker. Morpho-MNIST. MNIST: Quantitative Assessment and Diagnostics for Represcntation Learning. Journal of Machine Learning Research, 20:1 20:1-29, 2019. 10
Riccardo Crupi, Alessandro Castelnovo, Daniele Regoli, and Beatriz San Miguel Gonzalez. Counterfactual explanations as interventions in latent space. Data Mining and Knowledge Discovery, pp. 1-37, 2022. 2
Saloni Dash, Vineeth N. Balasubramaniaa, and Amit Sharma. Evaluating and Mitigating Bias in Image Classifiers: A Causal Perspeetive Using Counterfactuals. Winter Conference Applications of Computer Vision, pp. 915-924, 2022. 15
Conor Durkan, Artur Bekasov, lain Murray, and George Papamakarios. Neural Spline Plows. Advances in Newral Information Processing Systems, 0177599-52110 2019. 26
Falcon, William and The PyTorch Lightning team. PyTorch Lightning, 2019. 24
17

---

Published in Transactions on Machine Learning Research (07/2024)
Tobias Gerstenberg, Christos Bechlivanidis, and David A. Lagnado. Back track: Backtracking in coun- terfactual reasoning. Annaul Meeting of the Cognétive Science Sociely, 35:2386-2399 2013.
Partha Ghosh, Mehdi S. M. Sajjadi, Antonio Vergari, Michael Black, and Bernhard Schölkopf. From Varia- tional to Deterministic Autocncoders. International Conference on Learning Representations, 2020. 27
lan Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative Adversarial Nets. Advances Neural Information Processing Systems, 27:53 65, 2014. 16
Olivier Goudet, Diviyan Kalainathan, Philippe Caillou, Isabelle Guyon, David Lopez-Paz, and Michele Se- bag. Learning Functional Causal Models with Generative Neural Networks. Explainable and Interpretable Models in Compuler Vision and Machine Learning, pp. 39 80, 2018. 1, 15
Yash Goyal, Ziyan Wu, Jan Ernst, Dhruv Batra, Devi Parikh, and Stefan Lee. Counterfactual Visual Explanations. International Conference on Machine Learning, 97:2376 2384, 2019. 2
Riccardo Guidotti. Counterfactual explanations and how to find them: literature review and benchmarking. Dula Mining and Knowledge Discovery, 6:1 55, 2022. 14, 16
Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mo- hamed, and Alexander Lerchner. 8-VAF: Learning Basic Visual Concepts with Constrained Variational Framework. International Conference on Learning Representations, 2017. 10, 26
Jonathan Ho, Ajay Jain, and Picter Abbecl. Denoising Diffusion Probabilistic Models. Advances in Neural
Information Processing Systems, 33:6840 6851, 2020. 16
Patrik O. Hoyer, Dominik Janzing, Joris Mooij, Jonas Peters, and Bernhard Schölkopf. Nonlinear causal discovery with additive noise models. Advances in Neural Information Processing Systems, 21:689 -666, 2008. 16
Zhiting Hu and Li Erran Li. A Causal Lens for Controllable Text Generation. Advances in Neural Information Processing Systems, 34:24941 2224941-44955, 2021. 15
Aapo Hyvärinen and Petteri Pajunen. Nonlinear independent component analysis: Existence and uniqueness results. Newral Networks, 12:429 439, 1999. 16
Aapo Hyvärinen, llyes Khemakhem, and Ricardo Monti. Identifiability of latent-variable and structural- equation models: from linear to nonlinear. Arnals of the Instilule of Statistical Mathemalics, 76:1 33, 2024. 15
Paul Jacob, Éloi Zablocki, Hedi Ben-Younes, Mickaäl Chen, Patrick Pérez, and Matthieu Cord. STEEX: Steering Counterfactual Explanations with Semantics. European Conference on Computer Vision, pp. 387-403, 2022. 29
Eric Jang, Shixiang Gu, and Ben Poole. Categorical Reparameterization with Gumbel-Softmax. International Conference on Learning Representations, 2017.
Adrián Javaloy, Pablo Sánchez-Martín, and Isabel Valera. Causal normalizing flows: from theory to practice. Advances in Neural Information Processing Systems, 36:58833 58864, 2023. 1, 15, 16
Amir-Hosscin Karimi, Julius von Kügelgen, Bernhard Schölkopf, and Isabel Valera. Algorithmic recourse under imperfect causal knowledge: a probabilistic approach. Advances in Neural Information Processing Systems, 33:265-277, 2020. 15
Amir-Hosscin Karimi, Bernhard Schölkopf, and Isabel Valera. Algorithmic Recourse: from Counterfactual Explanations to Interventions. ACM Conference on Fairness, Accountability, and Transparency, pp. 353- 362, 2021. 15
18

---

Published in Transactions on Machine Learning Research (07/2024)
Amir-Hosseen Karimi, Gilles Barthe, Bernhard Schölkopf, and Isabel Valera. A Survey of Algorithmic Recourse: Contrastive Explanations and Consequential Recommendations. ACM Compuling Surveys, 55: 1 29, 2022. 29
Nyes Khemakhem, Ricardo Monti, Robert Leech, and Aapo Hyvärinen. Causal Autoregressive Flows. Inter-
national Conference on Artificial Intelligence and Statistics, 130:3520 3528, 2021. 1, 15
Justin Khoo. Backtracking Counterfactuals Revisited. Mind, 126:841-911 910, 2017. 2
Diederik P. Kingma and Max Welling. Auto-Encoding Variational Bayes. International Conference
Learning Representations, 2014. 4
Murat Kocaoglu, Christopher Snyder, Alexandros G. Dimakis, and Sriram Vishwanath. CausalGAN; Learn- ing Causal Implicit Generative Models with Adversarial Training. International Conference on Learning Representations, 2018. 1, 15
Sébastien Lachapelle, Pan Rodriguez, Yash Sharma, Katie E Everett, Rémi Le Priol, Alexandre Lacoste, and Simon Lacoste-Julien. Disentanglement via mechanism sparsity regularization: new principle for nonlincar ICA. Conference on Causal Learning and Reasoning, 140:428-484, 2022. 15
Jana Lang, Martin Giese, Winfried Blg, and Sebastian Olte. Generaling Sparse Counterfactual Explanations for Multivariate Time Series. Artificial Neurol Networks and Machine Learning, 14259:180-1999 2023. 13
David Lewis. Counterfactual Dependence and Time's Arrow. Noñs, 4:455-476, 1979. 2, 15
Wendong Liang, Armin Kekić, Julius von Kügelgen, Simon Buchholz, Michel Besserve, Luigi Gresele, and Bernhard Schölkopf. Causal Component Analysis. Advances in Neural Information Processing Systems, 36:32481 06:32481-32520, 2023. 15
Phillip Lippe, Sara Magliacane, Sindy Löwe, Yuki M Asano, Taco Cohen, and Efstratios Gavves. BISCUIT: Causal Representation Learning from Binary Interactions. Conference on Uncertainty in Artificial Intel- ligence, 216:1263-1277 2023. 15
Ziwei Liu, Ping Luo, Xisogang Wang, and Xiaoou Tang. Deep Learning Face Attributes in the Wild. International Conference on Computer Vision, pp. 7730-3738, 2015. 12
Francesco Locatello, Stefan Bauer, Mario Lucic, Gunnar Rätsch, Sylvain Gelly, Bernhard Schölkopf, and Olivier Bachem. Challenging Common Assumptions the Unsupervised Learning of Discntangled Rep- resentations. International Conference on Machine Learning, 97:4114 4124, 2019. 15
Christopher G. Lucas and Charles Kemp. An Improved Probabilistic Account of Counterfactual Reasoning. Psychological Review, 122:700, 2015.
Divyat Mahajan, Chenhao Tan, and Amit Sharma. Preserving Causal Constraints Counterfactual Expla- nations for Machine Learning Classifiers. arXiv preprinl urXiv:1912.03277, 2019. 15
Jorge Moré. The Eevenber--Marquart algorithm: implementation and theory. Numerical Analysis:
Proceedings of the Biennial Conference, 630:105-116, 2006. 9
Ramaravind Mothilal, Amit Sharma, and Chenhao Tan. Explaining Machine Learning Classificrs through Diverse Counterfactual Explanations. ACM Conference on Fairness, Accounlabilily, and Trunsparency, pp. 607 617, 2020. 9, 13
Arash Nast-Esfahany, Mohammad Alizadch, and Devavrat Shah. Counterfactual Identifiability of Bijective Causal Models. International Conference on Machine Learning, 202:25733 -55474,3-27744 2023. 3, 15, 16
Giorgio Parisi. Correlation Functions and Computer Simulations. Nuclear Physics 180:378 384, 1981. 2,
19

---

Published in Transactions on Machine Learning Research (07/2024)
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Deep Learning Library. Advances
Soumith Chintala. PyTorch: An Imperative Style, Neural Information Processing Systems, 32:8024 8035, 2019. 24
Nick Pawlowski, Daniel Coelho de Castro, and Ben Glocker. Deep Structural Causal Models for Tractable Counterfactual Inference. Advances in Newral Information Processing Systems, 33:857-800 869, 2020. 1, 2, 4, 10, 15, 16, 27
Judea Pearl. Causality. Cambridge University Press, 2009.
Ronan Perry, Julius von Kügelgen, and Bernhard Schölkopf. Causal Discovery in Heterogeneous Environ- ments Under the Sparse Mcchanism Shift Hypothesis. Advances Neural Information Processing Systems, 35:10904 10917, 2022. 10
Phillip Pope, Chen Zhu, Ahmed Abdelkader, Micah Goldblum, and Tom Goldstein. The Intrinsic Dimension Images and its Impact on Learning. International Conference on Learning Representations, 2021. 16
Patrik Reizinger, Luigi Gresele, Jack Brady, Julius von Küggelgen, Dominik Zietlow, Bernhard Schölkopf, Georg Martius, Wieland Brendel, and Michel Besserve. Embrace the Gap: VAFs Perform Independent Mechanism Analysis. Advances in Neural Information Processing Systems, 35:12040 12057, 2022. 4, 16
Danilo Rezende and Shakir Mohamed. Variational Inference with Normalizing Flows. International Confer- ence Machine Learning, 37:1530-1538, 2015. 4
Lance J. Rips. Two Causal Theories of Counterfactual Conditionals. Cogmitive Science, 34:175 221, 2010. 1
Pau Rodríguez, Massimo Caccia, Alexandre Lacoste, Lee Zamparo, Issam Laradji, Laurent Charlin, and David Vazquez. Beyond Trivial Counterfactual Explanations with Diverse Valuable Explanations. Inter- national Conference on Compuler Vision, pp.
2021. 29
Neal J. Roese. Counterfactual Thinking. Psychological Bulletin, 121:133-144 148, 1997.
Pedro Sanchez and Sotirios A. Tsaftaris. Diffusion Causal Models for Counterfactual Estimation. Conference on Causal Learningg and Reasoning, 140:1 21, 2022. 1, 15
Pablo Sanchez-Martin, Miriam Rateike, and Isabel Valera. VACA: Design of Variational Graph Autoencoders
for Interventional and Counterfactual Queries. AAAI Conference on Artificial Intelligence, 2022. 15
Timothy Sauer. Computational Solution of Stochastic Differential Equations. Wiley Interdisciplinary Re- views: Computational Statistics, 5:362-371, 2013. 8
Bernhard Schölkopf, Francesco Locatello, Stefan Bauer, Nan Rosemary Ke, Nal Kalchbrenner, Anirudh Goyal, and Yoshua Bengio. Toward Causal Representation Learning. IEEE, 109:612 634, 2021. 10
Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep Unsupervised Learning using Nonequilibrium Thermodynamics. International Conference on Machine Learning, 37:2256-223 2265, 2015.
Kihyuk Sohn, Honglak Lee, and Xinchen Yan. Learning Structured Output Representation using Deep Conditional Generative Models. Advances in Neural Information Processing Systems, 28:3483-348 34911, 2015.
Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising Diffusion Implicit Models. International Conference on Learning Representations, 2021. 16
Peter Spirtes. Introduction to Causal Inference. Journal of Machine Learning Research, 11:1643 -6622 2010.
3
20

---

Published in Transactions on Machine Learning Research (07/2024)
Vincent Stimper, David Liu, Andrew Campbell, Vincent Berenz, Lukas Ryll, Bernhard Schölkopf, and José Miguel Hernández-Lobato. normflows: A PyTorch Package for Normalizing Flows. Journal of Open Source Software, 8:5361, 2023. 24
Cathie Sudlow, John Gallacher, Naomi Allen, Valerie Beral, Paul Burton, John Danesh, Paul Downey, Paul Elliott, Jane Green, Martin Landray, et al. UK Biobank: An Open Access Resource for Identifying the Causes of Wide Range of Complex Diseases of Middle and Old Age. PLoS medicine, 12:e1001779, 2015. 2
Will Taylor- Mclanson, Zahra Sadeghi, and Stan Matwin. Causal Generative Explainers using Counterfactual Inference: A Case Study the Morpho-MNIST Dataset. aix preprint orXi:22/01111394 2024. 1
Sahil Verma, Varich Boonsanong, Minh Hoang, Keegan E Hines, John Dickerson, and Chirag Shah. Counterfactual Explanations and Algorithmic Recourses for Machine Learning: Review. arXiv preprint arXiv:2010. 10596, 2020. 14
Julius von Kügelgen, Michel Besserve, Liang Wendong, Luigi Gresele, Armin Kekić, Elias Bareinboim, David M Blei, and Bernhard Schölkopf. Nomparametric Identifabiliity of Causal Representations from Unknown Interventions. Advances in Neural Information Processing Systems, 36:60468-6088 60513, 2023a. 15
Julius von Kügelgen, Abdirisak Mohamed, and Sander Beckers. Backtracking Counterfactuals Conference on Causal Learning and Reasoning, 213:177-196, 2023b. 2, 4,
Sandra Wachter, Brent Mittelstadt, and Chris Russell. Counterfactual Explanations without Opening the Black Box: Automated Decisions and the GDPR. Harvard Journal of Law 8 Technology, 31:841-887, 2017. 2, 3, 5, 7, 30
Christina Winkler, Daniel Worrall, Emiel Hoogeboom, and Max Welling. Learning Likelihoods with Condi- tional Normalizing Flows. arXiv preprint arXiv:1912.0004: 2019.
Karren Dai Yang, Anastasiya Belyaeva, Saradha Venkatachalapatthy; Karthik Damodaran, Abigail Katcoff, Adityanarayanan Radhakrishhan, G. V. Shivashankar, and Caroline Uhler. Multi-domain translation between single-cell imaging and sequencing data using autoencoders. Nature Communications,, 12:31,
2021a. 2
Mengyue Yang, Furui Liu, Zhitang Chen, Xinwei Shen, Jianye Hao, and Jun Wang. CausalVAE: Struc- tured Causal Disentanglement in Variational Autoencoder. Conference on Computer Vision and Pattern Recogrition, pp. 9593 9602, 2021b. 12, 29
21

---

Published in Transactions on Machine Learning Research (07 (07/2024)
A Formalisms & Derivations
A.1 Formal Definition of Interventional and Backtracking Counterfactuals
Both kinds of counterfactuals can be computed in a thrre-stepp-rooeedure.
Interventional Counterfactuals
1. Abduction: Compute the distribution of U x, given the factual realization x of X.
2. Action: Obtain an altered collection of structural assignments (fi, f2, {1) by setting æi + x fi
for all e S. Leave all other structural assignments unmodified, i.e., fj = fj. for all j $ S.
3. Prediction: Compute distribution over Xi as the pushforward of the distribution of U F F
Backtracking Counterfactuals
1. Cross- WorssWWollddoo Abduction:
Use the antecodent x and the factual realization x obtain p(u', u x), using the backtracking conditional n8 (u'') u) and latent prior density p(u):
puu' u x) p(u', x., x) x)
( u) p(u) &x (F(U)) (Fs(u') T ū) p(u) 6x (F( (Fs(ū') du
where (x) refers to the dirac delta at and p (.1 corresponds to the backtracking conditional ($ 2.3).
2. Marginalization: Marginalize over U to obtain the density p(u' x),x) of the counterfactual posterior:
puu' x) = / p(u', u x x) du.
3. Prediction: Compute a distribution over Xn by marginalizing over the counterfactual latents U
x5 x) = f plu' xxxx du'.
p(x'
A.2 Formal Derivation of DeepBC
We derive (7) and (5) from the three-step-rroceeuuee of backtracking counterfactuals (see App. A.1) follows:
1. Cross-World Abduction: By the deterministic relationship between latents and observables, we see
that
p(u', u x) p(u' u, u, x) p(u x², p(u' x,x)) p(u x)
p(u' [1,'5) 8F (xx (u).
2. Marginalization: All the probability is located at F- (x), which is why marginalization reduces to
p(u') x) = p(u') (x). x p(u', x5 F=
= p(3s w'))((u' F=1(x)) 8x; (Fs(')))) T
[ (x (16)
where p(u') x). x) corresponds the density of U F (x).
3. Prediction: By the deterministic relationship between latents and observables, we obtain samples from | F (x). x5 and then subsequently mapping these samples through the function F(u*) to obtain the corresponding observables x*:
X" X x simply by sampling from U
n
U
F
X's x" F(u").
(17)
22

---

Published in Transactions on Machine Learning Research (07/2024)
We observe that (17) corresponds to performing stochastic DeepBC (6).
In order to derive mode DeepBC, we restrict ourselves the mode of the distribution of U F F (x1(x)xx's. We recall that assume that the backtracking conditional density p(u' u) has the form
di(ulf mn) }
(u' exp
Σ 1=1
where ds are distance functions. Then, we have
exp (-En di (u/s (x)())
if Ff X otherwise.
p(u' F (x).
x3)
0,
By taking the logarithm and ignoring constants, obtain
log p(u' F (x), = | Ei= de (u,, F; (x)),
if Fs('') = x
-00,
otherwise.
We conclude by noting that arg max log p(u') F (x), xt), composed with F, is equivalent to (7).
A.3 Derivation of (7)
As result of the linearization of F, u,z) in (11) simplifies to
(u' - (u'=)) WW('-o u) + (lIJs(u' u) Fss(u) x 22
(u' U) W u) A|J - x5l12 =: L(u'), (18)
where Xy' X-g = (Jssu)u (u(u). We see that [uu') is convex and differentiable with respect to u', which means that V.rC(u' = 0 implies optimality of u'. To derive Uppt we observe that
Vwr((u) 2(W(u' u) AJJJJu' AJJ33).
As result, uppt is given by
u opt = -W + AJJJs) ' +J
B Implementation
B.1 Technical Details and Comments for the DeepBC Optimization Algorithm
In practice, we implement (14) as follows
ú = - + JJJs)' Wu JJXS),
(19)
where & denotes Moore-Penrose pseudoinverse. We employ (19) rather than (14) for the reason of numerical stability. The main computational bottleneck in Alg. the computation of the pseudoinverse (A- + JTJ (19), which comes at cost of ((Hi--dimuu)) compared to O(#it-dim(u)) dim(u)) for gradient descent. We note, however, that the dimensionality of the latent space is typically not very large in our experiments. The maximum dimension is 516 for CelebA, due to attributes and 512-dimensional latent space of the VAE. We also stress that Jg is sparse (many 0 entries) when S covers attribute variables, because the 512- dimensional latent vector is not upstream of any attribute. We do not run experiments where many variables are upstream of the antecedent variable and stress that this may affect the performance of Alg.
In our experiments, we find Alg. to converge after few iterations, as can be seen Fig. Typically, convergence can be expected occur within 5 iterations, while fulfilling the constraint reliably (see table in Fig. 9). When applying gradient descent methods like Adam instead of our approach, observe
23

---

Published in Transactions on Machine Learning Research (07 (224))
that the convergence rate is sensitive to the choice of learning rate. The plot for À 10 shows that the linearization method can lead to oscillations if À is chosen too large, which likely stems from small eigenvalues of X - JJ (we not that JJ Jy is low-rank) that give rise to numerical issues. However, these oscillations can be detected carly on. Similar to wweebbeg--aarquare we could include a small damping variable > 0 alleviate this issue. We would then arrive
û = (A W + JJJJ + (A) Wu + {333).
We do not explore this possibility in the present work as we do not encounter these issucs in our experiments.
Adam's convergence highly depends on the choice of learning rate. We suspect that this is due to the poorly conditioned Hessian that comes from choosing large A. However, large À is required in order to (at least approximately) fulfill the constraint (7) (sec top row in the table of Fig. 9).
In our experiments, we always use DeepBC via constraint linearization (Alg. 1) with X 10sh and #it 30. À is chosen empirically and our choice yielded convincing results in all experiments. The choice of iteration number is conservative upper bound for the algorithm.
B.2
Implementation Details of Stochastic DeepBC
For both figures Fig. 10 and Fig. 8, we employ Alg. 2 with penalty parameter À 10 and for T 1000 iterations. For Fig. 10, we choose step size 1 10-5 and = 1, Vi. For Fig. 8, we choose 10-4 and 118, Vi.
B.3
Implementation Details of the Deep Structural Causal Models
For all experiments, we use PyTorch (Paszke et al., 2019), PyTorch Lightning (Falcon, William and The Py Torch Lightning team, 2019) and normflows (Stimper et. al., 2023).
B.3.1 Training Procedures
We train all models with the following paramcters:
optimizer
train/val. split ratio
regularization max. # epochs
Adam
0.8
carly stopping
1000
MOrpho-MNIITT. We use the same training parameters for both normalizing flow models. Patience refers to the number of epochs without hurther decrease in validation loss that early stopping regularization waits.
model batch size train
batch size val.
lcarning rate
patience
Flow
64
full
10
2
VAE
128
256
10-6
10
CelebA. We the same training parameters for all normalizing flow models.
model
batch size train
batch size val.
lcarning rate patience
Flow
64
256
10
2
VAE
128
256
10-6
50
B.3.2 Network Architectures
Notation. We denote concatenations of variables by [,, "..,,..,. -]. We denote modules that repeated n
times by a superscript (n). For instance, Linear (u) is shorthand for Linear Linear (u), i.c., two linear layers.
24

---

Published in Transactions on Machine Learning Research (07/2022 /204))
À = 10
10
10a
10a
10a
10a
10a
10a
50
100
150
200
50
100
150
200
# it
# it
10
10a
107
linearization
108
Adam: 1r=10
10a
Adam: 1r=10-1
Adam: 1r=10-3
104
10
10a
0
50
100
150
200
it
constraint crrors after 200 epochs
Adam
linearization
10
10
10 -3
10
0.412
0.412
0.412
56.978
103
0.000
0.000
0.000
56.895
= 106
0.012
0.000
0.000
56.894
Figure 9: The figures show the sum of penalty losses (11) over all points in Fig. 4 (b) for optimizing it for 200 iterations on a log scale. Comparison the Adam optimizer with various learning rates in comparison to constraint linearization (Alg. 1) for different choices of penalty parameter The table shows the of constraint errors F Fs('')
x311 1/2 after 200 iterations (How well the constraints are fulfilled).
25

---

Published in Transactions on Machine Learning Research (07/2024)
Flow Layers. In all of our experiments, make use of common types of flow layers:
QuadraticSpine((u) is a standard quadratic spline flow (Durkan et al., 2019).
ConstScalcShiff((() (4:) performs a constant affine transformation with learned, but unconditional, location and scale paramelers jr and a:
ConstScaleShift((u) a. 04 ScaleShift(u;; xpa(()) performs the same operation as ConstScalcShift(u)). but and a are computed as a function of (sa(s) via a two-layer neural network with ReLU activation functions and one-dimensional hidden units.
Morpho-MNIIT. For the thickness variable, we construct the flow as
(T(UT) =
ConstScaleShill QuadraticSplinee (5) (ur).
For intensity, we use
ur( = ConstScaleShift Sigmoid QuadraticSpline (3) ScaleShift ([t, uz]),
where Sigmoid denotes the (constant) sigmoid function.
For the MNIST image, we use a convolutional B-VAF (Higgins et al., 2017) with B 3 and the following encoder parameterization:
fing (t, 2, img) ss eimg (t, i, img)
([+, i, (Linear Pool2D o (ReLU Conv2D)(()) (ing))
=
Linear
where the Conv2D layers (starting with parameters from the layer closest the input) are parameterized by
out cat_chhanells (8, 16, 32, 64), kernel_siee 44,4,433), stride (2, 2, 2), padding 1,,1,1,0) 1, The linear layers are analogously parameterized with the put dimensions out = (128, 16, 16), i.e., dim( 32. For the decoder, we use
frug (t, i, Umng) dimg(t= Mmmg)
TrranSCov22 (RcLU TransConv2D) Linear ([t, umgg)),
where the lincar layer has output dimension out = 64 and the transpose convolution layers (starting with parameters from the layer closest to the imput) are parameterized by out out_channels = (64, 32, 16, 1), kernel_size = (3, 4, 4, 4)4, stride = 2,, padding = 1,
CelebA. We preprocess all attributes via separate classifiers Castr i.e., one individual classifier per al- tribute. The classifier has the following architecture:
CAur(img) Linear Dropout ReLU Linear (MaxPool2D ReLU Conv2D) (img).
(20)
We then standardize the output logits of C'sss for each attribute individually.
As for MorphoMNIST, we train one normalizing flow for each attribute. For this, we use the standardized logits from the classifiers rather than the original binary attributes from the data set. To model the non- Gaussian distributions, we employ the following flow architecture:
J (l, A ScaleShift ([QQuadratieSllinee ConstScaleShiit) (uAnr), Xpa(Aur))
For the 3-VAE with 3 3, follow slightly different approach as for B.3.2. Rather than concatenating the conditional variables Xpa(i) at the end of the encoder, we instead create an additional channel chanatte for each attribute attr that we concatenate to the RGB channels of the image. Specifically, we obtain the channel by broadcasting the continuous attribute value Attr like
chAur 1288x128 EAttr:
26

---

Published in Transactions on Machine Learning Research (07/2024)
where replace the (non-linear) neural network by linear function for Bald, since the signal-to-noise ratio is low for this variable. The reason is that Beard is the only variable that cannot be modeled well as linear function of its causal parents Age and Gender.
where 1288118 is a matrix of dimensionality 128 x 128 that consists only We then feed x == [RR RBG chBeard, chbaad; chGender, Age) E 12 directly into the encoder with the following archi- tecture (roughly inspired by Ghosh et al. (2020)):
flug (x) Clug (
Linear Pool2D (ReLU BatchNorm2D Conv2D) (6) (x),
where the final linear layer has output dimension out 512 and the transpose convolution layers (starting with parameters from the layer closest to the imput) are paramcterized by out_ ct__channels (128, 128, 128, 256, 512, 1024), bernel_sizs = /3,3,3,3,3,33 stride = (2 2, 2, padding = (1, 1,1,1,1,1,11 1). For the decoder, noting that Xpa(Img) = Beard BBlld Genders Tggel we use
Sing (Xpa(Img) Wmng) ding (Xam(Tm)) Wing)
TTransConvDD (ReLU o BatchNorm22 TransConv2D) Linear ((xpa[img)> Mimg))
where the first lincar layer maps to 1--10244 which is then reshaped to feature map in 22x2x 1024, The consecutive transposed convolutional layers have the parameters out_ aut_channels (512, 256, 128, 128, 128), kernel_size (3, 3, stride 2,, padding 1,,1,,,1,1).
C
Ground Truth Structural Equations in Morpho-MNIST
The structural equation for thickness T' and intensity / are given as
T 0.5 Ur,
UP T(10, 5) U, ~ N(0
I - 191 Sigmoid (0.5 2- + 64,
For details about how the MNIST images were modified as to change perceived thickness and intensity, we refer the reader to Pawlowski et al. (2020).
27

---

Published in Transactions on Machine Learning Research (07 /024)
D Additional Experiments
D.1 Morpho-MNIST
stochastic DeepBC for antecedent intensity
2
(dhrkmass)
1.9 117 1.5
-13
-11
-0.9
-0.7
-0.5 -0. -0.1 0.1 0.3 0.5
0.7
0.9
111
1.3
1.5
1.7
1.9
(intensity)
Figure 10: We run Fig. (b) using stochastic DeepBC to sample from the distribution over counterfactual
thickness values rather than just obtaining the mode. The box plots are generated from 400 samples per antecedent value.
a
antecedent intensity for different weights
(shickcone)
(intetsitt)
(inteuiity)
(inteusity)
(inteurity)
urr (standard)
WT
WT
(b)
antecedent intensity for different backtracking conditionals
(clickesss)
0
2
(intensity
(inlensity)
(intersiity)
sparse DeepBC
(ul ur) (uf 32
(ul wr (ul uy)
DeepBC
factual realization
Figure 11: (a) We run Fig. (b) multiple times, fixing wy Wing = and changing only WT. We see that the backtracking solution approaches the interventional solution (see Fig. 4 (b)) as we increase wr: thus preserving the value of thickness more we increase weight. We note that the left-most. plot (wr 0) corrosponds Fig. 4 (c). (b) DeepBC can be extended to more general backtracking conditionals (corresponding distance functions plotted below each subplot) that lead to different solutions.
28

---

Published in Transactions on Machine Learning Research (07/2024)
D.2 CelebA
D.2.1
Additional Qualitative Experiments
Fig. 12 shows further plots related to CelebA ($ 4.2). Pannel (a) demonstrates two examples with multi- variable antecedents. For the purpose of illustration, we also show single-variable antecedents for comparison. Pannel (b) showcases example where the antecedent value Beard) is solely absorbed by uBeard; leaving all other high-level features unchanged, similar to an interventional counterfactual. This may be explained by the fact that many men are not. bearded and thus this change does not need to be traced back to other variables. This is not possible if the noise in the predictor that "ought to be explained" is not modeled explicitly, such as in many counterfactual explanation methods, as shown on the right of pannel (b). Specifically, the tabular explanation method can only generale a different prediction it changes other variables, as can be seen by the changed gender in the counterfactual. Pannel (c) demonstrates the result of using wrong graph structure, including the wrong graph employed, for the counterfactual demonstrated in Fig. 6. We also display the factual and sparse DeepBC result with the assumed graph structure (Yang et al., 2021b) for easier comparison. We indeed observe a large difference in the two counterfactuals.
D.2.2 Quantitative Experiments
In addition to the qualitative experiments in 4.2 and App. D.2.1, we demonstrate quantitative experiments where assess three metries over large sample of generated counterfactuals for the different methods. In addition to baselines 1 and 2 from the main text ($ 4.2), we assess deep counterfactual explanation method (10). Specifically, we use an image regressor (fy)) together with an unconditional image auto-encoder (fx) to generate counterfactual explanations, sketched in Section $ 3.2. We do for each attribute ( separately. This corresponds in style to how Jacob et al. (2022); Rodríguez et al. (2021) obtain counterfactual explanations for images. This means that fx does not correspond to the reduced form of causal model, and so ux = fx (z) corresponds to an unstructured embedding space for image data. For our experiments, we apply DocpBC in this unstructured latent space (where neither the attributes nor their causal relationships are modeled) and use classifiers to extract the high-level altributes from the counterfactual image. We also use DeepBC with a wrong graph assess the effect of model missspecification on the result. The wrong graph used is shown in Fig. 12 (c).
Quantitative Evaluation Metrics. causal compliance. We define these as
We evaluate three metrics: plausibility, observational closeness and
plausible(x*))
Σ AEAttr
-logy (x Xpucss) /n,
obs(x, x") =
Σ m FA. /2
(21)
AEAttr
(ausal(x,x)) x')
Σ (IT(((x((A)))A) ( (2))
AEAttr
for A E Altr = {Age, Beard, Gender, Bald], m denotes distance function and n = 4. All of the metrics in (21) should be minimized. We restrict ourselves to the attributes for the computation of the metrios, because comparisons images are generally problematic due to the high dimensionality. When comparing in terms of high-level attributes, this problem is alleviated and the metrics can be interpreted more casily, We use the squared distance m(r,z') (x x²)² (SQU) and absolute distance m(x,x²) |ar =x'l (ABS).
The plausible metric measures the probability density of the generated counterfactual attributes, under the data distribution. In this sense, we can think of counterfactuals with high probability density (or low -log density) as being more plausible, i.e., being closer to the data manifold (see Karimi et al. (2022)). The obs metric measures the distance among attributes between factual realization and counterfactual, thereby evaluating closeness in the observation space (regardless of whether the causal laws are preserved).
We note that counterfactuals cannot be validated, because ground truths not exist. The purpose and quality coun- terfactuals depend on the application domain and universal metric does not exist.
29

---

Published in Transactions on Machine Learning Research (07 (07/2024)
(a)
"Whot would have been, had this person been
factual
old?"
old and male?"
factual
male?"
male and bearded
(b)
"What would have been, had this person not had a beard?"
factual
DeepBC
interventional
tabular explanation
(c)
"What would have been, had this person been bearded?"
sparse DeepBC
factual
sparse DeepBC
w. wrong graph
Age
Age
Genbee
Age
Bewrti
Bude
Beard
Bald
Beard
Bald
Figure 12: Additional plots for CelebA. (a) Two examples of multivariable DeepBC ((1) and (ii)). This means that not only one variable, but also multiple variables can be used as antecedent for DeepBC. (b) DeepBC takes into account non-determinnsticc relationships between variables: In this setting, the removed beard is traced back to UBeard rather than other variables. The result is highly similar the interventional example (plotted for comparison) and very different to the tabular counterfactual explanation method, which must change either one of the other attributes (here gender) in order to achieve different model prediction. (c) Applying sparse DeepBC with wrong graph produces different result compared to using the correct graph. Specifically, we observe that all fact variables change their value due to the far-reaching downstream effects of the gender variable the wrong graph.
This is the metric that has been optimized in the original work on counterfactual explanations (Wachter et al., 2017). The cousal metric measures the difference in exogenous variables between realization and counterfactual, which can interpreted as the degree of preservation the causal mechanisms: If changes in latent variables exceed what minimally necessary under the assumption of retained mechanisms, it suggests that the counterfactual does not effectively preserve the causal mechanisms, Since do not have access to ground truth structural equations (J1,2, Ju) in CelebA, the ones that trained
30

---

Published in Transactions on Machine Learning Research (07/2024)
Table 1: Quantitative Evaluations for CelebA. Three considered metrics + standard deviation of the different baselines for 500 iterations. Lower values are better, best per metric is highlighted in bold. CE stands for counterfactual explonation (see $ 2.4). The two distance functions assessed (m) are SQU for squared distance, and ABS for absolute distance.
Metric
Tabular CE
Interventional
Deep CE
Wrong graph
DeepBC
SQU
1.778 + 1.883
0.513 + 0.892
0.852 = 0.691
0.690 + 1.076
0.611 + 0.985
obs
ABS
0.879 + 0.575
0.345 0.317
0.720 0.305
0.545 0.451
0.451 + 0.372
SQU
2.304 + 2.620
0.674 = 1.140
1,286 = 0.983
0.504 + 0.893
0.498 + 0.930
causal
ABS
1.080 + 0.748
0.314 0.265
0.887
0.360
0.400 + 0.327
0.310 + 0.270
plausible
0.984 + 1.424
0.374 0.439
0.153 = 0.281
0.311 + 0.373
0.301 + 0.358
the data set. We furthermore note that incorporating the antecedent variable into the loss not issue either, because it is fixed for all methods. For the deep non-causal explanation method, only obtain the counterfactual image, without explicit access to the attribute variables. In order to extract those, use the (standardized) logits of classifiers that were trained to prodict the attributes from the image.
We obtain the numbers table Tab. as follows: We sample a factual data point x u~ u~ Then, we sample an attribute uniformly, i.e.
a ~ U(fage, gender, beard, bald))
and construct the corresponding antecedent as
10,
We then compute the counterfactual x* to evaluate all three loss functions (21). This process is repeated 500 times. The final reported scores are the arithmetic means over the individual metrics, including 1std.
Results. We quantitatively assess multiple properties of sparse mode DeepBC in comparison to the baselines in Tab. 1. While the deep counterfactual explanation method (10) achieves the best result on the plausible score, the interventional approach preserves the attribute values the best (obs score). This is likely due to the fact that counterfactuals parents at all, in contrast to the other methods. Finally, expected, DeepBC obtains the best score on the causal metric, independent of distance function m. This can be explained due to the fact that DeepBC always respects downstream effects (in comparison to other methods), as exemplified in Fig. 6.
leaf nodes of the causal graph in Fig. 6 do not change the values of their
31


Reviews:
[{"review_id": "z2uUxda3fC", "reviewer": "Reviewer_PkgY", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths: \n1. The use of the idea of backtracking counterfactuals within the machine learning community is still fresh and provides an interesting perspective on counterfactual inference. This paper does a nice job of taking those ideas an applying it to a more applied and modern context by connecting it to deep generative models. \n2. The provided experimental results show strong empirical performance. \n3. The authors do a nice job of describing the task, and necessary background for the paper. The discussion of interventional versus backtracking counterfactuals was particularly well done and makes for a very accessible introduction. Additionally, I felt the overall organization and writing was quite strong. \n\nWeaknesses: \nThe work seems to hinge on a few key aspects:\n (1) correct specification of the underlying DAG. In my view the authors do a nice job of addressing this with their experiments. \n (2) The correct specification of the latent factors, it's unclear what the implications are here for misspecification of the latent factors. What happens if we are wrong about the cardinality of them, for example? I assume this would have a significant effect on the entailed distance metric. In addition, it's not clear when we should assume relatively low rank for these latent factors. \n (3) The invertibility of the underlying generative model. It's not entirely clear to me what the downstream ramifications are of enforcing invertibility. It would seem to me that this would limit the space of functions that can describe dependence between any two variables. Is it possible to make this precise? \n (4) It also isn't entirely clear to me how one decides whether a model has sufficiently captured the aspects of the generating system such that we can trust the downstream counterfactuals. Is it possible to make this precise?", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "This work studies and introduces causal inference using backtracking counterfactuals and deep invertible generative neural networks. In contrast to interventional causal calculus, the backtracking approach considers an unmodified causal structure and examines differences in a latent factor factor model. The authors parameterize this difference using a simple exponentiation, and consider invertible causal generative deep models. Experiments are performed which evaluate the performance of the proposed algorithm under misspecification of the underlying causal dag, and on counterfactual image generation.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "It would be great if the authors could:\n1. Provide a set of experiments / theoretical results / more extensive discussion which describes what happens under model misspecification. \n2. Make precise the implications of invertibility in terms of the space of dependence functions that can be modeled. \n3. Provide some sort of error bound / discussion around worst case behavior here in terms of error estimating the latent factors translating to errors in the inferred counterfactual.", "broader_impact_concerns": "I do not believe that this paper requires adding a Broader Impact Statement.", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "XZVmqX0yMk", "reviewer": "Reviewer_2Fj7", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths:\n - the paper is well-written and easy to follow, the derivations clear\n - the relation to existing literature (counterfactual explanations) I found was interesting\n - the proposed method is simple\n\nWeaknesses:\n - it is not clear to me what the non-causal baselines (tabular and deep) are actually doing.\n - I found the quantitative metrics and results flaky and questionable. It is not clear what should be expected of each method, and it is very questionable that the evaluation involves the model learned by DeepBC.\n - the statement of the title, that backtracking counterfactuals allow for causally compliant explanations, is not well supported in the paper. See my detailed comments (p4: Backtracking counterfactuals, p9: Causal compliance).\n\nDetailed comments:\n\n - p3: the causal parents of Xi as specified by G -> A detail is missing at this point. Does G encode the causal relationships between endogenous variables only (X)? Or between all variables (X,U)? In other words, do you allow exogenous variables in U to be causally related? (I can find the answer later, but this should be stated here)\n\n - p3: compted -> typo\n\n - p4: Backtracking counterfactuals -> Consider yet another latent variable, say $\\bar{U}$, which would be a parent of both $U$ and $U'$. Then, one can express the backtracking conditional as the marginalized distribution $p(u'|u)=\\sum_{\\bar{u}} p(\\bar{u}|u)p(u'|\\bar{u})$ without loss of generality, and backtracking counterfactuals can be re-written as regular counterfactuals where $X$, $\\bar{U}$ are respectively the exogenous and endogenous variables. If so, aren't backtracking counterfactuals simply a parametric instantiation (causal mechanisms expressed with intermediate exogenous variables) of the more general (non-deterministic) counterfactual framework? Is there something fundamental in backtracking counterfactuals that regular (observational) counterfactuals cannot express?\n\n - p4: p(u'|u) -> why this notation, instead of p(u*|u) ? Is there a difference between u' and u*?\n\n - p5: $p^B(u'|u)$ -> Neither the latent distribution p(u|x) nor the backtracking conditional p(u'|u) are identifiable from observational datasets. Is this limitation discussed at all somewhere?\n\n - p7: $d_i(u'_i,u_i)$ -> Why this particular choice of a distance function? It is the first time this distance function is explicitly defined. Can DeepBC account for arbitrary distance functions? Is this particular choice of distance function an assumption of DeepBC? This should be clarified earlier in the manuscript.\n\n - p9: Causal compliance -> I find this point a bit misleading. It seems that DeepBC generates observational counterfactuals, and hence will produce the same output even if the causal structure is miss-specified, as long as it does not violate the dependencies in the data distribution. For example, in Figure 4, I do believe that DeepBC will produce the same result with the causal arrow reversed. And in Figure 6, DeepBC should produce the same results with any fully connected causal graph. Hence I fail to see how DeepBC produces causally compliant explanations, as it does not exploit causality at all (only the independence model). This point should at least be clarified in the Discussions section.\n\n - p10: We use here $d_i(u'_i, u_i)$ -> It would be nice to recall what are the exogenous variables $U_i$ here. Are there only three, for T, I and the image?\n\n - p12: Tabular non-causal explanation -> I do not understand this baseline. How is the image reconstructed from the attributes? What is the distance function here?\n\n - p12: Deep non-causal explanation -> Likewise, I have a hard time understanding this baseline. What is the difference with baseline 1? Is the distance function applied here only on $u_x$, or also on the attributes? Do baselines 1 and 3 correspond to the counterfactual explanations method described in 2.4?\n\n - p13: Table 1 -> The standard deviations in this table are extremely large, how is that? Moreover, the numbers reported in this table are I think very questionable, given that 1) the objective of each method is not the same and 2) both the causal and plausible metrics are biased because they rely on the normalizing flows learned by DeepBC during training. Moreover, the so-called \"causal\" metric is exactly the objective minimized by DeepBC (6)... This is like proposing a problem after the solution has been defined. I find Table 1 extremely confusing, and I am not sure what information I can extract from it. Why is a deep non-causal method better at producing plausible explanations? This is not even discussed in the text. I would suggest to either better motivate the experimental setup and discuss the numbers, or remove that table.\n\n - p15 Discussion -> I was waiting for a discussion of the limitations of this work, in particular on the fact that neither the latent distribution p(u|x) nor the backtracking conditional p(u'|u) are in general identifiable from observational data. I am glad to find some mention of it here, although it could be made more explicit. It is perfectly fine to present a method with limitations as long as these are acknowledged and discussed. For the reader's sake, I suggest to rename this section more explicitly \"Limitations\".", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "No", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "This paper presents Deep Backtracking Counterfactuals (DeepBC), a practical implementation of the recently proposed backtracking counterfactuals idea [von Kügelgen et al., CLeaR 2023]. Two variants are proposed, stochastic DeepBC and mode DeepBC, with practical algorithmic implementations. Experiments are conducted on two datasets, Morpho-MNIST and CelebA, where the method is compared against interventional counterfactuals as well as several ablated versions as baselines.", "claims_and_evidence_yn": "No", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "Critical:\n - clarify what the non-causal methods actually do, and what are their expected limitations compared to DeepBC\n - either report other, non-biased metrics, or motivate why these metrics make sense although they are biased, or simply remove the quantitative experiments from the paper\n\nStrengthen the paper:\n - discuss how backtracking counterfactuals differ from regular, observational counterfactuals (comment p4: Backtracking counterfactuals)\n - better motivate how DeepBC provides causally compliant explanations, although the method gives the same result regardless of causal directions in the graph (as long as no new independence is introduced, i.e. a fully connected graph is fine), or prove me wrong if I am mistaken (comment p9: Causal compliance)", "broader_impact_concerns": "This is a generic ML paper, no particular concern", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "3OX4K9eeGm", "reviewer": "Reviewer_Hh2N", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Weaknesses:\n- Some elements/hypotheses in the paper are not always clearly related to the literature in particular in the methodology section (see changes/questions below). This makes the contributions sometimes a bit hard to pinpoint.\n\nStrengths:\n- The paper tackles an interesting problem and shows interesting results\n- Anonymized source code is available\n\nDisclaimer: This paper is not in my core expertise.", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "The paper proposes a MCMC-based algorithm in the structured latent space of what is referred to as a causal model, based on the \"overdamped Langevin dynamics (Parisi, 1981)\". The paper also proposes a simplified method that provides a single counterfactual based on a constrained optimization problem.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "In terms of the algorithm, the key building blocks are hidden in the formalization. In particular, the following elements weren't clear to me: \n- How is the learning of U = F−1(X) done? It might be interesting to state what is given in the experiments. For instance in context of the celebA dataset, does the algorithm have access to all the labels (e.g. gender, baldness, etc.)?\n- How is the methods described in 3.3.1 different than e.g. diffusion models? And is this a key part of the contribution (only references are from 1981 and 2013)? \n- In Fig 9 for the plot $\\lambda=10^6$, why is there some periodicity in the blue loss?\n- In the experiments section, can you clarify what experiments are related to \"Langevin Monte Carlo sampling\" and the ones related to \"constrained optimization\"?", "broader_impact_concerns": "NA", "additional_comments": "", "extra_scores": {}, "extra_text": {}}]

Author rebuttal:

Meta-review: The reviewers generally found the work to be insightful and contributing to the state of the art for counterfactual reasoning.  They raised concerns about the assumptions and conditions needed for the techniques to work and the authors added suitable explanations to clearly outline the limits of the proposed techniques.  One reviewer further requested that bounds be derived in situations where the necessary conditions are not met or unverifiable, but this is beyond the scope of this work.  The proposed techniques do represent an important advance for backtracking counterfactuals in the context of modern deep learning models.  Furthermore, the paper provides important insights about the differences between non-causal counterfactual methods, interventional counterfactuals and backtracking counterfactuals.
Decision: Accept (poster)