← All publications

1 MIN READ

workshop · 2022 · Published

Random histogram equalization

Is contrast enhancement helping or deleting the evidence?

Paper
Effect of Random Histogram Equalization on Breast Calcification Analysis Using Deep Learning
Authors
Adarsh Bhandary Panambur · Prathmesh Madhu · Andreas Maier
Venue
Bildverarbeitung für die Medizin (BVM) 2022, Heidelberg, 173–178
FIG 1 / GRAD-CAM
Input patch, then Grad-CAM for the model trained without equalization (P = 0) and with random equalization (P = 0.4). The P = 0.4 model concentrates on the high-intensity calcification instead of the surrounding tissue. My figure — from the paper and my PhD thesis ↗
1,872 Calcification ROIs CBIS-DDSM · 326 held out for test
0.7071 Three-class F1 0.6855 without equalization
0.6322 F1 if you always equalize Worse than doing nothing
P = 0.4 Best probability Swept from 0 to 1

IN ONE SENTENCE

Summary

Stop applying histogram equalization to every calcification patch, apply it at random during training instead, and use Grad-CAM to check what changes.

Standard pre-processing, applied to the wrong scale.

Histogram equalization is routine for whole mammograms. But a calcification is a small bright spot, and a crop around it is mostly that spot — equalize it and the morphology and distribution that define the class get flattened into noise.

So should the operation be dropped altogether, or just used differently?

Make it stochastic, and training-only.

Apply equalization with probability P during training and never at test time, so the model sees both the raw and the enhanced view of the same patch and cannot rely on either.

P was swept from 0 (never) to 1 (always, at train and test), five runs at each value, with a ResNet-50 on 2-class and 3-class versions of the task.

  1. 01Calcification ROI
  2. 02Equalize with prob. P
  3. 03ResNet-50
  4. 042- or 3-class head
  5. 05Grad-CAM check

Two framings of the same clinical decision.

CBIS-DDSM calcification ROIs: 1,546 images split 80:20 for training and validation, plus an independent 326-image test set. Labels come from verified pathology.

The two-class task groups malignant and benign as "needs follow-up" against benign-without-callback; the three-class task keeps them separate.

1,546 Train + validation ROIs 80:20 split
326 Independent test ROIs
06 Probabilities swept P = 0 to 1
05× Runs per setting

Sometimes is better than always — and better than never.

At P = 0.4 the three-class F1 rose from 0.6855 to 0.7071 and the two-class F1 from 0.8838 to 0.8973, both at p < 0.0001.

The instructive number is P = 1. Equalizing every image at train and test time is the worst setting of all — three-class F1 0.6322, well below doing nothing. Deterministic enhancement actively removes class information here.

CBIS-DDSM calcification test set (n = 326), mean over 5 runs. P is the probability of histogram equalization during training; at P = 1 it is applied at test time as well.
P2-class accuracy2-class F13-class accuracy3-class F1
0 (never)0.92150.88380.66320.6855
0.20.91590.87590.67550.6985
0.40.93250.89730.68400.7071
0.60.91960.87700.66870.6969
0.80.92520.88690.66010.6839
1 (always)0.87240.81030.62520.6322

Standard deviations are in the paper. Two-tailed unpaired t-test, p < 0.0001 for both tasks.

FIG 2 / THE FAILURE CASE
Why always-on equalization fails: input, the equalized version, and Grad-CAM for the P = 1 model. It still finds the suspicious region, but the morphology it needed to classify it has been destroyed. My figure — from the paper and my PhD thesis ↗

Check your pre-processing against the model's attention.

The metric difference between P = 0 and P = 1 is a couple of points; the Grad-CAM difference explains why, and would have flagged the problem even without the sweep.

This was the first paper of the thesis, and the augmentation it introduced is reused as part of the standard pipeline in the later contrast-enhanced mammography work.

LIMITATION

What this does not show

CBIS-DDSM is digitized scanned-film mammography, not digital mammography, so the intensity statistics differ from a modern screening cohort. No comparison against other augmentation strategies was run.

READ IT YOURSELF

Paper · DOI · Code · Citation

Paper ↗DOI ↗arXiv ↗
View original abstract + citation

Abstract

Contrast enhancement is a standard pre-processing step for whole mammograms, but applying it to small calcification patches can destroy class-specific information: calcifications appear as bright spots, and equalizing such a patch amplifies noise along with signal. This paper treats histogram equalization as a stochastic augmentation instead of deterministic pre-processing, applying it with probability P during training only. On the CBIS-DDSM calcification subset a ResNet-50 trained with P = 0.4 improves over both no equalization and always-on equalization, and Grad-CAM shows the resulting model attending to the high-intensity calcification spots rather than diffuse surrounding tissue.

Citation

A. Bhandary Panambur, P. Madhu, A. Maier. Effect of Random Histogram Equalization on Breast Calcification Analysis Using Deep Learning. Bildverarbeitung für die Medizin (BVM) 2022, pp. 173–178. doi:10.1007/978-3-658-36932-3_38