# A Review of Deep Learning Algorithms and Their Applications in Healthcare
## 3 Artificial Neural Networks
### Backpropagation  
The backpropagation algorithm has played an important role in machine learning's development due to its efficiency in computing the gradient of neural networks. The weights in the network are successively adjusted to minimize the difference between the actual output vector and the desired output vector, namely, the loss function. As a consequence of weight adjustment, internal hidden layers that are neither input nor output  
Figure 2: A representation of a neural network [1].  
are significant features. The interactions between these layers assure the regularities in the task domain [43; 44].  
The backpropagation algorithm is summarized using the most common activation function, which is the logic sigmoid function.  
\[\sigma(\alpha)=\frac{1}{1+e^{-\alpha}} \tag{1}\]  
where \(\alpha\) is the activation, which is a linear combination of the inputs \(x=\left\{x_{1},\ldots,x_{p}\right\}\) and the weights \(w=\left\{w_{1},\ldots,w_{p}\right\}\), as \(\alpha=w_{0}+\sum_{i=1}^{p}w_{i}x_{i}\). The additional weight \(w_{0}\), which is independent of the input, is included and is known as the bias. The actual outputs \(\widetilde{y}\) are given by  
\[\widetilde{y}=\sigma\bigg{(}w_{0}+\sum_{i=1}^{p}w_{i}x_{i}\bigg{)} \tag{2}\]  
A similar approach given in [34] and [4] as follows. For a given dataset \(D=\left\{(x_{n},y_{n}),n\right.\) = 1,..., \(N\)}, where \(x_{n}\) is the input vector, \(y_{n}\) is the output, and \(N\) is the number of layers, we consider the loss function:  
\[\xi(w)=\frac{1}{2}\sum_{n=1}^{N}(\widetilde{y}(x_{n}-y_{n}))^{2}. \tag{3}\]  
In order to minimize the error \(\xi(w)\), the gradient descent method is implemented, and the backpropagation procedure is applied. The loss function is rewritten as  
\[\xi(w)=\sum_{n=1}^{N}\phi_{n(w)}, \tag{4}\]  
with \(\phi_{n(w)}=\frac{1}{2}\)\(\left(\widetilde{y}(x_{n}-y_{n})\right)^{2}\). Now the adjustment of the weights \(w\) will be applied incrementally using the approach  
\[w\gets w-u\
abla_{w}\phi_{n}(w) \tag{5}\]  
where \(\mu\) is a positive step-size. The remaining step is to compute the gradient \(\
abla_{w}\phi_{n}(w)\). The partial derivative is determined with respect to the weight \(w_{ij}\) in the unit \(j\) and, using the chain rule  
\[\frac{\partial\phi_{n}}{\partial w_{ij}}=\frac{\partial\phi_{n}}{\partial \alpha_{j}}\frac{\partial\alpha_{j}}{\partial w_{ij}} \tag{6}\]  
where \(\alpha_{j}\) is the activation in unit \(j\) and is defined by  
\[\alpha_{j}=w_{0}+\sum_{i=1}^{k}w_{ij}x_{i} \tag{7}\]  
For simplicity, the notation \(\delta_{j}=\frac{\partial\phi_{n}}{\partial\alpha_{j}}\) is used. If \(j\) is the output unit, then  
\[\delta_{j}=\sigma\big{(}\alpha_{j}\big{)}\big{(}1-\sigma\big{(}\alpha_{j} \big{)}\big{)}\big{(}\sigma(\alpha_{j})-y_{n}\big{)} \tag{8}\]  
In the case that \(j\) is not an output function, we obtain  
\[\delta_{j}=\sigma^{\prime}\big{(}\alpha_{j}\big{)}\sum_{i=1}^{k}w_{ik}\delta_ {k} \tag{9}\]To finalize the procedure, the derivatives \(\frac{\partial\phi_{n}}{\partial w_{ij}}\) are found; then each weight \(w_{ij}\) is updated using the approach  
\[w_{ij}\gets w_{ij}-u\frac{\partial\phi_{n}}{\partial w_{ij}} \tag{10}\]  
The backpropagation algorithm uses a teacher-based supervised-learning approach to train ANNs. Despite high training accuracy, backpropagation does not always perform well when applied to testing data. As backpropagation relies on local gradient information with a random initial point, it often gets stuck in local optima. Moreover, neural networks (NNs) may experience overfitting if the training set is not large enough.  
Backpropagation can be categorized into two types: [45]  
Static Backpropagation: Such an algorithm aims at producing a mapping of a static input for static output, and it is capable of solving static classification problems such as optical character recognition (OCR).  
Recurrent Backpropagation: This type of network is carried out until a fixed-point value is obtained, after that the error is determined and propagated backward.