Inferensys

Glossary

Novelty Detection

Novelty detection is a machine learning technique that identifies new or unknown patterns in data that were not present in the training set, often used when labeled anomalies are unavailable.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
ANOMALY AND OUTLIER DETECTION

What is Novelty Detection?

A specialized machine learning technique for identifying previously unseen patterns in data.

Novelty detection is a semi-supervised machine learning technique that identifies data points or patterns that differ from the established 'normal' data used during training, specifically when examples of anomalies are unavailable for model fitting. It operates by learning a tight boundary or density model around the training data, which is assumed to be purely normal, and then flagging new observations that fall outside this learned region as novel. This makes it distinct from general anomaly detection, which may be trained on datasets containing labeled anomalies. Common algorithms for this task include One-Class Support Vector Machines (SVM) and autoencoders trained to reconstruct normal data with low error.

The technique is critical in data observability for monitoring production data pipelines, where genuinely novel events—such as a new type of sensor failure or an unprecedented user behavior—must be distinguished from known anomalies. It is closely related to, but distinct from, detecting outliers within a static dataset and monitoring for data drift, which tracks gradual changes in known feature distributions. Effective novelty detection systems must balance sensitivity to new patterns with a low false positive rate to prevent alert fatigue among engineering teams.

NOVELTY DETECTION

Key Algorithms and Techniques

Novelty detection is the identification of new or unknown patterns in data that were not present in the training set. Unlike general anomaly detection, it specifically assumes that only 'normal' data is available during the model's training phase.

01

One-Class Support Vector Machine (SVM)

A semi-supervised algorithm that learns a decision boundary around the training data, which is assumed to be all 'normal'. It maps data into a high-dimensional space and finds a hyperplane that separates the data from the origin with maximum margin. New data points falling outside this learned region are flagged as novel.

  • Key Parameter: nu, which sets an upper bound on the fraction of training errors and a lower bound on the fraction of support vectors.
  • Use Case: Detecting novel machine states in industrial equipment using only data from normal operation.
02

Isolation Forest

An unsupervised, tree-based algorithm that explicitly isolates anomalies instead of profiling normal data. It works on the principle that anomalies are 'few and different', making them easier to isolate. It builds an ensemble of isolation trees, where the path length from the root to a leaf node is shorter for anomalies.

  • Mechanism: Randomly selects a feature and a split value to partition the data. The average path length across all trees forms the anomaly score.
  • Advantage: Highly scalable with linear time complexity and low memory usage, making it suitable for high-dimensional datasets.
03

Autoencoder-Based Detection

A deep learning, unsupervised technique using a neural network trained to reconstruct its input. The model is trained only on normal data, learning a compressed representation (the latent space). Novel instances, which the model has not learned to reconstruct well, result in a high reconstruction error.

  • Architecture: The network is typically bottlenecked, forcing it to learn the most salient features of the 'normal' distribution.
  • Thresholding: A statistical threshold (e.g., using the mean + 3 standard deviations of training reconstruction errors) is set to flag novelties.
04

Local Outlier Factor (LOF)

A density-based algorithm that measures the local deviation of a data point's density compared to its neighbors. It calculates the reachability distance to define local density. A point with a substantially lower density than its neighbors is considered a novelty.

  • Core Metric: The LOF score. A score approximately equal to 1 indicates density similar to neighbors. A score significantly greater than 1 indicates a novelty.
  • Strength: Effectively identifies novelties in data where the density of normal instances is not uniform, handling clusters of varying densities.
05

Gaussian Mixture Models (GMM)

A probabilistic model that assumes all normal data is generated from a mixture of a finite number of Gaussian distributions. The model is trained to learn the parameters (mean, covariance, weight) of these components. Novelty is detected by evaluating the log-likelihood of a new data point under the fitted model; points with very low likelihood are flagged.

  • Flexibility: Can model complex, multi-modal normal distributions better than a single Gaussian.
  • Use Case: Modeling normal network traffic patterns, where traffic can belong to several distinct behavioral clusters.
06

k-Nearest Neighbors (k-NN) Distance

A simple, distance-based method where the novelty score for a point is defined as its distance to its k-th nearest neighbor in the training set. Alternatively, the average distance to all k-nearest neighbors can be used. The underlying assumption is that normal data points exist in dense neighborhoods, while novelties are far from their nearest neighbors.

  • Critical Choice: The distance metric (Euclidean, Mahalanobis) and the value of k heavily influence performance.
  • Consideration: Computationally expensive for large datasets, as it requires storing the entire training set and calculating pairwise distances for scoring.
COMPARISON

Novelty Detection vs. Anomaly Detection

A technical comparison of two related but distinct paradigms for identifying unusual patterns in data, focusing on their core assumptions, data requirements, and typical use cases.

FeatureNovelty DetectionAnomaly Detection

Core Assumption

Only 'normal' data is available for training. Novel patterns are unknown and not represented in the training set.

Anomalies may be present in the training data, or their characteristics might be partially known.

Training Data Requirement

Requires a clean dataset containing only examples of the 'normal' class. No labeled anomalies are needed.

Can be trained on datasets that contain anomalies (supervised) or on mixed/unlabeled data (unsupervised).

Primary Goal

To identify if a new observation belongs to the same distribution as the training data or represents a new, previously unseen class.

To identify observations that deviate significantly from the majority of the data, regardless of whether the anomaly type was seen during training.

Typical Algorithm Family

One-class classification (e.g., One-Class SVM, Isolation Forest trained on normal data). Density estimation for the normal class.

Broad range: Supervised classifiers, unsupervised clustering/density methods (LOF, DBSCAN), statistical tests (Z-score, IQR).

Output Interpretation

A score or label indicating 'normal' (in-distribution) vs. 'novel' (out-of-distribution).

A score or label indicating 'normal' vs. 'anomalous'.

Handling of Known Anomalies

Not designed to classify or recognize specific known anomaly types. Treats all deviations from the trained normal model as novel.

In supervised settings, can be trained to recognize and classify specific, known types of anomalies.

Common Use Case

Monitoring systems for the emergence of new failure modes. Quality control where only good products are available for initial training.

Fraud detection (known fraud patterns), network intrusion detection, identifying faulty sensors in historical data.

Relation to Drift

Directly related to detecting covariate shift or new sub-populations in the input feature space.

May detect anomalies caused by drift, but is a broader task not exclusively focused on distributional change.

NOVELTY DETECTION

Frequently Asked Questions

Novelty detection is a specialized machine learning technique for identifying new or unknown patterns in data that were not present in the training set. It is a critical component of robust data observability and quality posture, enabling systems to flag previously unseen anomalies.

Novelty detection is a semi-supervised machine learning technique that identifies data points or patterns that differ from the 'normal' data the model was trained on. It works by training a model exclusively on data representing the normal, expected state of a system. The algorithm learns a boundary or a density model of this normal data. During inference, any new data point that falls outside this learned boundary or has a low probability under the learned model is flagged as novel or anomalous. Common algorithms for this task include One-Class Support Vector Machines (SVM), Isolation Forests, and autoencoders, which are trained to reconstruct normal data with low error; novel data results in high reconstruction error.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.