[Paper Review] Out of Distribution Detection and Adversarial Attacks on Deep Neural Networks for Robust Medical Image Analysis
This paper proposes a Mahalanobis distance-based confidence score to enhance robustness in deep learning models for medical image analysis, specifically malaria cell classification. By leveraging feature activations from intermediate network layers and computing Mahalanobis distances to class means, the method achieves state-of-the-art performance in detecting both out-of-distribution (OOD) and adversarial samples on ResNet-18 and VGG-19 models, outperforming ODIN and LID baselines across multiple metrics.
Deep learning models have become a popular choice for medical image analysis. However, the poor generalization performance of deep learning models limits them from being deployed in the real world as robustness is critical for medical applications. For instance, the state-of-the-art Convolutional Neural Networks (CNNs) fail to detect adversarial samples or samples drawn statistically far away from the training distribution. In this work, we experimentally evaluate the robustness of a Mahalanobis distance-based confidence score, a simple yet effective method for detecting abnormal input samples, in classifying malaria parasitized cells and uninfected cells. Results indicated that the Mahalanobis confidence score detector exhibits improved performance and robustness of deep learning models, and achieves stateof-the-art performance on both out-of-distribution (OOD) and adversarial samples.
Motivation & Objective
- To improve the robustness of deep neural networks in medical image analysis by detecting abnormal inputs such as out-of-distribution (OOD) and adversarial samples.
- To address the critical limitation of deep learning models in real-world medical applications, where distribution shift and adversarial attacks can lead to unreliable predictions.
- To evaluate and compare the performance of the proposed Mahalanobis confidence score against state-of-the-art methods (ODIN and LID) in detecting OOD and adversarial samples on a malaria cell dataset.
- To provide a reliable diagnostic framework for identifying model vulnerabilities and improving deployment safety in clinical settings.
Proposed method
- The method computes Mahalanobis distance between the feature activation of a test sample and the mean activation of each class in a selected intermediate layer of a pre-trained CNN.
- For each layer, the Mahalanobis score is calculated as $ M_l( ilde{ extbf{x}}_*) = - (f( ilde{ extbf{x}}_*) - m{ ilde{oldsymbol{ u}}}_c)^T m{ ilde{oldsymbol{ u}}}_c^{-1} (f( ilde{ extbf{x}}_*) - m{ ilde{oldsymbol{ u}}}_c) $, where $ f( ilde{ extbf{x}}_*) $ is the feature vector and $ m{ ilde{oldsymbol{ u}}}_c $ is the class mean.
- The final confidence score is a weighted sum across layers: $ M^*( extbf{x}_*) = igsum_{l=1}^{L} m{ ilde{oldsymbol{ u}}}_l M_l( extbf{x}_*) $, with layer weights $ m{ ilde{oldsymbol{ u}}}_l $ learned on a validation set.
- A threshold $ ho $ is used to classify inputs as in-distribution if $ M^*( extbf{x}_*) /geq ho $, enabling detection of OOD and adversarial samples.
- Adversarial samples are generated using FGSM, BIM, DeepFool, and CW attacks with varying noise levels $ m{ ilde{oldsymbol{ u}}}_* $.
- The method is evaluated on ResNet-18 and VGG-19 models fine-tuned on a malaria cell dataset with 13,779 parasitized and 13,779 uninfected cells.
Experimental results
Research questions
- RQ1Can the Mahalanobis distance-based confidence score effectively detect out-of-distribution (OOD) samples in medical image classification?
- RQ2How does the proposed method compare to state-of-the-art methods like ODIN and LID in detecting adversarial samples generated by multiple attack types?
- RQ3Does the Mahalanobis-based detection framework improve the robustness of pre-trained CNNs (ResNet-18 and VGG-19) in real-world medical imaging scenarios?
- RQ4To what extent does the method maintain high detection performance across diverse adversarial attack strategies (FGSM, BIM, DeepFool, CW)?
Key findings
- The Mahalanobis distance-based confidence score achieved a true negative rate (TNR) of 100.00% at 95% true positive rate (TPR) for FGSM attacks on VGG-19, outperforming LID (99.96% TNR).
- For CW attacks on VGG-19, the Mahalanobis method achieved 98.11% TNR at 95% TPR, compared to 75.93% for LID.
- The method achieved an AUROC of 99.98 for FGSM on VGG-19, significantly higher than LID’s 97.30 and ODIN’s 97.30.
- On adversarial samples generated by DeepFool, the Mahalanobis method achieved 75.96% TNR at 95% TPR on VGG-19, compared to 74.48% for LID.
- Detection accuracy for the Mahalanobis method reached 99.98% on FGSM for VGG-19, surpassing LID’s 99.41% and ODIN’s 99.41%.
- The method demonstrated superior robustness across all four adversarial attack types (FGSM, BIM, DeepFool, CW), consistently outperforming both LID and ODIN in AUROC, TNR, and detection accuracy.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.