Source-linked AI summary

A Deep Convolutional Neural Network for COVID-19 Detection Using Chest X-Rays

Pedro R. A. S. Bassi, Romis Attux

arXiv:2005.01578v4eess.IVcs.CVcs.LG

TL;DR

The paper addresses whether chest X-rays can support accessible COVID-19 diagnosis despite difficult-to-detect signals and limited data. It fine-tunes DenseNet models through twice transfer learning, adds output neuron keeping, and uses LRP heatmaps, achieving 100% test accuracy while identifying dataset and clinical-validation needs.

  • Problem

    Chest X-rays are faster and cheaper than RT-PCR but may contain difficult-to-detect COVID-19 signals, motivating neural-network assistance.

  • Method

    DenseNet classifiers are fine-tuned through ImageNet, NIH ChestX-ray14, and COVID-19 data, with output neuron keeping and LRP heatmaps.

  • Results

    The best reported test accuracy was 100%, and output neuron keeping with twice transfer learning outperformed twice transfer learning alone and simple transfer learning in DenseNet201 models.

  • Takeaways & Limitations

    The findings support chest X-rays as a potentially fast, accurate, cheap, and available auxiliary method for COVID-19 diagnosis, with LRP improving model interpretability.

  • Takeaways & Limitations

    Larger datasets collected from common sources and clinical studies are needed to assess generalization and real-world performance.

Abstract

from arXiv · show

Purpose: We present image classifiers based on Dense Convolutional Networks and transfer learning to classify chest X-ray images according to three labels: COVID-19, pneumonia and normal. Methods: We fine-tuned neural networks pretrained on ImageNet and applied a twice transfer learning approach, using NIH ChestX-ray14 dataset as an intermediate step. We also suggested a novelty called output neuron keeping, which changes the twice transfer learning technique. In order to clarify the modus operandi of the models, we used Layer-wise Relevance Propagation (LRP) to generate heatmaps. Results: We were able to reach test accuracy of 100% on our test dataset. Twice transfer learning and output neuron keeping showed promising results improving performances, mainly in the beginning of the training process. Although LRP revealed that words on the X-rays can influence the networks' predictions, we discovered this had only a very small effect on accuracy. Conclusion: Although clinical studies and larger datasets are still needed to further ensure good generalization, the state-of-the-art performances we achieved show that, with the help of artificial intelligence, chest X-rays can become a cheap and accurate auxiliary method for COVID-19 diagnosis. Heatmaps generated by LRP improve the interpretability of the deep neural networks and indicate an analytical path for future research on diagnosis. Twice transfer learning with output neuron keeping improved performances.

1. Introduction

COVID-19 diagnosis is constrained by RT-PCR’s cost and speed, while chest X-rays are more accessible but contain difficult-to-detect signals. The paper therefore develops DenseNet classifiers using transfer learning, output neuron keeping, and LRP heatmaps for three-way classification.

  • RT-PCR is specific but expensive, slow, and in high demand, whereas chest X-rays are faster and cheaper but contain subtle COVID-19 signals.
  • The study classifies chest X-rays as COVID-19, pneumonia, or normal using DenseNet models fine-tuned through transfer learning.
  • Twice transfer learning trains a network sequentially on ImageNet, NIH ChestX-ray14, and the COVID-19 dataset before final classification.
  • Output neuron keeping retains neurons for shared healthy and pneumonia classes during the final transfer-learning step.
  • LRP generates heatmaps showing image regions that most influence predictions and regions associated with other classes.

2. Databases

The assembled COVID-19 database combines COVID-19, pneumonia, and healthy chest X-rays from multiple sources. Its labels and patient populations vary across datasets, creating documented dataset and bias considerations.

  • The database combines images from separate COVID-19, pneumonia, and healthy-lung chest X-ray datasets.
  • The COVID-19 subset contains 439 frontal X-rays selected from the Covid-19 image data collection downloaded in October 2020.
  • The pneumonia subset includes 1,255 adult images from CheXpert, with most labels generated from radiology reports and eight manually labeled by radiologists.
  • Healthy images come from Montgomery and Shenzhen databases and were restricted to normal X-rays from adult patients.
  • Healthy and COVID-19 labels came from source-dataset authors, while most pneumonia labels were produced by natural-language processing of radiological reports.
  • Healthy, pneumonia, and COVID-19 groups differ in patient counts, ages, and available demographic information.

3. Transfer Learning and Twice Transfer Learning

Large-input neural networks can overfit small datasets, motivating transfer learning from larger, related datasets. The paper extends this strategy to three sequential stages, using ImageNet, ChestX-ray14, and the assembled COVID-19 dataset.

  • Large 224x224 inputs make data sparser, increasing the data needed to model input-label distributions effectively.
  • Insufficient data can make neural networks learn dataset-specific noise, producing overfitting and poor performance on a test database.
  • Transfer learning reuses representations learned on one dataset by fine-tuning a pretrained network on another, helping address overfitting when the first dataset is larger.
  • Transfer learning is expected to help more when the source and target tasks are similar because more learned features remain useful.
  • ImageNet offers scale, while ChestX-ray14 provides a task more similar to COVID-19, pneumonia, and normal chest X-ray classification.
  • Twice transfer learning sequentially trains a network on ImageNet, NIH ChestX-ray14, and the assembled COVID-19 dataset.

4. Output neuron keeping

Output neuron keeping adapts twice transfer learning by preserving output neurons corresponding to classes shared between the intermediate and final datasets. The retained parameters are intended to preserve learned representations and potentially improve final training.

  • Output neuron keeping preserves neurons for shared classes between ChestX-ray14 and the COVID-19 dataset during the transition to the final task.
  • The method changes only nonshared output neurons, retaining second-stage representations that may improve final-task training speed or performance.
  • Implementation copies the shared neurons’ weights and biases after step two and substitutes them into the reshaped output layer at step three.

5. Trained DNNs

The study trained five DenseNet variants differing in architecture, transfer-learning history, and output-neuron retention. These networks included simple transfer learning, twice transfer learning, and twice transfer learning with output neuron keeping.

  • 5. Trained DNNs: Five DNNs were trained, including DenseNet201 and DenseNet121 variants using simple transfer learning, twice transfer learning, or output neuron keeping.Network A used simple transfer learning; B used twice transfer learning; C added output neuron keeping; D and E began from pretrained CheXNet models.
  • 5. Trained DNNs: Network C retained the ChestX-ray14 neurons for no findings and pneumonia while adding a new COVID-19 output neuron.The other output neurons were removed, and the new COVID-19 neuron received random weights and biases.
  • 5. Trained DNNs: CheXNet-based networks D and E used pretrained DenseNet121 models, with E additionally retaining the pneumonia output neuron.CheXNet had been pretrained on ImageNet and ChestX-ray14 before COVID-19 training.
  • 5. Trained DNNs: The choice of dense networks was motivated by CheXNet’s reported performance surpassing four radiologists in pneumonia detection.

6. Data Processing and Augmentation

The authors prepared separate patient-level datasets for ChestX-ray14 and COVID-19 classification, removed textual artifacts from testing images, and used augmentation to expand and balance the data.

  • 6. Data Processing and Augmentation: ChestX-ray14 images were resized to 224x224 with three channels, normalized using ImageNet statistics, and split using its originally reported test set.The remaining images were randomly divided into training and validation data.
  • 6. Data Processing and Augmentation: The COVID-19 dataset used 50 test images per class, with the remaining images split 90% for training and 10% for validation while preserving class proportions.No images from the same patient appeared in different datasets.
  • 6. Data Processing and Augmentation: The test set included eight CheXpert pneumonia images labeled by three board-certified radiologists and 42 additional random pneumonia images.
  • 6. Data Processing and Augmentation: Textual labels and letters were covered in COVID-19 test images to assess classification based on lung content rather than visible words.The edits used black rectangles placed away from the lungs.
  • 6. Data Processing and Augmentation: Augmentation used rotations, translations, and horizontal flips to improve robustness and balance the small COVID-19 dataset.Training and validation augmentation produced balanced classes, with images randomly left out each epoch to equalize training counts.

7. Creating and Training the DNNs

The authors trained DenseNet models through staged transfer learning and compared them under a common COVID-19 training procedure. The protocols used frozen-output initialization, subsequent full-network training, validation, and early stopping.

  • 7. Creating and Training the DNNs: Networks B and C shared one ChestX-ray14-trained DenseNet201, enabling the same intermediate model to support both later variants.
  • 7. Creating and Training the DNNs: The ChestX-ray14 intermediate model used 15 sigmoid outputs, binary cross entropy, momentum-based stochastic gradient descent, mini-batches of 16, and hold-out validation.Training began with only the output layer unfrozen, followed by full-network training.
  • 7. Creating and Training the DNNs: COVID-19 training replaced final layers with three-neuron softmax outputs, except that networks C and E copied selected pretrained output weights and biases.Network C retained relevant ChestX-ray14 outputs, while network E copied the pneumonia output.
  • 7. Creating and Training the DNNs: All networks used the same COVID-19 training setup with cross entropy, momentum-based stochastic gradient descent, mini-batches of 9, two GPUs, and hold-out validation.The protocol used four phases with freezing, staged learning rates, early stopping, and progressive unfreezing.

8. Layer-wise Relevance Propagation

Layer-wise Relevance Propagation was used to explain DenseNet predictions through input heatmaps. The method identifies image regions associated with selected output classes and was intended to support model analysis and radiologist review.

  • 8. Layer-wise Relevance Propagation: LRP decomposes a DNN prediction into input contributions, producing heatmaps that indicate which image regions influenced the classification.The method propagates relevance backward through network layers using local propagation rules.
  • 8. Layer-wise Relevance Propagation: Choosing an output neuron determines the heatmap’s class-specific interpretation and color meaning.For COVID-19 propagation, red marks regions associated with COVID-19 and blue marks features associated with normal or pneumonia classes.
  • 8. Layer-wise Relevance Propagation: LRP heatmaps can reveal classification problems and indicate where the network identified lung abnormalities for possible radiologist review.The authors describe this as supporting cooperation between human experts and artificial intelligence.

9. Results

The strongest networks reached perfect classification on the test set, while the non-perfect networks made only a few errors. LRP heatmaps were used to analyze which X-ray regions influenced predictions.

  • 100% test accuracy was achieved by both CheXNets and DenseNet201 models using twice transfer learning with output neuron keeping.These were the best-performing networks among the five evaluated.
  • Network B made 2 errors among 150 test images, misclassifying COVID-19 images as pneumonia.
  • Networks C, D and E achieved precision, recall and F1 score of 1 on the test dataset.
  • LRP heatmaps enabled analysis of how each part of an input X-ray influenced the neural-network classification.

10. Discussion

The models reached near-perfect test accuracy, with output neuron keeping improving early DenseNet201 performance and all tested CheXNets converging similarly. LRP showed that embedded words and letters influenced predictions, but unedited-image and letter-insertion tests found only small accuracy effects.

  • Performance: Output neuron keeping produced the strongest early DenseNet201 accuracy, although performance differences narrowed with additional training.
  • Performance: The two CheXNets had similar performance, with matching accuracies at the beginning and equal final results; keeping two output neurons appeared more influential than keeping one.
  • Error analysis: No patient with disease was classified as healthy among the networks that made mistakes, avoiding the most dangerous misclassification identified by the authors.
  • LRP analysis: LRP heatmaps indicated that the network found COVID-19-related signs in both lungs and highlighted regions associated with COVID-19 or other classes.
  • LRP analysis: Although words and letters influenced heatmaps, leaving them unedited changed fully trained-network accuracy by at most 1.33%, and the best networks showed no change.

11. Conclusion

The proposed output neuron keeping method combined with twice transfer learning and outperformed the compared transfer-learning approaches, while LRP highlighted influential X-ray details. However, the study’s small, heterogeneous dataset limits generalization and motivates larger databases and clinical studies.

  • Output neuron keeping with twice transfer learning outperformed twice transfer learning alone and simple transfer learning in DenseNet201 models.
  • CheXNet matched or surpassed most DenseNet201 models, which the authors attributed mainly to stronger overfitting in the 201-layer networks.
  • LRP highlighted X-ray details influencing classification, while words and letters changed fully trained-model accuracies by at most 1.33%.
  • The COVID-19 dataset was limited, with only 439 usable coronavirus X-rays despite being the largest open database the authors found in October 2020.
  • Larger same-source datasets and clinical studies are needed to improve generalization, reduce bias, and assess performance in real-world diagnosis.
Loading 2005.01578v4…