Industrial Anomaly Detection Using Machine Learning

Inspiration

My inspiration for this project came from my interest in civil engineering, industrial systems and data science. With a background in Civil Engineering and my ongoing studies in Data Science, I became interested in exploring how machine learning could be applied to engineering problems.

Industrial processes involve several interconnected variables that continuously change during operation. Unusual patterns in these variables can indicate abnormal operating conditions. Detecting such patterns early is important because it can help engineers and monitoring teams investigate potential problems before they become more serious.

I wanted to explore how machine learning could support this process. Rather than building another application that simply displays charts and statistics, I wanted to develop a system that could analyse process data, identify unusual behaviour and communicate its findings through an interactive monitoring dashboard.

This idea led to the development of my Industrial Anomaly Detection application.

What I Built

I developed an AI-powered industrial process monitoring prototype that applies three machine learning techniques to identify abnormal patterns in industrial process data.

The application uses the Tennessee Eastman Process (TEP) benchmark dataset, a simulated chemical-process dataset commonly used for process monitoring and fault detection research.

The three machine learning models implemented are:

  1. Isolation Forest: Identifies unusual observations by learning patterns that distinguish normal observations from anomalies.
  2. One-Class Support Vector Machine (One-Class SVM): Learns the boundary of normal process behaviour and identifies observations that fall outside that learned boundary.
  3. Autoencoder: Learns to reconstruct normal process data and uses reconstruction error to identify observations that differ significantly from expected patterns.

I developed an interactive Streamlit dashboard to bring these components together. The application includes process simulation, model-based anomaly detection, model comparison, monitoring visualisations and an alarm management system.

The application also uses SQLite to store alarm events and their acknowledgement statuses.

How I Built It

I used Python as the primary programming language and organised the project into separate components for data preparation, model development, evaluation, simulation and application services.

The development process involved the following stages:

1. Data Preparation

I worked with the Tennessee Eastman Process benchmark dataset, which contains 52 process variables:

  • 41 measured variables.
  • 11 manipulated variables.

I prepared the data for machine learning, preserved relevant simulation metadata and applied feature standardisation using a scaler fitted on normal training data.

2. Machine Learning Development

I implemented and trained three anomaly detection models: Isolation Forest, One-Class SVM and Autoencoder.

Each model uses its own anomaly scoring mechanism and decision threshold. I evaluated their ability to identify abnormal observations using metrics such as precision, recall, F1-score, specificity, false alarm rate and ROC-AUC.

3. Model Evaluation

I compared the models using a run-based evaluation approach.

The results showed that One-Class SVM achieved the highest F1-score of approximately 76.61%, followed closely by the Autoencoder at 76.59%. Isolation Forest achieved an F1-score of approximately 55.05%.

These results helped me understand that different anomaly detection algorithms can behave differently when applied to the same process data.

4. Application Development

I developed the interactive application using Streamlit and connected the trained models to the monitoring services.

The application includes:

  • Industrial process simulation using prepared benchmark observations.
  • Anomaly detection using three trained machine learning models.
  • Model prediction and score monitoring.
  • Consensus-based alert generation.
  • Alarm classification and acknowledgement.
  • Interactive charts and a conceptual industrial facility visualisation.

The system uses an ensemble alert rule in which at least two of the three models must flag an observation for the consensus alert condition to be satisfied.

5. Testing and Integration

I integrated the different components and worked on making the data preparation, model loading, simulation, detection and alarm management processes function as one application.

The application is designed as a research prototype using benchmark data. It is not connected to live industrial sensors or validated as a real industrial safety system.

Challenges I Faced

One of the biggest challenges was understanding how to transform a machine learning experiment into a functional application.

Training a model was only one part of the problem. I also needed to understand how to prepare the data correctly, select suitable thresholds, evaluate the models and integrate their predictions into a monitoring interface.

Some of the challenges included:

1. Understanding the dataset: Working with 52 process variables and simulation metadata required careful data preparation and organisation.

2. Model performance differences: The three algorithms produced different results. I learned that high precision does not automatically mean that a model detects most anomalies. Recall and F1-score were also important when evaluating performance.

3. Threshold selection: Each model produces its own anomaly scores, so selecting and managing appropriate thresholds required separate calibration.

4. Application integration: Connecting the trained models, simulation engine, monitoring services and alarm management system required careful organisation of the project.

5. Building an understandable interface: I wanted the application to communicate technical machine learning results in a way that users could understand without having to examine raw model outputs.

These challenges required research, experimentation, debugging and repeated testing.

What I Learned

This project has been an important learning experience in my transition from Civil Engineering into Data Science.

I strengthened my understanding of:

  • Python programming and project organisation.
  • Data preprocessing and feature standardisation.
  • Unsupervised and reconstruction-based anomaly detection.
  • Isolation Forest, One-Class SVM and Autoencoders.
  • Model evaluation and performance metrics.
  • Threshold calibration and ensemble-based detection.
  • Building interactive applications with Streamlit.
  • Integrating machine learning models into a practical software application.
  • Debugging, testing and documenting a larger project.

Most importantly, I learned that building an AI application involves much more than selecting an algorithm. Data quality, evaluation, application design, usability and clear communication are equally important.

Future Improvements

There is still room to improve the application.

Future development will focus on incorporating additional industrial datasets, improving fault identification and model explainability, strengthening the monitoring interface and exploring integration with real-time sensor data in a controlled research environment.

Any future real-world industrial deployment would require facility-specific validation, cybersecurity assessment and qualified engineering oversight.

Final Thoughts

Industrial Anomaly Detection is more than a machine learning project for me. It represents an opportunity to connect my Civil Engineering background with my growing knowledge of Data Science and Artificial Intelligence.

Participating in this hackathon gives me an opportunity to take that research beyond model training and demonstrate how AI can be integrated into an interactive application.

I built this project to learn, experiment and explore how data-driven technologies can contribute to better industrial process monitoring.

My goal is simple: turn industrial data into meaningful insights that can support better engineering decisions.

Built With

Share this project:

Updates

Submission history