Abstract
One-Class Support Vector Machines (OCSVMs) are powerful tools for anomaly detection, yet their performance is highly dependent on the selection of hyperparameters—specifically $\nu$ and $\sigma$. Tuning these parameters is notoriously difficult because, by definition, one-class classification lacks outlier data for validation. This paper introduces Self-adaptive Data Shifting (SDS), a framework that automatically generates high-quality "pseudo-outliers" and "pseudo-target" data to optimize hyperparameters without manual intervention or additional tuning parameters.
Introduction
In One-Class Classification (OCC), the goal is to define a boundary for a "target" class (normal data) such that anomalies can be accurately identified. The OCSVM is a standard algorithm for this task, but its success hinges on two hyperparameters: $\nu$, which handles noise and outliers in the training set, and $\sigma$, which controls the smoothness of the decision boundary.
The Challenge of Hyperparameter Selection
The "Catch-22" of OCSVMs is that selecting the best $\nu$ and $\sigma$ typically requires a validation set containing both normal data and outliers. Since outliers are often unavailable during training, researchers frequently resort to generating random "pseudo-outliers" or using computationally expensive cross-validation. However, random outliers often fail in high-dimensional spaces due to the "curse of dimensionality," and standard cross-validation can be slow and sensitive to noise in the training data.
Methodology: Self-adaptive Data Shifting (SDS)
The authors propose the Self-adaptive Data Shifting (SDS) framework, which utilizes two distinct shifting mechanisms to create a robust validation environment:
1. Negative Shifting (Generating Outliers)
Instead of populating the feature space with random points, SDS identifies "edge patterns"—data points on the periphery of the target distribution. It then shifts these points away from the center of the data along the negative density gradient. This creates a focused set of high-quality pseudo-outliers that reside exactly where the decision boundary needs to be most precise.
2. Positive Shifting (Generating Validation Targets)
To avoid the overhead of leave-one-out cross-validation, SDS shifts training points toward denser regions (the positive density gradient). This creates a "cleaned" version of the target data. If a training point was originally noise, positive shifting pulls it back toward the normal group, ensuring the model is validated against the intended data distribution rather than noisy artifacts.
Following these shifts, the algorithm performs a grid search on the generated sets to identify optimal hyperparameters. The entire process maintains a complexity of $O(N^2 \log N)$, making it significantly faster than standard 10-fold cross-validation.
Experimental Evaluation
The SDS method was evaluated across three distinct categories:
- Synthetic 2-D Datasets: Six complex distributions (e.g., Banana, Spiral, Ring) were used to visualize decision boundaries.
- Benchmark Datasets: 18 real-world datasets from the UCI Machine Learning Repository and LIBSVM, including Adult, Abalone, Diabetes, and Sonar.
- Image Data: The MNIST handwritten digit dataset, utilizing 512-D Gist features to test performance in high-dimensional feature spaces.
Key Results and Insights
- Superior Accuracy: SDS consistently outperformed seven state-of-the-art hyperparameter selection methods (such as Hyper-cube, Skewness, and MIES) across the 18 benchmark datasets, as measured by $f1$-score and Matthews Correlation Coefficient (MCC).
- High-Dimensional Performance: On the MNIST dataset, SDS yielded the best performance for 9 out of 10 digits, proving more effective than standard cross-validation in high-dimensional spaces.
- Zero-Tuning Automation: Unlike competing methods that introduce new hyperparameters (e.g., the number of pseudo-outliers to generate), SDS is fully automatic, leveraging the data's own geometry via $k$-nearest neighbors to estimate density gradients.
Conclusion
Self-adaptive Data Shifting offers a robust, automated solution for OCSVM hyperparameter selection. By prioritizing the quality of pseudo-outliers over quantity and using density gradients to refine validation targets, SDS achieves high accuracy with minimal computational overhead. Future work may involve exploring more sophisticated search strategies, such as Bayesian Optimization, or applying the data-shifting logic to broader imbalanced classification problems.
Summary updated