Adversarial Robustness of Deep Learning-Based Thyroid Nodule Segmentation in Ultrasound
Organizations: Temerty Faculty of Medicine, University of Toronto, Toronto, Ontario, Canada · Faculty of Engineering, McMaster University, Hamilton, Ontario, Canada
Abstract
Introduction: Deep learning-based segmentation models are increasingly integrated into clinical imaging workflows, yet their robustness to adversarial perturbations remains incompletely characterized, particularly for ultrasound images. We evaluated adversarial attacks and inference-time defenses for thyroid nodule segmentation in B-mode ultrasound. Methods: Two black-box adversarial attacks were developed: (1) Structured Speckle Amplification Attack (SSAA), which injects boundary-targeted noise, and (2) Frequency-Domain Ultrasound Attack (FDUA), which applies bandpass-filtered phase perturbations in the Fourier domain. Three inference-time mitigations were evaluated on adversarial images: randomized preprocessing with test-time augmentation, deterministic input denoising, and stochastic ensemble inference with consistency-aware aggregation. Experiments were conducted on a U-Net segmentation model trained on cine-clips from a database of 192 thyroid nodules. Results: The baseline model achieved a mean Dice similarity coefficient (DSC) of 0.76 (SD 0.20) on unperturbed images. SSAA reduced DSC by 0.29 (SD 0.20) while maintaining high visual similarity (SSIM = 0.94). FDUA resulted in a smaller DSC reduction of 0.11 (SD 0.09) with lower visual fidelity (SSIM = 0.82). Against SSAA, all three defenses significantly improved DSC after correction, with deterministic denoising showing the largest recovery (+0.10, p < 0.001), followed by randomized preprocessing (+0.09, p < 0.001), and stochastic ensemble inference (+0.08, p = 0.002). No defense achieved statistically significant improvement against FDUA. Conclusion: Spatial-domain adversarial perturbations in ultrasound segmentation showed partial mitigation with input preprocessing, whereas frequency-domain perturbations were not mitigated by the defenses, highlighting modality-specific challenges in adversarial robustness evaluation.
Figures & tables
| Condition | DSC | IoU | Precision | Recall | Pixel Accuracy | HD95 |
|---|---|---|---|---|---|---|
| Unperturbed (baseline) | 0.76 (0.20) | 0.65 (0.23) | 0.81 (0.25) | 0.76 (0.19) | 0.95 (0.04) | 32.88 (26.88) |
| Unperturbed + Randomized Preprocessing | 0.76 (0.20) | 0.65 (0.23) | 0.78 (0.25) | 0.79 (0.17) | 0.95 (0.04) | 37.05 (27.65) |
| Unperturbed + Denoising | 0.76 (0.19) | 0.64 (0.22) | 0.76 (0.24) | 0.81 (0.14) | 0.95 (0.03) | 40.84 (28.00) |
| Unperturbed + Stochastic Ensemble | 0.76 (0.19) | 0.65 (0.22) | 0.78 (0.24) | 0.79 (0.15) | 0.95 (0.04) | 37.26 (28.25) |
| SSAA (undefended) | 0.47 (0.27) | 0.35 (0.23) | 0.58 (0.33) | 0.52 (0.33) | 0.92 (0.04) | 47.64 (17.08) |
| SSAA + Randomized Preprocessing | 0.55 (0.23) | 0.42 (0.22) | 0.62 (0.29) | 0.62 (0.28) | 0.92 (0.04) | 48.31 (23.72) |
| Condition | Unperturbed DSC | SD | DSC Cost |
|---|---|---|---|
| Undefended (baseline) | 0.7601 | 0.2036 | — |
| Randomized Preprocessing | 0.7575 | 0.2027 | +0.0027 |
| Input Denoising | 0.7570 | 0.1850 | +0.0031 |
| Stochastic Ensemble | 0.7606 | 0.1863 | 0.0005 |
| Attack | Defense | DSC | 95% CI | p-value | Cohen’s d |
|---|---|---|---|---|---|
| SSAA | Randomized Preprocessing | +0.09 | [+0.04, +0.14] | 0.0003 | +0.61 |
| SSAA | Denoising | +0.10 | [+0.06, +0.15] | 0.0002 | +0.73 |
| SSAA | Stochastic Ensemble | +0.08 | [+0.04, +0.12] | 0.0017 | +0.61 |
| FDUA | Randomized Preprocessing | +0.02 | [–0.03, +0.07] | 0.3603 | +0.11 |
| FDUA | Denoising | +0.01 | [–0.03, +0.05] | 0.1836 | +0.14 |
| FDUA | Stochastic Ensemble | +0.01 | [–0.02, +0.04] | 0.2647 | +0.10 |