Anomaly Detection for Supply Chain Operations
Architected and built an end-to-end MLOps platform for anomaly detection in BMW supply-chain data. Combined variational autoencoders with classic clustering and classification algorithms, wrapped everything in reproducible AWS pipelines, and exposed results through APIs and review front-ends. The system was projected to save over 1.6 million Euros by catching and resolving anomalies that previously relied on manual processes.
- €1.6M+
- Projected annual savings
- 4
- Model families combined
- 6
- End-to-end pipelines
- 3
- Deployment environments
The challenge
Supply-chain anomalies were spotted late, often through manual checks, and each incident carried fulfilment and financial risk. Labels were sparse and noisy, so a fully supervised classifier was impossible. The goal was to build a system that could surface irregularities early, suggest a probable root-cause class, and integrate into existing operations without creating a new silo.
Approach
- Designed a weakly-supervised ensemble: a variational autoencoder for representation learning and density estimation, combined with RQ-Kmeans/RQ-GMM clustering and XGBClassifier/QDA classification heads to score and classify anomalies.
- Built data preprocessing pipelines on AWS Glue and Lambda, with schema validation, drift checks, and lineage tracking so upstream changes do not silently break model inputs.
- Trained models on Amazon SageMaker with quantization and automatic model-registry writes to MLflow, then promoted only versions that passed CI tests and benchmark thresholds.
- Provisioned infrastructure as code with Terraform and Docker, spanning training, API and front-end services across EC2 and Kubernetes with environment parity between dev, staging and production.
- Exposed predictions through FastAPI services and a Streamlit review front-end, with Prometheus/Grafana monitoring for latency, throughput and data-drift alerts.
- Automated CI/CD with GitHub Actions, including unit tests, integration tests, packaging and canary deployments.
Outcome
The platform combined four complementary model families into a single anomaly scoring and classification service. End-to-end MLOps pipelines reduced model update time from weeks to days, and the project was estimated to deliver over 1.6 million Euros in savings by detecting and resolving anomalies earlier than the previous manual process.
Results in detail
Figures are from the delivered engagement, normalised where data is confidential.
Model family coverage by anomaly type
Relative detection utility of each algorithm family across five anomaly categories.
Pipeline stage runtime
Typical runtime per stage after optimization, in minutes.
Detected anomalies and resolution rate
Weekly flagged anomalies and share resolved within the operations SLA.
Related projects
Fintech / Credit risk
Causal Auditing of RL Loan Pricing Policies Using Process Mining
Auditing a reinforcement-learning pricing agent for fairness and causal soundness with event-log mining.
Consumer mobile / Privacy
Federated Privacy-Preserving Typing Assistant
On-device next-word prediction trained across millions of keyboards without a single keystroke leaving the phone.
E-commerce / Retail
Human-in-the-Loop E-Commerce AI Assistant
A shopping assistant that retrieves real catalogue data, defers to human agents, and learns from every handoff.
AI platform / Infrastructure
LLM Fine-Tuning, Compiling and Serving Benchmarks
An end-to-end benchmark harness for choosing how to align, compile, and serve open-weight models under real cost limits.
Supply chain / Operations research
Reinforcement Learning for Multi-Echelon Supply Chain Optimization
RL agents that match classical optimal stock policies on fixed lead-times and outperform them when lead-times vary.