Genetic Deep Learning for Lung Cancer Screening
Hunter Park Connor Monahan
cs.CV













Genetic Deep Learning for Lung Cancer Screening
    Hunter Park 

Innovation Dx Inc.

hpark@innovationdx.com
Connor Monahan 

Innovation Dx Inc. 

cmonahan@innovationdx.com

    today
=============================================================================================================================





Convolutional neural networks (CNNs) have shown great promise in improving computer aided detection (CADe). From classifying tumors found via mammography as benign or malignant to automated detection of colorectal polyps in CT colonography, these advances have helped reduce the need for further evaluation with invasive testing and prevent errors from missed diagnoses by acting as a second observer in today's fast paced and high volume clinical environment. CADe methods have become faster and more precise thanks to innovations in deep learning over the past several years. With advancements such as the inception module and utilization of residual connections, the approach to designing CNN architectures has become an art. It is customary to use proven models and fine tune them for particular tasks given a dataset, often requiring tedious work. We investigated using a genetic algorithm (GA) to conduct a neural architectural search (NAS) to generate a novel CNN architecture to find early stage lung cancer in chest x-rays (CXR). Using a dataset of over twelve thousand biopsy proven cases of lung cancer, the trained classification model achieved an accuracy of 97.15% with a PPV of 99.88% and a NPV of 94.81%, beating models such as Inception-V3 and ResNet-152 while simultaneously reducing the number of parameters a factor of 4 and 14, respectively. 




§ INTRODUCTION



The rate of lung cancers among the population has dramatically increased during the 20th century, posing a large threat to the public especially those with higher risks to the disease, such as former or current smokers and those with exposure to radiation or chemicals in the workplace. It is estimated that over 1,465,000 people die every year from cancers, 18.2% of which are a variant of lung cancer <cit.>. It is also estimated that there will be 228,150 new diagnoses of lung cancer in the United States in 2019. While the mortality rate has seen steady improvement the past few years, the low survival rate for lung cancer in 2019 of approximately 19% is attributed to its frequent late detection <cit.>. Despite the possibility of detecting lung cancer from annual chest x-rays, such detection in early stages is improbable as the 5-10mm sized lesions are easily overlooked <cit.>.

Computer aided detection has become a major research topic in medical imaging <cit.>. CADe systems provide a “second opinion" for radiologists to assist them in making a final decision, noting some abnormality that may have been overlooked or mistaken. These systems have become a key component in the detection of breast cancer at a number of screening sites and hospitals <cit.>, and many PACS environments are starting to have various CADe programs built into their platforms which reduces the fiscal and technical barriers to use. They are often built on a wide variety of computer vision tools. These systems are able to process many types of medical images including X-rays, MRI, and CT scans, and are intended to support the professional in their practice.

In the paper, we outline the utilization of genetic algorithms to find optimal deep neural network architectures which produces an architecture that beats state of the art models when applied to early detection of lung cancer in CXRs while simultaneously reducing the number of parameters by several orders of magnitude. We then employ a visualization technique to extract a heat map of the activations for the generated model, allowing a radiologist to understand which regions of the CXR lead to an image's classification.



§ BACKGROUND


Over the past several years, image classification and object detection have seen tremendous improvements in accuracy as well as speed thanks to continued research into deep learning and convolutional neural networks (CNNs) <cit.>. The success and improvement found from deep learning is not from improved hardware and more encompassing datasets, but from innovations into model structure. From convolutions into fully connected layers <cit.>, to the addition of dropout layers <cit.>, to optimization <cit.>, the approach to deep learning is constantly changing and improving.



 §.§ The Use of CNNs in Medical Applications


Using image analysis on medical images is not new to doctors or computer scientists. However, many applications of computer vision for medical applications struggle due to medical data being noisy, inexact, sparse, or requiring large amounts of storage.

In a project recently performed at the University of Bern, a group of researchers trained a CNN to classify lung diseases based on lung slices from computed tomography images with an accuracy of 85.5% on its data set <cit.>. They were able to successfully classify lung CT image patches between 6 different lung diseases. Originally, their dataset consisted of 2,032 different diseases. Extremely small training classes creates a major issue in applying deep learning to medical tasks, where rare diseases occur in less than one in ten thousand cases.
To work around this issue, they used a dynamic tree taxonomy to balance their classes and generated classes based on the number of examples rather than final diagnoses. This resulted in only 757 classes instead of 2,032.

In another project performed at the Federal University of Parana, a CNN was employed for classifying images of cell slides of breast cancer patients <cit.>. Using the BreaKHis dataset <cit.>, they trained the AlexNet model <cit.> to classify microscopic biopsy images of benign and malignant breast tumors. Each slide of breast tissue contains 4 images, each with different levels of magnification. To handle the high resolution nature of their dataset, they invoked a variety of computer vision techniques. The first was the use of sliding windows with 50% overlap and the second was random crops of the raw image with no overlap. Interestingly, the technique was not superior in the task of classification for every level of magnification of the biopsy. 

In <cit.>, they achieved human specialist performance in several classification tasks dealing with various skin diseases. Their model was capable of identifying benign or malignant skin diseases and distinguishing high level taxonomic classes to identify lesions with similar treatment paths. In addition to this, they also achieved human level capability in specifically discriminating between treatment paths for lesions: biopsy/treat or not. For their training, they used transfer learning from models trained on the ImageNet dataset, despite the image space of ImageNet and their dataset being extremely different. This use of transfer learning may prove to be very effective for other medical tasks.



 §.§ Genetic Algorithms

Genetic algorithms (GA) were first introduced by John Holland in the early 1970s. Such algorithms are search heuristics that try to mimic the process of natural selection for the purpose of finding possible solutions to optimization problems constructed as search problems. GAs have two main components, the first being the ability to represent every solution in the solution space. In our case, that requires the ability to form every possible CNN architecture, which is achieved through our genetic encoding scheme that is detailed in section 3. The second aspect of GAs is the ability to evaluate the fitness of solutions. In our application this is achieved by first training on the train set and then testing the trained solution on our development set, which then becomes the solution's fitness.

GAs begin with an initial population of genes and a population of genomes that encode a solution to a problem. Once every genome in the population has been evaluated on how well they solve the problem, they are selected based on their fitness to create a new population (generation) of individuals (solutions). Just as in nature, the more fit an individual, the more likely it is it have offspring. As generations are evaluated, the population's fitness should trend upwards as each individual gets better at solving the problem, with the hope that at least one individual will be close to optimal parameters to the optimization problem they were designed to solve. 

Evolutionary and genetic algorithms have experienced a resurgence in recent years due to their ability to search irregular and poorly characterized spaces effectively <cit.>, their ability to optimize without expensive gradient computations <cit.>, and their ability to be massively distributed <cit.>.



 §.§ Neural Architecture Search

The success of CNNs in perceptual tasks comes from the automation of feature extraction, with features extractors being learned in an end-to-end fashion as opposed to being manually designed. Convolutional neural networks date back to 1989 with LeNet-5 <cit.>, which was designed to be able to handle variance among identically labeled data by using local receptive fields, shared weights, and spatial sub-sampling. In 2012, AlexNet <cit.> outlined how CNNs were used to win the ImageNet Large-Scale Visual Recognition Challenge (ILSVRC) in 2012. After AlexNet, the designs trends of CNNs in literature was making them linear and deep. There have been two major breakthroughs in CNN architecture design since AlexNet, which we discuss. 

The first innovation was the inception module <cit.>. This module was designed with two ideas in mind: the approximation of a sparse structure with spatially repeated dense components and the need to keep the computational complexity in check. Unsurprisingly, the inception module does both of these exceptionally well: Inception-V1 used twelve times less parameters while still outperforming AlexNet. Inception architectures take advantage of the fact that convolutional filters of different sizes may extract features from separate clusters of information, and when one repeats them spatially they approximate an optimal sparse structure via dense components. The stacking of different sized convolutional filters concurrently allows for a significant increase in the number of units without an uncontrolled blow-up in computational complexity. This use of dimension reduction allows for shielding the large number of input filters of the last stage to the next layer. Inception architectures follows the principle that visual information should be processed at various scales and then aggregated so that the next stage can extract features from different scales simultaneously. The end result of the inception module is that they are up to three times faster than similarly performing networks with non-inception architecture.

The other major advancement in architecture design came from ILSVRC 2015's winner, ResNet-152 <cit.>. They asked themselves Is learning better networks as easy as stacking more layers? They discovered that when deeper networks begin converging, the network's accuracy becomes saturated, and then degrades rapidly. They wanted to ensure that a deeper model should produce no higher training error than its shallower counterpart, so to ensure this, they added identity mappings because solvers often struggle approximating identity mappings by multiple nonlinear layers. Residual learning ensures that solvers can easily approximate identity mappings by simply driving the weights of the multiple nonlinear layers toward zero to approach identity mappings.

Even with these breakthroughs in architecture designs, it is still time consuming to hand design models. Historically, architecture search routines focused on fine-tuning a particular aspect of an architecture <cit.>, however there has been a growing interest in automating the entire architecture design process <cit.>. When comparing NAS methods, it is important to not only look at how well of an architecture it produces in terms of accuracy, but also other metrics such as how efficient the search is, the number of parameters of the final architecture, and how scalable the search can be implemented. 

There are two approaches to NAS: heuristic searches <cit.>, and reinforcement learning (RL) <cit.>. While both produce similarly impressive models on challenging benchmark datasets, heuristic searches are vastly superior in search efficiency. Due to this, we constructed our optimization problem as a genetic algorithm. 





§ GENETIC DEEP LEARNING

There have been many proposed methods detailed how to implement Topology and Weight Evolving Artificial Neural Networks (TWEANNs). <cit.>. However, in deep learning there are often times millions of parameters that require optimization, and doing so through any chance based search algorithm is simply impractical. For this paper, we modified the NEAT algorithm as detailed in Algorithm <ref> to evolve the architecture of CNNs, dubbed “DeepNEAT", which we call DeepNEAT-Dx in alignment to the foundation paper that proposed using NEAT to create CNN architectures <cit.>. More specifically, we injected convolution and pooling layers with pseudorandom hyperparameters into a minimal convolutional architecture and then optimized the weights through backpropagation on the training set. The fitness of a model is the final accuracy on the development set after 5 epochs of training.

A very critical topic when designing a genetic algorithm is what encoding scheme one should use. This has been an ongoing topic of discussion as encoding schemes directly contribute to the success of genetic algorithms <cit.>. The requirements for our problem were as follows: the encoding must able to encode directed acyclic graphs (DAGs) of variable size, be able to easily create new, coherent, genomes from the genes of two parent genomes, and lastly the encoding scheme must inherently allow for efficient search for optimal network architectures. With these requirements, there are only a few encoding schemes that are able to meet all these requirements. Following <cit.>, we used a direct graph encoding scheme, and in particular Schiffman encoding <cit.>, whose basic structure is a simple list of neurons with their connectivity information. This allows us to easily program our own rules for mutations to ensure that mutations do not result in illegal architectures (such as convolving to negative dimensions). Each vertex in the genome's graph encoding represents a layer in a CNN which stores hyper parameter information for the node it would construct, such as filter size, stride, padding, and the weight initialization method. 

To describe the adjusted NEAT algorithm, some basic mutations must be defined. Inject Node injects a random node (convolution, pool, or ReLU) with pseudo-random hyperparameters into the genome's network between a preexisting connection. Before injecting the new node, we check to ensure that it would produce a valid network. If it does, the injection would occur, if it doesn't, we change the hyperparameters to values that would result in a valid network. This solves the problem of convolving the image to zero dimensions, as is guaranteed to occur as the number of injects increases. Inject Segment injects a pair of a convolution layer with a ReLU activation with a pooling layer in a preexisting connection. Point Mutate changes the essential hyperparameters of a node. These basic mutations allow for constructing most standard CNN architectures that one saw in literature before Inception-V1, such as AlexNet <cit.>. In addition to mutations, we incorporate speciation as outlined in <cit.> to allow for topological innovations to occur and prevent one topology framework from dominating the population.



 §.§ Dataset

The dataset used for training and testing was compiled from the Prostate, Lung, Colorectal, and Ovarian Cancer Screening Trial (PLCO) dataset. This trial, organized by the National Cancer Institute, was a randomized, controlled trial to determine whether certain screening exams reduce the mortality of prostate, lung, colorectal, and ovarian cancer. Approximately 155,000 participants were enrolled in the screening portion of the trial from 1993 to 2006. If a participant developed cancer at any point during the screening phase, all CXRs preceding the diagnosis were considered to be cancerous and therefore were labelled positive, which resulted in about 4,000 positives in our dataset. We then selected the same amount of CXRs from patients who were never diagnosed with lung cancer, creating a balanced dataset. 

The dataset construction was designed to produce a model such that it could spot early stage lung cancer in CXR, as many of the positive labelled CXRs were taken years before the biopsy backed diagnosis occurred (which generally lead to a diagnosis of late stage lung cancer). Due to this construction, there are no annotations as to which areas of the CXR corresponded to the areas of the lungs that were biopsied, consequently preventing an accurate model from being used as a CADe tool due to lack of localization into the cancerous regions of the CXR. Additional work beyond an accurate classification model is required, which we explore in section 3.4



Preprocessing
The PLCO image dataset had roughly 200,000 CXRs with an approximate size of 2000x3000 pixels. In <cit.>, down-scaling and cropping led to an improvement in their results, leading us to adopt similar procedures.

In the provided dataset, there were around 4,000 images that were linked with patients having biopsy-proven lung cancer. We used these images to create our cancer dataset, using an additional 4,000 other images as control/negative. 
Each of our datasets were then preprocessed to make the images uniform and to ensure the models were not influenced by other noise, such as notes or markings.

The first step was resampling and resizing the images to a constant 256x256 resolution, as this would retain enough detail for effective use and eliminate the inconsistencies seen in the input data.
The second step involved a specially-designed x-ray lung segmentation algorithm that was used to mask the input images to contain only the regions of interest. Initially, the images were shifted to have a constant mean, which was required due to the variation in images coming from different medical centers using different models of x-ray machines. Next, the images were filtered to retain only the middle intensities, which were found to correspond with the inside of the lungs. Contours were then extracted from the remaining part of the image which were then filled in to create the final mask for that image, which was then applied. The steps used in this procedure are as shown in figure <ref>.

Finally, the entire masked dataset as a whole was rescaled to a standard normal distribution which was then shuffled and randomly split into a training dataset containing 80% of the final images, a validation dataset containing 10%, and the last 10% reserved for evaluating the final trained model.


 §.§ Training

When training, we used a gene pool of 50 individuals, over the course of 10 generations. The genetic algorithm had mutation rate parameters that determined how often each mutation occurred. Each mutation received its own rate:

After the genetic algorithm produced a graph encoding of a network, we exported the graph into a Caffe model <cit.>. Each model received identical training parameters, and they are as follows:

A chart detailing the population's best and average fitness over generations is shown in Figure 3. 

Because we used the error on the development set as a reward signal, it is important to confirm that the population was not over fitting on the validation set. We evaluated the best model produced by the genetic algorithm on the previously unseen test set and showed that the performance of the model was no worse than on the development set, confirming that the GA was not over fitting from the sparse, weak reward signal. The results of this evaluation is detailed in Table 1. 


 §.§ Results

We ran several experiments with various population sizes and generations, and found that evolving 50 individuals for 10 generations was the most efficient in producing a fit population quickly as well as producing very fit top models. Unlike <cit.>, which trained 12,800 models to optimize the R-NN controller, we trained only 500 models.



To test the effectiveness of DeepNEAT-Dx, we compared it to the best models from the past 7 years. As shown in the table above, DeepNEAT-Dx surpasses every model in accuracy by at least 5%, and employed considerably fewer parameters. 










For binary classifiers, such as this model, a matrix can be used to present several statistics about the performance of the algorithm. The core of this matrix is the contingency table, which is used to present the frequency of the real condition variable and the predicted condition variable. From this cross-tabulation many ratios can be derived, most notably the rates of false positives and negatives among the population. To generate the contingency table in Table 1, the network was computed against all 1,884 validation samples and the ground truth label was recorded with the predicted output. The statistical ratios were then calculated from these inputs. The best model generated by our algorithm achieved an accuracy of 97.14% with a PPV of 99.88% and a NPV of 94.81%.


 §.§ User Friendly Model Prediction Visualizations


DeepNEAT-Dx produces a binary classifier, which is not sufficient enough to be allocated the label of being a medical CADe model. While an accurate binary classification of the presence of lung cancer within a particular CXR would help a radiologist in deciding what further testing to do for the patient or how to treat the patient, its lack of a useful localization of the classification dampens the impact of the model. Because of the general lack of annotations in the dataset, it is impossible to deploy a traditional object detection model, forcing the use of advanced visualization techniques.

Recent attempts to demystify the neural network black box have included the Grad-CAM <cit.> project, which introduced a technique to visualize the weights of a layer that most strongly correlate with the final decision. It attempts to maximize the outputs of that particular layer with respect to a desired filter (class). This technique was used to generate the heatmaps representing sources of influence to the prediction shown in figure <ref> and figure <ref>, where the selected layer was the final fully connected layer in the graph from the most recent convolution layer and the filter was for images which were predicted to be in the cancerous class. It is important to note that it is impossible to verify whether the heatmap activations correspond to the actual location of the malignant nodules or masses given the binary dataset. Coincidentally, the PLCO dataset provided radiologist annotations detailing a variety of lung abnormalities and their locations. One such abnormality was the presence of nodule masses. The heatmap markings seen in Figure <ref> correspond directly to the nodule masses noted location by a radiologist. However, it is important to clarify that a nodule mass does not always lead to lung cancer, but it is an interesting correlation. 


§ DISCUSSION


The final accuracy of the network over the test set of 97.15% shows that the model has succeeded at learning features related to the presence of various types of confirmed lung cancer in these images. Given that a human radiologist must spend a considerable amount of time on each image to make a correct prediction, screenings for many types of cancer do not often occur early, causing diagnoses to often arrive during the late stages of these diseases. The potential to use such a model as a preliminary screening step may save many lives with early detection and from misdiagnoses. All cases of concern will necessarily have to be verified by an experienced radiologist, but the automation provided by this tool will decrease costs, increase the accessibility of screenings, and increase the speed and accuracy of diagnoses.




ieee




