# On the Reliability Assessment of Artificial Neural Networks Running on AI-Oriented MPSoCs
## 3 Proposed Approach
### Mapping and Variance Assignment  
In state-of-the-art architectures, a DNN inference task is scheduled, using the one-to-many paradigm (one PE elaborates many neuronal computations). To optimize the memory accesses and to ease the inference process, a typical approach is to assign each PE always the same range of neurons throughout the network inference. Such an approach, named _static scheduling_, doubtlessly leads to gains in terms of performance and latency, but turns out to be disadvantageous from the reliability point of view. Indeed, a single physical fault affecting a PE insists always on the same range of neurons, no matter their importance.  
Traditionally, to improve parallelism, AI-oriented MPSoCs distribute the ANN workload, exploiting the SIMD paradigm. As shown in Figure 3, the neurons \(N=\{0,\ldots,n\}\) are neatly distributed among all the \(P=\{0,\ldots,p\}\) PEs, and it is known exactly which neurons that a PE handles when launching the inference of a L-layer neural network, where \(L=\{0,\ldots,l\}\). Thus, it is possible to split the total amount of neurons in well-defined chunks, consisting of fixed groups of neurons assigned, at each layer \(l\), to a specific PE \(p\). Nevertheless, the amount of critical neurons belonging to each \(chunk_{\rm l,P}\) is not equally distributed among the \(P\) computing resources. From the reliability point of view, this  
Figure 2: The critical neuron identification process: a practical example with the MNIST data set.  
might open serious concerns. According to the motivation of the work, a physical fault affecting the architectural level may negatively affect the computation of many neurons at the behavioral level. In addition, most interestingly, what happens if a physical fault hits the PE that processes the greatest number of critical neurons? The hypothesis is that it will emphasize even more the errors, leading to a significant drop in accuracy.  
In this work, we provide a way of balancing the assignment of the \(chunk_{1,p}\) to the \(P\) processing elements, thereby reducing the likelihood that a physical fault on a PE may jeopardize the correct functionality of a large number of critical neurons. In more detail, this study proposes a scheduling mechanism to allocate the chunks of neurons to the available PEs. Since we are not considering any retraining of the ANN, the trend of neurons cannot change. The only way is to redistribute their allocation to the available PEs so that the computation of the most critical neurons is not assigned to just one PE, or a subset of them.  
To measure the criticality of a group of neurons (also referred to as chunk), we use the variance parameter. Seeing that it measures how far a data set is spread out, the variance of a chunk of neurons can provide a measure of the number of critical ones contained in that chunk. Mathematically, it is defined as the average of the squared differences from the mean \(\mu\). In the beginning, the variance figure for each chunk is computed, with the aim of evaluating their criticality. Given subset of neurons \(x_{i,i\in[1,N]}\) assigned to a PE\({}_{p,p\in[1,P]}\), the variance of the \(chunk_{1,p}\) can be computed as described in (4). \(N\) represents the total number of neurons in the chunk. A large variance figure suggests that a significant number of critical neurons are enclosed in that chunk. In contrast, a small variance value indicates that the chunk holds a small number of critical neurons.  
\[\sigma^{2}_{1,p}=\frac{\sum_{i=1}^{N}(x_{i}-\mu)^{2}}{N} \tag{4}\]