## 4 DLR+ Router Overview
### The Neural Networks  
We treat the problem of finding the BNH and BNM as binary classification problems, given that we would like to know if the node and messages are in best conditions (i.e., fit) to carry and deliver the messages, or not. Thus, the neural networks used in the fitness center are feed forward neural networks, whose general architecture is presented in Figure 3.  
Figure 2: The fundamental routing architecture of a deep learning–based router (DLR+). Here, \(X\in R^{n}\) is the set of \(n\) input values \(x_{i},\ \forall i\in\{1,2,\dots,n\}\) that reflect some of the characteristics of the host at that moment, such as its speed and buffer occupancy; \(H_{i}\in R^{n_{hi}}\) is the vector that contains the values \(h_{i}\)(computed according to Equation (3)) of the \(n_{hi}\) neurons in the hidden layer number \(i,\forall i\in\{1,\dots,\ K\}\), where \(K\) is the number of hidden layers in the network; and \(f\) is the resulting fitness value of the host in the given conditions. The set of weights (synapsis) of the neural network, without its bias values, is given by \(S_{N0}\in R^{n\times n_{hi}}\) for the connections between the input layer and the hidden layer \(1\), and \(S_{Ni}\in R^{n_{hi}}\) for the connections between the hidden layer \(i\) and the next hidden layer \(i+1\), for all \(1\leq i\leq K\), including the connections from the last hidden layer to the output layer. Finally, the bias values of each synapsis are given by \(B_{Ni}\in R^{n_{hi}},\ \forall i\in(0,K)\). Similarly, \(S_{M0}\in R^{n\times m_{hi}}\) is the synapsis vector for the connections from the input layer to the first hidden layer, and \(S_{Mi}\in R^{n_{hi}}\) are the synapsis for the connections from the \(i\)-th hidden layer to the next one, including the connections from the last hidden layer to the output layer, and the bias values of each synapsis are given by \(B_{Mi}\in R^{n_{hi}},\ \forall i\in(0,K])\). As for the number \(K\) of hidden layers, the universal approximation theorem [29] establishes that \"a neural network with a single hidden layer with a finite number of neurons can approximate any continuous function on compact subsets in \(R^{n}\)\"; this implies that, finding the appropriate parameters, a neural network with one single hidden layer is enough to represent a great amount of systems. Nonetheless, the width of such layer might become exponentially big. Indeed, [PERSON], a pioneer researcher on deep learning, holds that \"a neural network with a single layer is enough to represent any function, but the layer can become infeasibly large and fail to learn and generalize correctly\" [30]. On the other hand, while not having hidden layers at all in the neural network would only serve to represent linearly separable functions, a hidden layer can approximate functions with a continuous mapping from a finite space to another, and two layers can represent an arbitrary decision boundary with any level of accuracy [31]. In summary, this means that one hidden layer helps to capture non-linear aspects from a complex function, but two layers help generalize and learn better. In fact, the authors hold that one rarely needs more than two hidden layers to represent a complex non-linear model. On the other hand, for the number \(n_{hi}\) of neurons in each hidden layer \(H_{i}\), there is no formula to have an exact number, although some empirical rules can be used [32]. The most common assumption is that the optimal size of the hidden layers is, in general, between the size of the input layer and the size of the output layer. For this module in DLR+, this would mean that \(n\geq n_{hi}\geq 1\). Another suggestion is to keep this number as the mean between the number of neurons in the input and output layers and from here start decreasing the number of neurons in each subsequent layer without falling below 2 neurons in the last hidden layer. In DLR+, this would imply that \(n_{h1}=\left|\frac{n}{2}\right|\geq n_{h2}\geq 2\).