# Artificial Intelligence to Reshape the Healthcare Ecosystem
## 2 AI Techniques for Healthcare
### Deep Learning: Convolutional Neural Networks and U-Net Architectures  
Convolutional neural networks (CNNs) are specialized neural networks that overcome the intrinsic limitations of a classical ANN for image processing. They analyze images through artificial neurons (i.e., nodes) organized in three dimensions, called channels: width, height, and depth [16]. In particular, they can detect and classify input images by extracting their features, such as edges and corners. For example, they have been proposed to detect objects such as circulating tumor cells or for the early diagnosis of different pathology and syndromes, such as tumors and strokes [17; 18; 19; 34]. The CNN structure consists of multiple layers for feature detection, sketched in Figure 4:  
* Convolutional layers: These use filters (or _kernels_) that slide over the input data and multiply by their values to capture local patterns. Each trained filter is expected to focus on a particular region of the input image file. In other words, its role is to offer subsequent layers a local feature, such an edge or a particular shape pattern, to either compose a global feature or an immediate detection. * Non-linear activation functions in nodes: These functions are applied after each convolutional layer. Non-linearity allows the network to learn and implement complex functions, and is essential for processing images and implement tasks such as recognition and classification. * Pooling layers: They play a crucial role by performing down-sampling operations along the spatial dimensions of the input images. The benefits of this operation include spatial dimensionality reduction, which reduces the number of parameters in the network and memory requirements to store them, invariance to small translations, rotations, and distortions in the input images, and reduction in the sensitivity of the implemented function to both noise and random variations in input data. Descriptions of some types of pooling functions follow:
* **Max pooling**: Takes the maximum value within a defined window (e.g., \(3\times 3\)): \[y_{i,j}=\max_{m,n}(x_{i+m,j+n})\] (6) where \(x\) is the input feature map, \(y\) is the output pooled map, and \(m,n\) define the window size. * **Average pooling**: Computes the average value within a defined window. \[y_{i,j}=\frac{1}{k\times k}\sum_{m=0}^{k-1}\sum_{n=0}^{k-1}x_{i+m,j+n}\] (7) where \(k\) is the window size. * **Global pooling**: Applies pooling over the entire spatial dimensions of the feature map. This way, each feature map is reduced to a single value, often used before the following fully connected layers to flatten the feature maps. * Fully connected layers (also known as dense layers): They take the aspect of the layers of the general ANN shown in Figure 3. They are used to learn complex, non-linear combinations of the features. For example, in a classification network, the fully connected layers map the features to class scores. * Dropout layer: During training, dropout is often applied to fully connected layers to prevent overfitting. Dropout randomly sets a fraction of the neurons to zero at each training step, forcing the network to learn redundant representations and improving generalization. For some medical applications, it is not enough to classify images and identify objects in them, it is also necessary to identify the boundaries of the detected objects. This is a process known as segmentation. For example, manually segmenting internal organs from X-ray images typically takes a very long time, and the use of dedicated neural networks is essential to improve the efficiency of medical practices that require it. In the pioneering paper [35], the authors present U-Net, a novel CNN architecture suitable for automatic segmentation of medical images. Since a CNN can learn the set of features of an input image and represent them as a numerical vector, this information is used for segmenting objects within the image through a reconstruction process. This task is quite difficult.