✅ Project Title
Implementing and Optimizing Variational Autoencoders (VAEs) for High-Dimensional Image Anomaly Detection
📘 Project Overview (Simplified Explanation)
You must build a Variational Autoencoder (VAE) for unsupervised anomaly detection on a high-dimensional image dataset (e.g., CIFAR-10, Fashion-MNIST, MNIST, or a similar dataset).
Your tasks include:
Implementing a complete VAE (encoder + decoder + sampling/reparameterization trick)
Optimizing it using KL Divergence + Reconstruction Loss
Training it on a normal dataset split into train/val/test
Using reconstruction error to detect anomalies
Justifying your threshold selection
Demonstrating performance with metrics such as Precision, Recall, and F1-Score
This project is meant to simulate a production-level anomaly detection pipeline.
🧩 Tasks to Complete (Rewritten Clearly)
1️⃣ Implement a full VAE model
Including:
Encoder
Decoder
Sampling layer (reparameterization trick)
KL Divergence term
Reconstruction loss term (MSE or BCE)
Total VAE loss = Reconstruction Loss + β * KL Divergence
You can use PyTorch or TensorFlow/Keras.
2️⃣ Prepare your dataset
Use any high-dimensional image dataset such as:
CIFAR-10
Fashion-MNIST
MNIST Split into:
Train
Validation
Test
3️⃣ Train your VAE
Train using reconstruction + KL loss
Tune hyperparameters (latent dimension, optimizer, epochs, learning rate, β-weight for KL)
4️⃣ Perform Anomaly Detection
-
Feed test images through the trained VAE
-
Compute reconstruction error (e.g., MSE)
-
Set an anomaly threshold using statistical methods such as:
Mean + k*std
Percentiles
Validation-based threshold selection
- Classify:
High reconstruction error → anomaly
Low reconstruction error → normal
5️⃣ Evaluate Model
Compute:
Precision
Recall
F1-Score
Provide results in a clean summary table.
6️⃣ Write the Final Reports
Technical Report Must Include
Dataset description
VAE architecture diagram + explanation
Hyperparameters used
Training graphs (loss curves)
Reconstruction vs anomaly examples
Threshold selection justification
Final metrics (Precision, Recall, F1-Score)
Discussion & conclusions
Code Deliverable
Fully documented Python code
Clean structure with functions/modules
📦 Expected Deliverables (Exactly as Required)
- Full Python implementation
Well-organized and commented (not just raw notebook cells).
- Written analysis report
Covers:
Design decisions
Architecture used
Tuning methodology
Threshold justification
Performance discussion
- Final results table
Includes anomaly detection metrics:
Precision
Recall
F1-S