When should an extremely imbalanced classification problem be reframed as anomaly detection?

Last updated 15 November 2026

  • Reframe as anomaly detection when positives are too rare (tens, not thousands), too varied, or too novel for a classifier to learn a reliable boundary. Instead, model the stable, well-defined "normal" class and flag deviations.

  • Stay supervised when there are enough labeled positives with recurring patterns, or when "normal" is itself diverse (false positives explode). Typical detectors: IsolationForest, OneClassSVM, autoencoders.

  • Hybrids often work best (anomaly scores as features, or a detector alongside a classifier). You still need some labeled anomalies to validate and set thresholds.

  • https://medium.com/data-science/class-imbalance-strategies-a-visual-guide-with-code-8bc8fae71e1a
  • https://codesignal.com/learn/courses/evaluation-metrics-advanced-techniques/lessons/anomaly-detection-for-extremely-imbalanced-data
All Imbalanced Datasets interview questions