Novelty detection

On this page 7

Novelty detection is the task of deciding whether a new observation comes from the same distribution as a clean training set of normal data, or whether it represents something the model has never seen. In anomaly detection, it is the semi-supervised setting: the model learns a description of normal behavior and then scores incoming points by how far they fall outside that learned description.

The defining assumption is that the training data contain no anomalies, or only a negligible fraction. This separates novelty detection from outlier detection, where the training data themselves are contaminated and the algorithm must find the unusual points within them. The distinction affects which algorithms are appropriate, how thresholds are set and how results should be interpreted.

How novelty detection works

Novelty detection works in two phases. During fitting, the model estimates the region, density or structure of normal data. During scoring, it assigns each new observation an anomaly score, and a decision threshold converts that score into a label of normal or novel.

The learned description of normality can take several forms: a boundary enclosing most of the training data, a probability density whose low-density regions signal novelty, a set of nearest neighbors whose distances indicate isolation, or a reconstruction model that fails on unfamiliar inputs. The table below summarizes these families.

Method familyRepresentative techniqueNovelty signalTypical data
Boundary-basedOne-class SVM, support vector data descriptionPoint lies outside the learned boundaryTabular features of moderate size
Density-basedGaussian mixture, kernel density, elliptic envelopeLow estimated likelihoodLow-dimensional continuous data
Distance-basedk-NN distance, local outlier factor in novelty modeFar from nearest normal pointsData with meaningful metrics
Reconstruction-basedAutoencoder, PCA reconstructionHigh reconstruction errorImages, sensor signals, logs
Deep one-classDeep SVDD, PatchCoreLarge distance in feature spaceImages and complex signals
Main families of novelty detection methods

Novelty detection is easily confused with neighboring tasks because they share algorithms but differ in assumptions about the training data. The difference determines whether a method is evaluated on held-out points or on the training set itself, and whether a contamination rate must be specified.

TaskTraining dataQuestion answeredTypical output
Novelty detectionClean normal data onlyIs this new point unlike normal dataScore and label for new points
Outlier detectionUnlabeled mix with anomaliesWhich training points are unusualScores for the existing dataset
Supervised anomaly detectionLabeled normal and anomalous examplesDoes this point match known anomaly classesClass probability
Out-of-distribution detectionIn-distribution data of a classifierShould the classifier abstainConfidence or rejection flag
Open-set recognitionLabeled known classesIs this a known or unknown classClass label or unknown
Comparison with related detection tasks

In practice the boundary is blurred: a novelty detector fitted on data with a few hidden anomalies still works if those anomalies are rare and scattered, but its boundary will be slightly inflated, so it misses subtle novelties near the edge of normal behavior.

Scores, thresholds and evaluation

The threshold is the most consequential design decision in novelty detection, because the model itself only ranks observations. A common approach sets the threshold at a high percentile of scores on a clean validation set, for example the 99th or 99.9th percentile, which fixes the expected false alarm rate on normal data.

Evaluation requires at least a small set of known novel examples, even though they are not used for training. Because novelties are rare, precision-oriented metrics are more informative than accuracy, which can exceed 99 percent for a model that never raises an alarm.

MetricWhat it measuresWhen it is most useful
ROC AUCRanking quality across all thresholdsComparing models independent of threshold
Precision-recall AUCRanking quality under strong class imbalanceRare novelties with costly false alarms
False positive rate at fixed recallAlarm burden for a required detection levelOperational monitoring and alerting
Recall at fixed alarm budgetShare of novelties caught per day of alertsTeams with limited review capacity
Metrics used to evaluate novelty detectors

Choosing a method in practice

The choice of method depends on dimensionality, data volume and data type. For tabular data with a few dozen features, classical methods such as one-class SVM or an isolation forest fitted on clean data are strong baselines. For images and high-dimensional signals, pretrained feature extractors combined with nearest-neighbor scoring often outperform models trained from scratch.

  • Scale features consistently, because distance and kernel methods are sensitive to units.
  • Keep a clean validation set separate from training data to calibrate the threshold.
  • Start with a simple baseline such as Mahalanobis distance before adopting deep models.
  • Retrain on a schedule when normal behavior drifts, for example after a process change.

Limitations and failure modes

Novelty detection is only as good as its definition of normal. If the training set misses legitimate operating conditions, such as a seasonal load pattern or a new product variant, the detector will flag them as novel and produce persistent false alarms.

High-dimensional data cause a further problem: distances become less discriminative, and deep generative models can assign high likelihood to clearly novel inputs, a well-documented failure in image data. Concept drift also erodes performance over time, so a novelty signal should be read as “different from the reference period”, not as “harmful” or “faulty”.

In simple terms

Novelty detection teaches a computer what normal looks like. It studies only normal examples. Later it checks each new case. If a case looks different from everything it learned, it raises a flag.

Think of a night guard who knows every regular visitor by sight. The guard does not need a list of every possible intruder. Anyone unfamiliar stands out. The method works the same way. Its main weakness is that a new but harmless visitor also gets flagged.

A practical example

A manufacturer of injection-molded medical device housings inspects every part with a camera on the production line. Defects are rare and varied, so collecting labeled examples of each defect type is impractical. The quality team instead gathers about 3,000 images of good parts from a stable production week and fits a feature-based novelty detector using a pretrained image network and nearest-neighbor distances.

The threshold is set at the 99.5th percentile of scores on a held-out set of good parts. On a test batch containing known short shots, flash and contamination, the detector catches more than 95 percent of defective parts while sending about one good part in two hundred to manual review. When the plant later switches resin suppliers, the false alarm rate rises, and the team refits the model on fresh images of good parts from the new material.