# Causal Inference-Based Self-Supervised Cross-Domain Fundus Image Segmentation
## 3 Methods
### Causal Inference-Based Pseudo-Label Fusion Module  
Based on the above causal inference strategy, we apply Fourier transform to the target-domain images for style transfer. As noted in [14], the low-frequency components of an image generally capture properties such as background, illumination, and other style-related attributes. Therefore, by replacing the low-frequency components of the original image with those obtained via Fourier transform, we can achieve an approximate image-domain transformation. First, we denote the Fast Fourier Transform (FFT) [25] by \(\mathrm{F_{ou}}(\cdot)\), and its inverse by \(\mathrm{F_{ou}}^{-1}(\cdot)\). In our algorithm, we apply FFT to each image to obtain its spectra (amplitude spectrum \(\mathrm{f_{am}}(\mathbf{x})\) and phase spectrum \(\mathrm{f_{ph}}(\mathbf{x})\)):  
\[ \begin{split}\mathrm{f_{am}}(\mathbf{x_{s}}),\,\mathrm{f_{ph}}( \mathbf{x_{s}})&=\mathrm{F_{ou}}\big{(}\mathbf{x_{s}}\big{)},\\ \mathrm{f_{am}}(\mathbf{x_{t}}),\,\mathrm{f_{ph}}(\mathbf{x_{t}})& =\mathrm{F_{ou}}\big{(}\mathbf{x_{t}}\big{)}\end{split}  \tag{2}\]  
Figure 2: Structural Causal Model for mitigating domain style interference. In this model, target domain images (\(X\)) undergo feature extraction to generate feature maps (\(F\)), from which pseudo labels (\(Y\)) are derived. Meanwhile, the domain style confounder C introduces confounding style effects in both feature extraction and pseudo label generation, inducing bias in \(Y\) via backdoor paths. During training, we randomly select a source-domain image \(\mathbf{x_{s}}\) and a target-domain image \(\mathbf{x_{t}}\), and replace the low-frequency part of \(\mathrm{f_{am}(\mathbf{x_{t}})}\) with that of \(\mathrm{f_{am}(\mathbf{x_{s}})}\) to obtain the style-transferred image \(\mathbf{x_{t}^{s}}\). Specifically, we treat the center of the amplitude spectrum as the zero-frequency point, and construct a square window \(\alpha\) of side length \(a\) centered at this point. We then remove the contents of \(\mathrm{f_{am}(\mathbf{x_{t}})}\) within \(\alpha\) and fill them with the corresponding contents of \(\mathrm{f_{am}(\mathbf{x_{s}})}\), resulting in the modified amplitude spectrum \(\mathrm{f_{am}(\mathbf{x_{t}^{s}})}\). Finally, by combining \(\mathrm{f_{am}(\mathbf{x_{t}^{s}})}\) with the original phase spectrum \(\mathrm{f_{ph}(\mathbf{x_{t}})}\) and applying the inverse FFT, we obtain the style-transferred image:  
\[\mathbf{x_{t}^{s}}=\mathrm{F_{ou}}^{-1}\big{(}\mathrm{f_{am}(\mathbf{x_{t}^{s}} ),\,f_{ph}(\mathbf{x_{t}})}\big{)} \tag{3}\]  
The resulting image \(\mathbf{x_{t}^{s}}\) retains the ground-truth segmentation mask of the original target-domain image \(\mathbf{x_{t}}\), while its domain gap relative to the source-domain image \(\mathbf{x_{s}}\) is significantly reduced, making it effectively aligned with the source domain. This operation is analogous to the stratification process in backdoor adjustment, where different domain styles are considered separately. Next, we feed the source-style transformed image \(\mathbf{x_{t}^{s}}\) and the original target domain image \(\mathbf{x_{t}}\) into two segmentation networks that share the same backbone architecture (DeepLabV3+ [26]) but do not share weights, thereby obtaining their corresponding feature maps. This design effectively decouples the feature extraction process under different domain styles, which better implements the stratification and more accurately reflects the relationship of \(P(Y\mid do(F))\). In terms of backbone architecture, we adopt MobileNetV2 [27]--pretrained on ImageNet--as the encoder within DeepLabV3+. MobileNetV2's core building block is the inverted residual: a \(1\times 1\) convolution first expands the low-dimensional input features to a higher dimension, followed by a \(3\times 3\) depthwise separable convolution for spatial filtering, and finally a \(1\times 1\) projection back to the original channel dimensionality.