Semantic Anomaly Detection & Classification 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.
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
A causally-audited reinforcement-learning pipeline for loan/insurance offer optimization, built on real BPI Challenge 2017 event data.
Privacy-preserving ML / Edge
Federated Privacy-Preserving Typing Assistant
Next-word prediction trained across distributed clients where only differentially-private model updates ever leave the device.
E-commerce / Agentic AI
Human-in-the-Loop E-Commerce AI Assistant
An agentic shopping assistant with four retrieval strategies as tools, and no capability to create a billable order without human sign-off.
AI platform / Infrastructure
LLM Fine-Tuning, Compiling and Serving Optimization Benchmarks
Qwen2.5-3B-Instruct benchmarked end to end , distributed DPO training, hand-written CUDA kernels, a three-way inference-engine comparison, Triton serving and Kubernetes autoscaling.
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.
Fashion retail / Influencer marketing
Outfit Recommender and Influencer Portfolio Optimizer
Built on a company's own catalogue: compose outfits from its products, then pick the influencer marketing portfolio that best fits them under a budget.