Robust One-Class Classification with Signed Distance Function using 1-Lipschitz Neural Networks
Louis Bethune, Paul Novello, Thibaut Boissin, Guillaume Coiffier, Mathieu Serrurier, Quentin Vincenot, Andres Troya-Galvis
TL;DR
OCSDF introduces learning the Signed Distance Function $\mathcal{S}$ to the boundary $\partial\mathcal{X}$ of the data support for One Class Classification by training a $1$-Lipschitz neural network with the Hinge Kantorovich-Rubinstein (HKR) loss against a carefully constructed complementary distribution $Q$. Through an Adapted Newton-Raphson sampling scheme and alternating minimization, the method yields a robust normality score whose behavior is underpinned by the Eikonal condition $\|\nabla_x \mathcal{S}(x)\|=1$, enabling certifiable $l_2$-robustness and a certified AUROC computable at the same cost as standard AUROC. Empirically, OCSDF is competitive on tabular and image OCC benchmarks, while offering provable robustness advantages and a natural link to implicit surface parametrization and generative visualization. The approach also opens avenues for shape reconstruction from point clouds and deeper integration of OCC with geometric representations, with code available at the authors' repository. Overall, OCSDF addresses core OCC challenges—negative data scarcity and adversarial vulnerability—by grounding the decision boundary in a geometrically meaningful SDF learned via Lipschitz-constrained networks.
Abstract
We propose a new method, dubbed One Class Signed Distance Function (OCSDF), to perform One Class Classification (OCC) by provably learning the Signed Distance Function (SDF) to the boundary of the support of any distribution. The distance to the support can be interpreted as a normality score, and its approximation using 1-Lipschitz neural networks provides robustness bounds against $l2$ adversarial attacks, an under-explored weakness of deep learning-based OCC algorithms. As a result, OCSDF comes with a new metric, certified AUROC, that can be computed at the same cost as any classical AUROC. We show that OCSDF is competitive against concurrent methods on tabular and image data while being way more robust to adversarial attacks, illustrating its theoretical properties. Finally, as exploratory research perspectives, we theoretically and empirically show how OCSDF connects OCC with image generation and implicit neural surface parametrization. Our code is available at https://github.com/Algue-Rythme/OneClassMetricLearning
