# Helping CNAs Generate CVSS Scores Faster and More Confidently Using XAI
## 6 Explainability
### Leveraging SHAP's Built-in Capabilities for Multi-Class Global Explanations  
SHAP provides various ready-to-use plots and functions, including the bar plot. Once Shapley values are computed for each word across different classes, the bar plot consolidates these values for each word, presenting them in a 2D plot. Here, the Y-axis signifies features (words in our case), while the X-axis represents cumulative SHAP values. The bars are arranged in descending order and color-coded to denote the associated class impact of each word. The notable advantage of employing SHAP for global explanations is its inherent capability to handle multi-class labels. Illustrated in Figures 13 and 14, the bar plots showcase the top 20 words for the Scope and Attack Vector metrics, offering insights into the significance of each word within the respective metric classes. Although the figures exclusively display the top 20 words, we can visualize any number of words, bounded solely by considerations of ergonomics and screen size. This restriction is a deliberate design decision. These plots allow us to gain insights into the correlation between specific words and classes. For instance, in the Scope metric, the words \"admin\" and \"high\" are almost exclusively correlated with the \"HIGH\" class. Similarly, in Attack Vector, the words \"physical\" and \"adjacent\" are strongly correlated with the \"PHYSICAL\" and \"LOCAL\" classes, respectively. On the other hand, in Scope, the word \"PHP\" has zero correlation with the \"PHYSICAL\" class, and the words \"remote\" and \"local\" have almost zero correlation with the \"ADJACENT_NETWORK\" class. Additionally, the top three words in both Scope and Attack Vector are somewhat well distributed (not extremely skewed) between two or more classes. Finally, we observe that the word ranking is different between Scope and Attack Vector and that the cumulative SHAP scores decrease sharply from the top word down to the 20 th, considering that the dataset contains 10,000 words. So by using SHAP bar plots, analysts can study:  
* Class exclusivity: Identifying words that influence the model decision exclusively for a specific class. * Class absence: Recognizing words that have no impact on the model decision for one or more classes. * Ambiguous words: Which words are evenly important to multiple classes and thus cannot be used as a basis for separation. * Word importance distribution: Examining the overall distribution of word importance. * Word importance by class: Analyzing the significance of words specific to each class. \begin{table}
\begin{tabular}{c c c c c c c c c c c c c c c c} \hline \hline  & & \multicolumn{8}{c}{**Accuracy**} & \multicolumn{8}{c}{**F1**} \\ \hline
**Works** & **AV** & **AC** & **PR** & **UI** & **S** & **C** & **I** & **A** & **AV** & **AC** & **PR** & **UI** & **S** & **C** & **I** & **A** \\ \hline
**Ours** & 0.92 & **0.973** & 0.84 & 0.94 & **0.965** & 0.87 & 0.88 & 0.9 & **0.923** & **0.977** & 8.43 & **0.941** & **0.966** & 0.87 & 0.88 & **0.901** \\ \hline
**[**3**]** & **0.96** & 0.956 & **0.92** & **0.94** & 0.964 & **0.93** & **0.94** & **0.94** & 0.88 & 0.814 & **0.87** & 0.939 & 0.936 & **0.91** & **0.92** & 0.852 \\ \hline
**[**2**]** & 0.91 & 0.952 & 0.86 & 0.93 & 0.964 & 0.87 & 0.88 & 0.89 & NA & NA & NA & NA & NA & NA & NA \\ \hline
**[**11**]** & 0.93 & 0.96 & 0.87 & 0.95 & 0.95 & 0.89 & 0.9 & 0.9 & 0.84 & 0.82 & 0.8 & 0.93 & 0.92 & 0.87 & 0.89 & 0.77 \\ \hline
**[**10**]** & 0.91 & 0.961 & 0.84 & 0.93 & 0.955 & 0.87 & 0.87 & 0.89 & 0.909 & 0.957 & 0.84 & 0.932 & 0.955 & 0.87 & 0.87 & 0.886 \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Experimental results comparison between our method and related works (we round up some results to gain space). The best results of each column are highlighted in bold. Metrics where our model achieved the best results are colored in green. Figure 14: Global word affinity for the Attack Vector class. Figure 13: Global word affinity for the Scope class.