Adversarial Defense for Medical Images

Min-Jen Tsai, Ya-Chu Lee, Hsin-Ying Lien, Cheng LiangElectronics 2025

TL;DR

This paper tackles the critical vulnerability of medical imaging AI to adversarial attacks by proposing and evaluating a novel autoencoder-based denoising model. The research demonstrates that this model can effectively restore medical images attacked by subtle, pixel-level perturbations, thereby enhancing the reliability of AI in clinical settings.

What Problem Does This Paper Address?

Deep learning models have revolutionized medical image analysis, but their susceptibility to adversarial attacks poses a significant threat. Even minor, imperceptible modifications to an image can cause these models to misclassify it, leading to potentially severe consequences in healthcare. This unreliability undermines trust in AI for critical diagnostic tasks and hinders the adoption of Explainable AI (XAI) and Trustworthy AI principles. This paper specifically addresses the challenge of defending medical images against "one-pixel attacks," a type of adversarial attack that manipulates a minimal number of pixels to induce misclassification, and evaluates the effectiveness of denoising techniques in restoring these compromised images.

Methods

The core of this research lies in developing and evaluating a denoising autoencoder model designed to counteract adversarial attacks on medical images. The authors propose a novel autoencoder architecture, building upon existing work, and train it using a specific noise injection strategy.

  • Adversarial Attack Generation: The study employs the "one-pixel attack" method to generate adversarial medical images. This technique subtly alters a single pixel in an image to trick a classification model into making an incorrect prediction. Differential Evolution algorithms are used to efficiently search for the optimal pixel to modify.
  • Denoising Model: A novel autoencoder-based denoising model is proposed. This model is trained to reconstruct clean images from noisy inputs. The architecture incorporates several optimizations, including increased depth, convolutional kernels, Batch Normalization, LeakyReLU activation, attention layers, residual blocks, and skip connections, to enhance its denoising capabilities.
  • Training Strategy: Denoising models are trained by introducing random impulse noise to images. For the proposed model, a 10% noise level is used for both input and target images, aiming to teach the model to map noisy inputs to clean outputs.
  • Evaluation Metrics: The effectiveness of the denoising models is quantitatively assessed using standard image quality metrics: Peak Signal-to-Noise Ratio (PSNR), Structural Similarity Index (SSIM), Mean Squared Error (MSE), Gradient Magnitude Similarity Deviation (GMSD), and Feature Similarity Index (FSIM).

Datasets

The study utilizes four diverse medical imaging datasets from the medMNIST collection:

  • Derma: Dermatoscopic images of skin lesions.
  • Pathology: Histopathology images.
  • OCT: Optical Coherence Tomography scans of retinal diseases.
  • Chest: X-ray images for disease detection.

These datasets represent a variety of modalities, resolutions, and classification complexities (binary, multi-label, and multi-class), allowing for a comprehensive evaluation of the proposed denoising model's generalizability.

Key Insights and Ideas

  • Pixel-level attacks are a real threat to medical AI: Even minimal perturbations can cause significant misclassifications, highlighting the need for robust defenses.
  • Denoising is a viable defense strategy: The proposed autoencoder model demonstrates a strong ability to restore images attacked by one-pixel perturbations, effectively mitigating the adversarial effect.
  • Model architecture matters: The inclusion of features like attention layers, residual blocks, and skip connections significantly improves the denoising performance of the autoencoder.
  • Dataset characteristics influence attack success: Larger images and simpler structures (like in the Chest dataset) appear more susceptible to successful one-pixel attacks compared to smaller, more complex images (like in the Pathology dataset).
  • Consistency across modalities: The proposed denoising model shows consistent performance across diverse medical imaging types, suggesting its broad applicability.

Key Results

The proposed denoising autoencoder model demonstrated strong performance across all four medical image datasets.

  • Derma Dataset: The proposed DAE achieved a PSNR of 37.60 and SSIM of 0.98 on successfully attacked images, outperforming other tested models like Noise2Noise and Autoencoder.
  • Pathology Dataset: The DAE achieved a PSNR of 35.48 and SSIM of 0.98 in denoising two-pixel attacked images.
  • OCT Dataset: The DAE achieved a PSNR of 37.62 and SSIM of 0.98 in denoising one-pixel attacked images.
  • Chest Dataset: The DAE achieved a PSNR of 42.21 and SSIM of 0.99 in denoising one-pixel attacked images.

Qualitatively, the images denoised by the proposed model were closer to the original images compared to other methods, with fewer blurred features.

Limitations and Future Work

The authors acknowledge several limitations:

  • Focus on Sparse Attacks: The study primarily evaluated robustness against sparse, pixel-level attacks (one-pixel and two-pixel). The model's performance against dense, multi-pixel adversarial attacks (like PGD or AutoAttack) is not guaranteed and requires further investigation.
  • Synthetic Dataset: The use of a synthetic test dataset might not fully reflect real-world prevalence and diagnostic challenges.
  • Lack of Demographic Diversity: The study's cohort lacked demographic diversity, particularly concerning skin tones, which can influence lesion morphology and diagnostic features.
  • Web-Based Design: The web-based evaluation excluded crucial clinical context from in-person examinations.
  • Proprietary Model Constraints: The use of a proprietary binary classifier limited the ability to analyze its internal mechanisms.
  • No Clinical Validation: The study relied on image quality metrics (PSNR, SSIM) as proxies for restoration quality, rather than full clinical re-labeling or post-denoising accuracy tables against baselines.

Future work should focus on evaluating robustness against more complex attacks, incorporating clinical validation, and expanding the dataset to include greater demographic diversity. The authors also suggest exploring techniques like autoencoders combined with One-Class SVMs to address class imbalance in medical datasets.

Summary updated

Abstract

The rapid advancement of deep learning is significantly hindered by its vulnerability to adversarial attacks, a critical concern in sensitive domains like medicine where misclassification can have severe, irreversible consequences. This issue directly underscores prediction unreliability and is central to the goals of Explainable Artificial Intelligence (XAI) and Trustworthy AI. This study addresses this fundamental problem by evaluating the efficacy of denoising techniques against adversarial attacks on medical images. Our primary objective is to assess the performance of various denoising models. The authors generate a test set of adversarial medical images using the one-pixel attack method, which subtly modifies a minimal number of pixels to induce misclassification. The authors propose a novel autoencoder-based denoising model and evaluate it across four diverse medical image datasets: Derma, Pathology, OCT, and Chest. Denoising models were trained by introducing Impulse noise and subsequently tested on the adversarially attacked images, with effectiveness quantitatively evaluated using standard image quality metrics. The results demonstrate that the proposed denoising autoencoder model performs consistently well across all datasets. By mitigating catastrophic failures induced by sparse attacks, this work enhances system dependability and significantly contributes to the development of more robust and reliable deep learning applications for clinical practice. A key limitation is that the evaluation was confined to sparse, pixel-level attacks; robustness to dense, multi-pixel adversarial attacks, such as PGD or AutoAttack, is not guaranteed and requires future investigation.
BibTeX
@inproceedings{tsai2025adversarial,
  author = {Min-Jen Tsai and Ya-Chu Lee and Hsin-Ying Lien and Cheng Liang},
  title = {{Adversarial Defense for Medical Images}},
  booktitle = {Electronics},
  year = {2025},
  doi = {10.3390/electronics14224384},
}
Figure