## 6 Experimental Results
### Performance of Twin-Adapt  
In order to obtain optimized TWIN-ADAPT models, their hyperparameters are automatically tuned using a Particle Swarm Optimization (PSO) technique as already discussed in Section 5.1 (Algorithm 2). The initial hyperparameter search range and the computed optimal hyperparameter values for TWIN-ADAPT's Algorithm 1 on the three experimental datasets are shown in Table 5. After using PSO, optimal hyperparameter values are assigned to the LightGBM classifier to construct an optimized model for adaptive anomaly classification under concept drift conditions.  
The performance comparison of TWIN-ADAPT's optimized and online LightGBM model against the offline LightGBM model during the testing phase is shown in Figures 19-21. For the Fumehood dataset, as illustrated in Figure 19, the online adaptive model achieves a relatively higher average accuracy of 96.97% compared to the offline LightGBM model's accuracy of 96.41% (with an average performance improvement of 0.57%). For the Vacuum Pump dataset, as illustrated in Figure 20, the adaptive model again shows a significantly superior performance with an average accuracy of 71.92%, while the offline LightGBM model achieves only 65.13% (with an average performance improvement of 10.42%). For the Lithography dataset, Figure 21 reveals that the online adaptive LightGBM model outperforms the offline model with an average accuracy of 69.26% compared to 39.57% accuracy from the static LightGBM model (with an average performance improvement of 75.60%).  
From these results, it is evident that the presented TWIN-ADAPT's optimized and continuous learning-driven LightGBM model consistently outperforms the offline LightGBM model across all datasets, exemplifying the effectiveness of the adaptive learning approach in dynamic industrial CPS environments. This is further supported by the performance  
Figure 18: Average accuracy comparison for baseline drift adaptation models on Lithography Unit dataset.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Hyperparameters** & **Search Space** & **Fumehood** & **Vacuum Pump** &
\begin{tabular}{c} **Lithography Unit** \\ \end{tabular} \\ \hline \(\gamma\) & [0.90, 1] & 0.977 & 0.984 & 0.9711 \\ \(\delta\) & [0.90, 1] & 0.965 & 0.912 & 0.917 \\ \(WinSize\) & [100, 1000] & 247 & 541 & 360 \\ \(winSizeMax\) & [500, 5000] & 2892 & 4111 & 2443 \\ \hline \hline \end{tabular}
\end{table}
Table 5: TWIN-ADAPT’s hyperparameter configuration.  
metrics in Table 4, which show that the TWIN-ADAPT model also excels in precision, recall and F1 score, indicating its robustness and reliability for online anomaly classification for CPS datasets. It is also worth mentioning that the performance improvement for the Fumehood dataset is marginal because even the offline model performs well, indicating it has already converged. In contrast, the significant improvements observed in the Lithography and Vacuum Pump datasets demonstrate that adaptation in dynamic environments can significantly enhance performance under concept drift conditions. The results emphasize the necessity and advantage of incorporating adaptive learning mechanisms in CPS utilizing anomaly and fault classification for online data streams.  
Figure 19: Average accuracy comparison of TWIN-ADAPT’s online adaptive LightGBM model vs. offline LightGBM model for Fumehood test dataset.  
Figure 20: Average accuracy comparison of TWIN-ADAPT’s online adaptive LightGBM model vs. offline LightGBM model for Vacuum Pump’s test dataset.