Explainable Machine Learning for Breast Cancer Diagnosis
Explainable Machine Learning for Breast Cancer Diagnosis
Abstract: Image classification is widely used to build predictive models for breast cancer diagnosis.
Most existing approaches overwhelmingly rely on deep convolutional networks to build such diagnosis
pipelines. These model architectures, although remarkable in performance, are black-box systems that
provide minimal insight into the inner logic behind their predictions. This is a major drawback as the
explainability of prediction is vital for applications such as cancer diagnosis. In this paper, we address
this issue by proposing an explainable machine learning pipeline for breast cancer diagnosis based on
ultrasound images. We extract first- and second-order texture features of the ultrasound images and use
them to build a probabilistic ensemble of decision tree classifiers. Each decision tree learns to classify the
input ultrasound image by learning a set of robust decision thresholds for texture features of the image.
The decision path of the model predictions can then be interpreted by decomposing the learned decision
trees. Our results show that our proposed framework achieves high predictive performance while being
explainable.
1. Introduction
Ultrasound imaging is an effective method for breast cancer diagnosis [1,2] that, compared to
alternative modalities, is more accessible and less costly. Several recent studies have explored building
data-driven automated breast cancer diagnosis machine learning pipelines to detect the malignancy of
tumors observed in ultrasound images [3–6]. These studies dominantly rely on deep convolutional neural
network architectures to classify tumor images. Convolutional neural networks essentially learn to map
the input image pixel information to a lower-dimensional feature space through a series of hidden layers.
Although notable in prediction performance, convolutional networks are largely black-box machine
learning models that provide little to no insight into the logic behind their predictions [7,8]. In general,
humans tend to be unwilling to rely on procedures that are not interpretable, explainable and transparent,
especially for making critical predictions such as cancer diagnosis [8,9]. Yet, the explainability of machine
learning models for cancer diagnosis falls short of the increasing demand for interpretable and reliable
artificial intelligence [10].
In a recent study, Moon et al. [3] adopted standard deep convolutional neural network architectures
(including VGG, ResNet, and DenseNet) to classify breast ultrasound images and detect the malignancy of
tumors. The study reports a high predictive performance for these standard architectures. In a similar
study, Masud et al. [11] evaluated pretrained convolutional models for ultrasound image classification.
Other studies, such as [12,13], focused on semantic segmentation of the breast tumor from ultrasound
images.
In this paper, we propose an explainable machine learning pipeline for probabilistic breast cancer
diagnosis based on ultrasound images. We formulate this as a binary classification problem. First, through
2 of 13
a comprehensive texture analysis, we extract first- and second-order texture features of the region of
interest in the ultrasound image. We then use these features to train an ensemble of decision trees. Each
decision tree in the model learns to classify the input image through a set of test conjunctions where each
test compares a texture feature with a robust numerical decision threshold. We show that our proposed
pipeline achieves a high predictive performance that is comparable to the existing black box convolution
neural network architectures. More importantly, we demonstrate that our proposed model can be probed
to accurately track and explain the decision path behind its prediction.
2.1. Data
We use a public dataset of breast ultrasound images [2]. In this dataset, a total number of 780 images
are obtained from 600 female patients (age of 25-75 years old). This includes 133 normal cases with no
mass, 210 cases with a benign mass, and 487 cases with a malignant mass. Images are obtained using
LOGIQ E9 ultrasound and LOGIQ E9 Agile ultrasound systems. These instruments produce DICOM
images with 1280 × 1024 resolution using 1-5 MHz transducers on ML6-15-D Matrix linear probe. The raw
DICOM images are cropped, preprocessed, and converted to PNG format with an average resolution of
500 × 500 pixels. For each case with a mass, a ground-truth binary mask of the region of interest (ROI) is
manually created. Dataset is split into 80% train set and 20% test set.
predictions, as opposed to black-box predictions, can be used more reliably in applications such as medical
diagnosis.
Next, at each boosting iteration m, for each entry the residuals are computed as
Through grading boosting, GBDT combines multiple "weak" learner classifiers into an ensemble of
strong classification model.
2.3.2. LightGBM
LightGBM is an open-source GBDT framework [25]. LightGBM is based on a gradient-based one-side
sampling to filter data instances and an exclusive feature bundling to encode features into less dense space.
Specifically, LightGBM discretizes continuous features using a histogram-based algorithm for a faster
training process and reduced memory consumption. Also, LightGBM uses a leaf-wise strategy of growing
decision trees by discovering a leaf with the highest gain of variance. This enables LightGBM to achieve
state-of-the-art performance in a variety of applications [26–28].
Figure 1. Our proposed pipeline uses the ultrasound image and ROI mask to extract GLCM texture features
and learns a boosted decision tree model to make probabilistic diagnosis based on explainable decision
trees.
features are denoted as {statistic}_d{distance}_a{angle} (e.g., energy_d3_a135 refers to the GLCM energy
computed within a distance of 3 pixels and along a 135◦ direction).
We then use a LightGBM classification model with a gradient boosting decision tree strategy, 10
leaves per tree, and a maximum feature bin size of 512. The classification model is trained by minimizing a
binary log loss, with a learning rate of 0.05, and for a total number of 500 boosting iterations. For a given
ultrasound image input, the model outputs the probability of the mass in ROI being benign or malignant.
Importantly, the decision tree ensemble can be decomposed to explain how the model comes up with a
prediction. The learned model is a set of decision trees with multiple test conjunctions that compare the
texture features of the ROI with numerical thresholds inferred from the data.
3. Results
In this section, we first summarize the texture analysis results and then evaluate the performance
of our purposed pipeline. Lastly, we highlight how our pipeline can be used as an explainable machine
learning framework to understand the logic behind each of its diagnostic predictions.
(p < 0.001). See Tables A2-A7 for the complete t-test results. Interestingly, the difference between the
two groups is consistent for various distances and angles. This further indicates that GLCM features are
consistent for different orientations of the ROI. Figure 3 exemplifies the persistence of the difference in
each GLCM features across all angles for d = 3 pixels.
5 of 13
Figure 2. First-order texture features. All measured statistics, except Mean and RMS, are significantly
different between the two groups of benign and malignant masses. Refer to Table A1 for a description of
the metrics and t-test results.
Figure 3. Second-order GLCM texture features. All measure statistics are significantly different between
the benign and malignant groups. This significant difference is consistent across various pixel distances
(d = {1, 3, 5}, only d=3 results are demonstrated here) and angles (θ = {0◦ , 45◦ , 90◦ , 135◦ }). Refer to Tables
A2-A7 for the deception of each metric and detailed t-test results.
6 of 13
Table 1. Model evaluation. Standard classification performance metrics measured on the test set. The best
performance is achieved with LightGBM model with 500 gradient boosting iterations.
Table 2. Model comparison with convolutional architectures. Standard classification performance metrics
measured on the test set. Our explainable model based on decision trees achieves high predictive
performance that is comparable to existing black box convolutional neural network architectures.
Figure 4. Feature importance. SHAP value quantifies the contribution of each feature to the prediction of
each class. The features are denoted as {statistic}_d{distance}_a{angle}.
4. Conclusions
Ultrasound imaging is an accessible and cost-effective imaging modality to diagnose breast cancer.
Most of recent work on building machine learning models for breast cancer diagnosis depend on
convolutional neural network architectures. Although accurate in performance, convolutional networks
are black-box models and cannot be interpreted in terms of the logic behind their predictions.
In this paper, we proposed a novel explainable machine learning pipeline for breast cancer diagnosis
based on ultrasound images. Our pipeline uses texture analysis of the ultrasound images as its basis to
learn an ensemble of decision trees to predict the likelihood of malignancy of breast tumors. Importantly,
our model can be decomposed into its underlying decision trees to fully interpret the decision path behind
its outputs by following test conjunctions in each decision tree.
8 of 13
Figure 5. Qualitative results of a benign case. Our pipeline learns to infer a probabilistic diagnosis of the
breast ultrasound images. The learned ensemble can be probed to obtain explainable decision paths in a
set of learned decision trees. In each learned tree classifier, the orange arrows highlight the decision path.
The model learns to compare the texture features obtained from the input image (orange numbers at the
bottom of each dashed box) with the learned thresholds (black triangle on each histogram) at each node of
the decision tree.
9 of 13
Figure 6. Qualitative results of a malignant case. Refer to Figure 5 caption for more details.
10 of 13
We believe our work is a step towards building more practical and comprehensible machine learning
tools for cancer diagnosis by increasing the transparency of the prediction process. An interesting future
work is to combine convolutional networks with decision trees. Finally, we hope our approach in this
work to inspire future research on data-driven medical diagnosis to devote more attention into increasing
the explainability of their solutions.
Appendix A
This section gives an overview of the first- and second-order GLCM texture feature statistics along
with a detailed report of the t-test of each statistic between the two group of benign and malignant masses.
Table A1. First-order Texture Features. The metrics are computed for a set of N pixels inside of the ROI
denoted as X. Benign and malignant groups are compared using a t-test.
N
mean 1
N ∑ X( i ) 6.40e+01 6.59e+01 0.43
q i =1
1 N
rms ∑
N i =1 (X ( i ) + c )
2 7.26e+01 7.51e+01 0.28
1 N
∑i=1 (X(i )− X̄ ) 3
skewness qN 3 1.45 9.92e-01 <0.001
1 N
N ∑i =1 (X(i )− X̄ )
2
N
uniformity ∑ p ( i )2 3.40e-01 2.69e-01 <0.001
i =1
N
variance 1
N ∑ (X(i) − X̄ )2 1.04e+03 1.22e+03 <0.001
i =1
Table A2. Second-order Texture Features. The metrics are computed based on the gray-level co-occurrence
matrix for a set of N gray level of pixels inside of the ROI.
Table A3. Gray level co-occurrence matrix contrast feature measured across three pixel distances {1, 3, 5}
and four angles {0◦ , 45◦ , 90◦ , 135◦ }.
GLCM contrast
distance angle µbenign µmalignant p-value
1 0° 184.86 114.20 <0.001
45° 433.20 238.06 <0.001
90° 304.20 154.26 <0.001
135° 438.01 238.07 <0.001
3 0° 730.45 493.19 <0.001
45° 1032.13 582.21 <0.001
90° 1229.20 660.83 <0.001
135° 1049.76 582.42 <0.001
5 0° 1136.95 830.26 <0.001
45° 1768.76 1132.49 <0.001
90° 1681.63 1040.57 <0.001
135° 1801.47 1130.44 <0.001
Table A4. Gray level co-occurrence matrix correlation feature measured across three pixel distances {1, 3, 5}
and four angles {0◦ , 45◦ , 90◦ , 135◦ }.
GLCM correlation
distance angle µbenign µmalignant p-value
1 0° 0.94 0.97 <0.001
45° 0.87 0.94 <0.001
90° 0.91 0.96 <0.001
135° 0.86 0.94 <0.001
3 0° 0.77 0.87 <0.001
45° 0.68 0.85 <0.001
90° 0.63 0.83 <0.001
135° 0.68 0.85 <0.001
5 0° 0.64 0.78 <0.001
45° 0.46 0.70 <0.001
90° 0.47 0.73 <0.001
135° 0.44 0.70 <0.001
Table A5. Gray level co-occurrence matrix dissimilarity feature measured across three pixel distances
{1, 3, 5} and four angles {0◦ , 45◦ , 90◦ , 135◦ }.
GLCM dissimilarity
distance angle µbenign µmalignant p-value
1 0° 4.84 3.41 <0.001
45° 8.67 5.75 <0.001
90° 7.09 4.58 <0.001
135° 8.69 5.74 <0.001
3 0° 12.10 8.84 <0.001
45° 15.33 10.07 <0.001
90° 17.04 10.97 <0.001
135° 15.40 10.06 <0.001
5 0° 16.76 12.76 <0.001
45° 23.10 15.95 <0.001
90° 22.06 14.98 <0.001
135° 23.18 15.90 <0.001
12 of 13
Table A6. Gray level co-occurrence matrix energy feature measured across three pixel distances {1, 3, 5}
and four angles {0◦ , 45◦ , 90◦ , 135◦ }.
GLCM energy
distance angle µbenign µmalignant p-value
1 0° 0.30 0.38 <0.001
45° 0.28 0.37 <0.001
90° 0.29 0.38 <0.001
135° 0.28 0.37 <0.001
3 0° 0.26 0.36 <0.001
45° 0.24 0.35 <0.001
90° 0.25 0.35 <0.001
135° 0.24 0.35 <0.001
5 0° 0.24 0.34 <0.001
45° 0.19 0.32 <0.001
90° 0.22 0.33 <0.001
135° 0.19 0.32 <0.001
Table A7. Gray level co-occurrence matrix homogeneity feature measured across three pixel distances
{1, 3, 5} and four angles {0◦ , 45◦ , 90◦ , 135◦ }.
GLCM homogeneity
distance angle µbenign µmalignant p-value
1 0° 0.49 0.56 <0.001
45° 0.41 0.49 <0.001
90° 0.43 0.51 <0.001
135° 0.41 0.50 <0.001
3 0° 0.37 0.45 <0.001
45° 0.33 0.44 <0.001
90° 0.33 0.43 <0.001
135° 0.33 0.44 <0.001
5 0° 0.33 0.41 <0.001
45° 0.26 0.32 <0.001
90° 0.30 0.40 <0.001
135° 0.27 0.39 <0.001
References
1. Kuhl, C.K.; Schrading, S.; Leutner, C.C.; Morakkabati-Spitz, N.; Wardelmann, E.; Fimmers, R.; Kuhn, W.; Schild,
H.H. Mammography, breast ultrasound, and magnetic resonance imaging for surveillance of women at high
familial risk for breast cancer. Journal of clinical oncology 2005, 23, 8469–8476.
2. Al-Dhabyani, W.; Gomaa, M.; Khaled, H.; Fahmy, A. Dataset of breast ultrasound images. Data in brief 2020,
28, 104863.
3. Moon, W.K.; Lee, Y.W.; Ke, H.H.; Lee, S.H.; Huang, C.S.; Chang, R.F. Computer-aided diagnosis of breast
ultrasound images using ensemble learning from convolutional neural networks. Computer methods and
programs in biomedicine 2020, 190, 105361.
4. Samulski, M.; Hupse, R.; Boetes, C.; Mus, R.D.; den Heeten, G.J.; Karssemeijer, N. Using computer-aided
detection in mammography as a decision support. European radiology 2010, 20, 2323–2330.
5. Sahiner, B.; Chan, H.P.; Roubidoux, M.A.; Hadjiiski, L.M.; Helvie, M.A.; Paramagul, C.; Bailey, J.; Nees, A.V.;
Blane, C. Malignant and benign breast masses on 3D US volumetric images: effect of computer-aided diagnosis
on radiologist accuracy. Radiology 2007, 242, 716–724.
6. Jiménez-Gaona, Y.; Rodríguez-Álvarez, M.J.; Lakshminarayanan, V. Deep-Learning-Based Computer-Aided
Systems for Breast Cancer Imaging: A Critical Review. Applied Sciences 2020, 10, 8298.
7. Castelvecchi, D. Can we open the black box of AI? Nature News 2016, 538, 20.
13 of 13
8. Arrieta, A.B.; Díaz-Rodríguez, N.; Del Ser, J.; Bennetot, A.; Tabik, S.; Barbado, A.; García, S.; Gil-López, S.;
Molina, D.; Benjamins, R.; others. Explainable Artificial Intelligence (XAI): Concepts, taxonomies, opportunities
and challenges toward responsible AI. Information Fusion 2020, 58, 82–115.
9. Zhu, J.; Liapis, A.; Risi, S.; Bidarra, R.; Youngblood, G.M. Explainable AI for designers: A human-centered
perspective on mixed-initiative co-creation. 2018 IEEE Conference on Computational Intelligence and Games
(CIG). IEEE, 2018, pp. 1–8.
10. Preece, A.; Harborne, D.; Braines, D.; Tomsett, R.; Chakraborty, S. Stakeholders in explainable AI. arXiv preprint
arXiv:1810.00184 2018.
11. Masud, M.; Rashed, A.E.E.; Hossain, M.S. Convolutional neural network-based models for diagnosis of breast
cancer. Neural Computing and Applications 2020, pp. 1–12.
12. Byra, M.; Jarosik, P.; Szubert, A.; Galperin, M.; Ojeda-Fournier, H.; Olson, L.; O’Boyle, M.; Comstock, C.;
Andre, M. Breast mass segmentation in ultrasound with selective kernel U-Net convolutional neural network.
Biomedical Signal Processing and Control 2020, 61, 102027.
13. Irfan, R.; Almazroi, A.A.; Rauf, H.T.; Damaševičius, R.; Nasr, E.A.; Abdelgawad, A.E. Dilated semantic
segmentation for breast ultrasonic lesion detection using parallel feature fusion. Diagnostics 2021, 11, 1212.
14. Tuceryan, M.; Jain, A.K. Texture analysis. Handbook of pattern recognition and computer vision 1993, pp. 235–276.
15. Materka, A.; Strzelecki, M.; others. Texture analysis methods–a review. Technical university of lodz, institute of
electronics, COST B11 report, Brussels 1998, 10, 4968.
16. Varghese, B.A.; Cen, S.Y.; Hwang, D.H.; Duddalwar, V.A. Texture analysis of imaging: what radiologists need
to know. American Journal of Roentgenology 2019, 212, 520–528.
17. Srinivasan, G.; Shobha, G. Statistical texture analysis. Proceedings of world academy of science, engineering
and technology, 2008, Vol. 36, pp. 1264–1269.
18. Kim, N.D.; Amin, V.; Wilson, D.; Rouse, G.; Udpa, S. Ultrasound image texture analysis for characterizing
intramuscular fat content of live beef cattle. Ultrasonic imaging 1998, 20, 191–205.
19. Sebastian V, B.; Unnikrishnan, A.; Balakrishnan, K. Gray level co-occurrence matrices: generalisation and some
new features. arXiv preprint arXiv:1205.4831 2012.
20. Iqbal, F.; Pallewatte, A.S.; Wansapura, J.P. Texture analysis of ultrasound images of chronic kidney disease.
2017 Seventeenth International Conference on Advances in ICT for Emerging Regions (ICTer). IEEE, 2017, pp.
1–5.
21. Xu, S.S.D.; Chang, C.C.; Su, C.T.; Phu, P.Q. Classification of liver diseases based on ultrasound image texture
features. Applied Sciences 2019, 9, 342.
22. Sharma, H.; Kumar, S. A survey on decision tree algorithms of classification in data mining. International
Journal of Science and Research (IJSR) 2016, 5, 2094–2097.
23. Myles, A.J.; Feudale, R.N.; Liu, Y.; Woody, N.A.; Brown, S.D. An introduction to decision tree modeling. Journal
of Chemometrics: A Journal of the Chemometrics Society 2004, 18, 275–285.
24. Safavian, S.R.; Landgrebe, D. A survey of decision tree classifier methodology. IEEE transactions on systems,
man, and cybernetics 1991, 21, 660–674.
25. Ke, G.; Meng, Q.; Finley, T.; Wang, T.; Chen, W.; Ma, W.; Ye, Q.; Liu, T.Y. Lightgbm: A highly efficient gradient
boosting decision tree. Advances in neural information processing systems 2017, 30, 3146–3154.
26. Rezazadeh, A. A Generalized Flow for B2B Sales Predictive Modeling: An Azure Machine-Learning Approach.
Forecasting 2020, 2, 267–283.
27. Chen, C.; Zhang, Q.; Ma, Q.; Yu, B. LightGBM-PPI: Predicting protein-protein interactions through LightGBM
with multi-information fusion. chemometrics and intelligent laboratory systems 2019, 191, 54–64.
28. Sun, X.; Liu, M.; Sima, Z. A novel cryptocurrency price trend forecasting model based on LightGBM. Finance
Research Letters 2020, 32, 101084.
29. Hossin, M.; Sulaiman, M.N. A review on evaluation metrics for data classification evaluations. International
journal of data mining & knowledge management process 2015, 5, 1.
30. Lundberg, S.M.; Erion, G.G.; Lee, S.I. Consistent individualized feature attribution for tree ensembles. arXiv
preprint arXiv:1802.03888 2018.