self-supervised learning for anomaly detection
**Self-Supervised Learning (SSL) for Anomaly Detection** is the **training of models on only normal (defect-free) data using self-supervised tasks** — the model learns the distribution of normal patterns, and anything that deviates from the learned normality is flagged as an anomaly.
**Key SSL Approaches for Anomaly Detection**
- **Autoencoders**: Learn to reconstruct normal images. Anomalies have high reconstruction error.
- **Contrastive Learning**: Learn representations of normal data. Anomalies have distant embeddings.
- **Knowledge Distillation**: Student network trained on normal data disagrees with teacher on anomalies.
- **Masked Image Modeling**: Predict masked regions — anomalies are poorly predicted.
**Why It Matters**
- **No Defect Labels Needed**: Only requires normal (good) images for training — defect labels are expensive and rare.
- **Novel Defects**: Detects previously unseen defect types (anything abnormal), not just known categories.
- **Industrial Standard**: Approaches like PatchCore and FastFlow achieve >99% AUROC on industrial anomaly benchmarks.
**SSL for Anomaly Detection** is **learning what normal looks like** — training exclusively on good data so that any deviation is automatically flagged as suspicious.