Efficiently Disentangle Causal Representations

Authors: yuanpeng  li
joel  hestness
mohamed  elhoseiny
liang  zhao
kenneth  church
Venue: CPAL_cc_2024_Conference
Published: 2023-08-21 07:49:09

Abstract: This paper proposes an efficient approach to learning disentangled representations with causal mechanisms based on the difference of conditional probabilities in original and new distributions.
We approximate the difference with models' generalization abilities so that it fits in the standard machine learning framework and can be computed efficiently.
In contrast to the state-of-the-art approach, which relies on the learner's adaptation speed to new distribution, the proposed approach only requires evaluating the model's generalization ability.
We provide a theoretical explanation for the advantage of the proposed method, and our experiments show that the proposed technique is 1.9--11.0$\times$ more sample efficient and 9.4--32.4$\times$ quicker than the previous method on various tasks.

Main paper: 
 introduction: 
 Causal reasoning is a fundamental tool that has shown significant impact in different disciplines [1] [2] [3] [4] , and it has roots in work by David Hume in the eighteenth century [5] and classical AI [6] . Causality has been mainly studied from a statistical perspective [7] [8] [9] [10] with Judea Pearl's work on the causal calculus leading its statistical development.More recently, there has been a growing interest in integrating statistical techniques into machine learning to leverage their benefits. Welling raises a particular question about how to disentangle correlation from causation in machine learning settings to take advantage of the sample efficiency and generalization abilities of causal reasoning [11] . Although machine learning has achieved important results on a variety of tasks like computer vision and games over the past decade (e.g., [12] [13] [14] [15] ), current approaches can struggle to generalize when the test data distribution is much different from the training distribution (common in real applications). Further, these successful methods are typically "data-hungry", requiring an abundance of labeled examples to perform well across data distributions. In statistical settings, encoding the causal structure in models has been shown to have significant efficiency advantages.In support of the advantages of encoding causal mechanisms, [16] recently introduced an approach to disentangling causal representations in end-to-end machine learning by comparing the adaptation speeds of separate models that encode different causal structures. With this as the baseline, in this paper, we propose a more efficient approach to learning disentangled representations with causal mechanisms based on the difference of conditional probabilities in original and new distributions. The key idea is to approximate the difference with models' generalization abilities so that it fits in the standard machine learning framework and can be efficiently computed. In contrast to the state-of-the-art baseline approach, which relies on the learner's adaptation speed to new distribution, the proposed approach only requires evaluating the generalization ability of models.Our method is based on the same assumption as the baseline that the conditional distribution P (B|A) does not change between the train and transfer distribution. This assumption can be explained with an atmospheric physics example of learning P (A, B), where A (Altitude) causes B (Temperature) [8] . The marginal probability of A can be changed depending on, for instance, the place (Switzerland to a less mountainous country like the Netherlands), but P (B|A) as the underlying causality mechanism does not change. Therefore, we can infer the causality from the robustness of predictive models on out-of-distribution [8, 17] and further learn causal representations (Section 2.4).The proposed method improves efficiency by omitting the adaptation process and is more robust when the marginal distribution is complicated. We provide a theoretical explanation and experimental verification for the advantage of the proposed method. Our experiments show the proposed technique is 1.9-11.0× more sample efficient and 9.4-32.4× quicker than measuring adaptation speed on various tasks. We also argue that the proposed approach reduces the required hyperparameters, and it is straightforward to implement the approach within the standard machine learning workflows.Our contributions can be summarized as follows.• We propose an efficient approach to disentangling representations for causal mechanisms by measuring generalization.• We theoretically prove that the proposed estimators can identify the causal direction and disentangle causal mechanisms.• We empirically show that the proposed approach is significantly quicker and more sampleefficient for various tasks. Sample efficiency is important when the data size in transfer distribution is small. 
approach: 
 To begin, we reflect on the tasks and the disentangling approach (as baseline) described by previous work [16] . The invariance of conditional distribution for the correct causal direction P (B|A) is the critical assumption in the work, and we also follow it in this work. We notice that the baseline approach compares the adaptation speed of models on a transfer data distribution and hence requires significant time for adaptation. We propose an approach to learn causality mechanisms by directly measuring the changes in conditional probabilities before and after intervention for both P (B|A) and P (A|B). Further, we optimize the proposed approach to use generalization loss rather than a divergence metric-because loss can be directly measured in standard machine learning workflowsand we show that it is likely to predict the causal direction and disentangle causal mechanisms correctly.We start with the binary classification task as the first step towards learning disentangled representations for causal mechanisms. Given two discrete variables A and B, we want to determine whether A causes B or vice-versa. We assume noiseless dynamics, and A and B do not have hidden confounders.The training (transfer) data contains samples (a, b) from training (transfer) distribution, P 1 (P 2 ). The baseline approach defines models that factor the joint distribution P (A, B) into two causality directions P A→B (A, B) = P A→B (B|A)P A→B (A) and P B→A (A, B) = P B→A (A|B)P B→A (B). It then compares their speed of adaptation to transfer distribution.Intuitively, the factorization with the correct causality direction should adapt more quickly to the transfer distribution. Suppose A → B is the ground-truth causal direction. For the correct factorization, conditional distribution P A→B (B|A) is assumed not to change between the train and transfer distributions so that only the marginal P A→B (A) needs adaptation. In contrast, for the factorization with incorrect causality direction, both the conditional P B→A (A|B) and marginal distributions P B→A (B) need adaptation. It is analyzed that updating a marginal distribution P (A) A→B is likely to have lower sample complexity than the conditional distribution P B→A (A|B) (only a part of P B→A (A, B)) because the latter has more parameters. Therefore, the model with correct factorization will adapt more quickly, and causality direction can be predicted from adaptation speed.To leverage this observation, the baseline method defines a meta-learning objective. Let L A→B and L B→A be the log-likelihood of P A→B (A, B) and P B→A (A, B), respectively. It optimizes a regret R to acquire an indicator variable γ ∈ R.EQUATIONσ is a sigmoid function σ(x) = 1/(1 + exp(-x)).Rather than relying on gradients of end-to-end predictions to identify the causal direction, we propose to directly observe the divergence of each model's conditional distribution predictions under the intervention of the transfer dataset.We consider the distribution of a single model's predictions on the training and transfer distributions. These distributions depend on both the marginal and conditional distributions learned by the models. It is expected that a model encoding the correct causal direction will have learned a correct conditional distribution, but the marginal distribution might shift from the training to transfer datasets. Hence, we would like to ignore changes in the model's predictions that are due to marginal distribution differences and focus directly on the conditional distribution.Given access to the model's conditional distribution predictions, we could use the KL-divergence to directly measure the conditional distribution differences between the training and transfer datasets.A model that encodes the correct causal structure should show no change in its conditional distribution predictions, so the divergence of these predictions should be slight. On the other hand, a model that encodes the incorrect causal structure is likely to show a significant divergence. We tie these observations together in the following proposition:Proposition 1. Given two data distributions with the same directed causality between two random variables, A and B, the difference of the KL-divergences of their conditional distributions is an unbiased estimator of the correct causality direction between A and B.This approach shares the same intuition as the baseline approach. The model with correct causal direction should only witness minimal changes in the conditional distribution of its predictions between train and transfer distributions. Thus, the KL-divergence of the predictions should not change for models with correct causal structure. The proof for Proposition 1 is included in Appendix A.Although we can use the KL-divergence of the conditional probabilities of two data distributions as an unbiased estimator of causality direction, it requires additional computation to model conditional distribution in transfer distribution. However, in many practical end-to-end learning settings, it is more efficient and straightforward to acquire generalization loss, such as the cross-entropy, that can be used to approximate the conditional KL-divergence.More specifically, we compare the generalization gaps between two causal models to approximate the causality direction. Let the generalization gap, G, be the difference of a model's losses on the training and transfer datasets:G A→B = L transfer A→B -L train A→B .Here, L • A→B is the loss on the specified set. Further, we define a directionality score as the difference of generalization gaps:S G = G B→A -G A→BWe show that for an appropriately chosen loss, such as cross-entropy, S G is a biased but reasonable estimator of the correct causal direction. When S G > 0, A → B is likely the correct causal directionthe generalization gap for the incorrect causal model dominates the score. We formalize this notion in Proposition 2 in Appendix B: Proposition 2. Given two data distributions with the same directed causality between two random variables, A and B, the difference of their generalization gaps is a biased estimator of the correct causality direction between A and B.In practice, for the tasks we test in the next section, we find that although S G is biased, it always indicates the correct causal direction. An intuitive understanding is that this approach measures how well models trained on train distribution can predict in transfer distribution-their generalization ability. Algorithm 1 summarizes the process for identifying a correct causal model. Appendix C describes that the generalization-based approach should converge more quickly than a gradient-based approach, especially in practical settings.The proposed approach for causality direction prediction. G B→A = L transfer B→A -L train B→A . 7: Compute S G = G B→A -G A→B . 8: If S G > 0 return A → B, else return return B → A.The baseline and proposed approaches are based on the same intuition of stable conditional distributions for correct causality direction. However, the baseline approach must observe gradients during transfer distribution training, while the proposed approach looks directly at the changes in model outputs on the transfer data distribution. Informally, we note that these approaches are roughly equivalent by observing the following: for the correct causal direction,G •→• = L transfer •→• -L train •→• ∇G •→• = ∇L transfer •→• -∇L train •→• Since ∇L train = 0, ∇G •→• = ∇L transfer •→• . The previous work shows that ∇ θi L transfer •→•= 0 for model parameters, θ i , representing correct causal structures (i.e., joint distribution), so ∇L transfer •→• should also be small. Similar to that, we expect G •→• to be small relative to the incorrect causal model.So far, we assume that the causal variables are already disentangled in the raw inputs. We are interested in extending it to situations where the variables are entangled in input, such as pixels or sounds. Here, we want to learn representations that disentangle causal variables.Following the previous work, we suppose the true causal variables (A, B) generate input observation (X, Y ) with ground truth decoder, D. We want to train an encoder, E, that converts input (X, Y ) to a hidden representation, (U, V ). The decoder and encoder are rotation matrices.[X Y ] = R(θ D ) [ A B ] [ U V ] = R(θ E ) [ X Y] Then, we treat (U, V ) as observed input and build causal modules on them in a way similar to the causality direction prediction problem (Section 2.1). If the encoder is learned correctly, we expect to obtain(U, V ) = (A, B) with θ E = -θ D , or (U, V ) = (B, A) with θ E = θ D .The baseline approach addresses this problem with the loss function in Equation ( 1) by extending meta-parameters to encoder parameters in the meta-learning framework.We apply our method to learn representation without using the adaptation process. Suppose the conditional distributions P (V |U ) is modeled by f U →V , and P (U |V ) by f V →U . Also, the original losses are L U →V for f U →V and L V →U for f V →U on train data. We optimize the following objective.L = L U →V + L V →U + λ min{G U →V , G V →U }λ is a hyperparameter for interpolation. Note that we compute L U →V , L V →U with train data, and G U →V , G V →U with transfer data. When we use mini-batches, this means that there are two typesThe proposed approach for representation learning.1: Initialize all parameters.2: for each iteration do 3:Update predictor parameters with train samples, and loss L U →V + L V →U .Update encoder parameters with transfer samples, and loss λ min{G U →V , G V →U }. 5: end for of mini-batches for data from train and transfer datasets, respectively. Train data is used to learn f U →V and f V →U , and transfer data is used to learn encoder θ E . Please see Algorithm 2 for details.An intuitive understanding is that we want to learn a representation that works well in both causal directions in train distribution and at least one causal direction in transfer data distribution. Therefore, the models are trained well in train distribution, and the representation recovers causal variables because it works on both distributions in at least one causality direction. 
experiments: 
 We run experiments to show that predicting the causal direction and disentangling causal representations can be more efficient with the proposed approach. For a fair comparison, we follow the same experimental setup as the baseline [16] . The proposed approach is green. The baseline approach [16] is orange.We first compare the approaches in the same meta-learning setting. For the proposed approach, we replace the log-likelihood of joint probabilities with the generalization loss. The overall loss for the proposed approach R ′ is similar to Equation (1) withL A→B = G A→B and L B→A = G B→A . R ′ = -log[σ(γ)G A→B + (1 -σ(γ))G B→A ]The first case we consider is the discrete model with both A and B being ten-dimensional variables (N = 10). For other cases, please refer to Appendix E. The model architecture, the same as in the baseline, has four modules: P A→B (A), P A→B (B|A), P B→A (B), P B→A (A|B). The baseline uses all of them, and the proposed approach only uses the conditionals. We parameterize these probabilities via Softmax of unnormalized tabular quantities and train the modules independently with a maximum likelihood estimator. We then predict the causality direction on transfer data with each approach.For each approach, we fix the ground-truth causal direction as A → B, and run 100 experiments with different random seeds. We plot the mean value of σ(γ) in Figure 1a . The proposed method (green) is above the baseline method (orange). This comparison shows that using generalization loss is more efficient than the log-likelihood of joint probabilities. Especially in the first several steps, the proposed approach moves toward the correct γ more quickly than the baseline approach. This quicker convergence is important when the transfer data is expensive. We also observe that for the baseline method, σ(γ) is less than 0.5 for the first several steps, which might be because the factorization with incorrect causality direction has more parameters to be updated, leading to faster adaptation.Since the proposed approach does not need the adaptation process, it does not need to update σ(γ) with gradients. Instead, we can calculate a score, S G = G B→A -G A→B , to detect causality direction. This score is not directly comparable with σ(γ) in the baseline approach because they have different scales and semantics. To compare them, we reformulate the causality direction prediction problem as a binary classification problem and evaluate the accuracy of the classification. For each approach, we run 100 experiments with the same setting as above. We then compute the accuracy as the number of experiments with successful prediction over all experiments. For the baseline approach, we count an experiment as successful when γ > 0. For the proposed approach, we count when S G > 0.We plot accuracy along with the number of iterations to compare sample efficiency as shown in Figure 1b . The experimental result demonstrates that the proposed approach (green) achieves 100% accuracy after just 3 iterations with 5.1 ms, while the baseline approach (orange) takes 33 iterations to achieve 100% accuracy with 165.1 ms.Since our method only requires estimating a scale value of loss from transfer data, it is more sample efficient than the original method that requires learning/updating all parameters in a model during adaptation. The experiments show that our method is 11.0 times sample efficient and 32.4 times quicker compared with the baseline approach. Also, the baseline accuracy for the first several steps is less than 50%. This is consistent with the previous observation that the σ(γ) < 0.5 for the first several steps. Figure 2 : Experiments to evaluate efficiency in representation learning with the same setting. The curve of the proposed approach (green) is above that of the baseline approach (orange), indicating the proposed method has both better sample and time complexity.We evaluate representation learning in the same setting as in previous work. We hope finding the correct causality direction helps to learn causal representations. We set the correct causal direction asA → B. With a sample (A, B), a fixed decoder D = R(θ D ) converts it to an observation (X, Y ),where R is a rotation matrix. We then use both approaches to learn encoders E = R(θ E ) that map (X, Y ) to representation (U, V ). We set decoder parameter θ D = -π/4, so that the expected encoder parameter should be π/4 or -π/4.For both approaches, we use the same experiment setting and hyperparameters. In each iteration, the baseline approach uses transfer samples to adapt the model by learning gradient descent for several steps and obtain regret to update the encoder. On the other hand, we directly use loss instead of analyzing with a statistical test because this can be neurally integrated with neural network training for disentangled representation learning.We plot the relation of θ values along with the number of iterations and time to compare sample and time efficiency. The result for sample efficiency is in Figure 2a . The proposed approach (green) reaches near π/4 after around 220 iterations. Baseline approach (orange) reaches near π/4 after around 410 iterations. The proposed approach is around 1.9 times sample efficient compared with the baseline approach. The result for time efficiency is in Figure 2b . The proposed approach (green) reaches near π/4 in around 34 seconds. Baseline approach (orange) reaches near π/4 in around 319 seconds. The proposed approach is 9.4 times quicker than the baseline approach.The results show that the proposed approach is both sample and time-efficient for the representation learning task. Especially, the time efficiency shows the proposed method's advantage that it does not need multiple steps of adaptation in each iteration. It even does not need to compute gradient with backpropagation or update model parameters. 
discussions: 
 To further understand the proposed approach, we discuss alternative metrics for distribution differences, the proposed approach's working conditions, and the baseline. We also extend experiments on real data and neural network models.The proposed approach may even work when using other metrics that are easily accessed in standard machine learning workflows. Many loss functions share properties of distance metrics and smoothness conditions that make them helpful in comparing the generalization ability of different models. Such metrics may be biased but can also be used to assess causality direction. We describe and experiment with metrics such as the KL-divergence loss and the gradient norm in Appendix F. Empirical tests show that both alternative metrics can identify causality direction in the prediction task. One may choose these alternative metrics depending on the workflow.We compare the proposed and the baseline approach on the working conditions. One potential problem of the baseline approach is the dependency on marginal distributions. This not only requires more samples and computation, but when the marginal distribution for the correct factorization P (A) is complicated, it may produce incorrect causality predictions (suppose A → B is the correct causality direction). We show an example of such a case in Appendix G. We design a marginal distribution of cause variable P (A) with a complicated hidden structure, which makes it harder to adapt after intervention than the marginal distribution of effect variable P (B), and conditional distribution P (A|B). We use a mixture model for P (A) with K dimensional hidden variables C and do not change models for other distributions. The result shows that the proposed approach is more robust than the baseline one in this case.In addition to comparing the proposed approach with the previous work in the same setting to understand the fundamental mechanism for causality learning, we also evaluate whether the proposed method extends naturally to broader situations. We use real data of temperature and altitude [18] . We scale the data to have unit variance. We apply the proposed approach with both linear models and neural networks. We also add noise to the data and observe the changes in performance. The details can be found in Appendix H. The results show that the proposed approach works for the real data and applies to both linear models and neural networks. It resists some level of noise (standard deviation ≤ 1), but not when the noise is too large. 
related work: 
 Our work is closely related to causal reasoning, disentangled representation learning, and its application to domain adaptation and transfer learning.Causal Reasoning There is rich literature on causal reasoning based on the pre-conceived formal theory since Pearl's seminal work on do-calculus [7, 19] . The major approach is structure learning in Bayesian networks. Discrete search and simulated annealing are reviewed in [20] . Minimum Description Length (MDL) principles are commonly used to score and search [21, 22] . Bayesian Information Criterion (BIC) is also used to search when models have high relative posterior probability [20] .Prior work uses observation but does not consider interventions and focuses on likelihood learning or hypothesis equivalence classes [20] . Later, approaches have also been proposed to infer the causal direction only from observation [17] , based on not generally robust assumptions on the underlying causal graph. The impact of interventions on probabilistic graphical models is also introduced in [23] . Another early work [8] uses intervention to detect causal direction, but it does not address representation learning, which is an important problem in the modern neural network and the main topic of this paper. Further, our method should be more efficient than the fast approximation method [8] , which takes iterations to fit a model. In contrast, we only run one forward pass on a fixed model.Recently, a meta-learning approach is adopted to draw causal inferences from purely observational data. [24] focuses on training an agent to learn causal reasoning by meta reinforcement learning; [16] focuses on predicting causal structure based on how fast a learner adapts to new distributions.In contrast, we propose an efficient approach for disentangling causal mechanisms based on the difference of conditional probabilities in original and new distributions, assuming causal mechanisms hold in both distributions. More recently, generative models have been augmented with causal capabilities to learn to generate images and also to plan [25, 26] .Disentangled Representation Learning This work discovers the underlying causal variables and their dependencies. This is related to disentangling variables [27] and disentangled representation learning [28, 29] . Some work points out that assumptions, including priors or biases, should be necessary to discover the underlying explanatory variables [27, 30] . Another work [30] reviews and evaluates disentangling and discusses different metrics.A strong assumption of disentangling is that the underlying explanatory variables are marginally independent of each other. Many deep generative models [31] and independent component analysis models [28, 32, 33] are built on this assumption. However, in realistic cases, this assumption is often not likely to hold. Some recent work addresses compositionality learning [34, 35] without such assumption, but they do not address how to use causal mechanisms for representation learning.Previous work finds a subset of features to best predict a variable of interest [36] . However, the work is about feature selection, and our work is about causality direction and representation learning.Other work also examines incorrect inference and turns the problem into a domain adaptation problem [37] . Counterfactual regression is proposed to estimate each effect from observation [38] . Another approach is to find a subset that makes the target independent from the variable selection [39] .To do that, they assume the invariance of conditional distribution in train and target domains.Also, competition may be introduced to recover a set of independent causal mechanisms, which leads to specialization [40] . 
conclusion: 
 In this paper, we propose an efficient simplification of a technique to disentangle causal representations. Unlike the baseline approach, which requires significant adaptation time and sophisticated comparisons of the models' adaptation speed, the proposed approach directly measures generalization ability based on the divergence of conditional probabilities from the original to transfer data distributions. We provide a theoretical explanation for the advantage of the proposed method, and our experiments demonstrate that the technique is significantly more efficient than the approach based on adaptation speed in causality direction prediction and representation learning tasks. We hope this work in causal representation learning will be helpful for more advanced artificial intelligence. 
 
 Appendix: Here, we prove that we could use conditional KL-divergence to detect causality direction.A and B, the difference of the KL-divergences of their conditional distributions (i.e., P (B|A)) is an unbiased estimator of the correct causality direction.Proof. First, let P 1 and P 2 be the distributions such that P 1 ̸ = P 2 , but their conditional distributions are the same. Let D KL (•∥•) be conditional KL-divergence. CrossEntropy A→B (P i , P j ) is the conditional cross-entropy, -∑ ∀(a,b) P i (a, b) log P j (b|a) = E A,B∼Pi [-log P j (B|A)]. Let H A→B (•) be conditional entropy.By the KraftMcMillan theorem, we haveD A→B = D KL (P 2 (B|A)∥P 1 (B|A)) = E A,B∼P2 [log P 2 (B|A) -log P 1 (B|A)] = E A,B∼P2 [-log P 1 (B|A)] -E A,B∼P2 [-log P 2 (B|A)] = CrossEntropy A→B (P 2 , P 1 ) -H A→B (P 2 )Without loss of generality, suppose A → B is the correct causality direction. Since P 1 (B|A) = P 2 (B|A), we have that CrossEntropy A→B (P 2 , P 1 ) = H A→B (P 2 ) andD A→B = CrossEntropy A→B (P 2 , P 1 ) -H A→B (P 2 ) = H A→B (P 2 ) -H A→B (P 2 ) = 0Finally, if we define a directionality score, S DKL , as the difference of KL-divergence of the two distributions, we can identify the incorrect causal direction by its greater divergence. Namely,S DKL = D B→A -D A→B = [CrossEntropy B→A (P 2 , P 1 ) -H B→A (P 2 )] -0 > 0 =⇒ A → BHere we use the property that entropy is less than cross-entropy when the two distributions are not equal.Here, we prove that we can replace conditional KL-divergence with a standard generalization loss calculation to approximate the causal directionality score, S DKL , in Proposition 1. This approximation introduces bias into the score, but we expect this bias to be slight relative to the difference of conditional KL-divergences of the incorrect causal model. Thus, it can be used as a good estimator of causality direction.Proposition 2. Given two different data distributions, P 1 and P 2 , with the same directed causality between random variables, A and B, consider the generalization loss defined as the conditional cross-entropy of a given distribution:L Pi A→B = CrossEntropy A→B (P i , P 1 ) = E A,B∼Pi [-log P 1 (B|A)]And define the generalization gap asG •→• = L P2 •→• -L P1 •→• . Finally, define the modified causality score, S G = G B→A -G A→B . If S D KL = D B→A -D A→B as defined in Proposition 1, then S G = S D KL -[∆H(B)- ∆H(A)]. S Gis a biased estimator of which model has correct causality direction.G A→B = L P2 A→B -L P1 A→B = CrossEntropy A→B (P 2 , P 1 ) -H A→B (P 1 ) = [CrossEntropy A→B (P 2 , P 1 ) -H A→B (P 2 )] + H A→B (P 2 ) -H A→B (P 1 ) = D A→B + H A→B (P 2 ) -H A→B (P 1 ) = D A→B + H(P 2 (B|A)) -H(P 1 (B|A)) = D A→B + [H(P 2 (A, B)) -H(P 2 (A))] -[H(P 1 (A, B)) -H(P 1 (A))] = D A→B + [H(P 2 (A, B)) -H(P 1 (A, B))] -[H(P 2 (A)) -H(P 1 (A))] = D A→B + ∆H(A, B) -∆H(A) G B→A = D B→A + ∆H(A, B) -∆H(B)Here ∆H(A, B), ∆H(A) and ∆H(B) are the change in entropy from P 1 to P 2 for (A, B), A and B, respectively. Further, the modified causality score is the difference of these generalization gaps:S G = G B→A -G A→B = [D B→A + ∆H(A, B) -∆H(B)] -[D A→B + ∆H(A, B) -∆H(A)] = [D B→A -D A→B ] -[∆H(B) -∆H(A)] = S DKL -[∆H(B) -∆H(A)]Without loss of generality, suppose A → B is the correct causal direction, then D A→B = 0.S G = D B→A -[∆H(B) -∆H(A)]When S G > 0 (and [∆H(B) -∆H(A)] is small), the prediction of causality direction is correct.Informally, we expect the bias term, [∆H(B) -∆H(A)], to be small relative to the divergence, D B→A , in real application settings. If A → B, then A and B will have some (positive or negative) correlation-they will vary in a correlated way under intervention on A. Unless the conditional distribution, P 1 (B|A) = P 2 (B|A), contains large portions with high entropy, a change in A will likely cause a commensurate change in B. Thus, it is likely that |∆H(A)| ≈ |∆H(B)|, so it is unlikely that ∆H(A) and ∆H(B) are both large and have opposite sign.Further, in cases where ∆H(A) is large, but ∆H(B) is small, it is frequently an indicator that the selected P i are "lucky" (uncommon) or the causality between A and B is weak. Consider the example in which H(P 1 (A)) is small, but H(P 1 (B)) is large. This case can occur if H(P 1 (B|A)) is small, but it is unlikely because the (low-entropy) conditional distribution must impose the disorder on P 1 (B). It is easy to see that the reverse situation (H(P 1 (B|A)) is large) implies that the causality between A and B is weak, such that causality direction prediction may be difficult anyway.Finally, if we want to relax the assumption that either A → B or B → A (e.g., a null-hypothesis that A and B are not causally related), we could introduce a significance test to decide whether we can accept the selection of causal direction from either method. Such a significance test would need to be mindful of the magnitude of any biases introduced in the approach.Here, we explain how generalization loss is likely to be more practical than gradient-based approaches for identifying a model with the correct causal direction. Both the baseline and proposed approaches rely on the convergence of estimators toward a ground truth model, but gradient-based approaches require much stronger assumptions to guarantee convergence, and they are more susceptible to practical challenges like tuning optimizer hyperparameters.First, both gradient-and generalization-based approaches have the same asymptotic convergence characteristics, with the prediction error proportional to ). These proofs rely on many assumptions that cannot be guaranteed in real-world datasets, such as convexity, regularity, or smoothness of error surface, using optimal settings of optimization parameters for best-case step sizes, etc. [41] [42] [43] . These bounds can also tend to be loose for real data distributions.On the other hand, non-parametric estimators, such as the sample average generalization loss proposed in this work, do not have a model, so their convergence rates can depend only on the structure of the dataset (e.g., first or second moments). For instance, early estimator convergence results show that after summarizing n samples, the error in an estimator can be within ε of the true value: [44, 45] . The constants in these bounds are just the moments that characterize the dataset (e.g., mean, variance). Like the gradient-based convergence rates, these non-parametric convergence rates can also be loose for real data distributions.ε = O( 1 √ n )Thus, in practical settings, it is likely that a generalization-based approach (non-parametric estimators) will converge more quickly on causality identification in real-world datasets. The proposed approach does not require further model optimization (fine-tuning), so it is not susceptible to poorly chosen hyperparameters. Further, it is unlikely to encounter complex error surface topology. Thus, in practice, it is likely to converge more quickly than gradient-based causality identification techniques.We run representation learning experiments for both approaches on a GeForce GTX TITAN Z with PyTorch. We use the original implementation for the baseline approach and extend it for the proposed approach. The hyperparameters are the same as the original setting [16] . We would like to extend causality direction prediction experiments to high dimensional variables and continuous variables. We still follow the experiment settings in previous work [16] and compare the proposed and the baseline approaches. We run all the experiments of causality direction prediction with Intel Core i9 9920X 12-Core Processors.For high dimensional variables, we run experiments with N = 100. We use the same setting as the experiments with N = 10 but only changed the N . The result for sample efficiency is in Figure 3a .Similar to the case of N = 10, the proposed approach (green) is significantly more efficient than the baseline approach (orange) in both sample.For continuous variables, we used the same setting as the previous work [16] . For the proposed method, we only use one sample for each episode. The plot shows that the proposed approach (green) is more efficient than the baseline approach (orange) in sample number (Figure 3b ).The proposed approach may even work when using other metrics that are easily accessed in standard machine learning workflows. Many loss functions share properties of distance metrics and smoothness conditions that make them helpful in comparing the generalization ability of different models. Such metrics may be biased but can also be used to assess causality direction. We describe and experiment with metrics such as the KL-divergence loss and the gradient norm. Empirical tests show that both alternative metrics can identify causality direction in the prediction task. One may choose these alternative metrics depending on one's workflow.For KL-divergence, we define the metric as follows and show an example result in Figure 4a .S DKL = D KL [P 2 (B|A)∥P 1 (B|A)] -D KL [P 2 (A|B)∥P 1 (A|B)]For gradient L 2 norm, we define the metric as the follows, and we show an example result in Fig- ure 4b .S L2 = L 2 ( ∂L transfer A→B ∂θ A→B ) -L 2 ( ∂L transfer B→A ∂θ B→A )Note that the model or optimization algorithm does not have special requirements on the gradient, such as gradient clipping.These results indicate that other loss functions can behave similarly to the conditional cross-entropy when identifying causality direction. The initial samples already show a large gap between the correct and incorrect causal models, and after just a few tens of examples, the difference is close to convergence.We expect that the same intuition applies to these other loss metrics. In particular, these loss metrics both satisfy distance metric properties of non-negativity and the triangle inequality. Further, they have continuity and smoothness characteristics that suggest any biases they may have should behave like conditional cross-entropy. Our empirical results confirm these intuitions. To compare the robustness of the proposed approach with the baseline, we design P (A) with a complicated hidden structure so that it is harder to adapt after intervention than P (B) and P (A|B). For P (A), we use a mixture model with K dimensional hidden variables C and keep other distributions unchanged.P (A; θ, ϕ) = K ∑ k=1 P (A|C k ; ϕ)P (C k ; θ)where θ ∈ R K , ϕ ∈ R K×N . We set N = 10, M = 10, K = 200. For the baseline approach, we plot the improvement of log-likelihood during adaptation along with the number of samples (×100) in Figure 5a . The model with correct causality direction (blue) adapts slower than that of incorrect direction (red), which means the fundamental intuition of baseline approach does not apply in this situation. For the proposed approach, we plot the difference of generalization losses S G = G B→A -G A→B along with the number of samples (×100) in Figure 5b . The difference (blue) is significantly larger than zero (red). This is natural because the proposed approach does not use P (A) so that it is not influenced by whether P (A) has a complicated hidden structure. This experiment shows that the proposed approach is more robust than the baseline one in this case. The result shows that the models with correct causalities are slow to adapt in the baseline approach (a), which means the baseline approach does not work, but the proposed approach (b) works.We use the altitude and temperature dataset [18] , where altitude (A) causes temperature (B). We generate the train and the transfer datasets in the following way. We first divide the data into two sets, D 1 and D 2 , according to their A values. Samples in D 1 have larger or equal A values than those in D 2 . We respectively shuffle and separate D 1 and D 2 to two subsets with ratio of 9:1, generating D 1 1 , D 2 1 , D 1 2 , D 2 2 . We then merge sets to generate train data (D 1 1 ∪ D 2 2 ) and transfer data (D 2 1 ∪ D 1 2 ). We use both a linear regression model with L 2 loss and a neural network model with two layers. The hidden layer has 100 nodes with ReLU activation. We use scikit-learn [46] for implementation. We run experiments 1,000 times with different random seeds, and the predicted causal directions are always correct.For different noise levels, we use Gaussian noise with different standard deviations. In the altitudetemperature experiment with the linear model, the success rate starts to drop to 99.8 ± 0.1% at 0.5 and becomes 96.0 ± 0.4% at 1.0, 63.9 ± 1.8% at 5.0, 55.3 ± 1.2% at 10.0, and 50.1 ± 1.3% at 50.0 (Figure 6 ). This means the method is robust to some noise (around 1 or less) but does not work when the noise is too large.We look into more details of the robustness and the edge cases for the difference in the generalization loss gap as a predictor. We first discuss the relation between the difference in KL divergence S D KL and the difference in loss gap S G . We also discuss the relation between intervention and S G . We then give a counterexample based on the analysis. Estimator We look at the relation between the difference in generalization loss gap S G (proposed estimator) and the difference in KL divergence S D KL . We assume A → B, so S D KL is positive by Proposition 1. The estimation is correct if S G is also positive. Figure 7a shows that S D KL and S G are close to each other, which means S G is a reasonable estimator. Also, when S G is negative, it is close to zero. It indicates that the estimation S G is reliable when large. So, a possible extension is to use a threshold to filter cases where S G are close to zero. Such cases also have small S D KL , so we can understand it in the way that the cases are filtered because they are essentially hard to predict.We also like to discuss the relation between intervention and S G . Figure 7b shows S G can be negative only when H(A) is negative. This means the prediction may not be robust when the intervention reduces the amount of information in the cause variable.Edge example Based on the previous analysis, we show an example that S G is negative. The intervention reduces the entropy of the cause variable. S G = -0.086 We first generate the invariant conditional distribution P (B|A). We then generate two marginal distributions, P 1 (A) for training and P 2 (A) for transfer distribution. The joint distributions P 2 (A, B) and P 2 (A, B) are computed from the conditional and the marginal distributions. Each distribution is generated by drawing a number uniformly at random between 0 and 1 for each possible value and normalizing them. 


Decision: The reviewers are generally positive about the paper and find it technically strong, original, and well-written. Several concerns were raised, including the limitation to two observational variables and limited experimental evaluation. Overall, the paper has sufficient novel contributions and is worth acceptance.

Reviews: review: title: title: Review
main_review: main_review: **Summary:**.  
The paper explores a new approach to concurrently disentangling causal variables and determining the causal relationship between them. It draws inspiration from the work of Bengio et al. (2020), but diverges by focusing on the generalization gap instead of employing a meta-objective and adaptation speed.  

**Pros:**  
•	The proposed method addresses both learning a disentangled representation of causal variables and discovering their causal direction.

**Cons:**   
•	The evaluation is somewhat limited. Specifically, it remains uncertain how the method can be extended to more than two variables and larger benchmarking datasets. Additionally, it would be beneficial to see ablation studies on edge cases, particularly the impact of choosing conditional and marginal distributions on the condition of a small entropy gap in Proposition 2 (which lies at the core of the theoretical justification of the method)

**Detailed:**    
The proposed method presents an interesting solution for acquiring both disentangled (causal) representations and the causal relationships between them. It builds upon the concept introduced by Bengio et al. (2020), but simplifies the computations to a comparison of the generalization gap. Consequently, it eliminates the necessity for defining connection-wise structural parameters and employing REINFORCE-based gradient estimators. However, I do have some concerns about this work. 

Firstly, I find the evaluation (and hence the impact) of the paper limited. The method is designed solely for setups involving two observational variables, and it does not appear readily extensible to studies involving datasets with more variables. As a result, its usefulness in recovering causal directionality in large-scale practical applications is unclear. Furthermore, the only baseline considered is the work of Bengio et al. (2020). While this is a logical baseline given the similarities between both approaches, it's worth noting that the notion of meta-learning the structural parameters of a causal graph has also been explored in more expansive and efficient studies (e.g., [2] and [3]).

Secondly, if I comprehend correctly, according to Proposition 1 (and consequently 2), the method is capable of working only with interventions on the cause variable (i.e. the causal graph cannot change between the transfer and train distributions). Consequently, there are no assurances regarding its behavior when the transfer dataset is, in fact, an intervention on the effect, thereby breaking the dependence between observed variables. Simultaneously, according to Proposition 2, the difference in generalization gap is posited as a valid predictor if the delta entropy gap between variables B and A is "reasonably small." However, the authors only provide an intuition that such a statement should not be violated in real-world applications. The paper does not examine any real-world datasets or distributions (or their "approximations," as encountered, for instance, in BnLearn, since it is difficult to request a "real" dataset), nor does it conduct ablation studies on potential edge cases that could lead to the violation of the aforementioned argument. I believe the paper could benefit from a more comprehensive analysis from this perspective.

**Questions:** How is σ(γ) defined in this approach?

**References:**.   
[1] Bengio, Yoshua, et al. "A meta-transfer objective for learning to disentangle causal mechanisms." arXiv preprint arXiv:1901.10912 (2019).   
 [2] Ke, Nan Rosemary, et al. "Learning neural causal models from unknown interventions." arXiv preprint arXiv:1910.01075 (2019).     
[3] Lippe, Phillip, Taco Cohen, and Efstratios Gavves. "Efficient neural causal discovery without acyclicity constraints." arXiv preprint arXiv:2107.10483 (2021).
title: title: Solid theoretical analysis
main_review: main_review: This paper studies efficient learning of disentangled causal representations by approximating conditional probability differences with generalization loss.

**Quality** 
The paper is technically strong with solid theoretical analysis and extensive experiments.

**Clarity** 
The writing is clear and easy to follow. The problem is well motivated, and the proposed approach is intuitively explained. Theoretical results clearly convey the mechanisms and efficiency benefits.

**Originality** 
Approximating conditional divergence with generalization loss to identify causality is novel. This simplification enables direct leverage of standard ML workflows.

**Significance** 
The significant efficiency improvements enable wider application of causal representation learning.

## Pros
1. Intuitive approximation using generalization loss avoids the adaptation process.
2. Theoretical analysis clearly explains mechanisms and advantages.
3. Empirical results strongly demonstrate efficiency benefits.
4. Enables straightforward integration with standard ML workflows.

## Cons
1. More intuition behind the generalization loss approximation could be useful.
2. Experiments on more complex real datasets could better showcase benefits.
3. More discussion on sensitivity and failure cases would be helpful.
4. Comparison with more baselines besides the one previous method is needed.
5. A broader impact discussion could be added.
title: title: A novel approach that enhances an existing method, supported by both solid theoretical justification and empirical evaluation.
main_review: main_review: **Overview**

This paper proposes an efficient and theoretically motivated approach to simplify the technique of disentangling causal representations. 

**Strength**
* The key idea of approximating the difference of conditional probabilities with models' generalization abilities is intuitively reasonable and further carefully approved with corner case well discussed. 
* The empirical evaluation is solid as the experiments follow the most standard work, and the efficiency improvement of the proposed method is very pronounced.


**Question**
* Does the paper offer insights into the approximation error associated with using generalization abilities as a surrogate for the actual difference in conditional probabilities? Is there any provided intuition or established bounds?