Robust One-Class Classification with Signed Distance Function using 1-Lipschitz Neural Networks

Louis Béthune, Paul Novello, Thibaut Boissin, Guillaume Coiffier, Mathieu Serrurier, Quentin Vincenot, Andres Troya-Galvis · DOI

Introduction

One-Class Classification (OCC) is a fundamental task in machine learning, primarily utilized for anomaly, outlier, or fraud detection. Unlike multi-class classification, OCC models are trained exclusively on "normal" data, with the objective of defining a decision boundary that encapsulates the distribution of known samples. However, deep learning-based OCC approaches face two significant challenges: the absence of negative samples to define the boundary's exterior and a lack of robustness against adversarial perturbations. Small, often imperceptible changes to an input can lead a model to misclassify a clear anomaly as a normal sample.

This paper introduces OCSDF (One-Class Signed Distance Function), a framework that addresses these issues by bridging computer graphics principles with anomaly detection. By learning a Signed Distance Function (SDF) using 1-Lipschitz neural networks, the authors provide a method that is not only effective at boundary definition but also offers provable safety guarantees through "certified robustness."

The OCSDF Framework

Signed Distance Functions and 1-Lipschitz Constraints

In computer graphics, an SDF represents the distance from a given point to the nearest surface of an object, where the sign indicates whether the point is inside or outside. OCSDF treats the boundary of the normal data distribution as this surface. To ensure the network accurately approximates a distance metric, the authors utilize 1-Lipschitz neural networks. These networks are constrained such that the change in output is bounded by the change in input (i.e., $||f(x) - f(y)|| \le ||x - y||$).

To optimize this function, the framework employs the Hinge Kantorovich-Rubinstein (HKR) loss. Mathematically, a 1-Lipschitz network minimizing this loss is guaranteed to approximate the SDF of the data distribution, effectively turning a standard normality score into a physical, geometric distance.

Boundary Targeting via Adapted Newton-Raphson

A core difficulty in OCC is the lack of negative data. OCSDF overcomes this by using an Adapted Newton-Raphson algorithm to generate synthetic boundary points. The process begins with random noise and uses the network's own gradients to iteratively "push" these points toward the zero-level set (the boundary) of the learned SDF. These synthetic points act as the necessary counter-examples to sharpen the decision boundary and prevent the model from over-generalizing the "normal" region.

Experimental Evaluation

The authors evaluated OCSDF across three distinct domains to demonstrate its versatility and robustness:

  1. Tabular Data: Using 19 datasets from the ODDS library (e.g., medical and cardiac data), OCSDF achieved competitive performance, ranking 7.1/15 among established baselines like Isolation Forests.
  2. Image Data: On MNIST and CIFAR-10 (one-vs-all), OCSDF demonstrated its primary advantage: robustness. While traditional models like Deep SVDD saw performance collapse under $l_2$ adversarial attacks, OCSDF maintained high performance levels.
  3. 3D Point Clouds: Using the ModelNet10 dataset, the authors showed that OCSDF could reconstruct smooth 3D surfaces from sparse point clouds, highlighting the method's strong inductive bias and its roots in geometric modeling.

Certified Robustness

The most significant contribution of the OCSDF framework is the introduction of Certified AUROC. Because the network is strictly 1-Lipschitz, the authors can analytically calculate a lower bound on the model's performance that is guaranteed to hold regardless of adversarial manipulation within a specific radius. This provides a "safety guarantee" that is often missing from deep learning models used in security-critical applications.

Discussion and Limitations

While OCSDF provides a robust theoretical framework, it faces challenges in high-dimensional pixel spaces. The model relies on Euclidean distance ($l_2$), which is often a poor measure of semantic similarity for complex images; for instance, a one-pixel shift in an image can result in a large Euclidean distance despite the content remaining identical. Additionally, the method requires the manual tuning of a "margin" parameter ($m$), which dictates the expected distance between normal and anomalous data.

Future research directions include the exploration of non-Euclidean distance metrics that are more semantically meaningful for computer vision and the refinement of orthogonal convolution layers to enhance the effectiveness of 1-Lipschitz constraints in deeper architectures.

Summary updated

BibTeX
@inproceedings{bethune2023robust,
  author = {Louis Béthune and Paul Novello and Thibaut Boissin and Guillaume Coiffier and Mathieu Serrurier and Quentin Vincenot and Andres Troya-Galvis},
  title = {{Robust One-Class Classification with Signed Distance Function using 1-Lipschitz Neural Networks}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=Fl5fjmIIe7O},
}
Figure