Abstract
Deep neural networks are known to be vulnerable to small adversarial perturbations in test data. To defend against adversarial attacks, probabilistic classifiers have been proposed as an alternative to deterministic ones. However, literature has conflicting findings on the effectiveness of probabilistic classifiers in comparison to deterministic ones. In this paper, we clarify the role of randomization in building adversarially robust classifiers. Given a base hypothesis set of deterministic classifiers, we show the conditions under which a randomized ensemble outperforms the hypothesis set in adversarial risk, extending previous results. Additionally, we show that for any probabilistic classifier (including randomized ensembles), there exists a deterministic classifier that outperforms it. Finally, we give an explicit description of the deterministic hypothesis set that contains such a deterministic classifier for many types of commonly used probabilistic classifiers, i.e. randomized ensembles and parametric/input noise injection.
Introduction
Deep neural networks are notoriously fragile; a tiny, invisible "adversarial perturbation" to an input can trick a model into misclassifying it. To mitigate this, researchers often employ probabilistic classifiers, primarily through randomized ensembles (selecting a model at random for each prediction) or noise injection (adding random noise to inputs or weights during inference).
The effectiveness of randomization has been a subject of debate. While some theoretical work suggests randomization is necessary for reaching a Nash equilibrium against an attacker, other findings suggest that for every randomized model, an equally good deterministic one exists. This research, presented at NeurIPS 2023, provides a rigorous framework to resolve these conflicting views.
Theoretical Framework: The Matching Penny Gap
The authors analyze Adversarial Risk, defined as the expected loss of a classifier against an optimal attacker who can perturb inputs within a budget $\epsilon$. A central concept introduced is the Matching Penny Gap. This metric quantifies the advantage gained when an attacker cannot find a single perturbation that simultaneously fools all models in an ensemble.
As shown in Figure 1, if different models are vulnerable in different ways (disjoint failure regions), the Matching Penny Gap is positive, and randomization provides a clear benefit over using any single model from the set.
The Role of Randomization
Randomization helps by "expanding" a limited set of base models. If the base hypothesis set is restricted, a randomized mixture can achieve lower adversarial risk than any individual member of that set. This occurs in "Matching Penny" configurations where the attacker is hindered by uncertainty about which specific model will be used.
Figure 2 illustrates such a scenario using synthetic data. Here, the randomized ensemble exploits the diversity of vulnerabilities among the base classifiers to achieve superior robustness.
Deterministic Equivalents and Thresholding
A key contribution of the paper is proving that randomization is not "magic." For binary classification, the authors show that for any probabilistic classifier (including complex noise-injection schemes), there exists a deterministic threshold classifier that is at least as robust.
They introduce Threshold Hypothesis Sets (THS), demonstrating that any probabilistic binary classifier can be viewed as a weighted average of deterministic ones. By applying a threshold to this average, one obtains a deterministic model that matches or exceeds the probabilistic model's performance. For instance, the popular "Randomized Smoothing" defense is shown to be a specific type of deterministic threshold classifier derived from input-noise injection.
Key Results
- Quantifying the Gain: Theorem 3.2 formally states that the adversarial risk of a randomized mixture equals the average risk of its components minus the expected Matching Penny Gap.
- Optimality of Determinism: Theorem 4.1 proves that in the binary case, the best deterministic classifier in the THS is always as good as or better than the probabilistic model.
- Closure and Robustness: If a set of deterministic models is "rich" enough (closed under union and intersection of decision regions), randomization provides zero additional benefit.
Conclusion and Future Work
While randomization can be a powerful tool when working with limited model classes, it can always be replaced by a sufficiently complex deterministic "threshold" version in binary settings. However, this result does not necessarily hold for multi-class classification, where recent examples suggest optimal classifiers might inherently require probability.
Future research is needed to explore the "risk-complexity trade-off," as the deterministic equivalent might be harder to represent or train. Additionally, the authors suggest that explicitly optimizing for the Matching Penny Gap could lead to more robust defenses in practice.
Summary updated