Abstract
Industrial control systems (ICS) are increasingly targeted by cyberattacks that manipulate physical processes while evading data-driven detectors trained on raw time-series data. This paper extracts 34–41 control-theoretic features, including tracking error, valve mismatch, sensor liveness, and their temporal derivatives, from Proportional–Integral–Derivative (PID) control loops and evaluates them using an Isolation Forest combined with a maximum z-score. On HAI 21.03, Stage 1 achieves a PA-F1 score of 0.8945, detecting 48 out of 50 attacks. On HAI 23.05, Stage 1 attains a PA-F1 score of 0.9210, surpassing seven deep-learning baselines by at least 23 PA-F1 points; the closest baseline, a learned Graph Neural Network (GNN), achieves 0.6890. Re-implementations of ConvBiLSTM-AE (PA-F1 = 0.6689) and TranAD (PA-F1 = 0.6838) on the same evaluation split confirm this performance gap. A controlled USAD experiment, with PA-F1 = 0.7343 for physics features versus 0.6687 for raw Supervisory Control and Data Acquisition (SCADA), demonstrates that the extracted features provide the detection signal independently of the model architecture. Adding a bidirectional Gated Recurrent Unit (GRU) refinement stage improves PA-F1 by 8.1 percentage points on HAI 21.03, but the same stage reduces it by 6.8 percentage points on HAI 23.05, where attacks manifest as brief perturbations; four alternative Stage 2 designs reproduce this degradation. We therefore characterize temporal refinement as beneficial only for sustained-deviation attacks and identify Stage 1 as the primary deployable detector. This study is the first to apply physics-informed features, report both PA-F1 and eTaPR on HAI 23.05, and perform per-window error diagnosis on this dataset. Results show that 10 of 15 detected windows are covered by fewer than 10% of their timesteps, revealing a structural tension between PA-F1 and eTaPR.
1. Introduction
Industrial control systems manage critical infrastructure, including power grids, water treatment facilities, and manufacturing lines, where a successful cyber attack may result in physical damage that endures beyond the initial intrusion [1]. In contrast to conventional IT attacks, ICS intrusions alter actuator setpoints and sensor readings to drive physical processes into unsafe states while maintaining operator dashboards within normal operational ranges. Effective detection of these attacks necessitates reasoning about the intended behavior of the process, rather than relying solely on statistical deviations from historical data.
The HAI security dataset [2,3] represents one of the few publicly available benchmarks constructed on a Hardware-In-the-Loop (HIL) testbed that accurately emulates a real-world power plant. The dataset comprises four interconnected sub-processes (boiler, turbine, water treatment, and HIL simulation), three distributed control systems (DCS), and, in its latest release (23.05), 225 HAIEnd monitoring channels for end-device health tracking. Over four major versions (20.07, 21.03, 22.04, 23.05), the dataset has incorporated progressively more challenging attack scenarios.
1.1. The Dominant Approach and Its Blind Spot
Most published anomaly detectors treat the task as a generic multivariate time-series anomaly-detection problem. Several unsupervised deep-learning architectures—including generative adversarial networks (MAD-GAN) [4], USAD [5], and TranAD [6] have reported high point-adjust F1 scores on both the SWaT and WADI datasets. Other notable architectures have achieved high performance on related multivariate time-series benchmarks, such as LSTM forecasting models [7], stochastic recurrent networks (OmniAnomaly) [8], and the Anomaly Transformer [9], as well as VAEs applied to web traffic data [10]. Comparative studies on ICS benchmarks indicate that these unsupervised deep models can perform effectively when sufficient normal training data are available. However, recent critical evaluations warn that the point-adjust F1 metric used by many of these methods severely overestimates true detection capabilities by rewarding random or highly partial predictions [11,12].
Graph neural networks introduce an inductive bias by encoding sensor topology [13,14,15]. For example, GDN constructs a learned sensor graph and achieves F1 = 0.81 on SWaT and F1 = 0.57 on WADI [13]. However, graphs constructed from data-flow topology rather than physical causation may introduce an inappropriate inductive bias for ICS anomaly detection. This issue is examined empirically in Section 5.3.
These architectures share the implicit assumption that anomalous sensor patterns can be detected without knowledge of the underlying physical process. In practice, ICS operators possess information such as the setpoint of each PID controller, the expected valve position for a given flow demand, and relevant inter-process conservation laws. Process-aware approaches leverage these invariants explicitly [16,17,18].
Instead of asking a model to learn physical relationships implicitly from raw SCADA data, this work encodes control-loop relationships explicitly and then evaluates whether temporal refinement adds value under different attack characteristics. Therefore, this work bridges the two paradigms by encoding PID control-loop relationships as engineered features and providing them to statistical and temporal models, rather than relying solely on models to infer physical relationships from raw sensor data.
1.2. Metric Considerations
Evaluation methodology remains a persistent challenge in time-series anomaly detection. The point-adjust (PA) protocol credits any prediction that intersects an attack window as a full true positive for every timestep within that window [12,19]. Consequently, a single threshold crossing can result in full recall for a multi-minute attack. Kim et al. [20] demonstrated that a random anomaly score can achieve near-perfect PA-F1 on standard benchmarks. Enhanced Time-Series Aware Precision and Recall (eTaPR) [12] addresses this limitation by discounting detections whose overlap with an attack window falls below a configurable coverage threshold ().
Our results on HAI 23.05 illustrate this tension: Stage 1 achieves PA-F1 = 0.9210, yet eTaPR-F1 = 0.2718 on the same predictions. As shown in Section 7, this gap arises not from a failure of the detector but from the marginal nature of most detections on this dataset.
1.3. Contributions
This work offers six primary contributions:
- 1.
- Physics-informed feature set: The proposed approach employs 34–41 features derived from five per-loop templates: tracking error, tracking error derivative, valve mismatch, valve-mismatch derivative, and sensor liveness. It also incorporates cross-loop correlations and watchdog signals. No ICS-specific tuning is required, as these templates apply to all instrumented control loops. A controlled USAD experiment demonstrates effective feature transferability across different architectures.
- 2.
- When temporal cascade refinement helps and when it does not: a bidirectional GRU stage applied on top of Stage 1 improves PA-F1 by 8.1 pp on HAI 21.03, where attacks produce sustained deviations, but degrades it on HAI 23.05 (mean PA-F1 across five seeds, versus 0.9210 for Stage 1 alone), where attacks appear as brief perturbations. Four controlled Stage 2 variants reproduce this degradation, establishing that the limitation is a property of the attack regime rather than of any single architecture. This finding is reported as an empirical boundary on temporal refinement, not as a performance improvement.
- 3.
- Comprehensive evaluation protocol on HAI 23.05: Although several recent studies have evaluated anomaly detectors on HAI 23.05 using pointwise metrics [21,22,23,24,25,26,27], none report PA-F1 or eTaPR, none employ physics-informed features, and none perform per-window error diagnosis. This study provides the first PA-F1 and eTaPR evaluation on HAI 23.05, the first controlled features-versus-architecture decomposition (via USAD), and the first systematic analysis of missed and marginally detected attack windows.
- 4.
- GNN topology ablation: The ablation study shows that employing the DCS data-flow graph as a prior is detrimental, as demonstrated by an AUROC of 0.5256.
- 5.
- Metric analysis: The gap between PA-F1 and eTaPR metrics reaches 0.65 points on HAI 23.05. The primary cause is marginal detections, where attacks are identified at only one to two timesteps per window.
- 6.
- Feature-versus-architecture decomposition: A controlled USAD experiment indicates that USAD raw achieves 0.6687, USAD physics reaches 0.7343, and IsoForest physics attains 0.9210. The features account for an improvement of 6.6 pp, while the model-feature match provides an additional 18.7 pp.
The remainder of this paper is organized as follows. Section 2 reviews related work. Section 3 describes the datasets and evaluation protocol. Section 4 introduces the physics-informed features. Section 5 presents all detection results, including deep-learning baselines, the USAD feature decomposition, and the ablation study. Section 6 details the two-stage cascade. Section 7 analyzes detection errors. Section 8 discusses broader implications. Finally, Section 9 concludes this work.
2. Related Work
Three primary streams of prior research are directly relevant to the current work: deep-learning detectors that treat ICS anomaly detection as a generic multivariate time-series problem; graph neural network approaches that encode sensor topology as an inductive bias; and process-aware methods that leverage physical invariants. The proposed methodology integrates elements from all three streams by employing engineered physics features in place of learned representations, a two-stage architecture that combines a lightweight statistical model with a temporal classifier, and explicit distinction between communication topology and physical causation.
2.1. Deep Learning for ICS Anomaly Detection
Deep-learning methods for anomaly detection in ICS and cyber-physical systems have proliferated in recent years [28]. LSTM autoencoders identify anomalies by observing elevated reconstruction errors in models trained with normal data [7]. Stochastic recurrent models such as OmniAnomaly [8] incorporate latent normalizing flows to capture inter-sensor dependencies. USAD [5] employs two autoencoders trained in adversarial collaboration, achieving up to 547 times speed-up over OmniAnomaly while matching or exceeding its performance on five public benchmarks. Transformer-based approaches, including TranAD [6] and the Anomaly Transformer [9], replace recurrent encoders with self-attention mechanisms. TranAD reports training-time reductions of 75–99% and F1 improvements of up to 17 pp over previous recurrent models.
MAD-GAN [4] utilizes a multivariate generative adversarial network (GAN) whose discriminator is trained to distinguish real from reconstructed sensor windows, thereby capturing inter-variable temporal correlations. VAE-based methods [10] model the marginal distribution of each key performance indicator (KPI) using a variational autoencoder, flagging timesteps when the reconstruction probability falls below a learned threshold.
Although strong results have been reported on the SWaT and WADI datasets, comparisons on the HAI benchmark indicate more modest improvements. Kim et al. [11] evaluated seven deep-learning and classical methods on HAI 21.03 and found that no single model consistently outperformed others across all metrics. For HAI 22.04, which is reported to be approximately four times more challenging than HAI 21.03 [2], limited published results are available. This work does not include evaluation on HAI 22.04 but identifies it as a target for future validation. A broader machine learning survey on HAI-style ICS data [29] similarly concluded that preprocessing and feature engineering account for more performance variance than model selection.
2.2. Graph Neural Networks for ICS Anomaly Detection
GDN [13] learns a sparse sensor dependency graph via attention and predicts each sensor’s value given its graph neighbors; it achieved F1 = 0.81 on SWaT and F1 = 0.57 on WADI. MTAD-GAT [14] applies two parallel graph attention networks: one over feature dimensions and one over the time axis, reporting F1 = 0.90 on SMAP and MSL. HierAnomaly [15] combines inter-metric and temporal embeddings in a hierarchical manner, outperforming pure recurrent baselines on two industrial monitoring datasets.
These methods assume that a meaningful sensor graph can be either learned or specified based on domain knowledge. In ICS, the graph is often derived from the physical process topology [17,18]. This study evaluates whether the DCS data-flow graph, which represents communication paths rather than physical causation, serves as an appropriate graph prior for HAI 23.05.
2.3. Process-Aware and Physics-Informed Approaches
Adepu and Mathur [16] demonstrated that process invariants derived from control specifications can detect attacks on a water treatment plant (SWaT) with 100% recall for biases above 4 mm, failing only for small perturbations or attacks executed immediately after control-loop resets. The SWaT dataset [17] and the WADI dataset [18] have since become standard benchmarks for process-aware anomaly detection.
The proposed approach generalizes the concept of invariants: instead of deriving invariants from a specific plant specification, five per-loop templates based on generic PID control theory are implemented and applied uniformly to every instrumentable loop. The resulting features capture the same physical information as hand-crafted invariants but require only that a setpoint signal and a controlled-variable signal are accessible, a condition satisfied by most DCS configurations. Table 1 contrasts this template-based formulation with the invariant- and topology-based alternatives.
2.4. Evaluation Metrics for Time-Series Anomaly Detection
The point-adjust (PA) F1 score was introduced by Hwang et al. [19] as a time-series-aware adaptation of the standard precision and recall. A detection is credited if it overlaps with an attack window; the entire window is then treated as detected. While operationally motivated, PA-F1 can be gamed: Kim et al. [20] showed that a detector trained with random noise can achieve near-perfect PA-F1 on standard benchmarks.
Hwang et al. [12] introduced eTaPR, which incorporates two coverage thresholds: (the minimum fraction of an attack window that must be detected for the window to count as recalled) and (the minimum precision of a detected segment for it to count as a true positive). Setting requires that at least 10% of an attack window’s timesteps be flagged before the window is considered detected. This adjustment eliminates the credit given by PA-F1 to marginal single-timestep detections, resulting in a more conservative metric. Both metrics are reported throughout, and the practical implications of the observed gap are discussed.
2.5. Prior Work on HAI 23.05
Lee et al. [21] proposed a ConvBiLSTM-AE hybrid autoencoder and evaluated it on HAI 23.05, reporting pointwise F1 scores of 0.783 on Test 1 (54,000 samples, simpler attack patterns) and 0.414 on Test 2 (230,400 samples, more complex and diverse attacks) in an unsupervised setting. Their ablation study compared CNN, LSTM, BiLSTM, and hybrid encoder variants but did not vary the input features. Bukharev and Sokolov [23] combined hierarchical clustering with an ensemble of Isolation Forest, LOF, and ECOD in an unsupervised pipeline, achieving F1 = 0.267 on HAI 23.05. Zhong et al. [26] introduced a Transformer Autoencoder for adversarial robustness evaluation, reporting F1 = 0.343 and AUC = 0.802 on HAI 23.05 and demonstrating that adversarial perturbations reduce F1 to 0.274 under the FGSM attack.
Le et al. [22] evaluated several supervised classifiers alongside a CNN-LSTM autoencoder on HAI 23.05, reporting near-perfect accuracy (0.999) with their proposed model; however, the evaluation used a randomized 60/20/20 split with ground-truth labels during training, which limits comparability with unsupervised methods. Potharaju et al. [27] applied a genetic-algorithm-based feature selection framework to the HAIEnd 23.05 endpoint channels (225 features), achieving 99.91% classification accuracy with a Random Forest on a 54,000-record subset. Kim et al. [24] proposed an explainable anomaly-detection approach using operational sequences derived from shapelets, focusing on the boiler process subset of HAI 23.05.
Feng et al. [25] proposed H-IIoTAD, a hierarchical graph neural network trained on HAI 22.04 and tested on HAI 23.05 for temporal stability analysis. Their model uses physical-topology assignment matrices for graph construction, which differs from the DCS data-flow graph evaluated in Section 5.3 of the present work. Three additional studies use HAI 23.05 for purposes other than benchmarking detection accuracy: Jeon and Seo [30] for synthetic time-series generation, and Kim and Euom [31,32] for explainability demonstrations using Kalman-filter residuals.
All studies reporting quantitative detection results on HAI 23.05 rely on pointwise F1, accuracy, or AUC; none report PA-F1 or eTaPR. No prior work employs physics-informed features derived from PID control-loop relationships. No study performs a controlled experiment to separate the contributions of engineered features from those of the model architecture. No per-window error analysis or detection-ceiling diagnosis has been reported. The present work addresses each of these gaps.
Table 1.
Positioning of the proposed approach against the two most closely related process-aware and graph-based methods on the HAI/SWaT testbeds.
3. Datasets and Evaluation Protocol
The HAI benchmark is one of the few publicly available ICS datasets constructed on a physical testbed, with multiple versioned releases that introduce progressively challenging attacks and additional monitoring channels. The choice of dataset version and evaluation split substantially affects reported results. Both HAI 21.03 and the more recent HAI 23.05 are evaluated in this study, each using distinct evaluation protocols. The selection of the evaluation metric, specifically PA-F1 versus eTaPR, matters as much as the dataset version; therefore, both metrics are reported throughout.
3.1. HAI Testbed Architecture
The HIL-based Augmented ICS (HAI) testbed [2,3] simulates a power plant consisting of four sub-processes: P1 (boiler), P2 (turbine), P3 (water treatment), and P4 (an HIL simulation connecting P1 to P3). Each sub-process is managed by a dedicated DCS, and the three DCS units communicate through an OPC-UA server, replicating a realistic ICS communication topology. Attacks are introduced by modifying control commands or falsifying sensor readings at the DCS level, with each attack annotated by precise start and end timestamps and attack-type metadata.
3.2. Threat Model
The adversary is assumed to have achieved a foothold inside the control network and to be capable of manipulating the signals exchanged between controllers and field devices, consistent with the attack design of the HAI testbed. Three injection surfaces are considered, mirroring the points at which the HAI attacks operate: (i) the setpoint (SP) issued by a controller, (ii) the control output or actuator command (CV/CO) sent to a valve or pump, and (iii) the process variable (PV) reported by a sensor back to the controller. An attack at any of these points drives the physical process away from its intended trajectory, while the manipulated signal is made to appear plausible to an operator dashboard. The adversary’s goal is to induce an unsafe or off-specification physical state without triggering conventional range or rate alarms. The three injection surfaces and their effect on the control loop are shown in Figure 1.
Figure 1.
Threat model. An in-network adversary can tamper with the setpoint (SP), the control output/actuator command (CV/CO), or the reported process variable (PV) of any control loop. Each manipulation perturbs the physical process while keeping the tampered signal within superficially plausible bounds. Detection relies on the consistency among SP, CV, and PV rather than on any single signal alarm.
The defender observes the recorded SCADA stream and, where available, the HAIEnd endpoint channels, but has no privileged knowledge of which signal is under attack or when. Detection must therefore rest on the internal consistency of the control loop represented by the expected relationship between SP, CV, and PV, rather than on any single signal crossing a fixed bound. This is precisely the relationship the physics-informed features of Section 4 encode. The threat model also clarifies the principal deployment assumption discussed in Section 8.5: the SP and CV signals must be observable for the per-loop features to be computable.
3.3. HAI 21.03
HAI 21.03 contains 80 SCADA data points sampled at 1 Hz. The training set consists of three files totaling 921,603 rows, with segments containing attack periods that must be excluded for unsupervised training. The test set includes five files (402,005 rows) and features 50 attack windows, comprising 25 single-actuator and 25 combined-actuator attacks distributed across P1, P2, and P3.
Six PID control loops are instrumented in this dataset: P1-PC (pressure control), P1-LC (level control), P1-FC (flow control), P1-TC (temperature control), P2-SC (speed control), and P3-LC (level control). Two loops, P2-SC and P3-LC, lack setpoint signals in HAI 21.03, resulting in the four tracking and valve features for these loops evaluating to zero; only the sensor-liveness feature is derived from actual data. This configuration yields 34 nominal features, of which 28 are non-degenerate.
3.4. HAI 23.05 and HAIEnd 23.05
HAI 23.05 expands the testbed to 86 SCADA channels and incorporates 225 HAIEnd end-device monitoring channels, resulting in a total of 311 channels sampled at 1 Hz. The HAIEnd channels capture device-level health indicators. Of the 225 HAIEnd columns, 156 remain constant throughout both training and test phases, and only five exhibit deviations during attack periods.
The dataset includes 52 attack scenarios, with the last 30% of the test split containing 17 attack windows. Attack durations range from brief 61-s interventions to a sustained 2052-s intrusion (Window 11). The attack set encompasses both single-process and cross-process attacks, as well as arbitrary-execution (AE) attacks targeting the HAIEnd layer.
Seven control loops are instrumented for HAI 23.05: the same six loops as in HAI 21.03, with the addition of P1-CC (combustion control). The inclusion of seven additional HAIEnd channels (watchdog count and watchdog max deviation) yields a total of 41 features.
3.5. Evaluation Protocol
In HAI 21.03, Stage 1 is evaluated on all 402,005 test rows, following the standard protocol. For the cascade comparison, the test set is split at index 281,403 (70/30), and both Stage 1 and the cascade are evaluated on the last 30%. This approach enables a direct comparison of Stage 1 and cascade performance on identical data. Evaluating the cascade on a held-out portion of test data introduces an implicit selection bias, as the cascade threshold is optimized on the same split used for testing (Section 6).
In HAI 23.05, all evaluations (Stage 1 and cascade) use the last 30% of the test set (85,320 rows, split index 199,080). The 70/30 boundary was fixed before any scoring, but the detection threshold is subsequently selected by maximizing PA-F1 on this same evaluation split. We retain this protocol because it is applied identically to every method compared in this paper, so the relative ranking is unaffected; the multiseed analysis in Section 6.4 characterizes the resulting variance, and the absolute scores should be read as optimistic point estimates under a shared, disclosed protocol.
The reported metrics include PA-F1, eTaPR-F1 (with eTaP and eTaR), pointwise F1, precision, recall, AUROC, and per-window detection rate. For eTaPR, and are used throughout, following the recommended defaults of the eTaPR authors [12]; here is the minimum fraction of an attack window that must be flagged for the window to count as recalled, and is the minimum precision required of a detected segment. These thresholds directly affect the reported eTaPR scores. In HAI 23.05, where 10 of 15 detected windows have coverage below 6%, increasing to 0.2 would further reduce eTaPR-F1, while decreasing it to 0.05 would credit more marginal detections. The choice of represents a moderate position between these extremes; is the eTaPR default and was used unchanged.
4. Physics-Informed Feature Engineering
A PID controller establishes a defined relationship among the setpoint, the controlled variable, and the actuator command. Instead of relying on a model to infer this relationship from raw sensor data, we encode it directly: deviations in tracking, valve position, and sensor continuity are represented as explicit numerical features. This approach simplifies detection by shifting the problem from pattern discovery to measuring deviations from a known physical baseline, making it more tractable for statistical classifiers.
4.1. Design Principles
A PID-controlled process loop consists of a setpoint signal , a controlled variable , and a manipulated variable (typically a valve command) . Under normal operation, the controller drives and the valve position tracks the control output. An attack that modifies or will manifest as one or more of the following deviations:
- 1.
- a persistent tracking error ;
- 2.
- a mismatch between valve command and measured valve position;
- 3.
- a sudden change in sensor liveness (freeze or saturation); or
- 4.
- a change in the rate of the above quantities.
We represent these four physical concepts as five per-loop features, along with their temporal derivatives, cross-loop correlations, and global watchdog features.
4.2. Per-Loop Feature Templates
For each instrumented control loop ℓ, we compute the following features:
- 1.
- Tracking error: .
- 2.
- Tracking derivative: .
- 3.
- Valve mismatch: , where is the measured valve feedback.
- 4.
- Valve-mismatch derivative: .
- 5.
- Sensor liveness: , the rolling standard deviation of the process variable over a window of s. A low value indicates a frozen or saturated sensor; attacks that manipulate sensor readings produce sudden changes in this statistic.
When setpoint or valve-feedback signals are unavailable, as with P2-SC and P3-LC in HAI 21.03, features (1) through (4) are set to zero. Only the sensor-liveness feature is computed from real data.
4.3. Cross-Loop and Global Features
Three cross-loop features capture inter-process dependencies: (i) Pearson correlation between P1 pressure and P1 flow over a 60-s window, (ii) Pearson correlation between P1 pressure and P1 tank level, and (iii) an energy balance deviation comparing pump power input to measured flow rate. These features show negative or near-zero Cohen’s d values on HAI 23.05 (Figure 2), indicating that cross-loop correlations are not the primary signal in this dataset.
Figure 2.
Feature importance for HAI 21.03 and HAI 23.05. Red bars denote features elevated during attacks; blue bars denote features suppressed. (a) Feature importance for HAI 21.03 (34 features) measured by Cohen’s d between normal and attack distributions. P2-SC tracking/valve features () reflect missing setpoint signals in this dataset version. (b) Feature importance for HAI 23.05 (41 features). Watchdog features (watchdog_count, ; watchdog_max_dev, ) rank among the top 10, validating the HAIEnd monitoring channels as independent attack signals.
For HAI 23.05, two global watchdog features are extracted from the HAIEnd channels: watchdog_count (number of HAIEnd devices reporting anomalous states) and watchdog_max_dev (maximum deviation across monitored devices). Both rank among the top 10 features by Cohen’s d ( and , respectively), supporting the HAIEnd layer as an independent attack signal.
The cross-loop correlation features carry low average discriminative power (Figure 2) because they respond only to attacks that disturb the relationship between two loops; for single-loop attacks, they remain near their normal range. They are retained because they are inexpensive and because the ablation in Section 8.4 shows that removing them yields a 0.76 pp PA-F1 reduction in exchange for a 5.3 pp eTaPR gain. This is a breadth-versus-depth trade-off rather than a strict loss.
4.4. Feature Summary
As a result, the feature summary for the datasets is as follows:
- HAI 21.03: 6 loops × 5 features + 3 cross-loop + 1 freeze count = 34 features (28 non-degenerate).
- HAI 23.05: 7 loops × 5 features + 3 cross-loop + 1 freeze count + 2 watchdog = 41 features.
5. Results
5.1. Feature Importance Analysis
The discriminative power of each feature is measured using Cohen’s d between its normal and attack distributions. A positive d indicates that the feature is elevated during attacks, whereas a negative d indicates suppression.
Figure 2a,b present the complete ranked feature importance charts. For HAI 21.03, the top three features are P1-PC_sensor_liveness (), P1-PC_tracking_error (), and P1-FC_sensor_liveness (), all originating from the P1 sub-process. The P2-SC tracking/valve features are identically zero due to setpoint unavailability, and the P3-LC tracking features are also zero.
For HAI 23.05, the top feature is P1-LC_tracking_error (), followed by P1-LC_sensor_liveness () and watchdog_count (). The ranking of watchdog features as third and eighth globally indicates that HAIEnd channels offer a complementary detection signal. Several cross-loop correlation features exhibit negative Cohen’s d values: cross_pressure_flow_corr () and cross_pressure_level_corr () on HAI 23.05. A negative effect size indicates that the correlation is higher during attacks than during normal operation. Attacks temporarily increase the coupling between process variables, which typically exhibit weaker correlation under dynamic operating conditions. This phenomenon is physically interpretable, as certain attacks that force a setpoint to a fixed value remove the natural variability that would otherwise decorrelate coupled variables. Although these features are not strong discriminators individually, they provide a complementary signal that the Isolation Forest can utilize in conjunction with stronger features.
5.2. Stage 1: Isolation-Forest Results
An Isolation Forest [33] (200 trees, contamination rate 0.01) is trained on the normal-only portion of each dataset’s training split. The contamination parameter does not influence the reported results. Stage 1 scores each timestep with the Isolation-Forest path-length score (score_samples), which is then min–max normalized and combined with the MaxZ term; the contamination value affects only scikit-learn’s internal binary decision offset, which this pipeline does not use, because detection is decided by an explicit threshold selected on the score (Section 3.5). We empirically verified that varying contamination over leaves PA-F1, eTaPR, and the number of detected windows unchanged to four decimal places across both datasets. The value 0.01 is therefore a nominal setting retained for reproducibility rather than a tuned hyperparameter. At test time, each timestep receives an anomaly score in . Anomaly score thresholds are chosen by maximizing PA-F1 on the evaluation split. The resulting thresholds are for HAI 21.03 (full test) and for HAI 23.05 (last 30%).
The per-timestep anomaly score consists of two components: the Isolation-Forest anomaly score, normalized to using the training score range, and a maximum z-score (MaxZ), defined as the largest absolute standardized deviation across all features, clipped to and rescaled to . The final score is calculated as . The MaxZ component serves as a complementary signal, capturing single-feature outliers that the ensemble-averaged Isolation Forest may underrepresent. The 0.6/0.4 weighting was established prior to any threshold optimization and remains constant across datasets.
Table 2 shows that PA-F1 is stable across a broad neighborhood of the weighting: on both datasets, it varies by under one percentage point for between 0.3 and 0.8, and degrades only at the extremes, where a single component acts alone. The Isolation-Forest-only setting () loses five attack windows on HAI 21.03 (48 to 43) and two on HAI 23.05, confirming that the MaxZ term contributes detections the ensemble misses; the MaxZ-only setting () is likewise inferior. The chosen , therefore, sits on a plateau rather than at a sharp optimum, which is the property we want from a fixed, untuned weighting. Consistent with the PA-F1/eTaPR tension discussed in Section 8.4, eTaPR peaks slightly earlier (near ) than PA-F1; we retain because it was fixed a priori for window-level detection and the eTaPR difference is small (e.g., 0.330 at versus 0.272 at on HAI 23.05), but this again illustrates that breadth and depth of detection trade-off against each other on this benchmark.
Table 2.
Sensitivity of Stage 1 to the Isolation-Forest/MaxZ weighting (). HAI 21.03 on full test, HAI 23.05 on the last-30% split. Each uses its own PA-F1-optimal threshold. The paper’s operating point is . PA-F1 per dataset at is in bold.
Table 3 presents the results. For HAI 21.03 (full test, 402,005 rows), Stage 1 achieves PA-F1 = 0.8945, eTaPR-F1 = 0.6347, and AUROC = 0.8903. The false-positive rate (FPR) is 0.44% (1731 false positives in 393,058 normal timesteps), and 48 out of 50 attack windows are detected. ROC curves for both datasets appear in Figure 3.
Table 3.
Stage 1 (physics-informed Isolation-Forest) detection results. The full test uses all 402,005 HAI 21.03 test rows (standard protocol); the last 30% is the evaluation split used for all method comparisons.
Figure 3.
ROC curves for Stage 1 on HAI 21.03 and HAI 23.05. The lower AUROC on HAI 23.05 reflects the harder attack set in this version. (a) ROC curve for Stage 1 on HAI 21.03 (last 30%, AUROC = 0.9236). (b) ROC curve for Stage 1 on HAI 23.05 (last 30%, AUROC = 0.8371).
For HAI 23.05 (last 30%, 85,320 rows), Stage 1 achieves PA-F1 = 0.9210, eTaPR-F1 = 0.2718 (eTaP = 0.3810, eTaR = 0.2112), and AUROC = 0.8371. Fifteen out of 17 attack windows are detected. Score distributions for both datasets are depicted in Figure 4 and Figure 5. HAI 21.03 displays a bimodal distribution with clear separation, whereas HAI 23.05 exhibits heavily overlapping distributions concentrated in the 0.3 to 0.6 range.
Figure 4.
Anomaly score distributions for HAI 21.03. Normal (blue) is concentrated below 0.3; attack (orange) has a distinct right tail above 0.4, yielding good score separation.
Figure 5.
Anomaly score distributions for HAI 23.05. Both distributions concentrate in 0.3–0.6, with substantial overlap. The reduced separation directly explains the lower AUROC (0.837) and the marginal detection patterns observed in Section 7.1.
A direct comparison with HAICon 2020 results is not feasible because the competition used HAI 20.07 rather than HAI 21.03. Several recent studies have reported pointwise F1 on HAI 23.05 [21,23,26], with results ranging from F1 = 0.267 [23] to 0.783 [21]; the latter was obtained on the smaller, less challenging Test 1 subset, whereas the same model achieved F1 = 0.414 on Test 2. However, none report PA-F1 or eTaPR on either HAI version. The PA-F1 and eTaPR values reported throughout this work, therefore, constitute the first such evaluation on both HAI 21.03 and HAI 23.05.
5.3. Deep-Learning Baselines
To provide context for the physics-informed approach, five deep-learning architectures were evaluated on HAI 23.05: an LSTM autoencoder, a GDN-style graph neural network under three graph configurations, and USAD. ConvBiLSTM-AE and TranAD, re-implemented from published descriptions, complete the baseline set. Table 4 presents a comprehensive comparison of all methods.
Table 4.
Comprehensive comparison of all methods. HAI 23.05 results are on the last 30% of the test set. HAI 21.03 Stage 1 is evaluated on the entire test set. ConvBiLSTM-AE and TranAD are external baselines re-implemented and evaluated on the same split and metric protocol as the other methods.
5.3.1. LSTM Autoencoder
A standard LSTM autoencoder with an encoder-decoder architecture was trained on the normal-only training windows from HAI 23.05. The reconstruction error at test time was used as the anomaly score. The model achieved PA-F1 = 0.6135, F1 = 0.5775 (precision 0.8765, recall 0.4719), and AUROC = 0.7721.
5.3.2. Graph Neural Networks
A GDN-style graph neural network [13] was trained under three graph configurations:
- Hand-coded topology: Edges encode known physical connections among the 86 SCADA sensors (P1 → P2, P2 → P3, etc.). PA-F1 = 0.6385, F1 = 0.3344, AUROC = 0.6966.
- Learned graph: Edges are learned from the training data rather than taken from the fixed plant or communication topology. PA-F1 = 0.6890, F1 = 0.5164, AUROC = 0.7460.
- DCS ground-truth graph: Edges are taken directly from the DCS data-flow JSON files distributed with HAI 23.05, which encode communication paths between OPC-UA nodes. PA-F1 = 0.5705, F1 = 0.0376, AUROC = 0.5256.
The DCS graph represents data-flow communication rather than physical causation. Among the 212 OPC-UA nodes in the DCS graph, 152 report constant values throughout both training and testing. Including these nodes in message-passing dilutes the signal from the 60 dynamic sensors. The near-random AUROC of 0.5256 indicates that the DCS graph introduces a detrimental inductive bias. In contrast, the learned graph disregards topology and achieves the best GNN result (PA-F1 = 0.6890), although this remains below the performance of the physics-informed Stage 1.
For reproducibility, the three graph configurations share an identical model and training schedule. Each node carries four input features: the raw value, a rolling z-score over a 30-step window, the first-order difference, and the setpoint deviation. The graph attention encoder uses two GATv2 layers with eight heads, hidden dimension 64, and a 16-dimensional edge-type embedding (dropout 0.2); a temporal convolutional encoder with four residual blocks (kernel size 3, dilations ) and multi-head temporal attention (four heads) over a 60-step window summarizes the temporal dimension before a detection head. Training uses the Adam optimizer with a learning rate of : a 10-epoch pretraining phase on the normal training data, followed by 50 epochs of fine-tuning on the first 70% of the test split with early stopping (patience 5) and a fixed random seed of 42.
Feng et al. [25] evaluated a hierarchical GNN on HAI 23.05 using a topology-derived graph. Table 1 summarizes how that construction differs from the data-flow graph used here and from the present feature-based approach.
5.4. USAD Feature Decomposition
To isolate the contribution of physics features from model architecture, USAD [5] was trained on two input representations: 86 raw SCADA channels and 41 physics features. USAD applied to raw SCADA data achieved a PA-F1 of 0.6687, which is comparable to the LSTM autoencoder (0.6135) and the learned-graph GNN (0.6890). Adding ConvBiLSTM-AE (PA-F1 = 0.6689) and TranAD (PA-F1 = 0.6838), re-implemented and evaluated on the same split, confirms that all seven raw-data architectures fall at or below PA-F1 = 0.69. ConvBiLSTM-AE detects only 3 of 17 attack windows; TranAD detects 4 of 17. In contrast, the physics-informed Isolation Forest detects 15 of 17. When using physics features, USAD achieves a PA-F1 of 0.7343, representing a 6.6-point improvement attributable solely to the features. The Isolation Forest applied to the same features achieves 0.9210, a further 18.7-point improvement. Across all seven raw-data architectures (Table 4), PA-F1 does not exceed 0.69, whereas training USAD on physics features alone raises performance to 0.7343. These results demonstrate that physics features provide a transferable advantage independent of the downstream model, and that the Isolation Forest is particularly well suited to the point-anomaly structure of the engineered feature space.
5.5. Ablation Study
Table 5 presents the impact of excluding feature groups from the Stage 1 Isolation Forest on HAI 23.05.
Table 5.
Ablation study on HAI 23.05 (eval = last 30%). Each row re-trains the Isolation Forest from scratch on the reduced feature set.
Four key findings are identified. First, the watchdog features contribute 2.2 PA-F1 points and 3.9 AUROC points, indicating that HAIEnd channels provide a complementary detection signal independent of the SCADA features. Second, valve-mismatch derivatives are not essential; removing all 7 results in a loss of only 0.6 PA-F1 points, with negligible impact on AUROC. Third, the minimal feature set, consisting of tracking error and sensor liveness only (14 features), reduces the window detection rate from 15 out of 17 to 8 out of 17. This demonstrates that valve-mismatch and cross-loop correlations provide essential information for detecting a substantial fraction of attacks. Fourth, removing features increases eTaPR: Full = 0.2718, No watchdog = 0.3008, Minimal = 0.3320. Excluding cross-loop features (38 features) reduces PA-F1 by only 0.76 pp, while increasing eTaPR by 5.3 pp to 0.3249. This outcome reflects a structural property of the PA point-adjustment rule: additional features produce broader but shallower detections, flagging at least one timestep in more windows (raising PA-F1) while reducing per-window coverage (lowering eTaPR). The resulting tension between detection breadth and detection depth means that practitioners selecting PA-F1 or eTaPR as their optimization objective will make different feature engineering choices. Figure 6 illustrates this inverse relationship.
Figure 6.
Ablation results on HAI 23.05 for five configurations (Full, No watchdog, No cross-loop, No vm_deriv, Minimal). PA-F1 (blue) decreases as features are removed, while eTaPR (orange) increases, revealing a tension between the breadth and depth of detection.
6. Two-Stage Cascade Detection
Stage 1 efficiently generates a per-timestep anomaly score using instantaneous feature vectors, but it does not account for temporal waveform shape. Stage 2 re-scores each region flagged by Stage 1 using a bidirectional GRU on 30-s sequences, providing temporal context for datasets where attacks cause sustained deviations. Figure 7 depicts the cascade detection architecture.
Figure 7.
Overview of the two-stage cascade architecture. Stage 1 extracts physics-informed features from PID control-loop signals and scores each timestep using an Isolation Forest combined with a maximum z-score. The S1 gate threshold is set to the highest value such that every training attack window has at least one timestep exceeding it, guaranteeing 100% window recall during training. Flagged timesteps are passed to Stage 2, where a bidirectional GRU operates on 30-s windows of combined physics and raw SCADA signals. Stage 2 makes an independent binary decision; the S1 score is not used after gating.
6.1. Architecture
Stage 1 serves as a high-recall screening gate. The S1 cascade threshold is set to the highest value such that every attack window in the training portion (the first 70% of the test data) has at least one timestep above the threshold. This ensures 100% window recall during training while minimizing the number of timesteps sent to Stage 2.
For HAI 21.03, the weakest training window has a maximum S1 score of 0.283, resulting in a gate threshold of 0.282 and flagging 3.0% of evaluation timesteps. For HAI 23.05, the weakest window scores 0.388, resulting in a gate of 0.387 and flagging 9.3%.
Stage 2 processes only flagged timesteps and makes an independent binary decision. The S1 score is not used after gating; Stage 2’s binary threshold alone determines the output. This separation ensures Stage 1 screens and Stage 2 classifies.
The Stage 2 model is a bidirectional GRU with two layers and a hidden dimension of 48 (approximately 80,000 parameters). It receives a 30-s window of combined physics features and raw SCADA signals. A window is classified as anomalous if the maximum GRU output score within the window exceeds the threshold .
Stage 2 is trained on windows from the first 70% of the test set. Each flagged timestep in the training portion generates a 30-s window centered on it, labeled by the ground-truth attack annotation at the center. This approach makes the cascade semi-supervised, as Stage 2 requires labeled attack data from the test set.
6.2. Stage 2 Threshold Selection
The Stage 2 binary threshold is selected by sweeping in 50 steps and choosing the value that maximizes PA-F1 on the evaluation split. We acknowledge that this approach optimizes and evaluates using the same data. The multiseed analysis (Section 6.4) characterizes the resulting variance. Please note that Stage 1 is the unsupervised deployable detector, whereas Stage 2 is a semi-supervised refinement trained on labeled attack windows; the cascade results should therefore be interpreted as diagnostic rather than as an independent generalization estimate.
6.3. Cascade Results
Table 6 summarizes the Stage 1-to-cascade comparison for both datasets.
Table 6.
Cascade detection results (binary S2 threshold, constraint-based S1 gate). All values are on the last 30% evaluation split. S2 thr. shows the threshold selected by the sweep; eTaP = 0.638/0.846/0.381/0.291 and eTaR = 0.737/0.738/0.211/0.270 for the four rows, respectively.
On HAI 21.03, the GRU cascade increases PA-F1 from 0.8913 to 0.9722 (+8.1 pp) and eTaPR from 0.6840 to 0.7881 (+10.4 pp), while maintaining 15/15 window recall. The S2 threshold of 0.78 shows that the GRU produces well-separated scores for attacks compared to normal data on this dataset.
On HAI 23.05, the cascade reduces PA-F1 from 0.9210 to 0.8823 (−3.9 pp) and detects one fewer window (14/17 compared to 15/17). The optimizer selects an S2 threshold of 0.05, the minimum of the sweep range, indicating that the GRU produces scores indistinguishable from noise. The model did not learn useful patterns for brief-perturbation attacks.
The contrast between the two datasets has a single underlying cause. The GRU operates on 30-s windows, so it benefits when the anomalous signal persists across most of a window and is harmed when the signal occupies only a few timesteps. On HAI 21.03, the attacks produce sustained deviations, the within-window signal-to-noise ratio is high, and the learned threshold settles at 0.78, which is a confident, well-separated operating point. On HAI 23.05, the attacks are brief perturbations (median Stage 1 coverage 5%), so averaging over a 30-s window dilutes the transient, the GRU’s scores collapse toward the normal range, and the threshold sweep is driven to the floor of 0.05, accepting almost everything. The instability across seeds (Section 6.4) is the signature of this degenerate regime: with no separable signal, the optimal threshold is essentially arbitrary from seed to seed. The MLP variant, which classifies each timestep independently and so avoids window averaging, confirms the mechanism; it recovers some within-window coverage on HAI 23.05 but still cannot separate the brief excursions from the normal tail (Section 6.5).
Figure 8.
Detection timeline for HAI 21.03 (evaluation split, ≈120 K timesteps). (Top) anomaly score with threshold line. (Middle) true and predicted labels. (Bottom) TP/FP/FN color map. Attack spikes are clearly resolved; false positives cluster near attack boundaries.
Figure 9.
Detection timeline for HAI 23.05 (evaluation split, ≈85 K timesteps). The baseline score is elevated (0.35–0.45) relative to HAI 21.03, making threshold selection harder. The 2052-s Window 11 (near timestep 50,000–60,000) is clearly detected; missed windows appear as false-negative bars.
6.4. Multiseed Variance Analysis
Re-training Stage 2 with five random seeds on HAI 23.05 yields a mean PA-F1 of 0.8530 ± 0.0307 and an average of 12.4 ± 1.0 windows detected out of 17. In comparison, Stage 1 alone achieves a PA-F1 of 0.9210 and detects 15 out of 17 windows. All seeds result in PA-F1 scores lower than Stage 1 alone, indicating that the cascade consistently degrades detection performance on this dataset. The variance is substantial: PA-F1 ranges from 0.8068 (seed 7) to 0.8863 (seed 999), and the number of windows detected ranges from 11 to 14. Seed 2024 selects an S2 threshold of 0.88, rejecting nearly all GRU outputs, while seed 42 selects 0.05, accepting nearly all outputs. These extremes suggest that the GRU’s scores do not provide a reliable discriminative signal.
This instability contrasts with HAI 21.03, where the cascade consistently achieves PA-F1 > 0.97 and detects all 15 windows across seeds. The increased variance observed on HAI 23.05 results directly from the binary S2 threshold design. When Stage 2 is required to make decisions independently, without stabilization from Stage 1’s score, the GRU’s limitations in learning brief-perturbation patterns become fully apparent.
Table 7 presents per-window S1 versus cascade coverage on HAI 23.05 (seed 42). The cascade substantially increases coverage for Windows 0 (5.7% → 98.6%), 4 (5.9% → 42.9%), and 8 (0.6% → 36.1%). In contrast, coverage for Window 10 decreases from 26.0% to 0.6%, although it is still counted as detected under PA-F1. Window 14 is not detected: S1 marginally triggers it (0.8%), but the maximum S2 score reaches only 0.004, which is well below the 0.05 threshold. Windows 7 and 13 are not detected by either stage.
Table 7.
Per-window detection coverage for Stage 1 vs. GRU cascade on HAI 23.05 (last 30%, seed 42, S2 thresh = 0.05). Det% is the fraction of attack-window timesteps exceeding the threshold; S2 max is the GRU’s peak score for that window. A window is marked ✓ when its Det% is at least 10%, marginal when its Det% is positive but below 10%, and missed when its Det% is zero. Windows 7 and 13 are missed by both stages. Window 14 is lost by the cascade (S2 max = 0.004, below threshold) despite being marginally triggered by S1.
6.5. Why the Cascade Fails on HAI 23.05
The cascade’s failure on HAI 23.05 is, in our view, a result worth reporting in its own right: it delimits when temporal refinement is and is not appropriate for ICS anomaly detection. This subsection consolidates that analysis. To assess whether the cascade failure arises from architectural limitations or fundamental issues, three additional Stage 2 designs were evaluated on HAI 23.05, supplementing the GRU cascade analysis in Section 6.3. A three-layer MLP (71→64→32→1, 6721 parameters) classifies each flagged timestep independently, thereby avoiding the 30-s window dilution that limits the GRU. The MLP achieves a PA-F1 of 0.8761 (4.5 pp lower than S1) and an eTaPR of 0.3374 (6.6 pp higher than S1). While the MLP improves within-window coverage for specific attacks (Window 0: 5.7% to 46.7%), it reduces PA-F1 by losing Window 10 entirely (S1 26.0% to MLP 0.0%) and fails to recover the two missed windows (7 and 13). As shown in Table 8, the MLP trades PA-F1 for eTaPR relative to Stage 1: it improves within-window coverage for some attacks but loses Window 10 entirely and still fails to recover the two undetectable windows (7 and 13). On HAI 21.03, the MLP achieves a PA-F1 of 0.9622 (1.0 pp lower than the GRU) and loses one window (14/15), which confirms the GRU’s advantage in temporal context for sustained attacks. Table 8 summarizes all Stage 2 comparisons.
Table 8.
Stage 2 architecture comparison on both datasets. S1 alone is the upper bound on HAI 23.05; every Stage 2 variant falls below it.
Minimum segment duration filters (2 and 3 s) and temporal extension (+15 and 30 s) were evaluated. Applying a minimum duration filter removes both true detections and false positives, as both are 1-s events in HAI 23.05. For example, setting min_dur ≥ 2 reduces the number of windows from 15/17 to 9/17, while increasing eTaPR from 0.2718 to 0.3200. Temporal extension increases within-window coverage but also raises the FPR, decreasing PA-F1 from 0.9210 to 0.7404 (a reduction of 18.1 pp) for only a 2.8 pp gain in eTaPR. No post-processing configuration improves both metrics simultaneously on HAI 23.05.
An independent detector flags timesteps when at least N features simultaneously exceed from their training mean. When combined with S1 using a logical OR operation, the co-occurrence method recovers both previously missed windows (7 and 13) at and , but this results in a 35.1% FPR. The strictest configuration that detects all 17 windows (, ) requires an FPR of 5.39%, which is 8 times higher than S1’s 0.66%. The optimal configuration that preserves 15 out of 17 windows (, ) achieves PA-F1 = 0.8948 and eTaPR = 0.2980 at a 1.00% FPR, representing a marginal eTaPR improvement of 2.6 pp at the cost of a 2.6 pp decrease in PA-F1.
The results of four experiments: GRU cascade (mean PA-F1 0.8530 ± 0.0307 across five seeds), pointwise MLP (PA-F1 0.8761), post-processing (best PA-F1 0.7741 at 9 of 17 windows), and co-occurrence (17 of 17 only at 5–35% FPR), indicate that S1’s detection ceiling of 15 out of 17 on HAI 23.05 is an inherent limitation of the attack design. These attacks generate brief perturbations (median S1 coverage 5%) that are individually detectable using a tuned threshold, yet cannot be reliably distinguished from normal tail behavior by either learned classifiers or rule-based filters.
Rather than indicating a weakness of the proposed framework, this result shows that temporal refinement is attack-pattern dependent. When attacks produce sustained deviations, as in HAI 21.03, the GRU improves both PA-F1 and eTaPR. When attacks appear as brief perturbations, as in HAI 23.05, temporal smoothing may dilute the anomaly signal and reduce window-level recall.
7. Error Analysis
Aggregate metrics reduce the distribution of detection outcomes to a single value. Two detectors may exhibit identical PA-F1 scores yet differ significantly in the specific attacks they fail to detect and the underlying reasons. This analysis considers three distinct failure modes: missed attacks, marginal detections, and false positives, as each arises from a different root cause and suggests a unique remedy. HAI 23.05 presents a more comprehensive set of failures and is therefore subjected to a more detailed analysis.
7.1. HAI 23.05: Missed Attacks and Marginal Detections
Table 9 presents per-window detection statistics for Stage 1 on HAI 23.05. Of the 15 detected windows, 10 have fewer than 10% of their timesteps above the threshold (median coverage: 5%), in contrast to a median of 53% on HAI 21.03. Notably, the following two windows are not detected at all:
Table 9.
Per-window detection statistics for Stage 1 on HAI 23.05 evaluation split (last 30%, 17 windows). Det% is the fraction of attack-window timesteps that exceed the threshold (). Windows with Det% < 10 are not recalled by eTaPR ().
- Window 7 (116 s, maximum score 0.395 compared to threshold 0.496): In this case, the attack maintains process variables within their normal operating envelope. The maximum feature deviation across all 41 channels is approximately 2.5 from the normal mean, which is insufficient to elevate the Isolation-Forest score above the threshold. This attack is therefore classified as currently undetectable with the present feature set.
- Window 13 (87 s, maximum score 0.416 compared to threshold 0.496): In this scenario, the attack enforces near-perfect valve tracking, resulting in the valve-mismatch feature approaching zero. The most significant feature activations occur after the attack concludes; the recovery transient is more detectable than the attack itself. Consequently, no S1 score exceeds the threshold during the attack window. Neither S1 nor any S2 variant detects this window (GRU S2 maximum = 0.002; MLP S2 maximum also remains below the threshold).
This disparity in per-window coverage directly accounts for the substantial eTaPR gap between HAI 21.03 and HAI 23.05 (Section 8).
7.2. HAI 21.03: Window-Level Analysis
In the full test split, Stage 1 detects 48 out of 50 attack windows. In the evaluation split, all 15 attack windows are detected. Window 11 (241 s) is classified as marginal: its maximum score is 0.429, which exceeds the threshold by less than 0.001, and only 0.4% of its timesteps surpass the threshold, resulting in a single threshold crossing. The PA-F1 metric fully credits this detection, whereas eTaPR does not.
The median detection coverage on HAI 21.03 is approximately 53%, with 12 windows exhibiting coverage above 30%. This accounts for the smaller gap between PA-F1 and eTaPR on HAI 21.03 (0.8945 vs. 0.6347) compared to HAI 23.05 (0.9210 vs. 0.2718). On average, attacks in HAI 21.03 are easier to sustain above the threshold once triggered.
7.3. False-Positive Analysis
In the HAI 21.03 evaluation split, Stage 1 generates 687 false positives out of 117,784 normal timesteps (FPR = 0.58%). Of these false positives, 60.1% occur within 120 s of an attack boundary, indicating that most are transition artifacts rather than spurious alarms. The median duration of false-positive segments is 1 s, with a maximum of 108 s.
For HAI 23.05, Stage 1 generates 533 false positives among 80,828 normal timesteps (FPR = 0.66%). Only 34.7% of these occur near attack boundaries, a lower proportion than observed in HAI 21.03. This finding suggests that false positives in HAI 23.05 are more evenly distributed throughout the normal operating period. The median segment duration remains 1 s, while the maximum duration increases to 222 s.
Both false-positive rates are below 1%, and the median segment duration of 1 s indicates that most false alarms would be filtered by any practical alert aggregation window.
8. Discussion
The main contribution of this work is two-fold: first, it demonstrates that physics-informed control-loop features provide a strong and transferable detection signal; second, it shows that the usefulness of temporal cascade refinement depends strongly on attack duration, detection coverage, and the selected evaluation metric.
8.1. Domain Knowledge vs. Architectural Complexity
As shown in Section 5.4, physics-informed features provide a 6.6 pp improvement over raw SCADA when applied to the same USAD architecture, and the Isolation Forest adds a further 18.7 pp. With seven raw-data architectures all falling at or below PA-F1 = 0.69 (Table 4), the performance gap is attributable to the features rather than the classifier.
Stage 1, which utilizes 34 to 41 features with the Isolation Forest (training time approximately 51 s on CPU), achieves a PA-F1 score of 0.9210 on HAI 23.05. In comparison, the best GNN baseline (learned graph, approximately 20 min on GPU) achieves a score of 0.6890. The observed improvement is primarily attributable to the engineered features rather than the classifier. By encoding the expected behavior of control loops, feature engineering enables structural anomaly detection at the feature level, thereby reducing the complexity required of the downstream model.
For context, Lee et al. [21] reported F1 = 0.783 with a ConvBiLSTM-AE on the Test 1 subset of HAI 23.05 (54,000 samples, simpler attacks). On the larger and more challenging Test 2 subset (230,400 samples), the same model achieves F1 = 0.414. Re-implementing ConvBiLSTM-AE on our evaluation split yields PA-F1 = 0.6689 and F1 = 0.2548, detecting only 3 of 17 attack windows. The physics-informed Isolation Forest achieves a pointwise F1 of 0.5731 on the same split (Table 3), with PA-F1 = 0.9210 and 15 of 17 windows detected. Although the evaluation splits differ from those used by Lee et al., the controlled comparison on our split confirms that physics-informed features outperform deep autoencoder architectures under identical conditions. The gap in window-level detection (15 vs. 3) is particularly notable, as it indicates that raw-data autoencoders fail to trigger on the majority of HAI 23.05 attacks.
8.2. Detection Ceiling
The effectiveness of supplementary features in surpassing S1’s 15 out of 17 detection ceiling on HAI 23.05 was evaluated. Twenty-five per-signal feature variants, including S1 score derivatives, exceedance counts, watchdog state changes, long-horizon deviations, and inverse sensor liveness, as well as eleven global features such as PCA reconstruction error, Mahalanobis distance, correlation matrix deviation, feature energy, and rank disruption, were assessed. Three features (inverse liveness on P1-FC, P1-LC, and P2-SC) were able to detect the previously missed windows above the 99th percentile of normal. However, combining these features with S1 reduced PA-F1 by 5.1 pp. Incorporating PCA reconstruction error and exceedance count as features within the Isolation Forest further degraded detection performance (from 48 to 46 windows on HAI 21.03 and from 15 to 13 on evaluation), as the algorithm’s random feature sampling allocated splits to noisy new features, thereby diluting the signal from the original strong features. These results indicate that 15 out of 17 is the practical detection ceiling given the current feature representation.
8.3. Cascade Effectiveness and Attack Duration
The cascade results (Section 6) reveal a clear dependence on attack duration.
Waveform analysis identifies three distinct attack morphologies on HAI 23.05: (1) boundary-dominated attacks, characterized by the strongest signal at onset or recovery transients (Window 8: undetectable for 150 s, then spiking to at the boundary); (2) delayed-response attacks, where system recovery is more detectable than the attack itself (Window 13: the most prominent features occur after the attack concludes); and (3) within-envelope attacks, which produce deviations that are indistinguishable from normal operational variability (Window 7: three features at 2–2.5, consistent with baseline operation).
8.4. PA-F1 vs. eTaPR Tension
The ablation study demonstrates a consistent inverse relationship between feature count and eTaPR. The Full configuration, utilizing 41 features, achieves the highest PA-F1 score (0.9210) but the lowest eTaPR (0.2718). Excluding cross-loop features (resulting in 38 features) reduces PA-F1 by only 0.76 pp, while increasing eTaPR by 5.3 pp to 0.3249. The Minimal configuration, with 14 features, attains an eTaPR of 0.3320 despite a lower PA-F1 of 0.7674. This trend occurs because the PA point-adjustment rule credits an entire attack window when any single timestep is detected. Consequently, configurations with more features yield broader, less persistent detections that PA-F1 rewards but eTaPR penalizes.
For HAI 23.05, ten out of fifteen detected windows exhibit coverage below 10%, with none exceeding 6%. Although the alarm triggers at the correct time, detection lacks persistence. Optimizing for eTaPR rather than PA-F1 would likely improve detection persistence. Architectures that explicitly model the anomalous state over time, such as hidden Markov models, state-space models, or transformer encoders applied over extended horizons, are expected to achieve higher eTaPR scores on HAI 23.05.
From an operational standpoint, the two metrics answer different questions, and the gap on HAI 23.05 has a concrete interpretation. PA-F1 measures whether an attack is noticed at all: a single correct alarm within a window is enough to raise an operator alert, dispatch an investigation, or trigger an automated interlock, and on this benchmark Stage 1 raises such an alert for 15 of 17 attacks. eTaPR measures how much of the attack the detector sustains visibility over, which matters for forensic scoping, for automatically bounding the affected time interval, and for control actions that require persistent confirmation before acting. The low eTaPR on HAI 23.05, therefore, does not mean the attacks are missed; it means that, once flagged, the alarm is not maintained across the full episode, so the detector is well suited to triggering human or supervisory response but poorly suited to unattended, duration-sensitive automation. For brief-perturbation attacks, which are the dominant regime in HAI 23.05 with a median detected coverage of 5%, a momentary alarm is arguably the appropriate granularity, since the physical excursion itself is brief. Where sustained visibility is required, the eTaPR-oriented directions noted above (state-duration models and longer-horizon encoders) are the appropriate remedy, and we identify this as the main limitation of the present detector for closed-loop deployment.
8.5. Generalizability and Deployment
The same pipeline, without dataset-specific tuning, achieves a Stage 1 PA-F1 score of 0.89 to 0.92 across two structurally distinct releases of the HAI testbed. We frame this as evidence of robustness across versions of a single testbed family rather than as cross-domain generality: all results are obtained on HAI, and the PID-template formulation, while in principle applicable to any instrumented loop, has not been validated on structurally different benchmarks such as SWaT or WADI. Establishing cross-testbed generalization is a distinct undertaking that we leave to future work. Stage 1 operates in real time on a CPU, requiring 51 s for training and less than 1 millisecond per timestep during inference. Stage 2 introduces approximately 80,000 additional parameters and processes only 3–9.3% of the timesteps identified by Stage 1, which enables practical deployment on edge hardware.
The approach assumes that, for each monitored loop, the controller setpoint and the actuator command (and, where present, valve feedback) are observable in the recorded stream, in addition to the process variable. This assumption holds for the HAI testbed and for modern DCS deployments that log controller I/O, and it is the same observability condition made explicit in the threat model (Section 3.2). It does not always hold: in legacy installations, the setpoint and actuator signals may not be archived at the DCS or may be inaccessible to the monitoring layer. Where only sensor signals are available, the per-loop tracking-error and valve-mismatch features cannot be formed, and the method reduces to the sensor-liveness and cross-loop correlation features alone (a 5–10-dimensional vector whose detection power we have not characterized here). Quantifying the degradation under partial observability is left to future work.
9. Conclusions
This paper introduced a physics-informed anomaly-detection framework for ICS and evaluated it on two versions of the HAI benchmark. Physics-informed PID features let a simple Isolation Forest outperform all seven deep-learning baselines on HAI 23.05 by at least 23 PA-F1 points, and a controlled USAD experiment attributed the advantage to the features rather than the model. The broader lesson is that for ICS anomaly detection, encoding known control-loop physics as features yields a larger and more reliable gain than increasing model capacity does. A bidirectional GRU cascade provided substantial improvement on HAI 21.03 (PA-F1 = 0.9722, eTaPR = 0.7881), but consistently reduced detection performance on HAI 23.05 (mean PA-F1 = 0.8530 ± 0.0307 across five seeds, compared to S1’s 0.9210). Four alternative Stage 2 approaches: GRU, MLP, post-processing, and co-occurrence, did not surpass the standalone Isolation Forest on HAI 23.05. Feature augmentation experiments involving 36 variants indicated that 15 out of 17 is the detection ceiling for the current feature representation. These results indicate that the effectiveness of multi-stage detection depends on the temporal characteristics of the anticipated attack profile, a design consideration not addressed in the current ICS anomaly-detection literature. The physics-informed Stage 1 detector is the primary deployable component of the framework. The Stage 2 cascade provides additional value when attacks generate sustained temporal deviations, but it is not universally advantageous, particularly for brief-perturbation attacks such as those observed in HAI 23.05.
Future research will pursue three directions: (i) training with an eTaPR objective to enhance detection persistence within windows; (ii) evaluation on HAI 22.04, which presents approximately four times greater difficulty than HAI 21.03; and (iii) integration of physics-informed features with attention-based architectures to jointly model physical invariants and long-range temporal dependencies.
Author Contributions
Conceptualization, K.C. and H.N.N.; methodology, K.C.; software, K.C.; validation, K.C. and H.N.N.; formal analysis, K.C. and H.N.N.; writing—original draft preparation, K.C.; writing—review and editing, K.C. and H.N.N.; visualization, K.C. and H.N.N. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The HAI Security Dataset is publicly available at https://github.com/icsdataset/hai, accessed on 23 May 2026. All information required to reproduce the reported results is provided in the manuscript: the feature definitions are given in Section 4, the Isolation-Forest configuration (200 trees, contamination ) in Section 5.2, and the exact evaluation protocol in Section 3.5. For HAI 23.05, the evaluation split is the last 30% of the concatenated test set (split index 199,080) with detection threshold , and for HAI 21.03, the full test set is used with , with the 70/30 cascade split at index 281,403.
Conflicts of Interest
The authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| ICS | Industrial Control System |
| DCS | Distributed Control System |
| PID | Proportional–Integral–Derivative |
| HAI | HIL-based Augmented ICS |
| pp | Percentage Points |
| HIL | Hardware-in-the-Loop |
| GRU | Gated Recurrent Unit |
| MLP | Multilayer Perceptron |
| GNN | Graph Neural Network |
| LSTM | Long Short-Term Memory |
| USAD | UnSupervised Anomaly Detection |
| PA-F1 | Point-Adjust F1 score |
| eTaPR | Enhanced Time-series aware Precision and Recall |
| AUROC | Area Under the Receiver Operating Characteristic curve |
| FPR | False-Positive Rate |
| SCADA | Supervisory Control and Data Acquisition |
References
- Tushkanova, O.; Levshun, D.; Branitskiy, A.; Fedorchenko, E.; Novikova, E.; Kotenko, I. Detection of Cyberattacks and Anomalies in Cyber-Physical Systems: Approaches, Data Sources, Evaluation. IEEE Access 2023, 11, 85. [Google Scholar] [CrossRef] [Scilit]
- Shin, H.K.; Lee, W.; Yun, J.H.; Min, B.G. Two ICS Security Datasets and Anomaly Detection Contest on the HIL-based Augmented ICS Testbed. In Proceedings of the 14th USENIX Workshop on Cyber Security Experimentation and Test (CSET 21), Virtual Event, 9 August 2021. [Google Scholar]
- Shin, H.K.; Lee, W.; Yun, J.H.; Kim, H. HAI 1.0: HIL-based Augmented ICS Security Dataset. In Proceedings of the 13th USENIX Workshop on Cyber Security Experimentation and Test (CSET 20), Boston, MA, USA, 10 August 2020. [Google Scholar]
- Li, D.; Chen, D.; Jin, B.; Shi, L.; Goh, J.; Ng, S.K. MAD-GAN: Multivariate Anomaly Detection for Time Series Data with Generative Adversarial Networks. In Proceedings of the Artificial Neural Networks and Machine Learning—ICANN 2019: Text and Time Series; Springer: Cham, Switzerland, 2019; pp. 703–716. [Google Scholar]
- Audibert, J.; Michiardi, P.; Guyard, F.; Marti, S.; Zuluaga, M.A. USAD: UnSupervised Anomaly Detection on Multivariate Time Series. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, San Diego, CA, USA, 6–10 July 2020. [Google Scholar] [CrossRef] [Scilit]
- Tuli, S.; Casale, G.; Jennings, N.R. TranAD: Deep transformer networks for anomaly detection in multivariate time series data. Proc. VLDB Endow. 2022, 15, 1201–1214. [Google Scholar] [CrossRef] [Scilit]
- Hundman, K.; Constantinou, V.; Laporte, C.; Colwell, I.; Soderstrom, T. Detecting Spacecraft Anomalies Using LSTMs and Nonparametric Dynamic Thresholding. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, London, UK, 19–23 August 2018; pp. 387–395. [Google Scholar]
- Su, Y.; Zhao, Y.; Niu, C.; Liu, R.; Sun, W.; Pei, D. Robust Anomaly Detection for Multivariate Time Series through Stochastic Recurrent Neural Network. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining; ACM: New York, NY, USA, 2019. [Google Scholar] [CrossRef] [Scilit]
- Xu, J.; Wu, H.; Wang, J.; Long, M. Anomaly Transformer: Time Series Anomaly Detection with Association Discrepancy. In Proceedings of the International Conference on Learning Representations, Virtual, 25–29 April 2022. [Google Scholar]
- Xu, H.; Chen, W.; Zhao, N.; Li, Z.; Bu, J.; Li, Z.; Liu, Y.; Zhao, Y.; Pei, D.; Feng, Y.; et al. Unsupervised Anomaly Detection via Variational Auto-Encoder for Seasonal KPIs in Web Applications. In Proceedings of the 2018 World Wide Web Conference, Republic and Canton of Geneva, CHE, Lyon, France, 23–27 April 2018; WWW ’18. pp. 187–196. [Google Scholar] [CrossRef] [Scilit]
- Kim, B.; Alawami, M.A.; Kim, E.; Oh, S.; Park, J.; Kim, H. A Comparative Study of Time Series Anomaly Detection Models for Industrial Control Systems. Sensors 2023, 23, 1310. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Hwang, W.S.; Yun, J.H.; Kim, J.; Min, B.G. Do You Know Existing Accuracy Metrics Overrate Time-Series Anomaly Detections? In Proceedings of the 37th ACM/SIGAPP Symposium on Applied Computing; ACM: New York, NY, USA, 2022. [Google Scholar] [CrossRef] [Scilit]
- Deng, A.; Hooi, B. Graph Neural Network-Based Anomaly Detection in Multivariate Time Series. Proc. AAAI Conf. Artif. Intell. 2021, 35, 4027–4035. [Google Scholar] [CrossRef] [Scilit]
- Zhao, H.; Wang, Y.; Duan, J.; Huang, C.; Cao, D.; Tong, Y.; Xu, B.; Bai, J.; Tong, J.; Zhang, Q. Multivariate Time-Series Anomaly Detection via Graph Attention Network. In Proceedings of the 2020 IEEE International Conference on Data Mining (ICDM); IEEE: New York, NY, USA, 2020; pp. 841–850. [Google Scholar] [CrossRef] [Scilit]
- Li, Z.; Zhao, Y.; Han, J.; Su, Y.; Jiao, R.; Wen, X.; Pei, D. Multivariate Time Series Anomaly Detection and Interpretation using Hierarchical Inter-Metric and Temporal Embedding. In Proceedings of the 27th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining; ACM: New York, NY, USA, 2021; pp. 3220–3230. [Google Scholar]
- Adepu, S.; Mathur, A. Using Process Invariants to Detect Cyber Attacks on a Water Treatment System. In Proceedings of the ICT Systems Security and Privacy Protection (SEC 2016); Springer: Cham, Switzerland, 2016; Volume 471, IFIP Advances in Information and Communication Technology. [Google Scholar]
- Mathur, A.P.; Tippenhauer, N.O. SWaT: A Water Treatment Testbed for Research and Training on ICS Security. In Proceedings of the 2016 International Workshop on Cyber-physical Systems for Smart Water Networks (CySWater), Vienna, Austria, 11 April 2016. [Google Scholar] [CrossRef] [Scilit]
- Goh, J.; Adepu, S.; Junejo, K.N.; Mathur, A. A Dataset to Support Research in the Design of Secure Water Treatment Systems. In Proceedings of the Critical Information Infrastructures Security (CRITIS 2016); Springer: Cham, Switzerland, 2017; Volume 10242, Lecture Notes in Computer Science. [Google Scholar]
- Hwang, W.S.; Yun, J.H.; Kim, J.; Kim, H.C. Time-Series Aware Precision and Recall for Anomaly Detection: Considering Variety of Detection Result and Addressing Ambiguous Labeling. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management; ACM: New York, NY, USA, 2019. [Google Scholar] [CrossRef] [Scilit]
- Kim, S.; Choi, K.; Choi, H.S.; Lee, B.; Yoon, S. Towards a Rigorous Evaluation of Time-Series Anomaly Detection. Proc. AAAI Conf. Artif. Intell. 2022, 36, 7194–7201. [Google Scholar] [CrossRef] [Scilit]
- Lee, B.; Kim, S.; Maqsood, M.; Moon, J.; Rho, S. Advancing Autoencoder Architectures for Enhanced Anomaly Detection in Multivariate Industrial Time Series. Comput. Mater. Contin. 2024, 81, 1275–1300. [Google Scholar] [CrossRef] [Scilit]
- Le, H.A.; Tran, L.D.A.; Hoang, S.H.; Nguyen, T.H. Advanced Machine Learning and Deep Learning Techniques for Anomaly Detection in Industrial Control System. Smart Syst. Devices 2024, 34, 9–16. [Google Scholar] [CrossRef] [Scilit]
- Bukharev, D.A.; Sokolov, A.N. Performance Analysis of the Two-Stage Hybrid Anomaly Detection Model for ICS Subjected to Cyberattacks. In Proceedings of the 2025 International Russian Smart Industry Conference (SmartIndustryCon), Sochi, Russian Federation, 24–28 March 2025; pp. 460–465. [Google Scholar] [CrossRef] [Scilit]
- Kim, K.K.; Kim, J.S.; Euom, I.C. Explainable Anomaly Detection Based on Operational Sequences in Industrial Control Systems. IEEE Access 2025, 13, 66170–66187. [Google Scholar] [CrossRef] [Scilit]
- Feng, N.; Li, J.; Zhao, H.; Zhao, L.; Li, M. Anomaly Detection in Industrial Internet of Things: A Graph Learning Approach with Spatiotemporal Interactions. IEEE Trans. Eng. Manag. 2026, 73, 1753–1768. [Google Scholar] [CrossRef] [Scilit]
- Zhong, H.; Xie, F.; Chantarasathaporn, K.; Xu, Y.; Wang, X.; Ran, Z. Adversarial Robustness Enhancement for Transformer-based Anomaly Detection in Industrial Control Systems. In Proceedings of the 2026 IEEE International Conference on Electrical Engineering and Informatics with Artificial Intelligence (EEICAI), Bangkok, Thailand, 9–11 January 2026; pp. 310–313. [Google Scholar] [CrossRef] [Scilit]
- Potharaju, S.; Tambe, S.N.; Rao, G.M.; Kantipudi, M.V.V.P.; Bamane, K.D.; Bendre, M. Min3GISG: A Synergistic Feature Selection Framework for Industrial Control System Security with the Integrating Genetic Algorithm and Filter Methods. Int. J. Comput. Intell. Syst. 2025, 18, 104. [Google Scholar] [CrossRef] [Scilit]
- Pang, G.; Shen, C.; Cao, L.; Hengel, A.v.d. Deep Learning for Anomaly Detection: A Review. ACM Comput. Surv. 2021, 54, 38. [Google Scholar] [CrossRef] [Scilit]
- Mokhtari, S.; Abbaspour, A.; Yen, K.K.; Sargolzaei, A. A Machine Learning Approach for Anomaly Detection in Industrial Control Systems Based on Measurement Data. Electronics 2021, 10, 407. [Google Scholar] [CrossRef] [Scilit]
- Jeon, S.; Seo, J.T. A Synthetic Time-Series Generation Using a Variational Recurrent Autoencoder with an Attention Mechanism in an Industrial Control System. Sensors 2024, 24, 128. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Kim, K.K.; Euom, I.C. Research on Implementation eXplainable Anomaly Detection Using Artificial Intelligence on Cyber-Physical System. In Proceedings of the Transactions of the Korean Nuclear Society Autumn Meeting, Changwon, Korea, 24–25 October 2024. [Google Scholar]
- Kim, K.K.; Kim, J.S.; Euom, I.C. Research on a Identifying Maliciously Manipulated Measurement Data Based on Characteristics of Cyber-Physical System. In Proceedings of the 2024 IEEE 12th International Conference on Information, Communication and Networks (ICICN), Guilin, China, 21–24 August 2024; pp. 187–192. [Google Scholar] [CrossRef] [Scilit]
- Liu, F.T.; Ting, K.M.; Zhou, Z.H. Isolation Forest. In Proceedings of the 2008 Eighth IEEE International Conference on Data Mining, Pisa, Italy, 15–19 December 2008; pp. 413–422. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.








