A neural network is a type of machine learning model, the design of which is inspired by the human brain.
In the brain there are hundreds of ‘neurons’, which are responsible for processing information about the world around us. Different neurons have different tasks. For example, some neurons might be responsible for determining whether something we are touching is hot or cold and other neurons might be responsible for moving our hand towards or away from the thing that we are touching. This means that sometimes the neurons must pass information between each other to produce a result.
For instance, if you accidentally touch an activated electric hob on your stovetop, your neurons responsible for sensing temperature will want to tell the neurons responsible for making your hand move that the hob is too hot and you need to move your hand away.
To do this, the temperature neurons send a small signal (an electrical pulse) to the hand neurons which then make sure you move your hand away. How quickly you need to move your hand away will depend on exactly how hot the hob is.
Example of a threshold that determines an action:
- Too hot = snatch hand away
- Medium hot = move hand away smoothly
- Cold = no need to move hand.
These thresholds are typically learned through a process of trial and error: a child is more likely to put their hands near a hot hob than an adult because they have not yet learned that it might hurt them. If the child does touch the hob, they’ll learn (or their neurons will remember) that this is something that should be avoided in the future.
How Artificial Neural networks (ANNs) work
Artificial neural networks (ANNs) work in a similar way to our bodies. They’re made out of artificial neurons (or nodes) arranged in layers that work together to solve a problem.
- Information from the environment enters the ANN from the input layer, which processes and analyzes the information (i.e., works out how hot the hob is), and passes it onto the next layer.
- The middle layers determine the action that should be taken (i.e., move hand away).
- The output layer is the final result (i.e. the hand moves).
Just like in the human brain, the meaning of particular pieces of information and what should be done about it is learned through a process of trial and error, where a neural network ‘looks at’ lots of information (or data) and guesses what it should do about it. It then assesses whether its guess was right or wrong, and refines its actions over time. Of course, ANNs used in healthcare are not used to assess whether or not a hob is hot. They’re mainly used for classification tasks i.e., looking at scans and deciding whether a medical scan contains a feature of interest or not. The mechanism for taking in the information (e.g., the scan image), categorising it as normal or abnormal (e.g., deciding whether there is a tumour present), and assigning a label, is the same.
Artificial Neural Networks (ANNs) are designed for pattern recognition and are the building blocks of many of the most successful deep learning models available today, including large language models such as Chat-GPT.
ANNs are comprised of node layers: an input layer, one or more hidden layers, and an output layer. Each node is responsible for processing, analysing, and categorising information (or data) it was passed from the nodes it was connected to in the preceding layer, and for passing on what it has ‘learned’ from its analysis to the nodes it is connected to in the following layer. These layers are hierarchical, with the outer layers responsible for more general calculations and analytical tasks and the inner layers responsible for more specific or more complex calculations and analytical tasks. Most of the heavy lifting is done by the middle ‘hidden layers’, while the input layer is where the information being assessed (for example an image) enters the ANN and the output layer gives the final results of the calculation (e.g., a label for the image).
Each layer of nodes, and the individual nodes within the layers, analyze incoming information (in the form of variables) to determine how important it is for the question that has been asked of the ANN (e.g., is this an image of a cat or a dog?). Importance is denoted by the assignment of weights to individual variables. Variables that are deemed more important for the question at hand are assigned higher weights. All inputs (or variables) are multiplied by their respective weights and then added up. If the output of this calculation exceeds a threshold, the node ‘activates’ the transfer function and passes the data to the next layer in the network. In this way, the output of one layer of nodes becomes the input for the next layer and so forth – this is why most neural networks are described as feedforward networks. The variables being assigned weights get more specific with each layer. So while the outer layers might be responsible for looking at high-level variables such as the edges of the shapes contained within the image, the inner layers then get progressively more specific (for example, examining the eyes, ears, tail of the animal in the image), and eventually classifying the image as either a dog or a cat.
There are many different types of neural networks and selection largely depends on whether the task at hand is a classification or prediction task.
However, the most commonly used neural networks are:
- deep neural networks
- convolutional neural networks (most often used for image analysis)
- recurrent neural networks
- generative adversarial networks
The most common advantages and disadvantages of Artificial Neural Networks (ANNs)
Different types of ANNs have advantages and disadvantages, which can vary slightly depending on the exact model used. Careful consideration should be given to the balancing of these advantages and disadvantages during model development.
- Jiang, Fei et al. 2017. ‘Artificial Intelligence in Healthcare: Past, Present and Future’. Stroke and Vascular Neurology2(4): 230–43.
- Shahid, Nida, Tim Rappon, and Whitney Berta. 2019. ‘Applications of Artificial Neural Networks in Health Care Organizational Decision-Making: A Scoping Review’ ed. Olalekan Uthman. PLOS ONE 14(2): e0212356.
- Sordo, Margarita. 2002. Introduction to Neural Networks in Healthcare. OpenClinical. https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=a649c824436c4b9f860164a7651ef2c163b92e35