SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$$
l _ {c} = \sum_ {i = 1} ^ {D} d \left(\mathbb {E} \left(Z _ {i} \mid d o ^ {c} \left(Z _ {- i}\right), \mathbf {X}\right), \quad \mathbb {E} \left(Z _ {i} \mid \mathbf {X}\right)\right) = 0. \tag {10}
$$
From Theorem 4.1, we see that for each  $\mathbf{C} = c$ , enforcing the latent variable  $\mathbf{Z}$  to be statistically independent minimizes  $l_{c}$ . Taking the whole  $\mathbf{C}$  set into consideration,  $P(\mathbf{Z}|\mathbf{X})$  subjects to a mixture
of Gaussian distribution where each centroid is inferred from observational data under a specific realization of the confounder C:
$$
P (\mathbf {Z} | \mathbf {X}) = \sum_ {c \in C} \pi_ {c} \mathcal {N} \left(\mu^ {c} (\mathbf {X}), \Sigma^ {c} (\mathbf {X})\right). \tag {11}
$$
The mixing coefficient  $\pi_c = P(\mathbf{C} = c|\mathbf{X})$  reads the probability of occurrence of  $\mathbf{C} = c$ . Nevertheless, such a hard assignment of coefficient varies with observable dataset and cannot accommodate scenarios in which the label set  $\mathbf{C}$  does not exist. In this paper, we parameterize  $\pi_c$  as a Gaussian distribution for a soft assignment of samples:  $\pi_c \sim \mathcal{N}(\mu^c(\mathbf{X}), \Sigma^c(\mathbf{X}))$ . Parameters  $\mu^c(\mathbf{X})$  and  $\Sigma^c(\mathbf{X})$  are learned to minimize the discrepancy with  $P(\mathbf{C} = c|\mathbf{X})$ .
In VAEs, the prior of the latent space  $P(\mathbf{Z})$  is assumed to follow a Gaussian distribution with mean zero and identity variance:  $\mathbf{Z} \sim \mathcal{N}(\mathbf{0}, I)$ . To avoid enforcing statistical independence of the overall latent spaces we learn, we only assume that the prior of  $\mathbf{Z}$  to be a Gaussian distribution with variance one for each subset of  $\mathbf{C}$ .
Concretely, suppose that the latent variable  $\mathbf{Z}$  for  $\mathbf{X}$  under  $\mathbf{C} = c$  follows a Gaussian distribution  $\mathcal{N}(\mu^c (\mathbf{X}),\Sigma^c (\mathbf{X}))$ , then the KL divergence in (7) regulates the distribution to  $\mathcal{N}(\mu^c (\mathbf{X}),I)$ .
By the Lagrangian multiplier method, the new loss function is
$$
\mathcal {L} = \underbrace {- \mathbb {E} [ \log P (\mathbf {X} | \mathbf {Z}) ]} _ {\mathcal {L} _ {r e c}} + \underbrace {\mathbb {E} [ \log P (\mathbf {C} | \pi_ {c} (\mathbf {X})) ]} _ {\mathcal {L} _ {c l s}} + D _ {K L} [ P (\mathbf {Z} | \mathbf {X}, \mathbf {C}) | | P (\mathbf {Z} | \mathbf {C}) ]. \tag {12}
$$
The algorithm pseudocode can be found in Appendix C.
In this section, we experimentally compare cdVAE with various baselines on synthetic and real-world datasets, and study properties of cdVAE through the ablation studies. We demonstrate that cdVAE allows for causally disentangled but statistically correlated features being discovered in the latent space, which better approximates the ground truth generative factors and outperforms SOTA baseline under distribution shifts.
Concretely, we aim to answer the following questions regarding the proposed model:
$\triangleright$  Q1: How does it perform compared to the existing methods in the latent space?
$\triangleright$  Q2: How does it perform in downstream tasks such as classification under distribution shifts?
5.1 Basic setup
Datasets. we evaluate cdVAE on three datasets: synthetic datasets 3dshape [3] and Candle [21], and real-world dataset CelebA [15]. 3dshape is a dataset of 3D shapes generated from 6 ground-truth independent latent factors. These factors are floor color, wall color, object color, scale, shape, and orientation. There are 480,000 images from all possible combinations of these factors, and these combinations are present exactly once. Candle is a dataset generated using Blender, a free and open-source 3D CG suite that allows for manipulating the background and adding foreground elements that inherit the natural light of the background. It has floor hue, wall hue, object hue, scale, shape, and orientation as latent factors.
We use 3dshape and Candle as synthetic datasets. To mimic the real-world scenario where perfectly disentangled ground-truth generative factors do not exist or are hard to identify, we manually create a certain level of correlation in these datasets by first making rules among certain attributes and then sampling accordingly.
Baselines and tasks. We compare the performance of cdVAE in the task of image generation and classification under distribution shift with the following architectures: (1) VAE-based methods (vanilla VAE [12],  $\beta$ -VAE [9], FactorVAE [11]) that equate disentanglement as statistical independence, (2) Existing causal regulation methods, CAUSAL-REP [24], (3) cVAE [12] as it also applies the label information (4) GMVAE [7] as it also adopts a mixture of Gaussian model in a variational autoencoder framework.
Table 1: Compare with baselines in image generation task on celebA and candle. The reconstruction error indicates the end-to-end performance of the image generation task. D-score measures from a non-causal perspective and requires that the generation process is unconfounded. We expect that a good method that recovers causally disentangled factors should obtain poor (i.e., low) D-scores. IOSS, UC and CG are causal metrics that measure the level of disentanglement of a representation.
Methods	CelebA	Candle
Recon ↓	D ↑ (non-causal)	IOSS ↓ (causal)	Recon ↓	D ↑ (non-causal)	UC ↑ (causal)	CG ↑ (causal)	IOSS ↓ (causal)
VAE	0.33	0.11	0.78	.024	0.14	0.10	0.18	0.69
β-VAE	0.27	0.15	0.74	.017	0.18	0.11	0.24	0.54
FactorVAE	0.25	0.17	0.68	.014	0.15	0.13	0.26	0.51
CAUSAL-REP	0.29	0.16	0.34	.012	0.18	0.20	0.32	0.31
cVAE	0.32	0.14	0.64	.020	0.14	0.12	0.21	0.62
GMVAE	0.30	0.13	0.71	.018	0.12	0.09	0.16	0.71
cdVAE	0.18	0.12	0.21	.008	0.11	0.35	0.54	0.16
Note that in this paper, we do not compare cdVAE with CausalVAE [27], despite the latter also obtaining "disentanglement" in the latent space. The main reason is that the problem-setting and the learning objectives are fundamentally different. CausasLVAE aims to disentangle known ground truth generative factors in the latent space, it aims to bind these factors one by one to latent variables and the causal dependency is not considered. The task of interest in this paper is to discover causally disentangled factors in the latent space and the ground truth is unavailable, thus these two methods are not comparable.
Evaluation metrics. The experimental results are evaluated on (1) end-to-end evaluation metrics: the accuracy of classification under distribution shifts and reconstruction loss in image generation task. (2) how well the learned latent generative factors recover the ground truth one: Maximal Information Coefficient (MIC) and Total Information Coefficient (TIC) [13]. (3) Existing disentanglement scores from a causal perspective: IRS [23], UC/CG [21], IOSS [24], and statistical perspective: D-Score [8]. The higher these evaluation metrics, the better the model except for IOSS (the lower, the better). A detailed introduction of these metrics can be found in Appendix C.
To be more concrete, IRS evaluates the general interventional robustness of learned representations while UC and CG are extended from IRS. UC (Unconfoundedness) evaluates how well distinct generative factors are captured by distinct sets of latent dimensions with no overlap. CG (Counterfactual Generativeness) measures how robust a certain latent variable is against the others. IOSS measures whether learned random variables have independent supports as a necessary condition inferred from the definition of causal disentanglement.  $D$  score measures disentanglement in the non-causal definition.
5.2 Experimental results
(Q1) cdVAE significantly outperforms various baselines in end-to-end measurement.
We compare our cdVAE with baseline models in the image generation task on the CelebA, and Candle datasets. In CelebA dataset, we have  $\mathbf{C}$  set to be whether there are eyeglasses in the image, i.e.,  $|\mathbf{C}| = 2$ . In the Candle dataset, we have  $|\mathbf{C}| = 4$ , with 2 objective hues and two wall hues combined together. More details can be found in Appendix C.
As shown in Table 1, cdVAE are evaluated by several groups of metrics. Reconstruction error measures how well the images are reconstructed in an end-to-end fashion while the others are measurements of how disentangled the latent factors are: D score is from the non-causal perspective while UC, UG and IOSS are from the causal perspective. For the celebA dataset, we do not measure the UC and CG score as it requires ground truth generative factors or access to the true generative process. Our method outperforms all baselines on these metrics except for the D score. Note the D score is only an effective measurement when there are no confounders in the observational dataset, as it requires each latent variable not to contain information about the others. Under the confounded dataset such as CelebA and Candle, the ground truth generative factors are correlated, resulting in a low D score with our model as expected.
(Q2.1) cdVAE are more robust under distribution shifts.
We conduct the task of shape classification on the 3d shape dataset with distribution shift and use the classification accuracy as a metric for out-of-distribution generalization[28]. Specifically, in the source distribution, we sample a certain percentage of images in which the object hue is correlated with the object shape (i.e., red objects are cubes). The rest of the images are evenly generated by
disentangled factors, while in the target domain, all images are generated by disentangled factors. The proportion of highly correlated data is denoted by shift severity. For example, shift severity = 0.4 means that  $40\%$  of training images are sampled under preset correlation between object hue and object shape.
We train cdVAE,  $\beta$ -VAE, and CAUSAL-REP using images from the source set, with decoders being replaced by classifiers. The trained classifier is then tested on the targets set. We report the classification accuracy on the target set and the performance drop in Figure 5. We could observe that cdVAE is more robust than other baselines under distribution shift as it has the lowest performance drop and the highest target set accuracy.
An intuitive explanation of how C-Disentanglement improves the OOD generalization. Suppose we have a fruit dataset and the goal is to classify fruits. In the training set, a large amount of apples are red and round. If assuming unconfoundedness and requires statistical independence, it is possible that a latent variable encodes whether this object is round-and-red. As a result, in the test set, if there is a green apple, it will fail the test and may not be able to be identified as an apple. However, under the framework of C-Disentanglement, color and shape are disentangled in the latent space, and the shape and color contribute to the classification separately, resulting in a higher probability for the green apple also to be identified as an apple.
Table 2: Compare how ground truth generative factors are recovered (MIC/TIC) and how disentangled they are in the latent space in classification on 3dshape dataset with shift severity  $= 0.5$
Methods	MIC ↑	TIC ↑	IRS ↑
VAE	21.9	12.1	0.82
β-VAE	22.1	12.4	0.85
FactorVAE	24.3	15.6	0.89
CAUSAL-REP	26.8	16.1	0.88
cVAE	22.4	12.4	0.84
GMVAE	23.2	12.8	0.81
cdVAE	31.9	20.2	0.89
Figure 5: Compare cdVAE with  $\beta$ -Vae, CAUSAL-REP on classification under distribution shift. T represents accuracy on the target data, S-T represents the performance drop when the classifier trained on the source data is directly tested on the target data.
(Q2.2) cdVAE better discovers the ground truth generative factors.
In the task of shape classification, we further examine how well the learned representations approximate the ground truth generative labels and to what extent they are causally disentangled. Table 2 shows that cdVAE outperforms all baselines in approximating the generative factors and the disentanglement.
5.3 Ablations studies
We further conduct ablation studies to show that providing inductive bias indeed improves the discovery of generative factors in the latent space. Concretely, we compare cdVAE with conditional VAE (cVAE) [12] and GMVAE [7]. Compared with vanilla VAE, the method proposed uses label information to provide inductive bias to confounders for partitioning the observational dataset. cVAE has the label information compared with vanilla VAE and GMVAE is a VAE modelled by a mixture of Gaussian. As shown in Table 1, cdVAE has universally better results, showing the necessity of introducing bias to factors discovered in the latent space. We also investigate how choice of C affect the model performance and how to adapt C-Disentanglement to the existing method aiming for statistical independent, as shown in appendix C.
6 Related work
Disentangled Representations The pursuit for disentangled representation can be dated to the surge of representation learning and is always closely associated with the generative process in modern machine learning, following the intuition that each dimension should encode different features.
[6] attempts to control the underlying factors by maximizing the mutual information between the images and the latent representations. [8] propose a quantitative metric with the information theory. They evaluate the disentanglement, completeness, and informativeness by fitting linear models and measuring the deviation from the ideal mapping. [9, 11, 5, 18] encourage statistical independence by penalizing the Kullback-Leibler divergence (KL) term in the VAE objective. However, the non-causal definitions of disentanglement fail to consider the cases where correlated features in the observational dataset can be disentangled in the generative process. Such a challenge is well-approached through a line of research from the causal perspective.
Causal Generative Process. Causal methods are widely used for eliminating spurious features in various domains and improving understandable modelling behaviours[25, 26, 14]. It is not until [23] that it was introduced for a strict characterization of the generative process. [23] first provided a rigorous definition of a causal generative process and the definition of disentangled causal representation as the non-existence of causal relationships between two variables, i.e., the intervention on one variable does not alter the distribution of the others. The authors further introduce interventional robustness as an evaluation metric and show its advantage on multiple benchmarks. [21] follow the path of [23] and further propose two evaluation metrics and the Candle dataset. The confounded assumption allows for correlation in the latent space without tempering with the disentanglement in the data generative. Despite effective evaluation tools, there is still a missing piece on how to infer a set of causally disentangled features. Using the proposed evaluation metric as regulation, the model implicitly assumes unconfoundedness and it falls back to finding statistical independence in the latent space. The problem of unrealistic unconfoundedness assumption is identified by [24]. They assume that confounders exist but they are unobservable. They further propose an evaluation metric considering the existence of confounders, that causally disentangled latent variables have independent support measured by the IOSS score. Similar to the evaluation metrics introduced in [23, 21], IOSS is also a necessary condition of the causal disentanglement. More importantly, as in previous work focusing on obtaining statistical independence, such a regulation suffers from the identifiability issue.
Weak Supervision for Inductive Bias. The identifiability issue in unsupervised disentangled representation learning is first identified in [16]. Specifically, they show from the theory that such a learning task is impossible without inductive biases on both the models and the data. Naturally, a series of weak-supervised or semi-supervised methods [4, 1, 2] are proposed with a learning objective of statistical independence or alignment. In this paper, we take a step further for the confounding assumption, assuming that the confounders are observable with proper inductive bias so that the latent representation can be better identified. We, similarly, adopt partial labels of the dataset as the supervision signal. We treat the labels as a source of possible confounders and allow the learning of correlated but causally disentangled latent generative factors to be learned.
7 Conclusion and discussions
In this paper, we recognize the importance of bringing in confounders with proper inductive bias into the discovery of causally disentangled latent factors. Specifically, we propose a framework, C-Disentanglement, that introduces the inductive bias from the domain knowledge and a method, cdVAE, to identify the generative factors. Although cdVAE helps with discovering generative factors under confounders, the learning process relies on the domain knowledge, the choice of  $\mathbf{C}$ , and that  $\mathbf{C}$  has to be discrete/categorical and have a finite number of realizations. How to generalize to continuous  $\mathbf{C}$  or select effective  $\mathbf{C}$  from the available knowledge set is beyond the scope of this paper and will be investigated in future studies. We hope this work could bring attention to the importance of inductive bias of confounders and inspire future works in this direction. In addition, better capturing of generative factors could bring a more controlled generative process and positive social impact.
[20] J. Pearl. The do-calculus revisited. arXiv preprint arXiv:1210.4852, 2012.
[21] A. G. Reddy, V. N. Balasubramanian, et al. On causally disentangled representations. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pages 8089-8097, 2022.
[22] J. Soch, T. B. of Statistical Proofs, T. J. Faulkenberry, K. Petrykowski, and C. Allefeld. StatProofBook/StatProofBook.github.io: StatProofBook 2020, Dec. 2020.
[23] R. Suter, D. Miladinovic, B. Scholkopf, and S. Bauer. Robustly disentangled causal mechanisms: Validating deep representations for interventional robustness. In International Conference on Machine Learning, pages 6056–6065. PMLR, 2019.
[24] Y. Wang and M. I. Jordan. Desiderata for representation learning: A causal perspective. arXiv preprint arXiv:2109.03795, 2021.
[25] Y. Wang, D. Liang, L. Charlin, and D. M. Blei. Causal inference for recommender systems. In Proceedings of the 14th ACM Conference on Recommender Systems, pages 426-431, 2020.
[26] C. Xu, C. Liu, X. Sun, S. Yang, Y. Wang, C. Wang, and Y. Fu. Patchmix augmentation to identify causal features in few-shot learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2022.
[27] M. Yang, F. Liu, Z. Chen, X. Shen, J. Hao, and J. Wang. Causalvae: Disentangled representation learning via neural structural causal models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9593-9602, 2021.
[28] S. Zhu, B. An, and F. Huang. Understanding the generalization benefit of model invariance from a data perspective. Advances in Neural Information Processing Systems, 34:4328-4341, 2021.
A Introduction of do calculus.
Do-calculus consists of three rules that help with identifying causal effects.
Rule A.1 (Insertion/deletion of observations).
$$
P (y | d o (x), z, w) = P (y | d o (x), w) \quad \text {i f} \quad (Y \perp Z | X, W) _ {G _ {\bar {X}}} \tag {13}
$$
Rule A.2 (Action/observation exchange).
$$
P (y | d o (x), d o (z), w) = P (y | d o (x), z, w) \quad \text {i f} \quad (Y \perp Z | X, W) _ {G _ {\bar {X} \underline {{Z}}}} \tag {14}
$$
Rule A.3 (Insertion/deletion of actions).
$$
P (y | d o (x), d o (z), w) = P (y | d o (x), w) \quad \text {i f} \quad (Y \perp Z | X, W) _ {G _ {\overline {{X}} Z (W)}} \tag {15}
$$
where  $G_{\overline{X}}$  is the graph with all incoming edges to  $X$  being removed,  $G_{\underline{W}}$  is the graph with all outgoing edges to  $W$  being removed, and  $Z(W)$  is the set of  $Z$ -nodes that are not ancestors of any  $W$ -node.
Intuitively, Rule A.1 states when an observer can be omitted in estimating the interventional distribution, Rule A.2 illustrates under what condition, the interventional distribution can be estimated using the observational dataset, and Rule A.3 decides when we can ignore an intervention.
B.1 Proof of Proposition 2.1
Proposition B.1. Let  $Z_{1}$  and  $Z_{2}$  be two random variables,  $\mathbf{C}^{*}$  be the ground truth confounder set. If  $\mathbf{C}$  is a superset of or is equivalent to  $\mathbf{C}^{*}$ , i.e.,  $\mathbf{C}^{*} \subseteq \mathbf{C}$ , with  $c$  being a realization of  $\mathbf{C}$ , we have
$$
P \left(Z _ {2} \mid d o \left(Z _ {1}\right)\right) = \sum_ {c \in \mathbf {C}} P \left(Z _ {2} \mid Z _ {1}, \mathbf {C} = c\right) P (\mathbf {C} = c) \tag {16}
$$
$$
P \left(Z _ {2} \mid d o \left(Z _ {1}\right)\right) = P \left(Z _ {2} \mid d o \left(Z _ {1}\right), \mathbf {C}\right) P (\mathbf {C} \mid d o \left(Z _ {1}\right))
$$
$$
P \left(Z _ {2} \mid d o \left(Z _ {1}\right), \mathbf {C}\right) \stackrel {\text {R u l e A . 2}} {=} P \left(Z _ {2} \mid Z _ {1}, \mathbf {C}\right)
$$
$$
P (\mathbf {C} \mid d o (Z _ {1})) \stackrel {\text {R u l e A . 3}} {=} P (\mathbf {C})
$$
$$
P \left(Z _ {2} \mid d o \left(Z _ {1}\right)\right) = \sum_ {c \in \mathbf {C}} P \left(Z _ {2} \mid Z _ {1}, \mathbf {C} = c\right) P (\mathbf {C} = c)
$$
B.2 Proof of Theorem 4.1
Theorem B.2. Suppose that the latent variable  $\mathbf{Z}$  on dataset  $\mathbf{X}$  given  $\mathbf{C} = c$  is Gaussian  $\mathcal{N}(\mu^c (\mathbf{X}),\Sigma^c (\mathbf{X}))$ . Specifically,
$$
P (\mathbf {Z} | \mathbf {C} = c, \mathbf {X}) = (2 \pi) ^ {- D / 2} \det (\Sigma^ {c}) ^ {- 1 / 2} \exp \left(- \frac {1}{2} (\mathbf {Z} - \mu^ {c}) ^ {\intercal} (\Sigma^ {c}) ^ {- 1} (\mathbf {Z} - \mu^ {c})\right),
$$
$$
l _ {c} = \sum_ {i = 1} ^ {D} d \left(\mathbb {E} \left(Z _ {i} \mid d o ^ {c} \left(Z _ {- i}\right), \mathbf {X}\right), \quad \mathbb {E} \left(Z _ {i} \mid \mathbf {X}\right)\right) = 0. \tag {17}
$$
Proof. We suppose that
$$
P (\mathbf {Z} | \mathbf {C} = c, \mathbf {X}) = (2 \pi) ^ {- D / 2} \det  \left(\Sigma^ {c}\right) ^ {- 1 / 2} \exp \left(- \frac {1}{2} \left(\mathbf {Z} - \mu^ {c}\right) ^ {\top} \left(\Sigma^ {c}\right) ^ {- 1} \left(\mathbf {Z} - \mu^ {c}\right)\right) \tag {18}
$$
where we omit  $\mathbf{X}$  for simplicity and  $D$  is the dimension of  $\mathbf{Z}$  for any given  $c$ . By definition of  $l_{c}$  (Equation (9)) and proposition 2.1,
$$
\begin{array}{l} l _ {c} = \sum_ {i = 1} ^ {D} d \left(\mathbb {E} \left[ Z _ {i} \right] d o ^ {c} \left(Z _ {- i}\right), \mathbf {X} \right] - \mathbb {E} \left[ Z _ {i} \mid \mathbf {X} \right]) (19) \\ = \sum_ {i} ^ {D} d \left(E \left[ Z _ {i} \mid Z _ {- i}, \mathbf {X}, C = c \right], E \left[ Z _ {i} \mid \mathbf {X}, C = c \right]\right) (20) \\ = \sum_ {i} ^ {D} d \left(E \left[ Z _ {i} ^ {c} \mid Z _ {- i} ^ {c} \right], E \left[ Z _ {i} ^ {c} \right]\right) (21) \\ \end{array}
$$
where we denote  $\mathbf{Z}^c = [\mathbf{Z}|\mathbf{X},C = c]$  for simplicity. Notice that  $\mathbf{Z}^c\sim \mathcal{N}(\mu^c,\Sigma^c)\in \mathbb{R}^D$  , we therefore know that the conditional distribution of any subset vector  $Z_{k}^{c}$  , given the complement vector  $Z_{j}^{c}$  , is also a multivariate Gaussian distribution [22]
$$
Z _ {k} ^ {c} \mid Z _ {j} ^ {c} \sim \mathcal {N} \left(\mu_ {k \mid j} ^ {c}, \Sigma_ {k \mid j} ^ {c}\right) \tag {22}
$$
$$
\mu_ {k \mid j} ^ {c} = \mu_ {k} ^ {c} + \Sigma_ {k, j} ^ {c} \left(\Sigma_ {j, j} ^ {c}\right) ^ {- 1} \left(Z _ {j} ^ {c} - \mu_ {j} ^ {c}\right), \quad \Sigma_ {k \mid j} ^ {c} = \Sigma_ {k, k} ^ {c} - \Sigma_ {k, j} ^ {c} \left(\Sigma_ {j, j} ^ {c}\right) ^ {- 1} \Sigma_ {j, k} ^ {c}, \tag {23}
$$
given that  $\Sigma_{j,j}^{c}$  is nonsingular.
Hence we know that the first expectation in Equation (21) becomes
$$
E \left[ Z _ {i} ^ {c} \mid Z _ {- i} ^ {c} \right] = \mu_ {i} ^ {c} + \Sigma_ {i, - i} ^ {c} \left(\Sigma_ {- i, - i} ^ {c}\right) ^ {- 1} \left(Z _ {- i} ^ {c} - \mu_ {- i} ^ {c}\right) \tag {24}
$$
assuming that  $\Sigma_{-i, - i}^{c}$  is nonsingular. Since  $\mathbb{E}[Z_i^c ] = \mu_i^c$  , the loss  $l_{c}$  can be written as