## 7 Discussion  
* **Performance of TWIN-ADAPT across different CPS datasets:** TWIN-ADAPT works well with the Fumehood dataset, which contains multiple features that offer sufficient information to train the model accurately (average accuracy of 96.97% and F1 score of 0.97). In contrast, the significant performance improvements observed on the Lithography and Vacuum Pump datasets demonstrate that TWIN-ADAPT significantly enhances the performance under concept drift conditions compared to the older offline model. These results could be further improved by exploring other advanced deep learning-based classification models within the TWIN-ADAPT framework, such as CNNs, MLPs or Transformers to enhance the performance on datasets with limited features for learning or high-anomally distributions.
* **Comparative analysis between TWIN-ADAPT and baseline drift adaptation models:** As observed in Table 4, TWIN-ADAPT generally outperforms traditional drift adaptation methods due to its more flexible adaptation strategy. While methods like ADWIN rely on fixed-size sliding windows to manage data and detect drift and DDM monitors degradation in model performance--which are not dynamically adaptive to new or evolving data patterns--TWIN-ADAPT's approach allows for more fine-grained adjustments to both sudden and gradual concept changes, integrating drift detection and adaptation into a singular process. This eliminates the need to pair separate drift detectors with adaptation models, which typically increases computational and time overheads. TWIN-ADAPT seamlessly combines sliding and adaptive windows, enhancing both the detection and adaptation to drift within a streamlined framework. Additionally, instead of comparing the statistical properties of the data for drift detection and adaptation, TWIN-ADAPT focuses on performance-based adaptation. This ensures that model updates for retraining occur only when the performance degrades significantly, rather than responding to every minor data fluctuation that might not impact the model's effectiveness.
* **Computational complexity of TWIN-ADAPT:** The computational complexity of TWIN-ADAPT's continual learning model is determined by the operations within its sliding and adaptive windows, and the hyperparameter optimization using Particle Swarm Optimization. Specifically, the sliding window operation has a complexity of _O(NM)_, where \(N\) is the number of data samples in the every batch, and \(M\) represents  
Figure 21: Average accuracy comparison of TWIN-ADAPT’s online adaptive LightGBM model vs. offline LightGBM model for Lithography Unit’s test dataset.  
the number of times that the hyperparameters are tuned within PSO. PSO itself is relatively efficient, with a complexity of _O(NlogN)_, supporting parallel execution to enhance performance. This setup ensures that the TWIN-ADAPT model remains computationally feasible for real-time applications in IoT-driven cyber-physical systems, balancing the need for accurate drift adaptation with the real-time constraints of computational resources.
* **Cross-domain generalization:** The integration of automated hyperparameter optimization using Particle Swarm Optimization (PSO) allows TWIN-ADAPT to be effectively generalized across various domain datasets. This feature enables adaptive anomaly classification without the need for manual tuning or intervention, which reduces the risk of bias and enhances model applicability in diverse settings.
* **Impact of data quality check to prevent overfitting:** The integrity of TWIN-ADAPT's performance is heavily reliant on high data quality. Spurious drifts and noisy data can significantly distort the model performance due to frequent retraining and resets. Implementing stringent data quality checks ensures that only relevant and precise data influence the model's training process, thereby avoiding overfitting and underfitting.