# Causal Inference-Based Self-Supervised Cross-Domain Fundus Image Segmentation
## 3 Methods
### Causal Inference-Based Pseudo-Label Fusion Module
When the input and output channels match, a residual connection is applied, which mitigates gradient vanishing and feature degradation while dramatically reducing both parameter count and computational cost. This lightweight feature extractor therefore strikes an effective balance between representational capacity and inference speed, particularly well suited to medical imaging tasks with limited data and constrained hardware resources. Built upon this encoder, DeepLabV3+ incorporates an Atrous Spatial Pyramid Pooling (ASPP) module that applies parallel atrous convolutions at multiple dilation rates to capture contextual information from local to global scales without sacrificing feature-map resolution. Its lightweight decoder then fuses shallow, high-resolution feature maps with the ASPP outputs and employs depthwise separable transposed convolutions for upsampling, thereby refining boundary details. This backbone design achieves a harmonious trade-off between multi-scale adaptability, high-fidelity edge recovery, and computational efficiency, effectively addressing the large scale variations and fine boundary requirements inherent to OD/OC segmentation. After obtaining the feature maps from both the target domain image and its source-style transformed counterpart, we proceed to generate pseudo-labels using these features. The structure of the pseudo-label generation module is shown in Figure 3. In this figure, the dashed arrow denotes that the maximum-square loss \(L_{m}\) is applied to the fused pseudo-label \(y_{t}^{f}\) during training. In this process, we also introduce a confidence-based mechanism to enhance the reliability of the pseudo-labels. First, for the prediction outputs of the segmentation network \(M_{s}\) (or \(M_{t}\)), we compute the confidence for each pixel; then, we fuse the resulting confidence maps obtained from the same image (e.g., \(\mathbf{x_{t}}\) and \(\mathbf{x_{t}^{s}}\)) and perform pixel-level normalization. It is important to note that \(\hat{\mathbf{y}}_{\mathbf{t}}\) comprises the OD prediction probability map \(\hat{\mathbf{y}}_{\mathbf{t}(\textbf{disc})}\) and the OC prediction probability map \(\hat{\mathbf{y}}_{\mathbf{t}(\textbf{cup})}\), whereas \(\hat{\mathbf{y}}_{\mathbf{t}}^{\mathbf{s}}\) consists of \(\hat{\mathbf{y}}_{\mathbf{t}(\textbf{disc})}^{\mathbf{s}}\) and \(\hat{\mathbf{y}}_{\mathbf{t}(\textbf{cup})}^{\mathbf{s}}\). Accordingly, we compute the confidence maps for these four probability maps--denoted as \(\hat{\mathbf{O}}_{\mathbf{t}(\textbf{disc})}\), \(\hat{\mathbf{O}}_{\mathbf{t}(\textbf{disc})}\), \(\hat{\mathbf{O}}_{\mathbf{t}(\textbf{disc})}\), \(\hat{\mathbf{O}}_{\mathbf{t}(\textbf{cup})}\), and \(\hat{\mathbf{O}}_{\mathbf{t}(\textbf{cup})}^{\mathbf{s}}\)--and then concatenate \(\hat{\mathbf{O}}_{\mathbf{t}(\textbf{disc})}\) with \(\hat{\mathbf{O}}_{\mathbf{t}(\textbf{disc})}^{\mathbf{s}}\) and feed the result into a softmax layer for normalization. The computation process is illustrated in Figure 4. An analogous operation is performed for \(\hat{\mathbf{O}}_{\mathbf{t}(\textbf{cup})}\) and \(\hat{\mathbf{O}}_{\mathbf{t}(\textbf{cup})}^{\mathbf{s}}\). The resulting normalized confidence maps \(\hat{\mathbf{O}}_{\mathbf{t}}\) and \(\hat{\mathbf{O}}_{\mathbf{t}}^{\mathbf{s}}\) are then used to weight the corresponding probability maps and produce the pixel-wise pseudo-label \(\hat{\mathbf{y}}_{\mathbf{t}}^{\mathbf{t}}\), which serves as the self-supervision target in the target-domain segmentation loss. Moreover, because there is an imbalance in the prediction probabilities among different classes (in fundus images, the OD region typically surrounds the OC region and the boundary of the OD is more distinct), the OD class tends to exhibit higher prediction confidence, which may lead to bias during training. To mitigate this bias and further enhance the reliability of the fused pseudo-label \(\hat{\mathbf{y}}_{\mathbf{t}}^{\mathbf{t}}\), we incorporate the Max-square loss [28].