# Helping CNAs Generate CVSS Scores Faster and More Confidently Using XAI
## 4 Methodology
### Machine Learning Model Selection  
By basing ourselves on the dataset section, we can make informed decisions towards designing our modeling pipeline:  
* Multiple models: Given the unique label distribution of each metric and the variance in distributions across metrics, opting for individual models for each metric is preferable. This approach entails having a dedicated model for each metric, currently totaling eight models for the existing version, with the potential for adjustments in future versions. * Models that are easy and fast to update: As newly identified CVEs emerge, the NVD undergoes continuous updates, leading to significant changes such as the introduction of new keywords, fluctuations in the occurrence of specific vulnerabilities, and corrections in the classification of CVEs. CNAs therefore need to swiftly transition from older distributions to new ones, maintaining a continuous learning and adaptive process. In the case where software aids in this adaptation, these programs also require frequent updates. The more difficult, costly, and time-consuming a system is to update, the less useful it becomes as it slowly becomes outdated, thus making analysts not rely on it, rendering the whole thing obsolete. * Models that are robust to small changes: Updating the model too frequently can disorient analysts, as the patterns and rules they will learn and use change too often, not giving them the time needed to obtain accustomed to the distribution and come up with ideas to improve the model. Therefore, it is best to choose an ML family that is robust to small changes over time and that offers acceptable ranges for new points to be classified into; therefore, density-based models (e.g., Nearest Neighbors) are not a natural fit for this problem. Rules-based models (e.g., trees) and margin-based models (e.g., Support Vectors) would be better suited. Based on the earlier points, smaller models (in both size and inference time), models that are fast to retrain and redeploy, as well as models that are robust to small changes, are preferred. DL models such as Neural Networks (NNs) therefore are not the best natural fit, even if they can be very performant. We could make NNs fit this pattern, but a lot of work has to be performed by specialists, such as regularization and model pruning. As CNAs are security companies and not AI-first companies, doing this adds both an HR obstacle and a Single-Point-of-Failure (SPOF) issue. An out-of-the-box solution that integrates all these past points is the optimal solution. Given these limitations, we opted for XGBoost [35] as our ML model. XGBoost, short for eXtreme Gradient Boosting, is an open-source library that excels in handling tabular datasets and classification problems. It is renowned for its efficiency, scalability, and flexibility. The algorithm is based on gradient boosting, which works by iteratively constructing an ensemble of decision trees, where each subsequent tree corrects the errors made by the previous ones. The model is trained by optimizing a loss function that measures the discrepancy between predicted values and the actual values of the target variable. Figure 11 visualizes this process. One of the notable features of XGBoost is its ability to handle large datasets and achieve high prediction accuracy. It incorporates regularization techniques to mitigate overfitting and improve generalization. Moreover, XGBoost supports parallel processing, enabling faster training on extensive datasets. During the inference phase, the final ensemble model is utilized to make predictions on new data points. Since our text dataset will be processed using vectorization, we will have inputs of equal length; thus, it can be transformed into a tabular format and used by XGBoost, which excels in handling tabular datasets and classification problems. Finally, XGBoost is already interpretable, but its built-in feature importance method only returns global explanations. Global explanations can help us discover trends and biases learned by the model for the whole dataset.