# Causal Inference-Based Self-Supervised Cross-Domain Fundus Image Segmentation
## 3 Methods  
### Causal Inference  
In the self-supervised cross-domain fundus image segmentation task, the model is primarily supervised by source-domain images and their corresponding labels. However, as illustrated in Figure 1, the same sample can exhibit substantial visual differences under different domain styles, and this style-induced variation inevitably perturbs the training process, introducing systematic biases into pseudo-label generation. Specifically, during feature extraction, the model may capture intrinsic style noise from images in a particular domain, leading to biased pseudo-labels and ultimately degrading segmentation performance.  
To mitigate this confounding effect, we conducted a causal analysis of the task and constructed a corresponding SCM, as illustrated in Figure 2. This model comprises four variables: the target domain image \(X\), the feature map \(F\) extracted from the target domain image, the interference information \(C\) induced by domain style, and the segmentation result \(Y\). In this causal graph, the arrow \(X\to F\) indicates that the feature map \(F\) is extracted from the target domain image \(X\), while the arrow \(F\to Y\) signifies that the pseudo-label \(Y\) is generated based on the feature \(F\). Moreover, \(C\to\{F,Y\}\) shows that the domain style shift interferes with both the feature extraction process and the pseudo-label generation, thereby acting as a confounding factor.  
Figure 1: Comparison of the same sample under different domain styles.  
Due to the existence of a backdoor path, directly generating pseudo-labels using the conditional probability \(P(Y\mid F)\) leads to bias. Therefore, we adopt a causal intervention approach to cut off the backdoor path and eliminate the confounding effect, replacing the conditional distribution with the interventional distribution \(P(Y\mid do(F))\) for pseudo-label generation. To accurately compute \(P(Y\mid do(F))\), we intervene on \(F\) so as to sever its causal connections with all non-descendant nodes, thereby ensuring that the remaining causal pathways faithfully reflect the relationship \(P(Y\mid do(F))\).  
In this process, we assume that the confounder C can be observed and stratified; in our context, the set C represents the domain style information from both the source and target domains. To this end, we introduce the Fourier transform to simulate such stratification--by exchanging the low-frequency components between the source and target domain images, we effectively strip away the confounding domain style components. Subsequently, both the intrinsic feature map extracted from the target domain image and the feature map obtained after applying a source-domain style transformation are concurrently fed into the pseudo-label generation module to produce pseudo-labels based on causal inference.  
Based on the above analysis, the backdoor adjustment can be expressed as:  
\[\begin{split} P(Y\mid do(F))&=\sum_{c\in C}P(Y\mid F,c)P(c\mid F)\\ &=\sum_{c\in C}P(Y\mid F,c)P(c)\end{split} \tag{1}\]  
where \(P(Y\mid F,c)\) denotes the conditional probability of generating the pseudo-label \(Y\) given the feature \(F\) and the confounding factor \(c\), and \(P(c)\) represents the marginal distribution of the confounder.