Diagnostics at Digital Speed
By: Gennadii Popov
Tags: Artificial Intelligence, Computer Vision, Machine Learning, Cancer, AI

Just a few years ago, hearing the phrase “artificial intelligence” (AI), most of us would immediately remember the sinister HAL 9000 from the Space Odyssey, Neuromancer by William Gibson, or the robot Andrew from the movie Bicentennial Man. However, technologies are rapidly developing and today AI holds an important place in many aspects of our lives.

Today, AI for us are neural networks and various algorithms that choose interesting news and music, help create an personalized healthy diet plan, or determine using a photo whether this birthmark on our shoulder is a reason to see a doctor. Some people are already using neural networks in their work, for example, to make recruitment decisions or forecast sales.

The majority of developers today utilize the most perspective direction of AI — machine learning and creation of artificial neural networks. Therefore, we are increasingly interested in learning about how AI is used in everyday life.

Neural networks are used everywhere: drones with AI warn Australians of shark attacks, IBM Watson helps doctors make the right diagnosis, and neural networks with facial recognition help prevent crime.

Machine Learning

Machine learning algorithms are already widely used to classify or predict results, but they still have some significant restrictions. Having analyzed the information obtained, the AI makes an appropriate conclusion, but it does not “understand” the reason for the obtained result. In addition, AI is not universal at this stage of development. This means that if the neural network is trained to recognize faces, it cannot translate a text. It should also be noted that the quality of AI work depends on the quality and amount of data used for its training. It’s also worth adding that the AI is not yet independent. After training, the neural network is capable of continuing learning on its own in the course of work and using information from test examples rather than the training ones. Nevertheless, at the same time, it is not able to choose which of its layers should work in each particular case and to build its own logic — an operator is required for this.

Neural Networks and Medicine

Despite this, neural networks are successfully used to solve various business, industrial, and robotics tasks. Moreover, neural networks can even help forecast the weather. However, medicine seems to us as one of the most promising directions of neural network introduction. After all, working algorithms that can help diagnose and choose the right treatment of various diseases will help optimize the time of the doctor and the patient, and thus — to increase the efficiency and quality of medical care. But in which direction do neural networks already enjoy real success?

Achievements in computer vision have found their application in medical imaging. Medical imaging includes a variety of diagnostic techniques, such as X-ray, ultrasound, computed tomography (CT), magnetic resonance imaging (MRI), electroencephalography, and others that help us get images of internal organs and structures. It is already possible to purchase FDA-approved AI systems to optimize the work of a health care center. For example, icobrain which analyzes brain structures using MRI and CT scans of patients with various diseases or Arterys Lung AI which improves the accuracy of early lung cancer diagnosis.

Pathomorphology is an extremely promising area for the introduction of neural networks in medicine. Pathomorphology studies changes in cells and tissues of the body mainly through microscopy). It is known that neural networks need large amounts of data for successful training. And histological preparations carry a huge amount of information: the size and contours of cells, characteristics of nuclei and other intracellular structures, colors and shades of individual elements, immunohistochemical coloring features, and many other parameters.

So, what kinds of AI technologies are already available in clinical practice? For example, Google Health has created an augmented reality microscope to facilitate pathologists work. In 2018, there was an interesting event — the Grand Challenge on Breast Cancer Histology images (BACH) — which invited participating neural networks to analyze and classify histological preparations for breast cancer diagnosis. According to the results of the competition, it turned out that the algorithms proposed by the participants can detect cancer with an accuracy of 87%. As for our team — PathVision.ai Corporation, we have developed a neural network to analyze histological images and detect pathological changes in them. We’re already conducting a study of the developed product in the diagnosis of prostate cancer.

How do Neural Networks Work?

The neural network we have created is a revolutionary (convolutional) neural network aimed at effective recognition of visual images. This type of neural networks works on the visual cortex principle. You know that individual cortical neurons of the cerebral cortex react only to irritation of receptors that are in a certain field of vision. The combination of these receptors forms a neuron receptive field. In order to “see” the full picture the way it really is, a lot of receptive fields are overlapping. Receptive fields in the visual cortex are divided into “simple,” “complex,” and “supercomplex.” “Simple” fields will react to straight lines at different angles, while “complex” fields will react to the movement of these lines in a certain direction, and to activate the “supercomplex” field this line must also have a strictly defined size. Combining several “supercomplex fields” of the primary visual cortex into a more complex network allows us not only to see but also to find out what is in front of us.

That is, a whole image is initially divided into small fragments that can be transmitted through a chain of neurons. After that, they are organized into an increasingly complex network that is already able to analyze what we see.

A convolutional neural network is organized in a similar way but consists of layers rather than neurons. As in the visual cortex, the first layers are responsible for the simpler functions of capturing individual pixels, the subsequent layers for capturing edges, edge combinations, and so on. The sequence of such layers allows to adapt the network to perform high-level functions and teach it to “understand” the image as we do.

To create a convolutional network, convolutional and sub-sampling (pooling) layers are used.

Let us briefly explain what they’re for. A convolution layer is a sequence of matrices of a given size (e.g. 3*3, 5*5, etc.) which elements consist of pixels of an image divided into channels, usually RGB (red, green, and blue). Pooling layers, depending on the selected mode, allocate a maximum or average value within each of these matrices to reduce the spatial size of the collapsed image. That is, the pooling layer summarizes the information obtained from the convolution layer. The alternation of these layers makes it possible to identify the dominant features that the neural network will be able to classify at the final stage.

How does the convolution layer work? [from https://towardsdatascience.com/a-comprehensive-guide-to-convolutional-neural-networks-the-eli5-way-3bd2b1164a53]

What is pooling? [from https://towardsdatascience.com/a-comprehensive-guide-to-convolutional-neural-networks-the-eli5-way-3bd2b1164a53]

Convolutional neural network operation scheme [from https://towardsdatascience.com/a-comprehensive-guide-to-convolutional-neural-networks-the-eli5-way-3bd2b1164a53].

Neural Network Training Process

The principle of machine learning based on imitating the work of the human brain in the processing of information is called deep learning. The accuracy of the results produced by a neural network trained using this method depends directly on the size of the data set. And in this case, we talk about histological preparations — small pieces of body tissues, each of which contains huge amounts of information, again.

And how exactly does this method of training take place? The standard neural network training process includes three stages: training, validation, and testing. Training of our neural network takes place as follows: at the first stage, a training set containing several hundred or even thousands of fragmented images is loaded into the system, where the system learns to mark up images and classify changes. Fragmentation of the whole image into individual slides is done to prevent the phenomenon of re-training (sometimes a neural network is well oriented only in training samples, while often making mistakes in real work. This is due to the fact that the algorithm finds random regularities in the training set of data which do not really work).

At the next stage, a NN (neural network) analyzes the validation set of slide fragments. Validation (test) set is a set of data that is used to test the performance of a neural network after its training using the training set. At this stage, correct interpretation of changes and their markup is checked by specialists. After making corrections to the neural network weights (parameters), a third, test set of whole-slide images is loaded into a neural network. Based on this stage, the consistency of the neural network findings with those of pathologists is assessed.

According to the preliminary study, a good degree of consistency between our neural network and the network of experts in the diagnostics of changes in prostate tissue was found. We are confident that the development and implementation of this algorithm can improve the accuracy of diagnostics in clinical practice.

Undoubtedly, the introduction of neural networks can have a positive impact on the quality and availability of health care. But how to implement these algorithms and where to introduce them?

Doctors vs Artificial Intelligence

Let’s imagine that this neural network can be made available to any user. While waiting for the results of the histology and doctor’s consultation, everyone will be able to get an AI opinion online. The neural network will quickly analyze the information loaded into it and make its conclusion. For example, you upload a chest CT scan to the program, and the algorithm detects lung cancer. Okay, now you know what’s on “scans” and you don’t have to wait to see a doctor. But what is our next step having this information? The neural network will not be able to discuss the problem, will not point out the reasons, and will not offer a solution. And most importantly, AI cannot empathize, it does not take into account the emotional state of a person. Therefore, such an option of introducing neural networks into practice seems unethical and hardly feasible to us. In providing medical care, even with the most advanced technology, the doctor is the primary link. It is the interaction between the doctor and the patient and their joint decisions on how to further combat the identified disease determines the success of treatment. Thus, AI is an assistant capable of improving the effectiveness of diagnosing and treatment rather than replacing a human specialist.

Doctors + Artificial Intelligence

We find it more reasonable and feasible to introduce neural networks into our lives in other ways.

First, a trained AI can act as an independent expert in the assessment of histological preparations. In this case, by comparing the findings of the neural network with those of human experts and re-examining the preparations it will be possible to avoid diagnostic errors. Secondly, the use of such algorithms can significantly reduce the working time of pathologists. In normal conditions, the expert needs to manually view a large number of slices to detect areas that need to be examined for pathology. But if we introduce an AI in their work, which will automatically mark specific areas that deserve further study on the preparation, it will significantly reduce the time to make a diagnosis. And the patient will be able to get an opinion within a shorter period of time.

Finally, imagine that by introducing AI, all medical services can be accelerated and the quality of health care can be significantly improved. It is already happening now, we are taking steps towards the evolutionary development of medicine with all its features and traditions to digital medicine, while keeping in mind that the main thing in this system is human.

A note from Plain English

Did you know that we have launched a YouTube channel? Every video we make will aim to teach you something new. Check us out by clicking here, and be sure to subscribe to the channel 😎