## 4 Methods
### Connected and Automated Vehicles (CAVs) Data Characteristics and Anomaly Model
In particular, for sensor 3 (\(RoC\)), it is observed that the performance values of the approaches are worse when compared with the other two sensors, \(Ax\) and speed that appear to show much smoother reading over time, under the same anomaly scenario. This is partly being attributed to the tremendous variation of consecutive \(RoC\) readings. The distribution of the \(RoC\) values in Figure 12a, validates the performance degradation of the mechanisms when subjected to unobserved anomalous \(RoC\) sensor values. However, the proposed approach demonstrates a lead performance in all the scenarios with the values of \(4.92\pm 0.009\) and \(6.95\pm 0.009\) over BDL and CNN, considering the worst case scenario of \(RoC\) sensor analysis. This significant improvement in performance is also replicated in Figure 12b-d.

A similar experiment is conducted to investigate the behaviors of CAVs system and detection mechanisms at low value of \(\alpha=10\%\) and d = 7, with all the types of anomaly present. As shown in Figure 13 the detection performances of the selected mechanisms vary among various sensors, again detection mechanisms show the lowest performance values when applied to anomalous \(RoC\) sensor values. This may equally be attributed to the variation in input read sequence of \(RoC\) sensor readings. At a value of \(\alpha\) set to 10%, the approaches tend to show a better classification accuracy but generally indicate poor performances on other metrics, especially on Figure 13(a) when compared to \(\alpha=50\%\) as shown in Figure 12(a). The observation is in compliance with intuition, as lower value of \(\alpha\) makes the anomaly more elusive and thus more difficult to spot. The high detection accuracy as shown in Figure 13(b) in this case may be as a result of the imbalance nature of the BSMs samples, classification in this context appears to favor the more representative class [38]. Accuracy metrics may not be a much appropriate performance metric for imbalance data. The proposed approach presents significant performances in the values of precision and sensitivity metrics when compared to BDL and CNN as shown in Figure 13(c) and 13(d) respectively. Our focus mainly is on F1-score which provide more insights on the strength of detection mechanisms in event of imbalance class [39] scenario. From the obtained F1-score results in Figure 13(a), BDL outperforms CNN, while the proposed approach provides significant improvement of performance by values of \(4.36\pm 0.010\) and \(6.45\pm 0.010\) compared to the performance of BDL and CNN mechanisms. Figure 12: Detection performance and 95% confidence intervals (CIs) and CRIs across 15 to 20 different executions for all three methods, at anomaly rate \(\alpha=50\%\) an in the presence of all the types of anomalies. Furthermore, in the experimental setting, we compute the Area Under the Curve (AUC) of the Receiver Operating Characteristics (ROC) curve to validate the performance and reliability of our proposed model on gradual drift anomaly at \(\alpha=10\) and \(\alpha=50\) respectively. The ROC curve is a graphical plot tool that shows the binary classifier's diagnostic potential as its discrimination threshold is varied and this result denotes the plot of true positive rate (sensitivity) as against false positive rate (1-specificity). In the simulation setting in this scenario, we train the methods on Bias and Instant anomaly and then carry out detection process of these trained methods on gradual drift anomaly to validate and generalize the performance of the proposed approach. From Figures 14 and 15 respectively, we observe that the proposed approach shows superior performances over the existing approaches. For instance, in Figure 13(a) at \(\alpha=10\%\), the proposed approach has a performance gain of 1.9%, 7.4% and 3.5 over DWT- CNN, BDL and CNN, respectively. At the same time, Figure13(b) shows that when \(\alpha=50\%\), the proposed approach is improved by values of 2.2%, 8.4% and 3.4, respectively, when compared with over DWT- CNN, BDL and CNN, respectively.