Support Vector Method for Novelty Detection

Bernhard Schölkopf, Robert C. Williamson, Alexander J. Smola, John Shawe-Taylor, John C. PlattNeurIPS 1999

This classic 1999 paper, authored by prominent figures in machine learning including Bernhard Schölkopf, Alex Smola, and John Platt, introduces what is now widely known as the One-Class SVM. It provides a robust, kernel-based framework for novelty detection—identifying whether new data points belong to the same distribution as a training set without needing to model the full probability density.

The Challenge of Novelty Detection

In many real-world scenarios, we only have access to "normal" data and want to detect "anomalies" or "novelties." Traditional unsupervised learning often defaults to density estimation, which attempts to figure out the exact probability $P(x)$ for every point in the space.

However, the authors argue—following Vapnik’s Principle—that one should never solve a harder problem than necessary. If the goal is simply to know if a point is "inside" or "outside" the typical data range, calculating the full density is overkill. The challenge lies in creating an algorithm that can define a simple, tight boundary around a dataset in high-dimensional space while remaining computationally efficient and theoretically sound.

The One-Class SVM Approach

The paper proposes a "Support Vector Method for Novelty Detection," extending the standard SVM framework to unsupervised learning. Here is the technical breakdown of their approach:

  1. The Kernel Trick: Similar to standard SVMs, the data is mapped into a high-dimensional feature space using a kernel function (e.g., the Gaussian RBF kernel).
  2. Separation from the Origin: Instead of separating two distinct classes of data, the algorithm treats the origin as the only member of a "second class." It seeks a hyperplane that separates the mapped training data from the origin with the maximum possible margin.
  3. The $\nu$-Property: The authors introduce a parameter $\nu \in (0, 1)$, which serves as the core control mechanism of the model. They mathematically prove that $\nu$ acts as both:
  4. An upper bound on the fraction of outliers (points falling outside the learned boundary).
  5. A lower bound on the fraction of Support Vectors (points sitting exactly on or outside the boundary).
  6. Optimization: The problem is formulated as a quadratic program (QP). Because the constraints are simpler than those in standard two-class SVMs, it can be solved efficiently using variants of Sequential Minimal Optimization (SMO).

Visualizing the Decision Boundary

To demonstrate how the algorithm adapts to different data shapes, the authors evaluated the method on synthetic 2D toy datasets. By varying the kernel width ($c$) and the $\nu$ parameter, the model can transition from a broad, inclusive boundary to a highly non-linear, tight boundary that isolates specific clusters.

Effect of varying nu and kernel width on 2D toy data

Key Insights and Results

  • Avoiding Density Estimation: By focusing strictly on the support of the distribution rather than its density, the model is significantly more robust, especially in cases where the true density isn't well-defined (e.g., singular components).
  • The Geometry of Gaussian Kernels: The authors note that when using a Gaussian kernel, all data points are mapped to the same side of the origin and have unit length in the feature space. This geometric property ensures that the data is always separable from the origin, making the "one-class" approach mathematically viable.
  • Robustness via Soft Margins: The inclusion of slack variables ($\xi_i$) creates a "soft margin," allowing the algorithm to ignore a certain percentage of training outliers. This prevents the boundary from being stretched too thin by noisy data.
  • Real-World Application (USPS Dataset): Beyond toy data, the algorithm was tested on the USPS Handwritten Digit Dataset (9,298 images of $16 \times 16$ pixels). The algorithm successfully identified the "worst" outliers in the test set. Qualitative results showed that the top-ranked outliers were genuinely difficult cases: digits that were severely smudged, incorrectly segmented, or clearly mislabeled (e.g., a "9" that looks exactly like a "4").
  • Efficiency: On a Pentium II 450 MHz processor (state-of-the-art at the time), the algorithm processed the entire USPS test set in just 36 seconds.

Limitations and Future Work

While the One-Class SVM became a foundational tool in anomaly detection, the authors noted a few preliminary limitations:

  • Hyperparameter Selection: While the $\nu$ parameter is intuitive, choosing the optimal kernel width ($c$) remains a challenge. The scale of the kernel significantly alters what the algorithm considers an "outlier."
  • Thresholding: For better generalization to novel data, the decision threshold ($\rho$) might need slight adjustments, a topic left for future research.
  • Structural Risk Minimization: The paper describes its approach to optimally choosing $\nu$ and $\rho$ as preliminary, suggesting that more advanced statistical techniques could refine these selections.

Summary updated

BibTeX
@inproceedings{scholkopf1999support,
  author = {Bernhard Schölkopf and Robert C. Williamson and Alexander J. Smola and John Shawe-Taylor and John C. Platt},
  title = {{Support Vector Method for Novelty Detection}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {1999},
  url = {https://openreview.net/forum?id=HJ-u__buWr},
}
Figure