## 2 Background
### Convolutional Neural Networks  
Artificial neural networks (ANNs), or just neural networks, imitate the behavior of the human brain by allowing computers to learn how to recognise relevant components of a problem and how these components interact; this information aids in the solution of difficult problems. An ANN consists of nodes or neurons grouped into layers and connections between them; neuron connections have associated weights.  
Neurons receive information from other neurons or from external sources, process the information and pass it to other neurons or external sources through their connections.  
A ConvNet is an ANN that can extract features from an input image, classify them and identify patterns (see Figure 1).  
A ConvNet is a deep learning network consisting of the following kinds of neuron layers:  
* **Input Layer:** The input layer reads the image that will be processed.
* **Convolutional Layers:** Convolutional layers process the input image to extract features from it. A convolutional layer applies a set of linear _kernels_ or _filters_ to its input to produce a set of so-called _convolved features_. A non-linear activation function is applied to the convolved features to produce the output of the convolutional layer, called a _feature_ or _activation map_. Filters are designed to detect changes in an image's intensity values to recognise spatial patterns such as edges. The more convolutional layers a ConvNet has, the more complex spatial features a ConvNet can detect in an image. Some XAI techniques are aimed at visualizing feature maps to gain a better understanding of the image features that a ConvNet discovers and uses to reach conclusions about what an image represents.
* **Pooling Layers:** Pooling is a technique for reducing the size of feature maps to speed up computation. In the pooling layer, the feature maps produced from the previous layer are down-sampled so that new feature maps with a condensed resolution can be generated. The input spatial dimension is greatly reduced by this layer. The most common types of pooling are max pooling and average pooling in which a group of values from a feature map is replaced with the maximum or the average value in the group, respectively. In a ConvNet, a convolutional layer is usually followed by a pooling layer.  
Figure 1: Architecture of Convolutional Neural Networks.  
* **Flatten Layer:** Feature maps are flattened to create a long continuous linear vector from all the 2-Dimensional arrays. A fully connected layer uses the flattened matrix as input for image classification.
* **Fully-connected Layers:** These layers appear at the end of ConvNets. They process the feature maps computed by the other layers to determine relationships between high-level image features.
* **Output Layer:** In a neural network that performs multi-class classification, the output layer consists of a set of scores giving the likelihood of the image belonging to each one of the classes that the ConvNet can identify. The softmax function is commonly used in ConvNets to compute these scores.  
Given a large number of medical images depicting different classes of abnormalities, a ConvNet can learn the key characteristics of each class, but it lacks the ability to provide explanations about how particular classes are detected.  
When dealing with data of a sensitive nature, such as medical data, we can see the desire to better understand how complex algorithms process it. Without such understanding, it is very difficult to trust the information produced by these algorithms.