Comparative Study of KNN and Isolation Forest for Anomaly Detection in Oil and Gas Sensor Data using Moving Average Labeling

Anomaly detection in sensor data is essential for ensuring operational reliability in the oil and gas industry. This study presents a comparative analysis between supervised and unsupervised approaches to anomaly detection using K-Nearest Neighbors (KNN) and Isolation Forest (IF), respectively. A moving average-based statistical method is employed to generate ground truth labels with an anomaly ratio target of 5%, serving as the foundation for the supervised model. The dataset consists of four key sensor features PRESSURE, TEMPERATURE, N2, and NC5 aggregated daily and normalized for modeling. KNN is configured with distance-weighted neighbors, while IF uses a contamination-adjusted ensemble structure. Both models are evaluated using ROC- AUC and F1-score metrics. Visual analysis on daily detection patterns reveals distinct behavioral differences between the models: KNN tends to follow conservative patterns shaped by the labeling method, whereas IF captures more outliers based on internal data structure. The results demonstrate the complementary strengths of both approaches in identifying anomalies in multivariate time-series sensor data.

Authors

Institutions

Publication Details

Journal
Procedia Computer Science
Published
2025-01-01
DOI
https://doi.org/10.1016/j.procs.2025.08.275
Primary Topic
Anomaly Detection Techniques and Applications
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Comparative Study of KNN and Isolation Forest for Anomaly Detection in Oil and Gas Sensor Data using Moving Average Labeling

Aditya Firman Ihsan, Amalia Nur Alifah, Halim Arif Cahyono
Procedia Computer Science
Anomaly Detection Techniques and Applications
article

Comparative Study of KNN and Isolation Forest for Anomaly Detection in Oil and Gas Sensor Data using Moving Average Labeling

Aditya Firman Ihsan, Amalia Nur Alifah, Halim Arif Cahyono
article en

Abstract

Anomaly detection in sensor data is essential for ensuring operational reliability in the oil and gas industry. This study presents a comparative analysis between supervised and unsupervised approaches to anomaly detection using K-Nearest Neighbors (KNN) and Isolation Forest (IF), respectively. A moving average-based statistical method is employed to generate ground truth labels with an anomaly ratio target of 5%, serving as the foundation for the supervised model. The dataset consists of four key sensor features PRESSURE, TEMPERATURE, N2, and NC5 aggregated daily and normalized for modeling. KNN is configured with distance-weighted neighbors, while IF uses a contamination-adjusted ensemble structure. Both models are evaluated using ROC- AUC and F1-score metrics. Visual analysis on daily detection patterns reveals distinct behavioral differences between the models: KNN tends to follow conservative patterns shaped by the labeling method, whereas IF captures more outliers based on internal data structure. The results demonstrate the complementary strengths of both approaches in identifying anomalies in multivariate time-series sensor data.

Procedia Computer ScienceVol. 269
University of Surabaya (ID), Universitas Negeri Surabaya (ID), Telkom University (ID)
Openalex Percentile: Top 83%
Anomaly Detection Techniques and Applications
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.

Comparative Study of KNN and Isolation Forest for Anomaly Detection in Oil and Gas Sensor Data using Moving Average Labeling — Aditya Firman Ihsan, Amalia Nur Alifah, et al. · Procedia Computer Science (2025) | TGRS Research Map | TGRS