Case Study: Explaining Diabetic Retinopathy Detection Deep CNNs via Integrated Gradients

Linyi Li, Matt Fredrikson, Shayak Sen, Anupam Datta · DOI

TL;DR

This paper applies "Integrated Gradients," a powerful explainability technique, to a deep convolutional neural network (CNN) designed for detecting diabetic retinopathy. By visualizing which parts of retinal images the CNN focuses on, the authors not only improve lesion identification but also gain insights into the model's internal workings, potentially aiding clinicians in diagnosis.

What Problem Does This Paper Address?

Diabetic retinopathy (DR) is a leading cause of blindness, and its early detection is crucial for preventing vision loss. While deep CNNs have shown promise in automatically detecting DR from retinal images, they often function as "black boxes." This lack of transparency makes it difficult for clinicians to trust the model's predictions and understand why a particular diagnosis is made. Furthermore, identifying the subtle visual cues (like microaneurysms and leaky blood vessels) that indicate DR is a challenging and time-consuming task for human experts. This paper aims to bridge this gap by using explainability methods to make the DR detection CNN more interpretable, thereby enhancing its utility as a diagnostic aid.

Methods

The core of this work is the application of Integrated Gradients (IG), an attribution method that quantifies the contribution of each input pixel to the model's output. Unlike simpler gradient-based methods, IG has desirable properties like "completeness," ensuring that the sum of attributions equals the difference between the model's output for the input and a baseline input.

The authors go beyond standard IG application by:

  • Explaining Intermediate Layers: Instead of just looking at the input layer, they apply IG to understand the contributions of neurons in deeper layers of the CNN. This helps reveal how features are processed and combined.
  • Filtering Unimportant Units: They identify and focus on the most influential neurons within intermediate layers, allowing for a more targeted analysis.
  • Generating Contrary Samples: Using the pixel attributions from IG, they create modified images that nudge the model's prediction towards a different outcome. This is presented as a more "authentic" way to generate adversarial examples compared to traditional gradient-based attacks.
  • Visualizing Attribution Values: They use heatmaps to visualize the attribution scores, highlighting regions of the image that are most important for the model's decision.

Datasets

The study utilizes a dataset of retina images from a recent Kaggle competition. This dataset comprises approximately 35,000 training images and 55,000 test images, with labels ranging from stage 0 (no DR) to stage 4 (proliferative DR). The images are colorized and come in various sizes and tones, requiring significant preprocessing.

Key Insights and Ideas

  • Direct Pixel Attribution is Limited: While applying IG directly to input pixels can highlight potential lesions, the resulting heatmaps are often scattered and mixed with noise, making it hard to pinpoint definitive signs of DR.
  • Intermediate Layer Explanations are More Revealing: Attributing the model's output to intermediate layer neurons, particularly in convolutional layers, provides clearer visualizations of lesion locations. This suggests that higher-level features captured by these layers are more discriminative.
  • Identifying Opposing Features: By analyzing both positive and negative attributions, the researchers can see which image regions contribute to a positive prediction (e.g., stage 4 DR) and which might oppose it, potentially indicating features that confuse the model or are associated with less severe stages.
  • "Contrary Samples" Offer Realistic Perturbations: Generating modified images based on IG attributions creates samples that are more realistic than traditional adversarial examples, offering a novel way to probe model behavior.
  • Evidence of Model Linearity: The study observes that as adversarial perturbations increase, the attributions of certain intermediate layer units grow linearly, providing empirical evidence for the linearity of neural network models.

Key Results

  • Improved Accuracy: The proposed CNN model achieved an accuracy of 75.15%, a slight improvement over a baseline model (73.76%).
  • Enhanced Lesion Visualization: Heatmaps generated from intermediate layer attributions effectively highlight key lesions like microaneurysms and leaky blood vessels, often distinguishing them from normal retinal features.
  • Qualitative Understanding of Model Behavior: The visualizations provide insights into how the CNN processes information, showing that convolutional layers focus on local features while fully-connected layers capture more abstract patterns.
  • Generation of Realistic "Contrary" Samples: The method successfully generated modified images that altered the model's prediction, demonstrating the utility of IG for understanding feature importance.

Limitations and Future Work

  • Multi-channel Attribution Complexity: Explaining the attribution for each of the three color channels (RGB) of an image is challenging, as channel attributions can differ significantly, making intuitive visualization difficult.
  • Coincidence of Positive and Negative Regions: The paper notes an empirical observation where positive and negative attribution regions sometimes coincide, which is counter-intuitive if lesions are solely responsible for disease stages.
  • Computational Cost: Calculating attributions for intermediate layers can be computationally intensive, with one sample taking up to 4 hours on a Core i7-7700K.
  • Missed Lesions: Despite improvements, some vital lesions are still missed by the current approach.

Future work could involve:

  • Developing better methods for visualizing and interpreting multi-channel attributions.
  • Investigating special units whose attribution values behave unusually.
  • Optimizing the computational efficiency of the attribution process.
  • Exploring how to incorporate these explainability insights into clinical workflows to assist doctors.

Summary updated

Abstract

In this report, we applied integrated gradients to explaining a neural network for diabetic retinopathy detection. The integrated gradient is an attribution method which measures the contributions of input to the quantity of interest. We explored some new ways for applying this method such as explaining intermediate layers, filtering out unimportant units by their attribution value and generating contrary samples. Moreover, the visualization results extend the use of diabetic retinopathy detection model from merely predicting to assisting finding potential lesions.
BibTeX
@misc{li2017case,
  author = {Linyi Li and Matt Fredrikson and Shayak Sen and Anupam Datta},
  title = {{Case Study: Explaining Diabetic Retinopathy Detection Deep CNNs via Integrated Gradients}},
  year = {2017},
  eprint = {1709.09586},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1709.09586},
}
Figure