Comparing Random Forest, XGBoost, LSTM, GRU, and Autoencoder Architectures for Cyber-Attack Detection in Industrial Control Systems

Cyber-physical attacks on industrial control systems (ICS) can create serious safety and operational hazards in critical infrastructure such as water treatment plants, power grids, manufacturing lines and transport networks. These plants stream sensor and actuator data around the clock, yet turning that data into reliable attack detection is difficult. Operating conditions drift over time, attacks occupy only a small share of the recorded runtime, and a detector that raises too many false alarms soon loses the trust of the operators who have to respond to it. This paper compares five learning approaches for separating normal plant operation from attack activity. Random Forest and eXtreme Gradient Boosting (XGBoost) serve as strong baselines for tabular features, Long Short-Term Memory (LSTM) networks and Gated Recurrent Units (GRUs) model temporal dependence, and an Autoencoder learns the bounds of normal behaviour and flags observations whose reconstruction error exceeds a threshold. The experiments use the Secure Water Treatment (SWaT) benchmark, which holds 1,387,098 normal records and 54,621 attack records across 51 physical variables. Models are judged by accuracy, precision, recall, F-score and confusion-matrix counts. On a held-out test set of 288,344 samples, Random Forest reached an accuracy of 99.9931 percent with 6 false positives and 14 false negatives, while XGBoost reached 99.9185 percent with 20 false positives and 215 false negatives. The LSTM currently has only a preliminary accuracy of 97.5 percent, and the full confusion matrices for the LSTM, GRU and Autoencoder are still being compiled. The paper also examines why the widely used 80/20 stratified random split is a weak basis for evaluating time-series models: consecutive one-second records are almost identical, so test samples effectively leak information from the training set and inflate the reported metrics. We outline the chronological and episode-isolated validation needed to confirm these findings.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-12-01
DOI
https://doi.org/10.5281/zenodo.24719887
Primary Topic
Network Security and Intrusion Detection
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Comparing Random Forest, XGBoost, LSTM, GRU, and Autoencoder Architectures for Cyber-Attack Detection in Industrial Control Systems

Aniket Lande Prerana Mahajan
Zenodo (CERN European Organization for Nuclear Research)
Network Security and Intrusion Detection
article

Comparing Random Forest, XGBoost, LSTM, GRU, and Autoencoder Architectures for Cyber-Attack Detection in Industrial Control Systems

Aniket Lande Prerana Mahajan
article en

Abstract

Cyber-physical attacks on industrial control systems (ICS) can create serious safety and operational hazards in critical infrastructure such as water treatment plants, power grids, manufacturing lines and transport networks. These plants stream sensor and actuator data around the clock, yet turning that data into reliable attack detection is difficult. Operating conditions drift over time, attacks occupy only a small share of the recorded runtime, and a detector that raises too many false alarms soon loses the trust of the operators who have to respond to it. This paper compares five learning approaches for separating normal plant operation from attack activity. Random Forest and eXtreme Gradient Boosting (XGBoost) serve as strong baselines for tabular features, Long Short-Term Memory (LSTM) networks and Gated Recurrent Units (GRUs) model temporal dependence, and an Autoencoder learns the bounds of normal behaviour and flags observations whose reconstruction error exceeds a threshold. The experiments use the Secure Water Treatment (SWaT) benchmark, which holds 1,387,098 normal records and 54,621 attack records across 51 physical variables. Models are judged by accuracy, precision, recall, F-score and confusion-matrix counts. On a held-out test set of 288,344 samples, Random Forest reached an accuracy of 99.9931 percent with 6 false positives and 14 false negatives, while XGBoost reached 99.9185 percent with 20 false positives and 215 false negatives. The LSTM currently has only a preliminary accuracy of 97.5 percent, and the full confusion matrices for the LSTM, GRU and Autoencoder are still being compiled. The paper also examines why the widely used 80/20 stratified random split is a weak basis for evaluating time-series models: consecutive one-second records are almost identical, so test samples effectively leak information from the training set and inflate the reported metrics. We outline the chronological and episode-isolated validation needed to confirm these findings.

Zenodo (CERN European Organization for Nuclear Research)
Network Security and Intrusion Detection
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
Comparing Random Forest, XGBoost, LSTM, GRU, and Autoencoder Architectures for Cyber-Attack Detection in Industrial Control Systems — Aniket Lande Prerana Mahajan · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS