Convolutional Neural Networks have shown promising effectiveness in identifying different types of cancer from radiographs. However, the opaque nature of CNNs makes it difficult to fully understand the way they operate, limiting their assessment to empirical evaluation. Here we study the soundness of the standard practices by which CNNs are evaluated for the purpose of cancer pathology. Thirteen highly used cancer benchmark datasets were analyzed, using four common CNN architectures and different types of cancer, such as melanoma, carcinoma, colorectal cancer, and lung cancer. We compared the accuracy of each model with that of datasets made of cropped segments from the background of the original images that do not contain clinically relevant content. Because the rendered datasets contain no clinical information, the null hypothesis is that the CNNs should provide mere chance-based accuracy when classifying these datasets. The results show that the CNN models provided high accuracy when using the cropped segments, sometimes as high as 93%, even though they lacked biomedical information. These results show that some CNN architectures are more sensitive to bias than others. The analysis shows that the common practices of machine learning evaluation might lead to unreliable results when applied to cancer pathology. These biases are very difficult to identify, and might mislead researchers as they use available benchmark datasets to test the efficacy of CNN methods.
Figures & tables
Figure 1: Example of 20 × 20 cropped images from the ISIC 2017 Skin cancer diagnosis dataset and five sections of the original image: upper-left, upper-right, center, bottom-left, and bottom-right. These small sub-image contain no medical information, and therefore are not expected to be useful for identifying cancer to a level beyond mere chance. The empirical classification accuracy of each section is compared with that of the classification accuracy observed when using the original image.
Figure 2: Sample images from the different classes of the DermaMNIST dataset and their respective 20 × 20 cropped sections that have no meaningful medical content. Since they do not have any medically relevant information, these non-informative sub-images are not expected to be able to identify cancer.
PathMNIST
Histopatology
Multi-Class (9)
1. Cancer-Associated Stroma, 2. Colorectal Adenocarcinoma Epithelium = Cancer Present / 3. Adipose Tissue, 4. Background, 5. Debris, 6. Lymphocytes, 7. Mucus, 8. Smooth Muscle and Normal Colon Mucosa = Cancer Absent
1. Malignant = Cancer Present / 2. Normal, 3. Benign = Cancer Absent
780
570
210
NoduleMNIST3D
Chest CT
Binary-Class (2)
1. Malignant = Cancer Present / 2. Benign = Cancer Absent
1,633
401
1232
Table 1: The description, class modification, and distribution of samples of the MedMNIST Dataset.
BreakHis Dataset
Magnification
Modality
Initial Class
Modified Binary Class
Total Samples
Cancer Present Samples
Cancer Absent Samples
40×
Microscopy Histopathology
Multi-Class (8)
1 to 4 = Cancer Absent/ 5 to 8 = Cancer Present
1995
1370
652
100×
2081
1437
644
200×
2013
1390
623
400×
1820
1232
588
Table 2: The Description, class modification, and distribution of samples of the BreakHis Dataset. Figures assigned to each class are as follows: Adenosis = 1; Fibroadenoma = 2; Phyllodes tumor = 3; Tubular adenoma = 4; Ducta carcinoma = 5; Lobular carcinoma = 6; Mucinous carcinoma = 7; and Papillary carcinoma = 8.
The ISIC (2016–2019) Dataset
Dataset
Data Modality
Initial Class
Modified Binary Class
Total Samples
Cancer Present Samples
Cancer Absent Samples
ISIC-2016
Dermatoscope
Binary Class
1. Melanoma = Cancer Present; 2. Benign = Cancer Absent
1279
248
1031
ISIC-2017
Dermatoscope
Multi-Class (3)
1. Melanoma = Cancer Present; 2. Seborrheic_keratosis; 3. Nevus = Cancer Absent
Table 3: The description, class modification, and distribution of samples of the ISIC dataset.
Breast Histopathology Image (IDC) Dataset
Dataset
Modality
Initial Class
Modified Binary Class
Total Samples
Cancer Present Samples
Cancer Absent Samples
Breast Histopathology Image (IDC)
Microscopy Histopathology
Binary
IDC-Nagative = Cancer Absent/IDC-Positive = Cancer Present
277,524
78,786
198,738
Table 4: Distribution of samples of the Breast Histopathology Image (IDC) Dataset.
Figure 3: Sample images across the MedMNIST datasets, showing the original images and their 20 × 20 cropped images. Mostly, the cropped images contain little or no medical content useful for correct diagnostics.
Figure 4: The classification accuracy of the BreastMNIST original image dataset alongside cropped 20 × 20 pixel sections. As expected, CNNs models can classify the original images. Surprisingly, all CNN models performed better than the random chance accuracy of 50%, when applied to the cropped sections, highlighting that these models can classify images that lack lesion-specific features.
Model
Sub Dataset
Accuracy
Recall
F 1
Precision
DENSENET121
Bottom Left
85.8372
85.5634
81.9552
78.7535
DENSENET121
Bottom Right
62.8590
4.4366
7.4707
28.3412
DENSENET121
Center
62.7399
3.9437
6.8230
35.0489
DENSENET121
Original Images
61.2442
6.5141
10.0572
64.2105
DENSENET121
Upper Left
62.9782
4.6479
7.9069
57.9132
DENSENET121
Upper Right
62.8855
4.7887
7.9559
42.9699
Table 5: Accuracy, precision, recall, and F-1 results of the analysis of the balanced BreastMNIST.
Figure 5: The classification accuracy, precision, recall, and F-1 scores for the DermaMNIST dataset when each class contains 458 images.
Figure 6: The classification accuracy of the original image alongside a cropped 20 × 20 pixel of the DermaMNIST datasets. All CNN models achieved a consistent classification accuracy of 93.42% on all four corner-cropped-image datasets, even when they contained only skin-toned background images. However, performance is slightly higher and varied on center-cropped images across all models; these images may contain small fractions of the lesion structure.
Figure 7: The classification accuracy performance of CNN models on the NoduleMNIST original images and their 20 × 20 pixel subset images. Unexpectedly, neural networks can identify positive and negative cases from the cropped-image datasets, despite the lack of sufficient nodule structures to make adequate diagnostics.
Figure 8: The classification accuracy performance of CNN models on the PathMNIST original dataset and its 20 × 20 pixel subsets, suggesting that these models may be classifying histopathology images as either cancerous or noncancerous based on non-informative medical cues.
Figure 9: The classification accuracy, precision, recall, and F-1 scores for the PathMNIST dataset when the size of each class is set to 9366 images.
Model
Sub Dataset
Accuracy
Recall
F-1
Precision
DENSENET121
Original Images
98.5376
98.8588
99.3495
99.1036
DENSENET121
Bottom Left
82.7994
82.6044
99.8973
90.4315
DENSENET121
Bottom Right
82.8830
82.6653
99.9144
90.4751
DENSENET121
Center
82.9109
82.6795
99.9315
90.4906
DENSENET121
Upper Left
82.7994
82.5952
99.9144
90.4330
DENSENET121
Upper Right
82.7855
82.6481
99.7946
90.4156
Table 6: Accuracy, precision, recall, and F-1 results of the analysis of the balanced PathMNIST.
Figure 10: Sample images across different magnification levels of the BreakHis datasets, showing the original images and their 20 × 20 cropped images. Cropped images show staining protocols that often lack clear histopathological structures.
Figure 11: The classification accuracy of the BreakHis 40× magnification level of the original images and its corresponding 20 × 20 cropped sections, showing that CNNs can classify images that contain non-informative medical content.
Figure 12: All the CNN models can accurately classify the original images as well as all the 20 × 20 cropped sections when applied using BreakHis 100× , suggesting that neural networks may be learning from staining color or texture pattern not related to the actual disease.
Figure 13: The results from BreakHis 200× show that CNN models can classify cancerous or noncancerous tumors from both the original images and their 20 × 20 cropped sections.
Figure 14: The classification accuracy score of all the CNN architectures across BreakHis 400× datasets (the original image and cropped sections) is far higher than accuracy when using only random chance.
Model
Sub Dataset
Accuracy
Recall
F-1
Precision
DENSENET121
Original Images
97.69
97.97
98.30
98.64
DENSENET121
Bottom Left
55.48
51.58
49.49
64.49
DENSENET121
Bottom Right
55.35
50.48
48.87
65.09
DENSENET121
Center
56.41
52.64
50.93
84.84
DENSENET121
Upper Left
55.93
52.25
50.27
85.12
DENSENET121
Upper Right
54.74
49.95
48.53
65.76
Table 7: Summary of the results of the analysis of the BreakHis dataset with 40 × magnification.
Figure 15: The classification accuracy, precision, recall, and F-1 scores for the BreakHis dataset with 40 × magnification when each class contains exactly 405 images.
Figure 16: Sample images across the ISIC datasets, showing the original images and their 20 × 20 cropped images. Mostly, the cropped images contain a black or skin-toned background. Sometimes, center-cropped images include lesion structures that lack meaningful diagnostic features for an expert dermatologist.
Figure 17: All CNN models can classify the ISIC_2017 cropped-image datasets with an accuracy higher than the 50% of mere chance. VGG16 consistently performs slightly better on the cropped images than on the original images.
Figure 18: The classification accuracy of the ISIC_2016 original image dataset alongside its 20 × 20 cropped sections; VGG16 exhibited consistent accuracy performance across all cropped datasets, suggesting that neural networks may be learning from background artifacts during training.
Figure 19: The classification accuracy scores on the ISIC_2018 original images and the cropped sections show that CNN models can also identify skin cancer from a small fraction of the full dermatoscope image containing only skin-toned background.
Model
Sub Dataset
Accuracy
Recall
F-1
Precision
DENSENET121
Original Images
85.8372
85.5634
81.9552
78.7535
DENSENET121
Bottom Right
62.8590
4.4366
7.4707
28.3412
DENSENET121
Bottom Left
62.7399
3.9437
6.8230
35.0489
DENSENET121
Center
61.2442
6.5141
10.0572
64.2105
DENSENET121
Upper Left
62.9782
4.6479
7.9069
57.9132
DENSENET121
Upper Right
62.8855
4.7887
7.9559
42.9699
Table 8: Accuracy, precision, recall, and F-1 results of the analysis of the balanced ISIC-2018 dataset.
Model
Sub Dataset
Accuracy
Recall
F-1
Precision
DENSENET121
Original Images
0.68
0.53
0.78
0.63
DENSENET121
Bottom Left
0.48
0.38
0.80
0.52
DENSENET121
Bottom Right
0.48
0.38
0.82
0.52
DENSENET121
Center
0.48
0.30
0.40
0.34
DENSENET121
Upper Left
0.48
0.38
0.82
0.52
DENSENET121
Upper Right
0.49
0.39
0.84
0.53
Table 9: Accuracy, precision, recall, and F-1 results of the analysis of the balanced ISIC-2019 dataset.
Figure 20: Classification accuracy scores on the ISIC_2019 original images and cropped sections. Performance reveals a significant drop compared to previous years, but CNN can still classify cropped images with an accuracy slightly higher than mere chance of 50%.
Figure 21: Classification accuracy of ISIC-2016 using different parts of the image with or without using transfer learning. The number of epochs was set to 15 in both cases.
Figure 22: Precision observed when using different deep neural network architectures when using ISIC-2016 with different parts of the image, with and without using transfer learning.
Figure 23: Recall of different architectures when using ISIC-2016 with different parts of the image, with or without using transfer learning.
Figure 24: F-1 of different architectures when using ISIC-2016 with different parts of the image, with or without using transfer learning.
Figure 25: Learning as a function of the number of epochs for different CNN architectures.
Figure 26: The classification accuracy scores on the breast histopathology original images and cropped images show that the models can accurately detect the classes, whether IDC-positive or IDC-negative, on cropped images containing little or no medical content.
Universidade Federal do Vale do São Francisco (Univasf), Petrolina, Pernambuco, Brasil · Universidade Tecnológica Federal do Paraná (UTFPR), Pato Branco, Paraná, Brasil