# Analysis of Deep Learning-Based Decision-Making in an Emotional Spontaneous Speech Task
## 4 Interpreting the Model Behaviour
### Class Model Visualisation  
Class Model Visualisation is a global method within the Explainable Artificial Intelligence (XAI) framework, the goal of which is to generate image visualisations of each of the classes or categories the system is trying to predict [10]. We selected this method because it can provide insights into the features that the system takes into account when making those predictions in a visual way. At this point, we take advantage of the fact that we use the spectrogram to parametrise the voice signal by processing it as an image. This can be very useful for understanding the performance of the system and acting. For instance, it might be used for analysing the diversity of the samples in a category, which can be influenced by different factors such as the subjectivity in the annotation process. If a sample has a feature that the model relates to a different category that is not the predicted one, it might be due to a low agreement among the annotators, and it might be interesting to see what happens after a second annotation process. Figure 4: Two-dimensional representation obtained for each sample over different layers of the network using the PCA technique. The colour of each point represents the category to which it belongs, showing in the first row the annotated categories (ground truth) and in the second row the predicted categories. Given a convolutional network \(f\) and a class of interest \(c\), the goal is to generate an image visualisation \(I^{\prime}\), which is representative of \(c\). This is based on the scoring methods used to train \(f\), which maximises the class probability score \(S_{c}(I)\) for \(c\), combined with a weighted (\(\lambda\)) L2 regularisation so that the image \(I^{\prime}\) keeps regular values, such that:  
\[I^{\prime}=\arg\max_{I}S_{c}(I)-\lambda\|I\|_{2}^{2} \tag{2}\]  
Thus, the generated images (usually called Deep Dream) provide information related to what the black box model had learnt for a particular class or category in the dataset [83]. In this work, the Deep Dream images associated with the different classes, for both categorical and VAD models, are shown in Figure 5. A random spectrogram sample was selected for initialisation and an L2-regularisation method was employed to obtain the final images. These deep dream images show different patterns for different categories. However, their interpretation is difficult since speech information is harder to interpret visually than deep dreams of images. First of all, it is worth noting that usually human speech is located in the 300-4000 Hz range, so the analysis will be focused on that interval. Focusing on the categorical model, it can be appreciated that, in \"Calm\", there is an intensity attenuation of around 1000 Hz, whereas, in \"Happy\", this is an intense interval, and the attenuation can be appreciated at lower frequencies, below 500 Hz. For the \"Angry\" category, the attenuation is observed below 1024 Hz, and above that frequency, there is an intense band (narrower than in the \"Happy\" class). Figure 5: _Cont._  
Switching to the VAD model, if we focus on Arousal, it can be concluded that, in \"Neutral\", there is a mix of high and low frequencies that are activated. However, the \"Excited\" category seems to be more activated at high frequencies (above 1024 Hz). Regarding Valence, the patterns are better-defined, and there seems to be much less noise here. Clearly differentiated bands emerge in this dimension, and are located in different places for the three different values. If we compare \"Negative\" with \"Neutral\", it can be seen that \"Negative\" has more defined blue bands between green or yellow bands, mainly at low frequencies. In \"Neutral\", the separation among bands becomes vaguer, and a pattern is replicated all over the frequencies, which might be considered as complementary to the one appreciated in \"Negative\" (see frequency bands above 512 Hz, blue in \"Negative\" and green/yellow in \"Neutral\"). Finally, the vagueness among bands increases in \"Positive\".