betaFeedback

WorksComputer Science

PhaseAT: Fourier Phase Adversarial Training for Medical Image Domain Generalization

Abstract

Reliable clinical deployment of deep medical image models is hindered by distribution shifts across scanners, sites, and acquisition protocols. Existing domain generalization (DG) methods often focus on style or intensity diversification, but they can still leave networks dependent on domain-specific texture correlations. Inspired by evidence that Fourier phase encodes semantic structure, we introduce PhaseAT, a phase-aware adversarial training framework for medical DG. PhaseAT forms phase-perturbed training views in the Fourier domain by iteratively updating a bounded phase perturbation while keeping the amplitude spectrum unchanged, thereby stressing spatial organization under matched appearance statistics. Perturbations are applied only to the luminance channel in YCbCr color space to avoid chromatic artifacts. Additionally, a simple phase-saliency mask concentrates updates on the most influential frequencies. The model is trained with a weighted combination of losses on clean and phase-perturbed samples, supporting both single-source and multi-source DG. We validate our method on two challenging medical datasets and demonstrate that PhaseAT achieves over 20% improvement in single-source domain generalization, outperforming several state-of-the-art DG methods. The code implementation is available at: https://github.com/ahmed-sharshar/PhaseAT.

Introduction

Deep learning has become the dominant paradigm for medical image analysis, yet standard training pipelines still rely on an i.i.d. assumption that rarely holds in clinical practice. In reality, medical imaging systems routinely experience distribution shifts induced by scanner vendors, acquisition protocols, reconstruction pipelines, and diverse patient populations [17]. From a spectral viewpoint, such shifts are often reflected in changes to the Fourier amplitude spectrum, which captures low-level appearance statistics (e.g., intensity and texture), while the Fourier phase largely preserves spatial organization and geometry [13]. Since standard CNNs are biased toward texture cues [8], they frequently overfit to these unstable amplitude-driven correlations, causing brittle performance when deployed outside the source environment.

Domain Generalization (DG) targets this challenge by learning predictors that remain accurate on unseen target domains without requiring target data during training. This distinction is crucial in medicine, where privacy constraints and logistical silos limit multi-institutional data aggregation, often leaving practitioners with only a small number of source environments [18]. Multi-center benchmarks further underscore that such shifts are routine rather than exceptional in medical imaging, with substantial gaps under cross-hospital evaluation [4]. The central DG question remains: how can we learn features that stay stable when imaging style changes but clinical semantics do not?

Prior medical DG methods have made steady progress, though most target only subsets of shift factors. Existing approaches broadly fall into three families. First, style/intensity diversification methods simulate scanner-driven appearance variation, for example via adversarial style composition [5], content–style augmentation [6], or monotonic adversarial intensity attacks [22]; others use representation-driven objectives to regularize style/content separation [14]. Second, frequency-domain approaches exploit spectral structure through Fourier mixing, amplitude synthesis, or reconstruction constraints to reduce scanner-specific artifacts [16]. Third, structure-consistent methods that focus on anatomy-aligned cues, such as via anatomy-consistent pseudo-modalities [10] or edge-guided generalization [11]. Despite these advances, performance can remain sensitive to hyperparameter choices, and carefully tuned baselines are often surprisingly strong [19]. This motivates mechanisms that more directly reflect how medical shifts arise in practice [23], especially in limited-source regimes where the inductive bias of the training objective becomes paramount [20].

A promising route to robustness is Adversarial Training (AT), but the perturbation model must reflect clinically relevant shifts. Standard pixel-space perturbations tend to emphasize high-frequency noise, potentially reinforcing a model’s texture bias [8]. A Fourier viewpoint enables more targeted control: the amplitude spectrum is closely tied to low-level appearance statistics, while phase governs spatial organization [13]. Indeed, phase is the primary carrier of recognizable structure [24]. Recent work further shows that improving stability to phase manipulations can enhance structural robustness [24], and frequency-constrained perturbations can effectively expose model vulnerabilities in medical tasks [21]. Together, these observations suggest that a phase-focused robustness objective can better match clinical distribution shifts while discouraging shortcut learning.

In this work, we propose Phase-Aware Adversarial Training (PhaseAT) for medical domain generalization, Figure 1. PhaseAT synthesizes training views by adversarially perturbing the Fourier phase, thereby challenging anatomy-relevant spatial organization, while fixing the Fourier amplitude to preserve per-frequency energy statistics (appearance). To avoid unnecessary chromatic artifacts and target geometry directly, we apply perturbations only to the luminance channel in YCbCr. The resulting phase-perturbed samples serve as hard training instances that complement recent appearance diversification and Fourier-based DG strategies [22, 16] by explicitly encouraging invariance to geometry-focused spectral variations under comparable appearance statistics. Unlike Fourier-based DG that varies the amplitude spectrum [16] or pixel-space augmentation, PhaseAT fixes amplitude and perturbs only phase, isolating geometry from appearance.

PhaseAT Pipeline

Figure 1. PhaseAT Pipeline (a) Phase Perturbation Step (inner maximization): Adversarial phase perturbations are applied in the Fourier domain by updating the phase component of the luminance channel, generating phase-perturbed view x′x'. (b) Model Update Step (outer minimization): Model parameters are optimized using a joint objective that incorporates both clean and phase-perturbed samples to improve robustness.

Contributions. We propose PhaseAT, a phase-aware adversarial training for medical image single-source and multi-source domain generalization, using robustness as a mechanism to improve out-of-domain performance. We introduce a phase-constrained spectral perturbation scheme that perturbs Fourier phase and applies perturbations in luminance to reduce artifacts under domain shift. Finally, we provide a comprehensive evaluation across different datasets, demonstrating consistent improvements over a range of recent DG baselines.

Methodology

To instantiate the phase-aware robustness objective described in § 1, we generate phase-perturbed samples in the Fourier domain while preserving the amplitude spectrum, and incorporate these samples during training to enhance domain generalization. Specifically, spectral perturbations are applied only to the luminance channel in the YCbCr color space. This design choice is motivated by three considerations. First, YCbCr allocates higher effective resolution to luminance than to chrominance, reflecting the fact that fine spatial details are primarily encoded in the (Y)(Y) channel. Second, human visual sensitivity to high-frequency spatial structure is substantially greater for achromatic (luminance) variations than for chromatic ones, meaning that edges and geometric information are predominantly conveyed by luminance [15]. Third, prior studies have shown that gradient-based perturbations tend to concentrate in the (Y) channel when images are represented in YCbCr, suggesting that restricting the inner maximization to luminance is both effective and avoids unnecessary chromatic distortions [15]. From an optimization perspective, operating on a single channel (Y) rather than three (RGB) reduces the dimensionality of the inner maximization problem. This not only improves computational efficiency but also produces more structured perturbations with fewer color artifacts.

Phase-Constrained Spectral Perturbations

Consider an RGB image x∈[0,1]H×W×3\mathbf{x} \in[0,1]^{H \times W \times3} and its corresponding label yy, with pixel values normalized to [0,1][0,1] for each channel. The RGB image x\mathbf{x} is first converted into the YCbCr color space, producing (xY,xCb,xCr)∈[0,1]H×W×3(\mathbf{x}_Y,\mathbf{x}_{Cb},\mathbf{x}_{Cr}) \in[0,1]^{H \times W \times3}, where the xY\mathbf{x}_Y is luminance channel. The luminance channel is transformed into the Fourier domain, yielding the complex spectrum X=F(xY)∈CH×W\mathbf{X} = \mathcal{F}(\mathbf{x}_Y) \in\mathbb{C}^{H \times W}, which can be decomposed into amplitude and phase components as X=∣X∣e(j∠X)\mathbf{X} = |\mathbf{X}|e^{(j\angle\mathbf{X})}. To generate a phase-perturbed representation, we introduce a perturbation δ∈RH×W\delta\in\mathbb{R}^{H \times W} and define the modified spectrum as: X′=∣X∣ej(∠X+δ)\mathbf{X}' = |\mathbf{X}|e^{j(\angle\mathbf{X}+\delta)}, thereby preserving the original amplitude spectrum ∣X∣|\mathbf{X}| while altering only the phase component. Applying the inverse Fourier transform yields the perturbed luminance channel, xY′=F−1(X′)\mathbf{x}'_Y = \mathcal{F}^{-1}(\mathbf{X}'). The perturbed luminance channel is combined with the original chrominance channels to form (xY′;xCb;xCr)(\mathbf{x}'_Y;\mathbf{x}_{Cb};\mathbf{x}_{Cr}), which is then transformed back to RGB space, yielding the perturbed image x′\mathbf{x}'. To obtain adversarial phase perturbations, δ\delta is optimized by maximizing the cross-entropy loss:

maximize⁡δ Lce(fθ(x′),y)s.t.∥δ∥∞≤ϵ,(1)\underset{\delta}{\operatorname{maximize}}\ \mathcal{L}_{\mathrm{ce}}(f_\theta(\mathbf{x}'),y) \quad\text{s.t.}\quad\|\delta\|_\infty\le\epsilon, \tag*{(1)}

where ϵ\epsilon specifies the maximum admissible phase deviation. Since X\mathbf{X} is complex-valued, the phase update is computed directly in the Fourier domain. Specifically, we derive the gradient of the loss with respect to the spectrum phase and use the resulting phase-direction gradient as a proxy signal for updating δ\delta. Using Wirtinger calculus [12], phase-direction proxy gradient GδG_\delta can be expressed as:

Gδ≜−2⋅ℑ(GX⊙X),(2)G_\delta\triangleq-2 \cdot\Im(G_X \odot X), \tag*{(2)}

where GXG_X denotes the gradient of the loss w.r.t the complex spectrum XX, ⊙\odot is the Hadamard product and ℑ(⋅)\Im(\cdot) denotes the imaginary part. To ensure a stable and well-defined phase update, we compute a phase-saliency soft mask Wδ∈[0,1]H×WW_\delta\in[0,1]^{H \times W} by applying min–max normalization to the magnitude of the phase-direction gradient, ∣Gδ∣|G_\delta|. This mask captures the loss sensitivity to phase perturbations, upweighting frequency components that induce larger loss changes. It thus focuses the phase update on structurally informative, adversarially relevant frequencies. Phase perturbation is updated as follows:

δ←P[−ϵ,ϵ](δ+η⋅Wδ⊙sign⁡(Gδ)),(3)\delta\leftarrow\mathcal{P}_{[-\epsilon,\epsilon]}\left(\delta+ \eta\cdot W_\delta\odot\operatorname{sign}(G_\delta)\right), \tag*{(3)}

where η\eta denotes the update step size, Wδ∈[0,1]H×WW_\delta\in[0,1]^{H \times W} is the phase-saliency weighting mask, P[−ϵ,ϵ](⋅)\mathcal{P}_{[-\epsilon,\epsilon]}(\cdot) denotes element-wise projection onto the ℓ∞\ell_\infty ball of radius ϵ\epsilon, and sign⁡(⋅)\operatorname{sign}(\cdot) is the element-wise sign operator.

Algorithm 1 PhaseAT: Phase-Adv. Training for Domain Generalization

  1. Source Data DsD_s, Model fθf_\theta, Epochs NN, Steps KK, Step Size η\eta, Budget ϵ\epsilon, Loss Weight λ\lambda, Learning Rate γ\gamma, FFT F\mathcal{F}, IFFT F−1\mathcal{F}^{-1}, Projection P[−ϵ,ϵ]\mathcal{P}_{[-\epsilon,\epsilon]}, Imaginary Part ℑ\Im

  2. for epoch =1,…,N=1,\ldots,N do

  3. (x,y)∼Ds(x,y)\sim D_s ▷ Sample a mini-batch (single-source or pooled multi-source)

  4. (xY,xCb,xCr)←RGB2YCbCr⁡(x)(x_Y,x_{Cb},x_{Cr})\leftarrow\operatorname{RGB2YCbCr}(x) ▷ Convert from RGB to YCbCr color space

  5. X←F(xY)=∣X∣ej∠XX\leftarrow\mathcal{F}(x_Y)=|X|e^{j\angle X} ▷ Luminance channel spectrum

  6. δ←0∈RH×W\delta\leftarrow0\in\mathbb{R}^{H\times W} ▷ Initialize phase perturbation

  7. for k=1,…,Kk=1,\ldots,K do

  8. X′←∣X∣ej(∠X+δ)X'\leftarrow|X|e^{j(\angle X+\delta)} ▷ Add perturbation to phase

  9. F−1(X′)→xY′→YCbCr2RGB⁡([xY′,xCb,xCr])→x′\mathcal{F}^{-1}(X')\rightarrow x'_Y\rightarrow\operatorname{YCbCr2RGB}([x'_Y,x_{Cb},x_{Cr}])\rightarrow x' ▷ Fourier-to-Spatial

  10. Compute cross-entropy loss: Lce(fθ(x′),y)\mathcal{L}_{ce}(f_\theta(x'),y)

  11. Gδ≜−2⋅ℑ(∇X⊙X)G_\delta\triangleq-2\cdot\Im(\nabla_X\odot X) ▷ Phase-direction gradient (Eq. (2))

  12. δ←P[−ϵ,ϵ](δ+η⋅Wδ⊙sign⁡(Gδ))\delta\leftarrow\mathcal{P}_{[-\epsilon,\epsilon]}(\delta+\eta\cdot W_\delta\odot\operatorname{sign}(G_\delta)) ▷ Update δ\delta with gradient ascent (Eq. (3))

  13. end for

  14. ℓ←λLce(fθ(x),y)+(1−λ)Lce(fθ(x′),y)\ell\leftarrow\lambda\mathcal{L}_{ce}(f_\theta(x),y)+(1-\lambda)\mathcal{L}_{ce}(f_\theta(x'),y) ▷ Training loss (Eq. (4))

  15. θ←θ−γ∇θℓ\theta\leftarrow\theta-\gamma\nabla_\theta\ell ▷ Update model parameters via gradient descent

  16. end for

  1. Return: Adversarially trained robust model fθf_\theta

Phase-Aware Adversarial Training

Given a clean sample xx and its phase-perturbed counterpart x′x', we update model parameters by minimizing a convex combination of clean and perturbed losses:

min⁡θλ⋅Lce(fθ(x),y)+(1−λ)⋅Lce(fθ(x′),y),(4)\min_{\theta}\quad\lambda\cdot\mathcal{L}_{ce}(f_\theta(x),y)+(1-\lambda)\cdot\mathcal{L}_{ce}(f_\theta(x'),y), \tag*{(4)}

where λ∈[0,1]\lambda\in[0,1] controls the trade-off between standard and robust accuracy. Algorithm 1 summarizes the full training procedure; the same routine applies to single-source and multi-source DG by defining DsD_s as the available source data.

Experimental Setup

Datasets. We evaluate on two medical benchmarks with strong cross-domain variation. Camelyon17-WILDS [4] contains histopathology data from five medical centers (domains). Diabetic Retinopathy (DR) combines Aptos [3], EyePACS [2], Messidor [7], and Messidor-2 [1] as distinct domains for multi-class severity prediction.

Evaluation Protocol. We follow the DomainBed methodology [9] which uses training-domain validation for model selection. We report accuracy on unseen domains in two regimes: (1) Single-domain generalization (SDG), where we train on one source and evaluate on the rest, and (2) Multi-source generalization (MSDG), using a leave-one-domain-out protocol.

Implementation Details

Backbones: We primarily use DenseNet-121 initialized from scratch. For architectural ablation and stability analysis, we also report results using ResNet-18, ViT-Base, and ImageNet-pretrained DenseNet-121, where specified. Training: Models are trained for 30 epochs on a single NVIDIA A6000 GPU, which is sufficient for convergence under our schedule (validation accuracy typically plateaus by the final full-attack phase). We use a 5-epoch clean warm-up, followed by a linear ramp-up of the adversarial strength/budget until epoch 25, then 5 epochs of full attack. We use K=5K=5 inner maximization steps (Algorithm 1), weighting (λ\lambda) = 0.5, and a step size of 0.2, and study their sensitivity. Results are averaged over 5 fixed random seeds.

Results

Table 1 reports the most stringent setting, where training is restricted to a single source domain and evaluation spans all unseen domains. On Camelyon17-WILDS, PhaseAT delivers large, consistent gains over ERM and recent DG baselines, with the strongest improvements arising when the source center encourages the most pronounced center-specific shortcuts, for example, when trained on C2C_2, the average accuracy increases from 52.08 (ERM) to 74.31. Crucially, the

Table 2: Performance comparison in the MSDG setting. Reported values are the accuracy(%) mean ±\pm standard deviation. Best and second-best per column are in bold and <u>underline</u>; †{}^{\dagger} marks a significant gain over the strongest baseline (paired tt-test, p<0.05p<0.05).

MethodC0C_0C1C_1C2C_2C3C_3C4C_4AVG.
ERM78.89±0.578.89\pm0.584.57±1.184.57\pm1.167.24±0.567.24\pm0.584.47±0.284.47\pm0.274.08±1.774.08\pm1.777.9
AdverIN [22]81.52±0.681.52\pm0.687.78±1.087.78\pm1.068.97±0.768.97\pm0.788.17±0.488.17\pm0.476.19±1.676.19\pm1.680.5
ConDiSR [14]81.67±0.481.67\pm0.487.90±0.787.90\pm0.772.12±0.272.12\pm0.286.79±0.386.79\pm0.380.06±0.380.06\pm0.381.7
RAS4DG [16]83.62±0.583.62\pm0.589.10±0.889.10\pm0.869.31±0.469.31\pm0.488.24±0.688.24\pm0.677.60±0.577.60\pm0.581.6
Ours90.49±0.590.49\pm0.587.97±0.787.97\pm0.776.86±0.376.86\pm0.394.61±0.594.61\pm0.578.58±0.478.58\pm0.485.7
MethodAptosEyePACSMessidorMessidor2AVG.
ERM55.7±1.255.7\pm1.243.4±0.843.4\pm0.854.3±1.654.3\pm1.653.8±0.453.8\pm0.451.8
AdverIN [22]58.6±1.258.6\pm1.248.0±0.948.0\pm0.958.3±1.558.3\pm1.553.4±0.553.4\pm0.554.6
ConDiSR [14]59.4±0.559.4\pm0.548.8±0.448.8\pm0.459.2±0.859.2\pm0.854.2±0.254.2\pm0.255.4
RAS4DG [16]60.9±0.960.9\pm0.950.2±0.650.2\pm0.660.6±1.160.6\pm1.155.6±0.355.6\pm0.356.8
Ours62.4±0.862.4\pm0.851.1±0.551.1\pm0.562.1±1.062.1\pm1.056.8±0.356.8\pm0.358.1

Table 2. Performance comparison in the MSDG setting. Reported values are the accuracy(%) mean ±\pm standard deviation. Best and second-best per column are in bold and underline; †{}^{\dagger} marks a significant gain over the strongest baseline (paired tt-test, p<0.05p<0.05).

gains are distributed across multiple target hospitals rather than concentrated on one, indicating reduced reliance on stain/texture-specific correlations and stronger sensitivity to morphology. On the Diabetic Retinopathy benchmark, PhaseAT similarly improves transfer across all source datasets (e.g., Aptos as source: 37.04 →\rightarrow 44.99 avg.), suggesting that enforcing stability to structured phase variations provides a robust inductive bias across heterogeneous acquisition conditions (camera/sensor, illumination, and preprocessing). Over the five shared seeds, gains marked †{}^{\dagger} are significant against the strongest baseline (paired tt-test, p<0.05p < 0.05; e.g., SDG C0C_0: Δ=+2.24\Delta=+2.24, 95% CI [0.3, 4.1]).

Following the SDG results in Table 1, Table 2 shows that the same phase-aware robustness mechanism remains effective when multiple source domains are available, albeit with a different gain regime. In SDG, improvements are often larger because single-source training amplifies center/dataset-specific shortcuts. In MSDG, pooling multiple sources already exposes the model to broader appearance variability, so the incremental gains are smaller but more stable.

Table 1: Performance comparison in the Single Domain Generalization (SDG) setting. Values are the accuracy(%) mean ± standard deviation. Best and second-best per column are in bold and <u>underline</u>; {sup}†` marks a significant gain over the strongest baseline (paired tt-test, p<0.05p<0.05).

(a) Camelyon17-WILDS

MethodC0C_0C1C_1C2C_2C3C_3C4C_4AVG.
ERM–67.29±1.265.89±2.167.73±1.556.50±2.864.35±1.9
AdverIN [22]–70.17±1.469.30±2.369.92±1.760.26±2.567.41±2.0
ConDiSR [14]–69.05±1.167.45±2.070.29±1.660.48±2.466.82±1.8
RAS4DG [16]–71.15±1.370.34±2.276.28±1.858.46±2.669.06±1.9
Ours–74.56±1.073.01±1.575.05±1.262.58±1.871.30{sup}†`±1.3
ERM61.87±2.1–59.45±2.563.01±1.950.67±2.758.75±2.3
AdverIN [22]65.42±1.8–61.72±2.465.94±1.653.85±2.561.73±2.1
ConDiSR [14]64.54±1.9–60.70±2.364.83±1.761.00±2.262.77±2.0
RAS4DG [16]73.39±1.5–73.05±1.876.48±1.465.49±2.072.10±1.7
Ours78.26±1.2–75.20±1.479.70±1.164.08±1.674.31{sup}†`±1.3
ERM55.12±2.647.46±2.9–51.09±2.454.65±2.252.08±2.5
AdverIN [22]57.76±2.351.36±2.7–53.20±2.158.02±2.055.09±2.3
ConDiSR [14]56.10±2.451.91±2.6–52.94±2.257.34±2.154.57±2.4
RAS4DG [16]75.71±1.669.40±1.9–68.35±1.774.86±1.572.08±1.7
Ours78.65±1.367.72±1.8–72.90±1.477.97±1.274.31{sup}†`±1.4
ERM53.49±2.546.45±2.854.41±2.3–38.25±2.948.15±2.6
AdverIN [22]55.54±2.250.08±2.557.19±2.0–41.47±2.751.07±2.4
ConDiSR [14]57.11±2.149.09±2.656.44±2.1–45.63±2.552.07±2.3
RAS4DG [16]64.40±1.853.76±2.468.73±1.7–43.98±2.657.72±2.1
Ours66.63±1.557.86±1.967.78±1.4–47.65±2.259.98±1.8
ERM56.65±2.453.12±2.555.26±2.357.53±2.2–55.64±2.4
AdverIN [22]59.56±2.156.18±2.257.73±2.061.42±1.9–58.72±2.0
ConDiSR [14]59.35±2.256.74±2.356.76±2.160.98±1.9–58.46±2.1
RAS4DG [16]56.18±2.357.10±2.156.17±2.256.28±2.3–56.43±2.2
Ours59.70±1.755.98±1.958.24±1.860.64±1.6–58.64±1.8

(b) Diabetic Retinopathy

MethodAptosEyePMessMess2AVG.
ERM–42.69±2.530.32±2.938.11±2.637.04±2.7
AdverIN [22]–45.03±2.331.98±2.840.20±2.439.07±2.5
ConDiSR [14]–45.26±2.232.14±2.740.40±2.339.27±2.4
RAS4DG [16]–48.14±2.033.60±2.642.75±2.241.50±2.3
Ours–51.85±1.836.82±2.146.28±1.944.99{sup}†`±1.9
ERM39.42±2.7–32.48±2.839.48±2.537.13±2.7
AdverIN [22]41.58±2.5–34.26±2.641.65±2.339.16±2.5
ConDiSR [14]41.79±2.4–34.43±2.741.86±2.439.36±2.5
RAS4DG [16]44.29±2.2–36.14±2.544.37±2.141.60±2.0
Ours47.87±1.9–38.94±2.247.95±1.844.95±2.0
ERM41.91±2.727.50±3.0–39.03±2.636.15±2.7
AdverIN [22]44.20±2.929.01±2.9–41.17±2.538.13±2.5
ConDiSR [14]43.44±2.229.16±2.8–41.37±2.338.32±2.4
RAS4DG [16]47.21±2.030.20±2.9–43.82±2.240.46±2.3
Ours50.91±1.733.40±2.4–47.40±1.943.90±2.0
ERM40.73±2.525.47±3.040.60±2.5–35.62±2.7
AdverIN [22]42.96±2.326.87±2.942.89±2.4–37.57±2.5
ConDiSR [14]43.18±2.927.00±2.943.11±2.3–37.76±2.5
RAS4DG [16]45.83±2.127.91±2.845.75±2.2–39.83±2.4
Ours49.47±1.830.94±2.549.39±1.9–43.26±2.1

Table 1.

On Camelyon17-WILDS, PhaseAT achieves the best overall average (85.7%), substantially improving over ERM (77.9%) and surpassing recent DG methods clustered around ∼81\sim81–82%82\%, with powerful benefits on shift-sensitive held-out hospitals (notably C2C_2), thereby improving worst-case behavior across centers. On Diabetic Retinopathy, PhaseAT likewise provides consistent improvements across all held-out datasets, increasing the average from 51.8% to 58.1% and outperforming the strongest baseline (RAS4{}^{4}DG at 56.8%), indicating that enforcing stability to phase-driven structural perturbations complements multi-source supervision by discouraging reliance on dataset-specific color/contrast statistics and promoting geometry-aligned cues that transfer across acquisition pipelines.

Ablation Study. Figure 2 highlights both robustness and practicality. PhaseAT is comparatively stable as the batch size increases, consistent with the phase-perturbed supervision acting as an additional regularizer rather than relying on fragile optimization conditions. Performance is also insensitive to small variations in the loss weighting, with a broad optimum around λ≈0.5\lambda\approx0.5, indicating that the clean/phase-perturbed trade-off is not finely tuned. Moderate phase step sizes are beneficial, while overly many inner steps eventually degrade performance, consistent with perturbations becoming too strong and drifting away from the desired “style-controlled” stress test. Overall, the method exhibits a wide stable operating region and achieves its best results with moderate perturbation strength and a small number of steps.

Figure 2. Ablation studies for the main hyperparameters on the average accuracy over the 5 centers in MSDG setting on Camelyon17-WILDS.

Table 3(a) demonstrates architectural generality: PhaseAT improves ResNet18 (78.49 →\to 82.66 avg.) and ViT-Base (69.30 →\to 74.26 avg.), indicating that the benefit is not tied to convolutional texture priors and persists for transformer backbones. With ImageNet-pretrained DenseNet, gains are smaller (90.69 →\to 91.66), suggesting that generic pretraining already contributes partial robustness, while PhaseAT still adds complementary invariances.

(a) Backbone Performance
C0C_0C1C_1C2C_2C3C_3C4C_4Avg.
ERM_ResNet78.8383.5679.0090.6660.3978.49
Ours_ResNet91.2086.1681.5391.6662.7782.66
ERM_ViT74.2078.4062.1086.5045.3069.30
Ours_ViT84.1081.2066.5089.1050.4074.26
Densenet Imagenet Pretrained
ERM94.4890.4582.5693.4392.5590.69
Ours95.3991.5288.8095.6886.9091.66
(b) Component Ablation
C0C_0C1C_1C2C_2C3C_3C4C_4Avg.
Amplitude-only79.1384.7365.9584.4075.2377.89
Phase+Amplitude80.3085.4666.1284.5276.1278.50
No Mask60.0181.6855.8249.9334.9256.47
RGB85.6185.6561.2186.0174.6278.62
YCbCr-all79.8686.1473.1890.5477.6481.47
Random Phase89.5787.8764.0191.8276.2281.90

Table 3. Ablation Study on Camelyon17-WILDS in MSDG setting.

Table 3 (b) clarifies which choices matter. PhaseAT perturbs phase while fixing amplitude; when we instead (i) fix phase and update amplitude only or (ii) update both phase and amplitude (no amplitude fixing), performance drops, consistent with the intended “structure under matched style” shift. The saliency mask is particularly important: without it, performance degrades sharply, indicating that concentrating updates on phase-sensitive frequencies stabilizes training. Operating on luminance is consistently advantageous: RGB-space perturbations degrade performance, and perturbing all YCbCr channels recovers only partially, reinforcing the choice to emphasize geometry and avoid unnecessary chromatic distortions. The “Random Phase” variant (sampling a bounded random phase offset within the same ℓ∞\ell_\infty budget, instead of gradient-based inner maximization) remains strong, showing that phase jitter is a useful regularizer, but the gradient-guided procedure provides the best overall generalization.

Conclusion and Future Work

We introduce PhaseAT, a phase-aware adversarial training framework that perturbs the Fourier phase of the luminance channel while fixing amplitude, generating structure-stressing views with matched appearance and reducing reliance on domain-specific texture shortcuts. PhaseAT improves transfer on Camelyon17-WILDS and diabetic retinopathy, achieving up to +22% accuracy gains over ERM in single-source settings and +9% multi-source. Our evaluation is currently limited to 2D classification and color medical images (YCbCr); investigating performance on grayscale modalities remains an important limitation. Future work will extend phase-constrained adversarial views to dense prediction, 3D modalities, and broader acquisition shifts, and study more adaptive frequency masking/selection, combinations with complementary amplitude-/style-based DG objectives, and efficiency improvements that reduce training overhead while preserving robustness.

Disclosure of Interests. The authors have no competing interests to declare that are relevant to the content of this article.

References

  1. [1]MESSIDOR-2 dataset. ADCIS (dataset access page), https://www.adcis.net/en/third-party/messidor2/, accessed: 2026-01-27
  2. [2]Diabetic retinopathy detection. Kaggle Competition (2015), https://www.kaggle.com/c/diabetic-retinopathy-detection, accessed: 2026-01-27
  3. [3]APTOS 2019 blindness detection. Kaggle Competition (2019), https://www.kaggle.com/c/aptos2019-blindness-detection, accessed: 2026-01-27
  4. [4]Bándi, P., Geessink, O., Manson, Q., Van Dijk, M., Balkenhol, M., Hermsen, M., Bejnordi, B.E., Lee, B., Paeng, K., Zhong, A., Li, Q., Zanjani, F.G., Zinger, S., et al.: From detection of individual metastases to classification of lymph node status at the patient level: The CAMELYON17 challenge. IEEE Transactions on Medical Imaging 38(2), 550–560 (2019). https://doi.org/10.1109/TMI.2018.2867350
  5. [5]Chen, C., Li, Z., Ouyang, C., Sinclair, M., Bai, W., Rueckert, D.: Maxstyle: Adversarial style composition for robust medical image segmentation. In: Medical Image Computing and Computer Assisted Intervention – MICCAI 2022. Lecture Notes in Computer Science, vol. 13435, pp. 151–161 (2022). https://doi.org/10.1007/978-3-031-16443-9_15
  6. [6]Chen, X., Shen, Z., Cao, P., Yang, J., Zaiane, O.R.: Constyx: Content style augmentation for generalizable medical image segmentation. In: Medical Image Computing and Computer Assisted Intervention – MICCAI 2025. Lecture Notes in Computer Science, vol. 15964, pp. 100–110 (2025). https://doi.org/10.1007/978-3-032-04971-1_10
  7. [7]Dencière, E., Zhang, X., Cazuguel, G., Lay, B., Cochener, B., Trone, C., Gain, P., Ordonez, R., Massin, P., Erginay, A., Charton, B., Klein, J.C.: Feedback on a publicly distributed image database: The MESSIDOR database. Image Analysis & Stereology 33(3), 231–234 (2014). https://doi.org/10.5566/ias.1155
  8. [8]Geirhos, R., Rubisch, P., Michaelis, C., Bethge, M., Wichmann, F.A., Brendel, W.: ImageNet-trained cnns are biased towards texture; increasing shape bias improves accuracy and robustness. In: International Conference on Learning Representations (ICLR) (2019), https://arxiv.org/abs/1811.12231, iCLR 2019 (oral)
  9. [9]Gulrajani, I., Lopez-Paz, D.: In search of lost domain generalization (2020), https://arxiv.org/abs/2007.01434
  10. [10]Hu, D., Li, H., Liu, H., Yao, X., Wang, J., Oguz, I.: Map: Domain generalization via meta-learning on anatomy-consistent pseudo-modalities. In: Medical Image Computing and Computer Assisted Intervention – MICCAI 2023 Workshops (MedAGI). Lecture Notes in Computer Science, vol. 14393. Springer (2023). https://doi.org/10.1007/978-3-031-47401-9_18
  11. [11]Jiang, J., Gu, S.: Train once, deploy anywhere: Edge-guided single-source domain generalization for medical image segmentation. In: Burgos, N., Pettijean, C., Vakalopoulou, M., Christodoulidis, S., Coupe, P., Delingette, H., Lartizien, C., Mateus, D. (eds.) Proceedings of the 7nd International Conference on Medical Imaging with Deep Learning. Proceedings of Machine Learning Research, vol. 250, pp. 722–741. PMLR (03–05 Jul 2024), https://proceedings.mlr.press/v250/jiang24a.html
  12. [12]Koor, K., Qiu, Y., Kwek, L.C., Rebentrost, P.: A short tutorial on wirtinger calculus with applications in quantum information (2023), https://arxiv.org/abs/2312.04858
  13. [13]Lee, S., Bae, J., Kim, H.Y.: Decompose, adjust, compose: Effective normalization by playing with frequency for domain generalization. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). pp. 11776–11785 (2023). https://doi.org/10.1109/CVPR52729.2023.01134
  14. [14]Matsun, A., Saeed, N., Maani, F.A., Yaqub, M.: Condisr: Contrastive disentanglement and style regularization for single domain generalization. In: Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV). pp. 2881–2889. IEEE (2025)arxiv.org/abs/2403.09400
  15. [15]Pestana, C., Akhtar, N., Liu, W., Glance, D., Mian, A.: Adversarial attacks and defense on deep learning classification models using ycbcr color images. In: 2021 International Joint Conference on Neural Networks (IJCNN). pp. 1–9 (2021). https://doi.org/10.1109/IJCNN52387.2021.9533495
  16. [16]Qiao, Q., Wang, W., Qu, M., Su, K., Jiang, B., Guo, Q.: Medical image segmentation via single-source domain generalization with random amplitude spectrum synthesis. In: Medical Image Computing and Computer Assisted Intervention – MICCAI 2024. Lecture Notes in Computer Science, vol. 15009, pp. 435–445. Springer (2024). https://doi.org/10.1007/978-3-031-72144-4_42
  17. [17]Safdari, R., Nikouei Mahani, M.A., Koohi-Moghadam, M., Bae, K.T.: MixStyle-Flow: Domain Generalization in Medical Image Segmentation using Normalizing Flows. In: Medical Image Computing and Computer Assisted Intervention – MICCAI 2025. Lecture Notes in Computer Science, vol. 15962, pp. 376–385 (2025). https://doi.org/10.1007/978-3-032-04947-6_36
  18. [18]Su, Z., Yao, K., Yang, X., Wang, Q., Sun, J., Huang, K.: Rethinking data augmentation for single-source domain generalization in medical image segmentation. In: Proceedings of the AAAI Conference on Artificial Intelligence. vol. 37, pp. 2366–2374 (2023). https://doi.org/10.1609/aaai.v37i2.25332
  19. [19]Teterwak, P., Saito, K., Tsiligkaridis, T., Plummer, B.A., Saenko, K.: Is large-scale pretraining the secret to god domain generalization? In: Proceedings of the International Conference on Learning Representations (ICLR) (2025), https://openreview.net/forum?id=wCOJpXmOMearxiv.org/abs/2412.02856
  20. [20]Yi, J., Bi, Q., Zheng, H., Zhan, H., Ji, W., Huang, Y., Li, S., Li, Y., Zheng, Y., Huang, F.: Hallucinated style distillation for single domain generalization in medical image segmentation. In: Medical Image Computing and Computer Assisted Intervention – MICCAI 2024. Lecture Notes in Computer Science, vol. 15010, pp. 438–448. Springer (2024). https://doi.org/10.1007/978-3-031-72117-5_41
  21. [21]Zhang, L., Luo, Y., Shen, H., Wang, T.: A fourier perspective of feature extraction and adversarial robustness. In: Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence (IJCAI). pp. 1715–1723 (2024). https://doi.org/10.24963/ijcai.2024/190
  22. [22]Zhang, Z., Wang, B., Yao, L., Keles, E., Jha, D., Antalek, M., Durak, G., Medetalibeyoglu, A., Spampinato, C., Turkbey, B., Gong, B., Bagci, U.: Adverin: Monotonic adversarial intensity attack for domain generalization in medical image segmentation. Medical Image Analysis 107, 103848 (2026). https://doi.org/10.1016/j.media.2025.103848
  23. [23]Zhang, Z., Chen, N., Liu, Y., Zhang, Q., Zhang, X.: Adversarial data augmentation for single domain generalization via lyapunov exponent-guided optimization. In: Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) (2025), https://arxiv.org/abs/2507.04302
  24. [24]Zhou, D., Wang, N., Yang, H., Gao, X., Liu, T.: Phase-aware adversarial defense for improving adversarial robustness. In: Proceedings of the 40th International Conference on Machine Learning (ICML). Proceedings of Machine Learning Research, vol. 202, pp. 42724–42741 (2023)

Paper details

vlnc:W_j9wdc65s
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents