Paper: Deep Backtracking Counterfactuals for Causally Compliant Explanations (ICLR-2024)

Reviewer comment (Theory):
The authors make a very big assumption that they only gently brush in section 2.2:  
> We assume that all f_i are given as deep generative models.  
This assumption is central, and key to feasibility of their formulation. However, structural causal equations are unknown, and often impossible to figure out solely based on data [1].

Author response:
Thank you for pointing this out! We agree that the structural equations are, in general, not identifiable from observational data---even without confounding and with a known causal graph, as assumed in our case. However, recent work [3] has shown that, under the additional assumption of univariate real-valued exogenous variables and diffeomorphic mechanisms $f_i$---both common assumptions in the context of deep generative modelling---the true structural equations can be identified up to an invertible component-wise transformation of the exogenous variables. We included this fact as a footnote into our paper in Section 2.2.

We hope that you find our answer convincing. Please let us know should this not be the case.

[3] Adrian Javaloy, Pablo Sanchez-Martın, and Isabel Valera. Causal normalizing flows: from theory to
practice. Advances in Neural Information Processing Systems, 2023.

Reviewer comment (Theory):
Question to the authors: How can we get access to structural causal equations underlying our data? How do we ensure identifiability of such equations given observed data? The reviewer will reconsider their score if authors provide a convincing answer.

Author response:
Thank you for pointing this out! We agree that the structural equations are, in general, not identifiable from observational data---even without confounding and with a known causal graph, as assumed in our case. However, recent work [3] has shown that, under the additional assumption of univariate real-valued exogenous variables and diffeomorphic mechanisms $f_i$---both common assumptions in the context of deep generative modelling---the true structural equations can be identified up to an invertible component-wise transformation of the exogenous variables. We included this fact as a footnote into our paper in Section 2.2.

We hope that you find our answer convincing. Please let us know should this not be the case.

[3] Adrian Javaloy, Pablo Sanchez-Martın, and Isabel Valera. Causal normalizing flows: from theory to
practice. Advances in Neural Information Processing Systems, 2023.

Reviewer comment (Theory):
Although the authors assume access to underlying generation mechanisms, the reviewer’s intuition is that this assumption might not be necessary. Identifiability of backtracking counterfactuals seems easier than identifiability of interventional counterfactuals, and we might not need access to generation mechanisms for them. This is an intuition and not rigorous.

Author response:
This is an interesting thought. In our setting, we do know the causal graph and the structural equations are identifiable for univariate exogenous variables, as responded above. However, in settings where the causal graph is not known, identifiability does not hold in general [4]. We thank you for pointing this out, and we touch upon this point in the additional paragraph we included in the revised discussion section (Sec. 6).

[4] Amir-Hossein 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, 2020.

Reviewer comment (Novelty):
How is *Deep Invertible Structural Causal Models* defined in section 2.2 or structural causal models with invertible reduced form mentioned in the last sentence of Appendix D different from BGMs [2]? If they are similar, perhaps some of their identifiability results could be used.

Author response:
Indeed, our models fit into the definition of BGMs and we included this fact into our revised manuscript for clarity. It could be the case that backtracking counterfactuals are identifiable for this class as well. We leave this question open for future work.

Reviewer comment (Writing):
In the third line of section 2.3, it took the reviewer a while to understand the quoted question. Enclosing $x^*$ with parentheses would help the reader.

Author response:
Incorporated into the revised manuscript.

Reviewer comment (Writing):
Why does the title of section 3 contain the word `Deep`? The formulation as a constrained optimization is not limited to deep neural networks.

Author response:
We would like to stress that this is the formulation that we employ for our approach. It is true, however, that this formulation can also work for shallow methods. In order to stress that the considered formulation is a design choice and not inherent to backtracking in general, we would leave it as it is.

Reviewer comment (Writing):
In the first line of section 3, why is the word `example` used? Counterfactual explanations explained in the former section are just an application of backtracking counterfactuals. If that is the case, they should not be used when explaining the general formulation.

Author response:
Incorporated into the revised manuscript.

Reviewer comment (Writing):
What is $Y$ in the footnote of page 4? It does not appear to be mentioned anywhere else in the text.

Author response:
Incorporated into the revised manuscript.

Reviewer comment (Novelty):
First of all, there should be a related work section in the main paper. I checked the one in the appendix, and it is still not sufficient. If the contribution of this paper is to introduce a new computation scheme for backtracking counterfactuals, you should at least include how existing work computes it. Also, there is a lack of proper citation in the introduction when you compare your work to the existing methods.

Author response:
Thank you for the suggestion. In response to your point, we decided to move other aspects of our method to the appendix in favor of a compressed related work section (Sec. 5) in the main article. We do keep a more comprehensive related work section in the appendix (App. E), which we also extended. We agree that a comprehensive review of the literature is crucial.

Reviewer comment (Novelty):
My main concern is how significant the proposed method is. It seems like the author optimizes it in the latent space rather than the feature space. Basically, all deep models are learning representations in the latent space, it looks like the proposed algorithm is just an implementation.

Author response:
We believe that you missunderstood the main contribution of our work and are sorry that we did not formulate this more clearly. Our optimization is not just about the latent space of a deep model. The relevant aspect is that this latent space is **embedded into a causal model**, which makes the key difference to these many existing works that you have in mind. This causal model cannot be learned from data without any assumptions, which is why models without the causal models do not achieve the same amount of causal faithfulness as ours. We introduced three metrics in our revised manuscript, one of which measure causal compliance (see Sec. 4.2). Our model performs best here (see Tab. 1), especially in comparison to models **without a causal model**. Please let us know if this is still not clear.

Reviewer comment (Experiments):
In the experiment section, the author compares backtracking intervention and conventional intervention, it is more like an introductory article that introduces backtracking intervention.

Author response:
We agree that this section is also meant to introduce these concepts to readers who are not familiar with causality. To the best of our knowledge, *backtracking interventions* do not exist. However, the experiments also demonstrate several other properties. For example, we show that counterfactuals can be identical for interventional counterfactuals and backtracking counterfactuals, in some settings. In our revised manuscript, the Morpho-MNIST furthermore serves to show the weighting feature of DeepBC (see Sec. 3.3 and App. D.1 in the revised version).

Reviewer comment (Experiments):
How does deepBC perform against other algorithms that also conduct backtracking counterfactual reasoning?

Author response:
We are not aware of any other method that implements backtracking counterfactuals. As mentioned above, DeepBC is not simply about optimizing in an arbitrary learned latent space. The **causal model** is the essential part. In our revised manuscript, we compare our method to a method without a causal model and quantitatively show that it does not achieve the same degree of causal faithfulness as DeepBC. In our revised manuscript, we introduced three metrics to compare our method against others and found that our method outperforms others in the metric relevant for backtracking (see Tab. 1).

Reviewer comment (Writing):
The importance of the problem under consideration is not well-articulated.

Author response:
Thank you for your feedback. 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 [1], biology [2], and robotics [3]. We incorporated additional text in the introduction (Sec. 1) as a response to your comment.

Reviewer comment (Novelty):
Why is it important to generate backtracking counterfactuals?

Author response:
You should employ our method if you would like to create counterfactuals that **retain the causal relationships between all variables**. These could be "how sex and age affect beard", or for example in a medical setting "how age affects brain volume". As we show in our experiments, our method generates counterfactuals that retain those relationships the best for CelebA (Tab. 1 in the revised manuscript).

Reviewer comment (Evaluation):
The proposed approach solves an optimisation problem for every counterfactual query, very similar to [1, 2]. Unlike referred papers, the authors here aim to generate faithful counterfactuals respecting the given causal graph; it is unclear how the faithfulness of generated counterfactuals is maintained. (Based on results, in the case of celebA it seems like the causal graph is not respected).

Author response:
We regret that the experiments on CelebA do not convey the preservation of the causal laws. In response, we updated Section 4.2 (CelebA experiments). Specifically, the new visualization (Fig. 5) highlights how exactly causal relationships are violated/preserved for the different approaches. In addition, we introduced and evaluated three metrics to compare the methods quantitatively. Our methods performs best on the metric relevant for backtracking counterfactuals. We would be happy to hear from you whether it is clearer now.

Reviewer comment (Reproducibility):
Is identity preservation enforced in the inference optimisation iteration? (As observed in celebA dataset, changing baldness is also affecting gender, facial hair, and age).

Author response:
Identity preservation is encouraged through the distance function $d(u_i, u_i^*)$. In response to your point, we introduced and assessed the metric "obs" that assesses how much the observed attributes change for the different approaches. Interestingly, our method actually does allow for adjusting the level of preserving the different attributes manually. We did not touch upon this in the current version, but implemented this features in the revised version (see Sec. 3.3 and App. D.1). We hope you will find this an interesting new aspect of our approach.

Reviewer comment (Theory):
The main difference between the counterfactual explanations and deepBC is that explainability approaches do not use the auxiliary causal variables to generate counterfactual images (at least to the best of my knowledge, I haven't seen any papers using them); using deepBC for generating explanations will severely limit the applicability on datasets with meta information on auxiliary variables and the data generating graph.

Author response:
This is a relevant point that we do not touch upon enough in the current version. There exists a highly active area of research known as *causal representation learning* that is concerned with extracting this meta data from the observed data set. Many conditions for the identifiability of these variables (and causal relationship) have already been established in recent years and we hope that further developments in this field will broaden the applicability of our methods further. To address this point, we decided to include an additional paragraph into our discussion section (Sec. 6).

Reviewer comment (Evaluation):
From an explainability point of view, the metrics like faithfulness, reliability, and robustness of the generated counterfactuals would be interesting to discuss; celebA results suggest that these metrics would be affected.

Author response:
We agree that we did not discuss the properties of our methods enough in the original manuscript. In response to your comment, we decided to introduce three metrics that measure 1) observable attribute preservation (as mentioned above) and 2) faithfulness with respect to the causal mechanisms and 3) plausibility of the generated counterfactuals. These are the metrics that we are most concerned about in this work and indeed, our approach performs best on 2) (see Tab. 1 in our revised manuscript).

Reviewer comment (Evaluation):
It would be useful to have auxiliary models evaluating the identity preservation and faithfulness of the generated counterfactuals and have a comparison against interventional counterfactuals.

Author response:
We agree that we did not discuss the properties of our methods enough in the original manuscript. In response to your comment, we decided to introduce three metrics that measure 1) observable attribute preservation (as mentioned above) and 2) faithfulness with respect to the causal mechanisms and 3) plausibility of the generated counterfactuals. These are the metrics that we are most concerned about in this work and indeed, our approach performs best on 2) (see Tab. 1 in our revised manuscript).

Reviewer comment (Experiments):
The paper is a relatively simple combination of [1] and [2] and it is unclear how important the linearisation of the optimisation procedure is for the performance of the counterfactuals: How well would simple SGD perform? Is the optimisation over u* converging or simply stopped after 30 iterations?

Author response:
> The paper is a relatively simple combination of [1] and [2]

The main contribution of our work is to provide a practical and computationally efficient way of generating backtracking counterfactuals. It is important to note that the formulation presented in [2] cannot be readily implemented “out-of-the box”, since it requires computing the posterior $p(\mathbf{u}^* | \mathbf{u}, \mathbf{x}^*_S)$ (see App. A.2), which involves several steps that are computationally intractable. Our approach computes the mode of the posterior $p(\mathbf{u}^* | \mathbf{u}, \mathbf{x}^*_S)$, and shows that this can, in fact, be done by solving a constrained optimization problem that is tractable (under the assumption of (approximate) bijectivity of the generative models). Our research goes therefore well beyond the results of [2] due to its focus on numerical evaluation, computation, and practical evaluation on Morpho-MNIST and CelebA. 

Our approach indeed relies on incorporating deep neural networks into structural causal models, but only as a starting point (this is not the contribution of the paper). The work therefore builds on new advances, such as [1], which makes our work timely and relevant to the community.

> it is unclear how important the linearisation of the optimisation procedure is for the performance of the counterfactuals: How well would simple SGD perform? Is the optimisation over u* converging or simply stopped after 30 iterations? From my understanding, the DeepBC algorithm is limited to handle continuous variables and it is unclear how the choice of distance metric would influence the resulting counterfactuals in case of u's with different dimensionalities along the backtracking trace. Additional ablations comparing the different design choices would strengthen the paper.

Thank you for this remark. We agree that we only swiftly touched upon this part in the old manuscript. We confirm that the optimization indeed converges after 30 iterations with respect to the penalty loss (equation (7)). Empirically, we observe that our method converges much quicker, compared to gradient-based optimization algorithms. Note that, strictly speaking, SGD is not applicable, because the optimization is not over a data set, but only a single example. To address your point, we included an additional section to our appendix (App. B.1) where we describe the choice of algorithm and parameters in detail. We also provide numerical experiments that contrast constraint linearization to the Adam optimizer. These experiments highlight the fact that the convergence of Adam is very sensitive to the step-size, whereas our method works out-of-the-box.

Reviewer comment (Experiments):
From my understanding, the DeepBC algorithm is limited to handle continuous variables and it is unclear how the choice of distance metric would influence the resulting counterfactuals in case of u's with different dimensionalities along the backtracking trace. Additional ablations comparing the different design choices would strengthen the paper.

Author response:
> it is unclear how the choice of distance metric would influence the resulting counterfactuals in case of u's with different dimensionalities along the backtracking trace.

While we agree that choosing the distance metric might be non-trivial in more complex examples such as multi-modal single cell data [4], we in fact, provide an intuitive interpretation of the distance metric as the log of the backtracking conditional density $p(\mathbf{u}^*|\mathbf{u})$ (see App. A2). As a result, the distance metric arises indirectly from the definition of the backtracking counterfactuals.

[4] Karren Dai Yang, Anastasiya Belyaeva, Saradha Venkatachalapathy, Karthik Damodaran, Abigail
Katcoff, Adityanarayanan Radhakrishnan, G. V. Shivashankar, and Caroline Uhler. Multi-domain
translation between single-cell imaging and sequencing data using autoencoders. Nature Com-
munications, 12(1):31, 2021

Reviewer comment (Evaluation):
I would encourage the authors to consider adding quantitative evaluations such as proposed by [3].

Author response:
> Additionally, I would encourage the authors to consider adding quantitative evaluations such as proposed by [3]

We agree that quantitative evaluations are of great interest to the reader. However, the work you mention is based on an axiomatic characterization of interventional counterfactuals (section 7.3.1 in [5]) and it is not obvious to us whether and how it can be applied/adapted to the backtracking philosophy, which is inherently different. Specifically, the reversibility axiom is not obvious to apply to backtracking, because backtracking does not employ functional re-assignmnents, which this axiom is based on (instead, all causal mechanisms are kept in place). In order to address your point, we introduced three metrics (Section 4.2) that measure how well the original example is preserved in terms of observable attributes (obs), plausibility, and causal compliance (causal). We indeed find that our method outperforms other approaches in the causal compliance metric, which is the relevant metric for backtracking counterfactuals (see Tab. 1).

Reviewer comment (Presentation):
The use of the DSCM framework could be highlighted more.

Author response:
> Furthermore, the use of the DSCM framework could be highlighted more.

We modified the first mentioning of deep learning for modelling structural equations to highlight this more. Thank you for the suggestion.

Reviewer comment (Theory):
I saw in the code that the autoencoders use a simple MSE loss without properly modelling the observational noise. Why is this choice made?

Author response:
>1. I saw in the code that the autoencoders use a simple MSE loss without properly modelling the observational noise. Why is this choice made?

During training, there is no difference compared to the standard variational autoencoder [6] (the fixed observational noise leads to the MSE loss of the decoder.). For computing counterfactuals, we only keep the encoder and decoder of the trained models and do not consider observational noise. This is justified to some extent by [7], as written in the paper. Please let us know if we did not understand your question correctly.

Reviewer comment (Theory):
In eq 7 you use an L2 penalty for the distance in latent space. This is very restrictive and would only sensibly work for continuous noise variables. How would this generalise to discrete variables?

Author response:
> In eq 7 you use an L2 penalty for the distance in latent space. This is very restrictive and would only sensibly work for continuous noise variables.: What's the impact on that if the variables have different noise dimensions? How would this generalise to discrete variables? This does not use any scaling between the variables. In footnote 2, it is mentioned that this isn't necessary because they all assume the same base distribution. I believe this point should be elevated beyond a footnote as it might be lost to readers otherwise.

In our method, we employ generative models only, which all operate on a standard Gaussian as base distribution. In response to your comment, we decided to include this into the main text (see Sec. 3.3). It is true that the method does not readily support discrete variables. We note, however, that discrete variables can often be replaced by logits , as we do in the experiments for CelebA (see Sec. 4.2.: Experimental Setup). In this case, our method can be applied. 

Our framework also allows for scaling the distances for variables differently. We find this an excellent point and therefore included this idea in the revised version of the manuscript (see equ. (8) and experiments in App. D1).

Reviewer comment (Theory):
In eq 7 you use an L2 penalty for the distance in latent space. This is very restrictive and would only sensibly work for continuous noise variables. This does not use any scaling between the variables. In footnote 2, it is mentioned that this isn't necessary because they all assume the same base distribution. I believe this point should be elevated beyond a footnote as it might be lost to readers otherwise.

Author response:
> In eq 7 you use an L2 penalty for the distance in latent space. This is very restrictive and would only sensibly work for continuous noise variables.: What's the impact on that if the variables have different noise dimensions? How would this generalise to discrete variables? This does not use any scaling between the variables. In footnote 2, it is mentioned that this isn't necessary because they all assume the same base distribution. I believe this point should be elevated beyond a footnote as it might be lost to readers otherwise.

In our method, we employ generative models only, which all operate on a standard Gaussian as base distribution. In response to your comment, we decided to include this into the main text (see Sec. 3.3). It is true that the method does not readily support discrete variables. We note, however, that discrete variables can often be replaced by logits , as we do in the experiments for CelebA (see Sec. 4.2.: Experimental Setup). In this case, our method can be applied. 

Our framework also allows for scaling the distances for variables differently. We find this an excellent point and therefore included this idea in the revised version of the manuscript (see equ. (8) and experiments in App. D1).

Reviewer comment (Writing):
You mention that you approximate $F_s$ at $\bar{u}$. Is this correct? What is $\bar{u}$ in this case?

Author response:
> You mention that you approximate $F_S$ at $\bar{u}$. Is this correct? What is $\bar{u}$ in this case?

You are correct, and we agree that this may not have been clear in the original manuscript. In optimization, it is common to construct an update rule that is based on the previous update. $\bar{\mathbf{u}}$ is always the previous update, starting with $\bar{\mathbf{u}} = \mathbf{u}_0$. We made this point clearer in the updated version of the text (see also Alg.1).

Reviewer comment (Theory):
Why do we want to enforce sparse changes in $u$? Is this sparse in the dimensions of all u or sparse in the different variables?

Author response:
> Why do we want to enforce sparse changes in $u$? Is this sparse in the dimensions of all $u$ or sparse in the different variables?

Regarding your first question: When we wish to obtain insights into the data-generating process (which is what our method is aimed at), it may be desirable to encourage that not all visible variables $\mathbf{x}$ change for interpretability reasons. We hope that this is more clear in our updated visualization for CelebA (Fig. 5).

To answer your second question, there could be multiple ways. However, we generally consider all $u$ that belong to one observable $x$. In this sense, your second option (sparsity in the different variables) is right.

Reviewer comment (Evaluation):
You mention that interventional CF can generate samples in low-density regions and mention it as a weakness. Why is that? Isn't that actually one of the strengths in terms of disentanglement and generalisation?

Author response:
> You mention that interventional CF can generate samples in low-density regions and mention it as a weakness. Why is that? Isn't that actually one of the strengths in terms of disentanglement and generalisation?

We believe that you misunderstood this point and we are sorry that this wasn't laid out precise enough. We do not intend to claim that backtracking counterfactuals are generally better than interventional counterfactuals. We believe that both approaches can give valuable insights. The preference should be established based on the specific use case. In algorithmic recourse [8], for instance, interventional counterfactuals are of greater interest, as written in our related work section. Backtracking may be more favorable for applications of developing insights into the structural relations between different variables. This can trivially not be achieved by interventional counterfactuals, since they break the governing laws. We updated the phrasing on our manuscript (Sec. 4.1) to make this point clearer.

Reviewer comment (Reproducibility):
You mention that you're using standardized logits for modelling. How do you compute them? What's the impact of using this over discrete variables?

Author response:
> You mention that you're using standardized logits for modelling. How do you compute them? What's the impact of using this over discrete variables?

We generate the logits via classifiers that predict the variables as functions of the image pixels. This is our approach for handling non-continuous variables. The consequence is that we never receive binary counterfactuals. Instead, we always obtain counterfactual logits, which can be translated back into probabilities. I.e., we obtain the probability of the person to be male in the counterfactual rather than the discrete variable directly.

Reviewer comment (Novelty):
You mention the composability / modularity as a strength of your work. However, this is generally possible within any causal generative framework, particularly the DSCM framework. What's special about this work in this regard?

Author response:
> You mention the composability / modularity as a strength of your work. However, this is generally possible within any causal generative framework, particularly the DSCM framework. What's special about this work in this regard?

This is a strength in comparison to counterfactual explanation methods that do not operate on the DeepSCM framework, which is why we elaborate on this point in Section 3.2. We explicitly highlight this as a strength *in the context of counterfactual explanations*.

Reviewer comment (Reproducibility):
You mention you're using "an image regressor, together with an unconditional AE ...". Can you elaborate how this baseline works?

Author response:
> You mention you're using "an image regressor, together with an unconditional AE ...". Can you elaborate how this baseline works?

This baseline is adapted from how standard counterfactual explanation methods work. These methods do not employ a causal model. Rather, these methods are aimed at minimizing some distance function between $\mathbf{x}$ and $\mathbf{x}^*$ such that an image regressor yields a specific, but different prediction than $\mathbf{x}$. To this end, we employ a VAE that is not embedded into a causal model. Instead, we only minimize a distance between the latent VAE embeddings of $\mathbf{x}$ and $\mathbf{x}^*$, without the causal embedding.

Reviewer comment (Novelty):
As for CF explanations, how does this compare to explaining anti-causal predictions by using causal generative models (e.g. see [4])?

Author response:
> As for CF explanations, how does this compare to explaining anti-causal predictions by using causal generative models (e.g. see [4]).

Our method can handle any causal relationship (including anti-causal ones) and can thus be seen as more general. The main key to understanding the relationship between our method and CF explanations is the idea that a predictive machine learning model can be viewed as a structural equation. In this sense, a counterfactual explanation corresponds backtracking with the goal of obtaining insights into this particular structural equation.