arXiv is now an independent nonprofit! Learn more
License: arXiv.org perpetual non-exclusive license
arXiv:2608.23547v1 [cs.CR] 24 Aug 2026

Robustness of Anomaly Detection Models for Industrial Control Systems under Training-Time Data Contamination

Mustafa Umut Ozbek, Taiwo Ojo, Pooria Madani, Khalil El-Khatib, Li Yang Affiliation:  Ontario Tech University, Oshawa, Ontario, Canada
Emails: mustafaumut.ozbek@ontariotechu.net, taiwo.ojo2@ontariotechu.net,
pooria.madani@ontariotechu.ca, khalil.el-khatib@ontariotechu.ca, li.yang@ontariotechu.ca
Abstract

Machine-learning-based anomaly detection is increasingly used in industrial control systems (ICS), yet most studies assume that detector training data is trustworthy. In practice, training data may be corrupted through compromised logs, labeling errors, manipulated historian records, or unsafe retraining processes. This paper evaluates the robustness of offline ICS anomaly-detection pipelines on the Secure Water Treatment (SWaT) benchmark under training-time contamination. We assess 11 heterogeneous anomaly detectors under three contamination strategies: random injection, similarity-targeted injection, and feature-noise injection. The first two insert attack samples into the nominal training pool, while the third adds bounded Gaussian noise to selected normal training samples. These attacks are contamination-based rather than gradient-driven poisoning methods. Contamination budgets from 1% to 10% are evaluated using clean validation and test sets under a unified offline protocol. The results show that robustness is strongly model-dependent and cannot be predicted from clean-data performance alone. Injection-based contamination causes the greatest degradation, particularly for local-density and distance-based detectors, whereas feature-noise contamination has a comparatively limited effect. PCA, SVM, HBOS, and IForest remain relatively stable, while the tuned neural detectors demonstrate intermediate robustness. Overall, the findings highlight the importance of training-data integrity in ML-enabled ICS monitoring, subject to the evaluated dataset, models, and threat assumptions.

Index Terms: 
industrial control systems, adversarial machine learning, training-time data contamination, anomaly detection, critical infrastructure

I Introduction

Industrial control systems (ICS) support critical infrastructure such as water treatment, energy, manufacturing, and digital instrumentation and control systems, where cyber incidents can produce direct operational and safety consequences. As these systems become increasingly connected and data-rich, anomaly-based detection has received growing attention as a complement to signature-based and rule-based monitoring. In particular, anomaly-based detectors are attractive in ICS because normal operating behavior is often easier to collect than comprehensive attack data, and multivariate process measurements can reveal deviations that are difficult to capture with static signatures alone [1, 2, 3].

Most existing ICS anomaly-detection studies evaluate models under the implicit assumption that the training data used to build them is trustworthy. In practice, that assumption is often weak. Datasets used for offline detector development may be assembled from historian exports, archived sensor traces, engineering workstations, alarm logs, operator annotations, and automated preprocessing pipelines. Errors, compromise, or manipulation at any stage can contaminate the final training corpus. As a result, a detector that appears strong under clean offline evaluation may still become unreliable if its training data has already been corrupted before deployment [4, 5].

This concern is especially important in anomaly-based pipelines trained on normal data only. In such settings, the detector does not learn an explicit supervised boundary between normal and attack classes. Instead, it learns a representation, support region, density structure, geometric profile, or reconstruction pattern of nominal process behavior. Contaminating the normal training pool therefore distorts the learned notion of normality itself. Attack samples injected into nominal training data can weaken the anomaly boundary, while perturbations applied to normal samples can blur the distinction between benign and malicious behavior. Despite this risk, the comparative robustness of anomaly-based ICS detectors under offline training-time contamination remains insufficiently characterized across a broad and diverse set of detector families.

Prior work has demonstrated effective clean-condition detection on the Secure Water Treatment (SWaT) benchmark using recurrent, convolutional, one-class, PCA-based, and reconstruction models [1, 6, 7, 8, 9]. Adversarial ICS studies, however, have concentrated mainly on inference-time evasion [10, 11, 12] or poisoning of online-adaptive neural detectors [13, 14].

We address this gap with a unified benchmark on SWaT [15, 16]. Eleven normal-only detectors are tested under three contamination strategies at 1%, 3%, 5%, and 10% budgets. Thresholds are calibrated on clean validation data and applied unchanged to a clean held-out test set. Our contributions are:

  1. 1.

    a comparative offline training-contamination benchmark spanning eleven heterogeneous anomaly detectors;

  2. 2.

    a common evaluation of random injection, similarity-targeted injection, and feature-noise injection across four budgets;

  3. 3.

    an analysis that jointly considers F1-score degradation, false-negative rate (FNR), and training cost rather than clean F1-score alone;

  4. 4.

    a transparent configuration-level evaluation that explicitly reports differences in data representation, tuning depth, training scale, and compute resources.

The remainder of this paper is organized as follows. Section II reviews related work on ICS anomaly detection, adversarial machine learning, and training-time contamination. Section III defines the threat model and contamination methodology. Section IV describes the dataset, detector configurations, and experimental protocol. Section V presents and discusses the experimental results, and Section VI concludes the paper and outlines directions for future work.

II Related Work

II-A ICS Anomaly Detection

Anomaly-based detection has become a major line of research in ICS because process behavior is highly structured, while comprehensive attack labels are often limited or costly to obtain. The SWaT testbed and dataset have become widely used benchmarks because they provide a realistic and reproducible platform for evaluating process-aware attack-detection methods [15, 16]. Prior SWaT studies include recurrent models trained on normal data [1], convolutional models [6], unsupervised and one-class approaches [7], sequence-to-sequence architectures [8], lightweight neural and PCA-based detection [9], and methodology-oriented work emphasizing preprocessing, thresholding, and evaluation [17].

Together, these studies support two recurring conclusions. First, anomaly-based monitoring is a natural fit for ICS settings because normal process behavior is repetitive, correlated, and usually easier to collect than diverse attack traces. Second, there is no universally dominant detector family. Broader reviews of machine learning for ICS security reach similar conclusions while identifying persistent challenges in cross-paper comparability, dataset dependence, and deployment realism [2, 3].

Our study also intersects with benchmark design for anomaly and time-series anomaly detection. Prior work shows that detector rankings can shift substantially with metric choice, hyperparameter treatment, and evaluation protocol [18, 19, 20], while time-series studies highlight temporal leakage, split construction, and inconsistent evaluation rules [21, 22]. These observations reinforce the need to interpret detector performance through both the model family and the evaluation pipeline used to generate the reported results.11 1 Code and experiment configurations for this paper are publicly available at: https://github.com/ANTS-OntarioTechU/Robustness-Anomaly-Detection-ICS-Data-Contamination

II-B Adversarial Machine Learning in Industrial Control Systems

Although adversarial machine learning has received increasing attention in ICS security, most prior work has focused on evasion rather than poisoning. Zizzo et al. studied adversarial attacks against time-series intrusion-detection models for ICS and showed that recurrent detectors can be manipulated even when an attacker controls only a subset of variables [10]. Erba et al. showed that realistic ICS manipulation must satisfy process and physical constraints, making the attack space substantially different from conventional adversarial examples [11]. Anthi et al. likewise demonstrated that adversarial perturbations can materially reduce machine-learning-based cyber defenses in industrial environments [12]. Collectively, these studies show that strong clean-data detection performance should not be interpreted as evidence of adversarial robustness.

II-C Training-Time Poisoning and Contamination of Anomaly Detectors

Compared with evasion, training-time corruption of ICS anomaly detectors has received much less direct study. Kravchik, Biggio, and Shabtai analyzed poisoning attacks against online-trained neural anomaly detectors for ICS [13]. This work was later extended to a practical evaluation of poisoning attacks on online anomaly detectors, again emphasizing online adaptation as the primary threat surface [14]. That setting is highly relevant, but differs from the offline training regime used in many operational pipelines, where models are built or periodically refreshed from curated historian logs, archived process traces, and exported datasets before deployment. Online poisoning studies therefore do not fully characterize contamination of the normal training pool during offline model development.

Outside ICS, the broader adversarial machine-learning literature has shown that training-time corruption can substantially degrade anomaly-detection and classification systems. Rubinstein et al. demonstrated that poisoning can distort anomaly detectors, particularly PCA-based detectors, by shifting the learned model of normality [4]. Other work developed poisoning attacks against SVMs and deep learning, certified defenses, targeted clean-label attacks, and broader surveys [23, 24, 25, 26, 5]. Recent CPS studies also address provable mitigation and dynamic backdoors [27, 28]. These studies provide the conceptual basis for training-time vulnerability, but primarily address optimization-based poisoning rather than the contamination-style attack families considered here.

II-D Research Gap

Prior ICS studies provide strong evidence that anomaly-based detectors can perform effectively under clean conditions [1, 6, 7, 8, 9, 17], while adversarial ICS studies have focused mainly on evasion or poisoning tied to online retraining [10, 11, 12, 13, 14]. What remains insufficiently characterized is the comparative robustness of a broad set of anomaly-based ICS detectors under offline training-time contamination within a unified benchmarking framework.

More specifically, to the best of our knowledge, existing literature does not provide a consistent comparison across heterogeneous anomaly-detector families under the same contamination definitions, budgets, threshold-calibration procedure, and clean held-out evaluation protocol. It also remains unclear whether detectors that appear strong on clean benchmark data retain that advantage once the normal training pool is contaminated. The novelty of this study is a unified, configuration-level robustness benchmark across heterogeneous anomaly-detector families under common training pools, contamination budgets, clean calibration data, held-out testing, and evaluation rules.

III Threat Model and Contamination Methodology

III-A System and Adversary Model

We consider an offline anomaly-detection pipeline for ICS under a normal-only training regime. Each detector is trained to model nominal process behavior from a clean training pool, while model selection and threshold calibration use a labeled validation split and final performance is measured on a held-out test split that is never modified during contamination. This setup reflects a practical workflow in which historical process data are curated, preprocessed, and used to develop anomaly detectors before deployment.

The adversary’s objective is to degrade the detector’s ability to distinguish attacks from normal behavior at test time while preserving the appearance of a plausible training workflow. More specifically, the attacker seeks to increase false negatives, reduce F1-score and recall, and distort the learned notion of normality so that malicious behavior is more likely to be accepted as benign.

We assume a gray-box adversary with training-time access only. The attacker knows the feature representation and general anomaly-detection pipeline, but does not modify the clean validation or test sets and does not interact with the deployed detector at inference time. Depending on the contamination strategy, the adversary either injects attack samples into the nominal training pool or perturbs selected normal training observations. The similarity-targeted strategy assumes more informed sample selection than random contamination, while all evaluated strategies remain weaker than white-box optimization-based attacks. The budget is at most 10% of the clean training-pool size.

For clarity, “uncontaminated” means that no training-time attack is applied to validation or test observations; it does not mean that the labeled validation split is attack-free. The restrictions to clean calibration and test data isolate training-time contamination effects, but may be optimistic relative to workflows in which curation errors or historian compromise propagate beyond the training data.

Offline ICS datasets can absorb attack traces or distorted values through annotation, alignment, curation, export, or preprocessing failures. These failures need not alter the running process; they affect a normal-only detector through data presented as benign. We retain poisoning for continuity with the literature, but evaluate contamination-style rather than gradient-driven worst-case attacks. Figure 1 summarizes the workflow.

Two practical corruption paths motivate the evaluated strategies. First, attack-period observations may be included in a nominal archive through missing labels, event-window misalignment, or unsafe merging of exports. Second, stored normal observations may be modified through historian compromise or preprocessing faults without changing the number of records. Injection attacks model the first path, while feature-noise injection models the second. The benchmark does not claim that these mechanisms exhaust real data-governance failures; they provide repeatable stress tests with a common budget.

Refer to caption
Fig. 1: Offline ICS anomaly-detection workflow. Contamination is confined to the normal training pool; validation and test data remain uncontaminated.

III-B Contamination Strategies

Let the clean normal training pool be Dclean={xi}i=1ND_{\mathrm{clean}}=\{x_{i}\}_{i=1}^{N} and the available attack pool be A={aj}j=1MA=\{a_{j}\}_{j=1}^{M}. For a training-pool-relative budget pp, the adversary manipulates k=⌊p​N⌋k=\lfloor pN\rfloor samples. For the injection attacks, appending kk samples yields a final injected fraction k/(N+k)k/(N+k) (approximately 9.09% when p=10%p=10\%); feature noise instead modifies kk of the original NN samples. Thus, pp denotes a common budget relative to the clean pool rather than an identical final-set fraction across attack families.

For the pointwise detectors and AE, the attack pool is the attack-labeled portion of the stratified training fold and is therefore disjoint from their validation and test observations. LSTM-AE uses this pointwise training-fold attack pool to contaminate its separate contiguous normal training block, as detailed in Section IV-A. This controlled resource isolates training contamination within each implemented protocol but is optimistic relative to end-to-end data-governance failures.

The injected pool should therefore be understood as an evaluation resource rather than an assumption that an operational attacker possesses a perfectly curated attack corpus. It enables controlled comparisons across budgets and seeds. Similarly, the clean validation and test assumption prevents threshold corruption from being conflated with model corruption, but may underestimate failures in pipelines where the same data-quality problem propagates across all splits.

TABLE I: Summary of the evaluated training-time contamination strategies.
Strategy Training-pool manipulation Final size
Random injection Uniformly sample kk observations from attack pool AA and append them as nominal N+kN+k
Similarity-targeted injection Append the kk attack observations closest to the clean centroid N+kN+k
Feature-noise injection Perturb kk selected clean observations with clipped, scaled Gaussian noise NN

III-B1 Random Injection

The attacker uniformly samples S⊆AS\subseteq A and forms

Dcont=Dclean∪S,|S|=min⁡(k,|A|).D_{\mathrm{cont}}=D_{\mathrm{clean}}\cup S,\qquad|S|=\min(k,|A|). (1)

This represents unsafe curation or accidental inclusion of attack traces in data later treated as normal.

Random injection does not exploit detector gradients or model parameters. Its strength comes from relabeling attack behavior implicitly as normal during fitting. It provides a simple baseline for measuring whether a detector’s learned support expands around malicious process states.

III-B2 Similarity-Targeted Injection

The clean centroid is μclean=N−1​∑ixi\mu_{\mathrm{clean}}=N^{-1}\sum_{i}x_{i}. Attack samples are ranked by dj=∥aj−μclean∥2d_{j}=\lVert a_{j}-\mu_{\mathrm{clean}}\rVert_{2}, and the kk closest samples are inserted. “Targeted” therefore denotes centroid-based data selection, not gradient-based optimization or guaranteed worst-case targeting.

This strategy prefers attack observations that appear globally similar to the clean pool after scaling. The centroid is a deliberately model-agnostic selection rule, which allows the same contaminated training set to be evaluated across all detector families. It may be weak for detectors governed by local structure or temporal context, so its results are interpreted as one reproducible similarity heuristic rather than a worst-case targeted attack.

III-B3 Feature-Noise Injection

The attacker selects Q⊆DcleanQ\subseteq D_{\mathrm{clean}}, |Q|=k|Q|=k, and replaces each selected sample with

x~i=clip[0,1]⁡(xi+zi⊙σfeat),\tilde{x}_{i}=\operatorname{clip}_{[0,1]}(x_{i}+z_{i}\odot\sigma_{\mathrm{feat}}), (2)

where zi∼𝒩⁡(0,0.152​I)z_{i}\sim\mathcal{N}(0,0.15^{2}I) and σfeat\sigma_{\mathrm{feat}} is the vector of per-feature standard deviations. Noise is added after MinMax scaling. This preserves training-set size while modeling corruption of stored process values.

Clipping maintains the normalized feature range and the per-feature scale factor prevents a common perturbation magnitude from dominating low-variance variables. The experiment fixes the Gaussian magnitude at 0.150.15 and varies only the fraction of modified samples. Consequently, a near-null result establishes limited sensitivity to this tested configuration, not general robustness to feature corruption.

The strategies cover unsystematic attack inclusion, centroid-targeted inclusion, and corruption of nominal records. All use the same clean held-out protocol.

IV Dataset and Experimental Protocol

IV-A Dataset and Preprocessing

SWaT contains multivariate time-series data from normal operation and attack scenarios [15, 16]. Timestamp columns are removed, source files are aligned on common features, values are coerced to numeric form, invalid rows are dropped, and seven constant columns (P202, P301, P401, P404, P502, P601, and P603) are removed. After the implemented preprocessing, the pointwise benchmark pool contains 449,919 samples, 44 features, and a 12.14% attack ratio. MinMax parameters are fitted on training data only and then applied to validation and test data.

Pointwise detectors and AE use a stratified 70/15/15 split of the pooled normal- and attack-file observations. Only normal samples from the training fold are used for detector fitting; labeled validation observations calibrate the F1-oriented threshold. LSTM-AE instead preserves the source-file order: the first 70% of the normal-operation file is used for training, the next 15% for early stopping, and the final 15% supplies normal test observations. The first half of the attack-period file is used for threshold selection and the second half for testing. For contaminated LSTM-AE runs, attack observations are drawn from the attack-labeled portion of the pointwise training fold and appended to the contiguous normal training block. Windows of length W=30W=30 are then constructed independently within the training, early-stopping, threshold-selection, and test arrays, so no window crosses a boundary between these arrays. A window is labeled anomalous if any included time step is attacked. This temporal protocol is stricter, but its sequence-level labels are not identical to the pointwise evaluation and must be considered in cross-family comparisons.

Preprocessing is fitted without using validation or test statistics. Timestamp columns are removed, the normal and attack files are aligned on their common process variables, and nonnumeric or invalid rows are discarded before splitting. The seven removed process variables are constant under the available traces and therefore provide no discriminatory variation. For the pointwise protocol, stratification preserves the attack ratio in validation and test data; only the normal portion of the training fold is passed to a detector. For LSTM-AE, preserving order avoids constructing windows from unrelated time points and prevents a window from crossing the boundary between the normal training sequence and the attack period.

The two protocols consequently use different units of evaluation. A pointwise model assigns one score to one 44-dimensional observation. LSTM-AE assigns reconstruction errors to overlapping windows and labels a window anomalous when at least one included time step belongs to an attack interval. We report this distinction because it affects both the number of evaluated instances and the meaning of a false negative. Cross-family comparisons remain useful at the implemented-configuration level, but should not be read as if every detector received an identical sample representation.

TABLE II: Pointwise SWaT benchmark pool after preprocessing.
Item Value
Processed samples 449,919
Retained features 44
Normal / attack samples 395,298 / 54,621
Attack ratio 12.14%
Pointwise split 70% / 15% / 15%
Normalization Train-fitted min-max to [0,1][0,1]

IV-B Detectors, Thresholding, and Reproducibility

The retained models are Isolation Forest (IForest), One-Class SVM, Local Outlier Factor (LOF), Cluster-Based Local Outlier Factor (CBLOF), KNN, Histogram-Based Outlier Score (HBOS), PCA, Minimum Covariance Determinant (MCD), Angle-Based Outlier Detection (ABOD), a feedforward autoencoder (AE), and LSTM-AE [29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39]. Classical detectors use PyOD; neural detectors use PyTorch. PCA and SVM are tuned, while other classical models use default or near-default configurations. AE and LSTM-AE use staged hyperparameter searches with multi-seed confirmation.

Table III summarizes the heterogeneous scoring mechanisms, final retained configurations, and training inputs, allowing contamination sensitivity to be compared across incompatible definitions of normality without duplicating training-scale information.

TABLE III: Detector families, scoring mechanisms, retained configurations, and training inputs used in the comparative benchmark. Classical detectors use PyOD and neural detectors use PyTorch, as described in the text.
Model and family Scoring mechanism Retained configuration Training input
IForest
Tree ensemble
Average path length in random isolation trees 100 trees; tree subsample 256; contamination 0.05; seed-controlled initialization Full normal pool
SVM
Kernel boundary
RBF ν\nu-SVM support boundary, ν=0.01\nu=0.01 RBF one-class SVM; ν=0.01\nu=0.01; gamma = scale; contamination 0.05 50K subsample
LOF
Local density
Density ratio relative to a 20-neighbor neighborhood Novelty mode; 20 neighbors; Minkowski distance; contamination 0.05 50K subsample
CBLOF
Cluster/density
Cluster assignment, cluster size, and distance Eight clusters; α=0.9\alpha=0.9; β=5\beta=5; seed-controlled initialization Full normal pool
KNN
Distance
Distance to the fifth-nearest training point Fifth-nearest-neighbor distance; largest-distance score; Minkowski metric 50K subsample
HBOS
Statistical
Feature-wise histogram outlier scores 10 bins; α=0.1\alpha=0.1; tolerance 0.5; feature-wise histogram scoring Full normal pool
PCA
Linear subspace
Reconstruction error at 90% retained variance 90% retained variance; reconstruction-error scoring; seed-controlled initialization Full normal pool
MCD
Robust covariance
Robust Mahalanobis distance from a trimmed center Default support fraction; robust covariance and Mahalanobis-distance scoring 50K subsample
ABOD
Geometric
Angle variance with 10 neighbors Fast variant; 10 neighbors; angle-variance scoring 50K subsample
AE
Neural pointwise
Bottleneck reconstruction error Dimensions [256,128,64][256,128,64]; BatchNorm, LeakyReLU, dropout 0.1; Adam 5×10−45\times 10^{-4}; batch 2048; MSE; maximum 100 epochs Full normal pool
LSTM-AE
Neural sequence
Sequence reconstruction error over W=30W=30 One 256-unit LSTM layer; W=30W=30; AdamW 10−310^{-3}; batch 256; MSE; maximum 30 epochs Full sequence set

IV-C Implementation, Tuning, and Compute Policy

The classical benchmark uses PyOD implementations with a common normal-only fitting workflow. IForest, HBOS, CBLOF, and PCA use the full pointwise normal training pool, while SVM, LOF, KNN, ABOD, and MCD use a fixed 50,000-point uniform subsample to control super-linear memory or distance-computation costs. IForest uses 100 trees and the default 256-sample tree subsample. LOF uses 20 neighbors, KNN scores distance to the fifth neighbor, CBLOF uses eight clusters, and ABOD uses its fast 10-neighbor configuration. PCA retains 90% variance, while SVM uses an RBF kernel with ν=0.01\nu=0.01 and gamma = scale.

Table III records the retained settings needed to interpret and reproduce each reported configuration. The PyOD contamination argument is fixed at 0.05 during construction where applicable, but it does not define the final operating threshold. Every detector is converted to binary decisions using the separate validation-calibration procedure described below. Thus, the benchmark’s 1–10% attack budgets describe training-pool manipulation and should not be confused with the library’s internal contamination parameter.

Tuning follows a sensitivity-first policy. A classical parameter family is promoted only when a preliminary change improves F1 by at least 0.03 or reduces FNR by at least 0.05 relative to its default slice. Only PCA and SVM cross this promotion threshold; other classical detectors retain default or near-default configurations. This conservative policy avoids tailoring every model extensively to one benchmark, but it also means that the reported ordering is configuration-level evidence rather than a definitive comparison of optimally tuned families.

The neural models receive staged searches because architecture and optimization choices materially affect their performance. AE is evaluated over 426 configurations spanning architecture, optimizer, regularization, threshold, and scaling choices. LSTM-AE is evaluated over 216 configurations spanning sequence length, hidden capacity, and training settings. Final candidates are re-ranked over three seeds using a validation-only composite of clean F1-score and F1-score under 10% similarity-targeted injection. All hyperparameter screening, staged selection, and multi-seed re-ranking use validation performance only; the held-out test set is accessed only after selecting the final configuration. Table IV records the resulting policy and configurations.

TABLE IV: Tuning policy and final model-configuration summary.
Group Search policy Retained configuration
Classical Sensitivity-first; only PCA and SVM promoted PCA: 90% variance; SVM: RBF, ν=0.01\nu=0.01
AE 426 staged configurations; multi-seed confirmation [256,128,64][256,128,64], LeakyReLU, dropout 0.1, Adam 5×10−45\times 10^{-4}, batch 2048
LSTM-AE 216 staged configurations; joint sequence/capacity search W=30W=30, hidden size 256, AdamW 10−310^{-3}, batch 256

Both neural models minimize mean-squared reconstruction error, use gradient clipping at 1.0, and apply early stopping with patience 15. AE permits up to 100 epochs and LSTM-AE up to 30. The LSTM-AE search also exposes an interaction that a one-factor sweep would miss: W=30W=30 and hidden size 256 are not the strongest isolated changes, but their joint configuration ranks highest after staged multi-seed evaluation. Dropout values are not interpreted for the selected single-layer LSTM because PyTorch applies recurrent dropout only between stacked recurrent layers.

Experiments were run on the Narval cluster of the Digital Research Alliance of Canada. Classical jobs used six Intel Xeon CPU cores and 48 GiB of RAM; neural jobs additionally used one NVIDIA A100-SXM4-40 GB GPU. Fixed seeds 42, 123, and 456 are applied to splitting, contamination, initialization, and training. Each run is checkpointed independently before aggregation, supporting restartable execution and consistent generation of the reported tables and figures.

All detectors output continuous anomaly scores. An F1-oriented threshold is selected on validation data and applied unchanged to held-out test data. The primary metric is F1-score; FNR is reported because missed attacks are safety-relevant. Experiments use seeds 42, 123, and 456 and training-pool-relative budgets of 1%, 3%, 5%, and 10%. Execution produced 430 successful runs: 33 retained clean baselines, 396 retained contamination runs, and one SOD clean baseline used only to document exclusion. SOD was removed from the main benchmark because its clean ROC-AUC indicated inverted score ordering under the evaluated configuration, making contamination-degradation analysis ill-posed [40]. Its available baseline also showed severe precision collapse (F1 =0.2013=0.2013, precision =0.1130=0.1130, recall =0.9218=0.9218) and a 2011.4-s training time; no SOD contamination result is included in the main analysis. All reported comparative analyses therefore use 429 retained runs.

For every clean or contaminated model within each seed and detector configuration, a new threshold is calibrated using only the same clean labeled validation split. That threshold is then frozen for the corresponding held-out test evaluation. This prevents test-set optimization and measures whether each contaminated model’s anomaly-score distribution remains compatible with an operating point selected without contaminated calibration data. Precision, recall, F1-score, FNR, ROC-AUC, and average precision are retained in the experiment outputs; F1 and FNR are emphasized because the former balances the two error directions while the latter directly exposes missed attacks.

V Results

V-A Clean Performance and Contamination Robustness

Table V combines clean performance, measured training cost, and worst-case F1 loss. LSTM-AE has the highest clean F1-score (0.88130.8813), followed by LOF, ABOD, and AE. Yet the clean-data ranking changes substantially under contamination. LOF, KNN, and ABOD each lose more than 0.64 F1 in their worst condition, while IForest, HBOS, PCA, and SVM remain within 0.068 of their clean baselines. AE and LSTM-AE occupy an intermediate position.

The clean scores are descriptive means over three seeds rather than significance-tested orderings. The leading group is narrow: LSTM-AE, LOF, ABOD, and AE all lie between 0.867 and 0.881. PCA and SVM are mid-table at approximately 0.813–0.814, but require far less training time than ABOD, KNN, AE, or LSTM-AE. Clean evaluation therefore defines the starting point for robustness analysis but does not identify a single operational winner.

The standard deviations also distinguish stable clean estimates from seed-sensitive ones. Most detectors vary by less than 0.01 F1 across the three seeds, whereas LOF and MCD vary more noticeably because their fitting pools are subsampled. These differences are small relative to the largest contamination losses, but they reinforce why degradation is computed from seed-averaged contaminated and clean scores rather than from a single favorable run.

TABLE V: Clean performance (mean ±\pm SD over three seeds), mean observed training time, and worst-case F1 drop across twelve attack-budget combinations. Worst-case drop is computed from seed-averaged F1 values.
Detector Clean F1 Clean FNR Train (s) Worst F1 drop
LSTM-AE 0.8813±0.00320.8813\pm 0.0032 0.2027±0.00680.2027\pm 0.0068 139.9 0.442
LOF 0.8761±0.02080.8761\pm 0.0208 0.1373±0.03120.1373\pm 0.0312 36.5 0.660
ABOD 0.8744±0.00390.8744\pm 0.0039 0.2012±0.01710.2012\pm 0.0171 249.8 0.674
AE 0.8674±0.00290.8674\pm 0.0029 0.2030±0.00820.2030\pm 0.0082 117.1 0.302
KNN 0.8482±0.00160.8482\pm 0.0016 0.2259±0.00770.2259\pm 0.0077 264.2 0.648
SVM 0.8144±0.00190.8144\pm 0.0019 0.2922±0.00150.2922\pm 0.0015 17.1 0.068
PCA 0.8134±0.00380.8134\pm 0.0038 0.3078±0.00540.3078\pm 0.0054 1.5 0.045
HBOS 0.7712±0.00370.7712\pm 0.0037 0.3425±0.00880.3425\pm 0.0088 4.1 0.007
CBLOF 0.7543±0.00480.7543\pm 0.0048 0.3874±0.00340.3874\pm 0.0034 6.9 0.182
IForest 0.7331±0.00220.7331\pm 0.0022 0.4162±0.00360.4162\pm 0.0036 4.5 0.000
MCD 0.7260±0.01290.7260\pm 0.0129 0.3211±0.05590.3211\pm 0.0559 6.2 0.126
Refer to caption
Fig. 2: F1-score versus training-pool-relative contamination budget. Injection attacks cause detector-specific degradation; feature noise has a limited effect at the tested magnitude.
Refer to caption
Fig. 3: FNR versus training-pool-relative contamination budget. LOF, KNN, ABOD, and LSTM-AE enter the highest missed-detection region under one or more injection settings.

Figure 2 shows distinct attack responses. Feature noise at σ=0.15\sigma=0.15 changes little, whereas 1% random injection reduces LOF, KNN, ABOD, and LSTM-AE from 0.876, 0.848, 0.874, and 0.881 to approximately 0.398, 0.335, 0.305, and 0.440. AE degrades progressively; similarity-targeted injection becomes severe for selected distance- and density-based detectors at 10%.

The earliest failures are operationally important because a small clean-pool-relative budget is sufficient to reverse the clean ranking. LOF, KNN, and ABOD begin among the five strongest clean configurations, yet at 1% random injection each loses more than half of its original F1-score. Their reliance on local neighborhoods, distances, or angles makes them sensitive when attack samples are incorporated into the reference geometry. In contrast, the more aggregated representations of PCA, HBOS, IForest, and SVM change much less under the same evaluated contamination.

The neural response is neither uniformly fragile nor uniformly robust. AE deteriorates gradually and reaches its worst condition at 10% random injection, where F1 falls to approximately 0.566. LSTM-AE has the highest clean F1-score but drops to approximately 0.440 at only 1% random injection. Its response to similarity-targeted injection is much milder through 5%, indicating that the centroid-based pointwise selection rule does not transfer directly into a worst-case sequence attack. The neural results therefore support an intermediate robustness interpretation and demonstrate why attack-family labels should not be treated as equivalent across data representations.

Figure 3 complements the F1 analysis with missed-detection behavior and is discussed in Section V-C. In Figs. 2–4, the labels HISTOGRAM, CLUSTER, and AUTOENCODER denote HBOS, CBLOF, and AE, respectively; axes labeled “contamination rate” report the clean-pool-relative budget pp defined in Section III-B.

The heatmap in Fig. 4 makes the model dependence explicit. IForest, HBOS, PCA, and SVM remain close to their clean values. Random injection sharply harms LOF, KNN, ABOD, and LSTM-AE across budgets, whereas AE degrades more gradually. Similarity-targeted injection produces delayed failures for LOF, KNN, and ABOD. These results show why a clean-only leaderboard is inadequate for adversarial model selection.

Refer to caption
Fig. 4: Change in F1-score relative to the clean baseline. Stable classical models remain near zero, while injection attacks expose severe fragility in several high-clean-F1 detectors.

V-B Attack-Type Comparison

The three strategies produce qualitatively different degradation patterns. Random injection is the dominant family overall: it causes the earliest large drops and affects both pointwise neighborhood methods and the sequence model. Because the injected samples span the available attack pool rather than only its center-nearest region, they introduce diverse malicious states into the normal reference data. This pattern is consistent with an expansion or distortion of the learned nominal region for detectors whose scores depend strongly on the training geometry.

Similarity-targeted injection is more detector-dependent. At low budgets it is often less harmful than random injection, but LOF, KNN, and ABOD show delayed failures as the budget increases. The centroid rule selects attack samples that are globally close to the average clean state, yet global proximity does not guarantee local proximity in every detector’s representation. The strategy should therefore be viewed as a repeatable stealth-oriented heuristic. It does not establish that random sampling is intrinsically stronger than an optimized targeted attack.

Feature-noise injection remains close to the clean baseline across the grid. Three aspects limit the conclusion: the magnitude is fixed at σ=0.15\sigma=0.15, perturbations are clipped to the normalized range, and only selected normal observations are modified. The result shows that the evaluated models tolerate this bounded configuration substantially better than attack-sample injection. It does not show general robustness to biased, coordinated, temporally persistent, or physically constrained sensor corruption.

V-C Safety, Cost, and Practical Trade-offs

Figure 3 shows that FNR should be interpreted together with F1-score rather than in isolation. ABOD, KNN, and LOF exceed approximately 0.70 FNR in at least one contamination setting, while LSTM-AE reaches a lower but still concerning peak under random injection. By contrast, PCA, SVM, HBOS, AE, and MCD remain in the lower-FNR group, and IForest stays comparatively stable despite its lower clean baseline.

At some contamination rates, a lower FNR may reflect overly permissive decision behavior, which reduces missed detections at the cost of precision. For that reason, FNR is most informative when read together with F1-score rather than as a standalone safety measure.

V-D Overall Trade-offs Across Performance, Robustness, and Cost

Taken together, the results show that the ordering by clean-data F1-score is materially different from the ordering implied by robustness and training cost. LSTM-AE, LOF, ABOD, and AE form the strongest clean-data group. However, several of these models remain fragile once the normal training pool is contaminated, particularly LOF, KNN, and ABOD, and to a lesser but still meaningful degree AE and LSTM-AE. By contrast, PCA and SVM do not lead the clean baseline table, yet both combine moderate clean performance with small worst-case F1 loss and much lower training cost. IForest is also notable for its stability across the contamination grid, although its clean baseline remains lower than that of PCA and SVM.

The most defensible practical conclusion is therefore not that one detector dominates on every metric, but that PCA and SVM provide a favorable observed balance among clean performance, contamination robustness, safety-relevant FNR behavior, and computational cost under the evaluated setup. Because hardware and training scales differ, this balance is configuration-specific rather than a formal multi-objective ranking. AE and LSTM-AE remain intermediate rather than robust, and their contamination-time behavior is less dependable than that of the most stable classical configurations.

V-E Limitations

Several limitations should be kept in mind when interpreting the benchmark. First, the study is conducted on a single ICS dataset, so the findings should be interpreted at the benchmark level rather than as population-wide claims about all safety-critical ICS environments. Second, the evaluated attack families are contamination-style training-time scenarios rather than optimization-based worst-case poisoning attacks. Third, the benchmark assumes clean validation and test splits, which isolates training-time contamination effects but may be optimistic relative to workflows in which curation errors propagate beyond the training data. Fourth, the benchmark does not apply equally deep hyperparameter optimization to every detector, so cross-detector comparisons should be interpreted as configuration-level robustness evidence rather than definitive family-level rankings. Finally, the pointwise detectors and sequence model use different split structures: the pointwise random split can place temporally adjacent observations in different folds, whereas LSTM-AE preserves a contiguous protocol. The limited feature-noise effect applies only at σ=0.15\sigma=0.15.

VI Conclusion

This paper compared eleven anomaly detectors under offline training-time contamination on SWaT. Across three attack families and four budgets, strong clean performance did not imply robustness. LOF, KNN, and ABOD ranked near the top on clean data but degraded most severely after attack-sample injection. AE and LSTM-AE showed intermediate robustness, with random injection as the dominant neural failure mode. PCA, SVM, HBOS, and IForest were comparatively stable; PCA and SVM balanced clean performance, robustness, and cost under the evaluated protocols. Feature noise had limited impact at the tested magnitude, whereas injection was more consequential. These findings motivate integrity controls for offline ICS training data and model selection procedures that explicitly account for contamination. Future work should evaluate additional ICS environments, stronger adaptive attacks, and defenses that jointly optimize accuracy, robustness, and operational cost.

References

  • [1] J. Goh, S. Adepu, M. Tan, and Z. S. Lee (2017) Anomaly detection in cyber physical systems using recurrent neural networks. In 2017 IEEE 18th International Symposium on High Assurance Systems Engineering (HASE), pp. 140–145. External Links: Document Cited by: §I, §I, §II-A, §II-D.
  • [2] A. M. Y. Koay, R. K. L. Ko, H. Hettema, and K. Radke (2023) Machine learning in industrial control system security: current landscape, opportunities and challenges. Journal of Intelligent Information Systems 60, pp. 377–405. External Links: Document Cited by: §I, §II-A.
  • [3] G. R. M. R., C. M. Ahmed, and A. Mathur (2021) Machine learning for intrusion detection in industrial control systems: challenges and lessons from experimental evaluation. Cybersecurity 4 (1), pp. 27. External Links: Document Cited by: §I, §II-A.
  • [4] B. I. P. Rubinstein, B. Nelson, L. Huang, A. D. Joseph, S. Lau, S. Rao, N. Taft, and J. D. Tygar (2009) ANTIDOTE: understanding and defending against poisoning of anomaly detectors. In Proceedings of the 9th ACM SIGCOMM Conference on Internet Measurement (IMC), pp. 1–14. External Links: Document Cited by: §I, §II-C.
  • [5] A. E. Cinà, K. Grosse, A. Demontis, S. Vascon, W. Zellinger, B. A. Moser, A. Oprea, B. Biggio, M. Pelillo, and F. Roli (2023) Wild patterns reloaded: a survey of machine learning security against training data poisoning. ACM Computing Surveys 55 (13s), pp. 1–39. External Links: Document Cited by: §I, §II-C.
  • [6] M. Kravchik and A. Shabtai (2018) Detecting cyber attacks in industrial control systems using convolutional neural networks. In Proceedings of the 2018 Workshop on Cyber-Physical Systems Security and PrivaCy (CPS-SPC), pp. 72–83. External Links: Document Cited by: §I, §II-A, §II-D.
  • [7] J. Inoue, Y. Yamagata, Y. Chen, C. M. Poskitt, and J. Sun (2017) Anomaly detection for a water treatment system using unsupervised machine learning. In 2017 IEEE International Conference on Data Mining Workshops (ICDMW), pp. 1058–1065. External Links: Document Cited by: §I, §II-A, §II-D.
  • [8] J. Kim, J. Yun, and H. C. Kim (2020) Anomaly detection for industrial control systems using sequence-to-sequence neural networks. In Computer Security, Lecture Notes in Computer Science, Vol. 11980, pp. 3–18. External Links: Document Cited by: §I, §II-A, §II-D.
  • [9] M. Kravchik and A. Shabtai (2022) Efficient cyber attack detection in industrial control systems using lightweight neural networks and PCA. IEEE Transactions on Dependable and Secure Computing 19 (4), pp. 2179–2197. External Links: Document Cited by: §I, §II-A, §II-D.
  • [10] G. Zizzo, C. Hankin, S. Maffeis, and K. Jones (2020) Adversarial attacks on time-series intrusion detection for industrial control systems. In 2020 IEEE 19th International Conference on Trust, Security and Privacy in Computing and Communications (TrustCom), pp. 899–910. External Links: Document Cited by: §I, §II-B, §II-D.
  • [11] A. Erba, R. Taormina, S. Galelli, M. Pogliani, M. Carminati, S. Zanero, and N. O. Tippenhauer (2020) Constrained concealment attacks against reconstruction-based anomaly detectors in industrial control systems. In Proceedings of the 36th Annual Computer Security Applications Conference, ACSAC ’20, New York, NY, USA, pp. 480–495. External Links: ISBN 9781450388580, Link, Document Cited by: §I, §II-B, §II-D.
  • [12] E. Anthi, L. Williams, M. Rhode, P. Burnap, and A. Wedgbury (2021) Adversarial attacks on machine learning cybersecurity defences in industrial control systems. Journal of Information Security and Applications 58, pp. 102717. External Links: Document Cited by: §I, §II-B, §II-D.
  • [13] M. Kravchik, B. Biggio, and A. Shabtai (2021) Poisoning attacks on cyber attack detectors for industrial control systems. In Proceedings of the 36th Annual ACM Symposium on Applied Computing (SAC), pp. 116–125. External Links: Document Cited by: §I, §II-C, §II-D.
  • [14] M. Kravchik, L. Demetrio, B. Biggio, and A. Shabtai (2022) Practical evaluation of poisoning attacks on online anomaly detectors in industrial control systems. Computers & Security 122, pp. 102901. External Links: Document Cited by: §I, §II-C, §II-D.
  • [15] A. P. Mathur and N. O. Tippenhauer (2016) 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), pp. 31–36. External Links: Document Cited by: §I, §II-A, §IV-A.
  • [16] J. Goh, S. Adepu, K. N. Junejo, and A. Mathur (2017) A dataset to support research in the design of secure water treatment systems. In Critical Information Infrastructures Security, Lecture Notes in Computer Science, Vol. 10242, pp. 88–99. External Links: Document Cited by: §I, §II-A, §IV-A.
  • [17] Á. L. P. Gómez, L. F. Maimó, A. H. Celdrán, and F. J. G. Clemente (2020) MADICS: a methodology for anomaly detection in industrial control systems. Symmetry 12 (10), pp. 1583. External Links: Document Cited by: §II-A, §II-D.
  • [18] G. O. Campos, A. Zimek, J. Sander, R. J. G. B. Campello, B. Micenková, E. Schubert, I. Assent, and M. E. Houle (2016) On the evaluation of unsupervised outlier detection: measures, datasets, and an empirical study. Data Mining and Knowledge Discovery 30 (4), pp. 891–927. External Links: Document Cited by: §II-A.
  • [19] S. Schmidl, P. Wenig, and T. Papenbrock (2022) Anomaly detection in time series: a comprehensive evaluation. Proceedings of the VLDB Endowment 15 (9), pp. 1779–1797. External Links: Document Cited by: §II-A.
  • [20] P. Wenig, S. Schmidl, and T. Papenbrock (2022) TimeEval: a benchmarking toolkit for time series anomaly detection algorithms. Proceedings of the VLDB Endowment 15 (12), pp. 3678–3681. External Links: Document Cited by: §II-A.
  • [21] S. Kim, K. Choi, H. Choi, B. Lee, and S. Yoon (2022) Towards a rigorous evaluation of time-series anomaly detection. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 36, pp. 7194–7201. External Links: Document Cited by: §II-A.
  • [22] A. Huet, J. M. Navarro, and D. Rossi (2022) Local evaluation of time series anomaly detection algorithms. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 635–645. External Links: Document Cited by: §II-A.
  • [23] B. Biggio, B. Nelson, and P. Laskov (2012) Poisoning attacks against support vector machines. In Proceedings of the 29th International Conference on Machine Learning (ICML), pp. 1467–1474. Cited by: §II-C.
  • [24] L. Muñoz-González, B. Biggio, A. Demontis, A. Paudice, V. Wongrassamee, E. C. Lupu, and F. Roli (2017) Towards poisoning of deep learning algorithms with back-gradient optimization. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security (AISec), pp. 27–38. External Links: Document Cited by: §II-C.
  • [25] J. Steinhardt, P. W. Koh, and P. Liang (2017) Certified defenses for data poisoning attacks. In Advances in Neural Information Processing Systems, Cited by: §II-C.
  • [26] A. Shafahi, W. R. Huang, M. Najibi, O. Suciu, C. Studer, T. Dumitras, and T. Goldstein (2018) Poison frogs! targeted clean-label poisoning attacks on neural networks. In Advances in Neural Information Processing Systems, Cited by: §II-C.
  • [27] S. Abedzadeh and S. Bhattacharjee (2025) Mitigating impact of data poisoning attacks on CPS anomaly detection with provable guarantees. Information 16 (6), pp. 428. External Links: Document Cited by: §II-C.
  • [28] Q. Jiang, Y. Zu, Z. Zhu, W. Zhong, Y. Xu, Z. Qian, and X. Zhang (2026) Dynamic stealthy backdoor attack against anomaly detectors in industrial control systems. Information Sciences 735, pp. 123066. External Links: Document Cited by: §II-C.
  • [29] F. T. Liu, K. M. Ting, and Z. Zhou (2008) Isolation forest. In 2008 Eighth IEEE International Conference on Data Mining, pp. 413–422. External Links: Document Cited by: §IV-B.
  • [30] B. Schölkopf, J. C. Platt, J. Shawe-Taylor, A. J. Smola, and R. C. Williamson (2001) Estimating the support of a high-dimensional distribution. Neural Computation 13 (7), pp. 1443–1471. External Links: Document Cited by: §IV-B.
  • [31] M. M. Breunig, H. Kriegel, R. T. Ng, and J. Sander (2000) LOF: identifying density-based local outliers. In Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data, pp. 93–104. External Links: Document Cited by: §IV-B.
  • [32] Z. He, X. Xu, and S. Deng (2003) Discovering cluster-based local outliers. Pattern Recognition Letters 24 (9–10), pp. 1641–1650. External Links: Document Cited by: §IV-B.
  • [33] S. Ramaswamy, R. Rastogi, and K. Shim (2000) Efficient algorithms for mining outliers from large data sets. In Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data, pp. 427–438. External Links: Document Cited by: §IV-B.
  • [34] M. Goldstein and A. Dengel (2012) Histogram-based outlier score (HBOS): a fast unsupervised anomaly detection algorithm. In KI-2012: Poster and Demo Track, Cited by: §IV-B.
  • [35] M. Shyu, S. Chen, K. Sarinnapakorn, and L. Chang (2003) A novel anomaly detection scheme based on principal component classifier. In Proceedings of the IEEE Foundations and New Directions of Data Mining Workshop, pp. 172–179. Cited by: §IV-B.
  • [36] P. J. Rousseeuw and K. V. Driessen (1999) A fast algorithm for the minimum covariance determinant estimator. Technometrics 41 (3), pp. 212–223. External Links: Document Cited by: §IV-B.
  • [37] H. Kriegel, M. Schubert, and A. Zimek (2008) Angle-based outlier detection in high-dimensional data. In Proceedings of the 14th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 444–452. External Links: Document Cited by: §IV-B.
  • [38] M. Sakurada and T. Yairi (2014) Anomaly detection using autoencoders with nonlinear dimensionality reduction. In Proceedings of the MLSDA 2014 2nd Workshop on Machine Learning for Sensory Data Analysis, pp. 4:1–4:11. External Links: Document Cited by: §IV-B.
  • [39] T. Kieu, B. Yang, C. Guo, and C. S. Jensen (2019) Outlier detection for time series with recurrent autoencoder ensembles. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, pp. 2725–2732. External Links: Document Cited by: §IV-B.
  • [40] H. Kriegel, P. Kröger, E. Schubert, and A. Zimek (2009) Outlier detection in axis-parallel subspaces of high dimensional data. In Advances in Knowledge Discovery and Data Mining, Lecture Notes in Computer Science, Vol. 5476, pp. 831–838. External Links: Document Cited by: §IV-C.