Generalized Reference Kernel for One-class Classification

Jenni Raitoharju, Alexandros IosifidisarXiv 2022

TL;DR

This paper introduces the Generalized Reference Kernel (GRK), a flexible framework that enhances standard kernel methods for one-class classification by incorporating a set of "reference vectors." By strategically choosing these vectors—ranging from random noise to external negative samples—researchers can implicitly regularize models and significantly improve accuracy on small-scale datasets where deep learning is impractical.

What Problem Does This Paper Address?

One-class classification (OCC) is the task of building a model using data from only a single "target" class, typically for anomaly or novelty detection. While deep learning dominates large-scale tasks, traditional kernel-based methods like Support Vector Data Description (SVDD) and One-Class Support Vector Machines (OC-SVM) remain the go-to for small-scale problems.

However, these traditional methods rely heavily on the choice of the kernel function (like the popular RBF kernel). Most research assumes the standard kernel is already optimal and focuses on approximating it for speed. The authors challenge this, arguing that the kernel itself can be improved. They address the lack of training data in small-scale scenarios by using reference vectors to perform implicit data augmentation and regularization within the kernel space.

Methods

The authors propose a Generalized Reference Mapping and its corresponding kernel. The core idea is to transform the data into a new feature space defined by its relationship to a set of reference vectors ($R$).

  1. The Mapping: They compute a base kernel (like RBF) between the data and the reference vectors. They then center this kernel matrix and perform an eigendecomposition to create an explicit mapping function $\phi(x)$.
  2. The Kernel: This mapping leads to a new kernel formulation: $\kappa(x_i, x_j) = \tilde{k}_{Rx_i}^T \tilde{K}_{RR}^+ \tilde{k}_{Rx_j}$, where $\tilde{K}_{RR}^+$ is the pseudo-inverse of the centered base kernel matrix of the reference vectors.

The authors explore seven strategies for selecting these reference vectors ($R$):

  • Case 1: $R$ is the training set (equivalent to the Non-linear Projection Trick).
  • Cases 2, 4, 7: $R$ consists of random vectors drawn from a normal distribution (varying in number).
  • Case 3: $R$ is a random subset of the training data (Nyström-like).
  • Case 5: $R$ includes both training data and some available negative samples (outliers).
  • Case 6: $R$ includes training data plus random noise.

Datasets

The researchers evaluated their approach on 14 subtasks derived from six small-scale datasets from the UCI machine learning repository:

  • Iris: (3 classes, 4 dimensions)
  • Seeds: (3 classes, 7 dimensions)
  • Ionosphere: (2 classes, 34 dimensions)
  • Sonar: (2 classes, 60 dimensions)
  • Qualitative Bankruptcy: (2 classes, 6 dimensions)
  • Somerville Happiness: (2 classes, 6 dimensions)

Details on the number of samples ($N$) and reference vectors ($T$) used for each task are provided in the paper's dataset summary:

Dataset properties and task definitions

Key Insights and Ideas

  • Randomness as Regularization: Surprisingly, using random reference vectors (Cases 2, 4, and 7) often outperformed using the actual training data as references. This suggests that projecting data against random points in the feature space provides a form of implicit regularization, preventing the model from overfitting to the small target sample.
  • Centering is a Double-Edged Sword: The mathematical centering required for the Non-linear Projection Trick (NPT) generally improved SVDD performance but significantly harmed OC-SVM. This indicates that kernel "improvements" are not universal and must be tailored to the specific optimization objective of the classifier.
  • Exploiting "Illegal" Data: In Case 5, the authors used negative samples as reference vectors. While these samples aren't used to label the training data (maintaining the one-class setup), their presence in the kernel definition helped OC-SVM draw much better boundaries.
  • Rank Adaptation: The GRK allows the model to adapt the rank of the kernel matrix to the specific task. In many cases, a lower-rank representation achieved through GRK led to higher accuracy than the full-rank base kernel.

Key Results

The performance was measured using the Geometric Mean (Gmean) of the True Positive Rate and True Negative Rate.

  • SVDD Improvements: For SVDD, random reference vectors (Case 2) consistently beat the base RBF kernel. For instance, in the "Bank2" task, the Gmean rose from 28.5% with the base kernel to 67.4% with the proposed method (see the table below).
SVDD results comparing base kernel to various GRK cases
  • OC-SVM Breakthroughs: For OC-SVM, incorporating negative samples into the reference set (Case 5) was exceptionally effective, often outperforming all other variants and the base SVDD results. On the "Ion1" task, Case 5 achieved a Gmean of 70.6%, compared to just 36.7% for the base kernel.
OC-SVM results showing the impact of different reference vector strategies

Limitations and Future Work

  • Computational Complexity: The method involves eigendecomposition, which has $O(N^3)$ complexity. While fine for the small-scale datasets studied here, it would require approximation techniques (like those in Case 3) for large-scale applications.
  • The "One-Class" Assumption: Case 5, while powerful, technically violates the pure one-class assumption by requiring some negative data. The authors suggest future work could explore using "pseudo-negatives" or synthetic outliers to achieve similar gains without real negative samples.
  • Algorithm Specificity: The divergent results between SVDD and OC-SVM suggest that future research should focus on developing kernel properties specifically optimized for the geometry of the chosen classification algorithm.

Summary updated

BibTeX
@misc{raitoharju2022generalized,
  author = {Jenni Raitoharju and Alexandros Iosifidis},
  title = {{Generalized Reference Kernel for One-class Classification}},
  year = {2022},
  eprint = {2205.00534},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.00534},
}
Figure