Hostname: page-component-5db58dd55d-8mwbx Total loading time: 0 Render date: 2026-06-01T19:12:37.329Z Has data issue: false hasContentIssue false

Do stable neural networks exist for classification problems? – A new view on stability in AI

Published online by Cambridge University Press:  20 November 2025

David Liu
Affiliation:
CCIMI, University of Cambridge, Cambridge, UK
Anders Hansen*
Affiliation:
DAMTP, University of Cambridge, Cambridge, UK
*
Corresponding author: Anders Hansen; Email: ach70@cam.ac.uk
Rights & Permissions [Opens in a new window]

Abstract

In deep learning (DL), the instability phenomenon is widespread and well documented, and the most commonly used measure of stability is the Lipschitz constant. While a small Lipchitz constant is traditionally viewed as guarantying stability, it does not capture the instability phenomenon in DL for classification well. The reason is that a classification function – which is the target function to be approximated – is necessarily discontinuous, thus having an ‘infinite’ Lipchitz constant. As a result, the classical approach will deem every classification function unstable, yet basic classification functions a la ‘is there a cat in the image?’ will typically be locally very ‘flat’ – and thus locally stable – except at the decision boundary. The lack of an appropriate measure of stability hinders a rigorous theory for stability in DL, and consequently, there are no proper approximation theoretic results that can guarantee the existence of stable networks for classification functions. In this paper, we introduce a novel stability measure $\mathcal{S}(f)$, for any classification function $f$, appropriate to study the stability of classification functions and their approximations. We further prove two approximation theorems: First, for any $\epsilon \gt 0$ and any classification function $f$ on a compact set, there is a neural network (NN) $\psi$, such that $\psi - f \neq 0$ only on a set of measure $\lt \epsilon$; moreover, $\mathcal{S}(\psi ) \geq \mathcal{S}(f) - \epsilon$ (as accurate and stable as $f$ up to $\epsilon$). Second, for any classification function $f$ and $\epsilon \gt 0$, there exists a NN $\psi$ such that $\psi = f$ on the set of points that are at least $\epsilon$ away from the decision boundary.

Information

Type
Papers
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2025. Published by Cambridge University Press
Figure 0

Figure 1. Different classes of unstable classification functions.

Figure 1

Figure 2. Step functions with differently placed steps.

Figure 2

Table 1. Stability and performance metrics for different models. We have tested two custom networks, a ResNet18 and a VGG16. The custom networks are simple implementations of a fully connected network and a convolutional network, respectively. The algorithms used to estimate the distance to the decision boundary are F: FGSM, D: DPG, P: PGD, and L: LinfPGD. The results suggests that VGG16 is the most stable model, according to the definition of class stability