1 MIN READ
workshop · 2022 · PublishedRandom histogram equalization
Is contrast enhancement helping or deleting the evidence?
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.01 / THE QUESTION
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?
02 / THE IDEA
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.
- 01Calcification ROI
- 02Equalize with prob. P
- 03ResNet-50
- 042- or 3-class head
- 05Grad-CAM check
03 / WHAT WE TESTED
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.
04 / MAIN RESULT
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.
| P | 2-class accuracy | 2-class F1 | 3-class accuracy | 3-class F1 |
|---|---|---|---|---|
| 0 (never) | 0.9215 | 0.8838 | 0.6632 | 0.6855 |
| 0.2 | 0.9159 | 0.8759 | 0.6755 | 0.6985 |
| 0.4 | 0.9325 | 0.8973 | 0.6840 | 0.7071 |
| 0.6 | 0.9196 | 0.8770 | 0.6687 | 0.6969 |
| 0.8 | 0.9252 | 0.8869 | 0.6601 | 0.6839 |
| 1 (always) | 0.8724 | 0.8103 | 0.6252 | 0.6322 |
Standard deviations are in the paper. Two-tailed unpaired t-test, p < 0.0001 for both tasks.
05 / WHY IT MATTERS
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
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