Home
Softono
anomaly-detection-iiot

anomaly-detection-iiot

Open source MIT Python
23
Stars
1
Forks
0
Issues
3
Watchers
1 year
Last Commit

About anomaly-detection-iiot

"Federated Learning for Autoencoder-based Condition Monitoring in the Industrial Internet of Things" (IEEE Bigdata) - Exploring resource-efficient & data privacy enabling training at the edge

Platforms

Web Self-hosted Kubernetes

Languages

Python

🧾 Federated Learning for Autoencoder-based Anomaly Detection in the Industrial IoT

This project investigates the use of autoencoders and federated learning for condition monitoring in Industrial IoT (IIoT) environments, with a focus on resource-constrained edge devices and data privacy. It was developed as part of my Bachelor thesis and published at IEEE BigData 2022.

πŸ—οΈ System Architecture

The project follows a stepwise approach:

βš™οΈ Lightweight Autoencoder Design

A compact and efficient autoencoder was developed for detecting anomalies in sensor data from industrial machinery. The model is optimized to run on edge devices with constrained compute and memory capacity.

πŸ” Federated Learning for Privacy

To preserve data privacy, the system leverages a federated learning setup. Instead of transferring raw data, only model parameters are shared among devices. This allows local data to remain on-premise while enabling global model improvements through collaboration.

Federated Learning IIoT Use Case Scenario Federated Learning Training Cycle
Federated Learning Federated Learning Architecture

πŸ“Š Evaluation & Results

To evaluate the success of this approach, we conducted a case study on a real-world industrial application of anomaly detection in rotating machines, which are commonly found in manufacturing.

Here, the performances and resource demands of three configurations were compared:

  • A baseline model: centralized and resource-unconstrained
  • A centralized, resource-efficient model: trained on pooled data
  • A federated version of the resource-efficient model: multiple instances trained locally on disjoint data subsets, exchanging only model weights

πŸ” Key Findings

Our research showed, that:

  1. The proposed resource-efficient centralized model was able to achieve similar anomaly detection performance to the baseline architecture.
  2. Even when used in a federated learning framework, only able to share model weights instead of data, instances of the resource-efficient model were still able to achive equal certainty of defect predictions.
  3. At the same time, this approach succeeded in strongly improving resource consumption and guaranteeing data privacy, as no trainings data was ever required to leave individual devices.

Resource evaluation Transferlearning evaluation

🧱 Project Structure & Usage

πŸ§ͺ Training & Models

  • src/models/: Resource-efficient condition monitoring model for deployment at the edge
  • src/training/: Training pipeline for the resource-efficient autoencoder, as well as baseline (resource-unconstrained) condition monitoring model for comparison
  • src/federated_learning/: Federated training, communication between models and model aggregation logic
  • src/data/: Entire data pipeline for data loading, cleaning and transformation
  • config.yaml: Central configuration for training parameters (e.g., LR, batch size, number of clients)

πŸš€ Build & Deployment

  • Dockerfiles for all components are located in docker/
  • Persistent state and model transfer mechanisms are built in for simulated or real federated setups
  • Supports local execution and deployment to cloud environments (e.g., Google Cloud Platform) via ansible in deployment/
  • For detailed information on deploying the KubeEdge testbed in GCP using Ansible, please refer to the Deployment README.

πŸ“„ License

This project is licensed under the MIT License – see the LICENSE file for details.

🀝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.