GradMask: Reduce Overfitting by Regularizing Saliency

Becks Simpson, Francis Dutil, Yoshua Bengio, Joseph Paul Cohen

TL;DR

Deep learning models in medical imaging often overfit by latching onto spurious background artifacts, such as hospital-specific equipment signatures. GradMask addresses this by penalizing a model's saliency maps when they highlight regions outside of a ground-truth lesion mask. This forces the network to focus its attention strictly on clinically relevant features, improving generalization on small datasets.

What Problem Does This Paper Address?

In medical imaging, datasets are frequently small due to the rarity of certain diseases. This scarcity makes convolutional neural networks (CNNs) highly prone to overfitting. Instead of learning true biological markers, models often exploit confounding shortcuts—such as specific scanner models, hospital-specific artifacts, or variations in acquisition parameters.

Standard regularization techniques like dropout or L2 weight decay limit overall model capacity but do not explicitly stop a network from using the wrong features. To build trustworthy clinical models, we need a way to penalize networks when they assign predictive importance to regions that a human doctor would completely ignore.

Methods

The authors introduce GradMask, a regularization technique that guides where a model looks by constraining its gradient-based attribution maps during training.

The pipeline works as follows:

  1. Compute Saliency: Calculate the gradient of the predicted class probability with respect to the input image ($\frac{\partial \hat{y}}{\partial x}$). This highlights the pixels the model finds most discriminative.
  2. Mask the Background: Multiply this saliency map by an inverted binary segmentation mask ($1 - x_{seg}$), isolating all highlighted features falling outside the actual lesion.
  3. Penalize Spurious Attention: Add the L2 norm of this "incorrect attribution map" as a penalty term to the classification loss function, driving background gradients toward zero.
Figure 1: A visualization of the GradMask method applied to brain tumor classification

Beyond basic saliency, the authors propose Contrast GradMask. Instead of regularizing the positive class alone, it penalizes the gradient of the difference between the healthy and non-healthy class predictions ($||\hat{y}_1 - \hat{y}_0||$). This ensures that background variations affecting both classes equally are not unnecessarily penalized, focusing the model purely on distinguishing features.

Datasets

To evaluate GradMask in data-scarce environments, the authors restricted training to small subsets (64 to 128 samples) across four medical imaging datasets:

  • Liver Segmentation (Medical Segmentation Decathlon - MSD)
  • Pancreas Tumor (MSD)
  • Cardiac Segmentation (MSD)
  • Brain Tumor (BraTS 2015)

Key Insights and Ideas

  • Regulating "Why", Not Just "What": Traditional regularization penalizes weight magnitudes blindly. GradMask penalizes the rationale of the network, aligning machine attention with human domain expertise.
  • The Power of Contrast: Regularizing the contrastive gradient between classes prevents the model from wasting capacity on background textures that are common to both healthy and unhealthy tissues.
  • Sensitivity to Baseline Quality: Saliency regularization is not a silver bullet; it relies on the underlying network being capable of finding a reasonable baseline signal. If the task is too difficult due to aggressive image downsampling, constraining the gradients can sometimes degrade performance.

Key Results

The Contrast GradMask variant achieved a 1–4% increase in test AUC on three out of the four evaluated datasets:

  • Liver Seg (MSD): Test AUC improved significantly from $0.809 \pm 0.042$ (Baseline) to $\mathbf{0.836 \pm 0.017}$.
  • Cardiac Seg (MSD): Test AUC increased from $0.864 \pm 0.032$ to $\mathbf{0.877 \pm 0.031}$ using just 64 samples.
  • Pancreas Tumor (MSD): Showed a minor improvement from $0.776 \pm 0.019$ to $\mathbf{0.783 \pm 0.018}$.
  • Brain Tumor (BraTS): Performance bucked the trend, decreasing from $0.826 \pm 0.026$ to $0.798 \pm 0.019$. The authors attribute this to preprocessing issues where resizing eroded tiny tumor structures.

Limitations and Future Work

  • Resolution Artifacts: Image resizing during preprocessing occasionally eroded small tumors to the point of making the classification task impossible, hindering GradMask's effectiveness on the brain tumor dataset.
  • Mask Dependency: GradMask requires pixel-level segmentation masks during training, which are notoriously expensive and time-consuming to obtain in medical contexts.
  • Future Directions: The authors plan to experiment with more advanced gradient attribution methods (such as DeepLIFT) and investigate how GradMask performs when only a fraction of the training samples have available segmentation masks.

Summary updated

BibTeX
@misc{simpson2019gradmask,
  author = {Becks Simpson and Francis Dutil and Yoshua Bengio and Joseph Paul Cohen},
  title = {{GradMask: Reduce Overfitting by Regularizing Saliency}},
  year = {2019},
  eprint = {1904.07478},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1904.07478},
}
Figure