Two flavors
Supervised anomaly detection has labels for known anomalies; treat it as classification with extreme imbalance. Unsupervised anomaly detection has no labels and assumes anomalies are rare and structurally different. The unsupervised case is what people usually mean.
Algorithms that matter
- IsolationForest — fast, scales well, no distance assumptions.
- LocalOutlierFactor — density-based, sensitive to local context.
- One-class SVM — boundary around normal data; expensive on large datasets.
- Autoencoder reconstruction error — for high-dimensional inputs (images, sensors).
Evaluation without labels
Without ground truth, evaluation is half art. Sample the top scores and have a human review. Track precision-at-K (of the top K alerts, how many were real). Wire the human reviews back as labels and gradually move toward supervised classification.