Interesting properties of robust classificationIntriguing Properties of Robust Classification
The authors argue theoretically and experimentally that the bottleneck of robust classification lies mainly in the amount of training data, and give a construction in which learning a robust classifier requires exponentially much data.
- Ten years after adversarial examples appeared, it is still impossible to train a classifier that is both accurate and guaranteed robust; the authors aim to answer why robust classification is difficult and to refute the common explanation that "a robust and accurate classifier does not exist."
- The authors construct a distribution family proving a "no free robustness" theorem: accurate classifiers are easy to learn and perfect robust classifiers exist, but learning a robust classifier requires data growing exponentially with dimension; and on MNIST/CIFAR-10/CIFAR-100 they use 1-Lipschitz networks to do data-scaling, PCA-subspace, and overfitting experiments.
- On CIFAR-10, doubling the dataset raises certified robust accuracy by about 5 points; a principal component subspace containing only 2% of the variance lets the standard network reach 85% test accuracy but robust training only 9%; 1-Lipschitz networks can robustly overfit the training set, and the same architecture with a different loss can reach 93.2% accuracy or 61.7% CRA.
- The authors point out: Figure 4 only shows that the capacity is sufficient for the existing data volume; after the data is expanded by several orders of magnitude, a larger model may be needed; the low quality of generated data may weaken the scaling gains; the "intrinsic dimension" estimated from nearest-neighbor distances is about 28, meaning that the amount of data required for 1-NN to reach close distances is unattainable in practice.
- Evaluated models
- CPL ConvNetAOL MLPRandomized SmoothingSimpleConvNet
- Benchmarks
- CIFAR-10CIFAR-100MNISTCIFAR-10 风格的扩散模型生成数据(取自 [40],100 万张)
- Metrics
- accuracycertified robust accuracy (CRA)robust accuracy
Addressing the problem that, a decade after the discovery of adversarial examples, it remains difficult to train high-accuracy classifiers guaranteed robust to small input perturbations, Bernd Prach and Christoph H. Lampert propose another explanation: under certain settings, robust generalization may require an impractical amount of data to be achievable. Prior work often attributed this difficulty to the nonexistence of classifiers that are both robust and accurate, but the authors point out that humans in computer vision usually possess both, so this assumption does not match reality. They theoretically construct a setting in which a robust classifier exists and an accurate classifier is easy to learn, but learning a robust classifier requires an exponential amount of data. Evaluations on datasets such as CIFAR-10 show that the amount of training data is the main factor determining robust performance. The authors also find that the data contains low-amplitude directions that aid non-robust generalization, but robust classifiers cannot exploit them.
Paper analysis
What problem does this paper attempt to solve?
The authors ask why robust classification is difficult and propose that data quantity is the main bottleneck, rather than that robust accurate classifiers do not exist.
Core question: why has it so far been impossible to train classifiers that are both highly accurate and guaranteed robust to small perturbations? Adversarial examples were discovered 10 years ago, and the authors believe the field still lacks an understanding of the root cause of the difficulty of robust classification.
- Importance of the problem: according to the authors, adversarial examples harm user trust, constitute a security risk, and, by contradicting human perceptual experience, hinder the construction of interpretable models; the human visual system itself proves that highly accurate and robust classifiers can exist.
- Existing explanations and their shortcomings: existing hypotheses include a natural robustness-accuracy trade-off, insufficient network expressiveness, and excessive training computation; the authors consider these explanations inconsistent with the fact that "humans are both accurate and robust". A recent large-scale study [31] shows that architectures and training techniques with very different memory and computation requirements end up with similar robust accuracy, which the authors take to suggest a more fundamental obstacle.
- Core observation: non-robust classifiers can exploit low-magnitude features in the data, whereas robust classifiers can rely only on high-magnitude features; when low-magnitude features generalize well and high-magnitude features generalize poorly, an exponential data-amount gap arises between robust and non-robust learning.
- Contributions of the paper: the authors give three insights—(1) construct a distribution family on which learning a robust classifier theoretically requires exponentially much data (Theorem 1); (2) give experimental evidence on MNIST, CIFAR-10, CIFAR-100 that data amount determines robust performance, and prove that CIFAR-10 contains a low-variance subspace useful for non-robust classification but unusable by robust classifiers; (3) prove that robust architectures can both robustly overfit the training set and generalize non-robustly, so the bottleneck is not architecture.
What related research exists?
Related work is organized around four groups: the sample complexity of robust generalization, the robustness-accuracy tradeoff, model complexity, and robust/non-robust features.
Robust generalization and sample complexity
- Schmidt et al. [34] (2018)—on a simple example with a Gaussian distribution, prove that robust classification requires far more training samples than non-robust classification: a single sample suffices to construct an accurate classifier, but ϵ-robust classification under the L∞ norm requires about Ω(ϵ²√d/log(d)) samples. The authors point out the difference of this paper: it focuses mainly on L2 robustness, and in this paper's example the sample-size gap can reach Ω(2^d).
- Bhagoji et al. [5] (2019) and Dan et al. [11] (2020)—extend [34] to different Lp norms and prove bounds on excess risk. The authors point out that they focus more on distributions where the optimal robust classifier achieves 0 risk, and consider that the sample complexity to get within 1% of the optimal risk is more worth studying than convergence rates.
- Bhattacharjee et al. [6] (2021)—on distributions where a perfect robust classifier exists, prove that learning a robust classifier with maximum margin may require d times as many samples; the authors state that this paper further shows that even when the goal is only robustness to small perturbations (not maximum margin), robust classification can still be hard.
Robustness-accuracy trade-off
- Tsipras et al. [37] (2019) and [4, 13, 33, 43]—observe theoretically and experimentally that in some distributions a classifier is either very accurate or fairly robust, and cannot be both. The authors consider this trade-off not the most promising research direction for image classification tasks, because in image tasks classifiers that are both accurate and robust do exist.
Model complexity and other explanations
- [14, 26, 30] (hypothesis class complexity), [7, 12] (required computation), [8, 23] (model size)—argue that robust classification requires more complex models; the distributions used are often similar to this paper's (a hard-to-learn mapping plus a low-magnitude feature from which the label can be read off directly). The authors point out that this paper's results also imply: on some distributions, training or inference requires exponentially much computation.
- Raghunathan et al. [32] (2019)—construct distributions where adversarial training harms test performance, and argue that unlabeled data plus pseudo-labels can improve performance; Min et al. [25] (2021)—on Gaussian data, the test loss of linear classifiers may worsen as data increases or exhibit double descent.
Robust/non-robust features and scaling
- Ilyas et al. [20] (2019)—propose that adversarial examples stem from features in the data distribution that are useful and generalize but are not robust. The authors consider their definition of features (any mapping from inputs to reals) too general, whereas this paper proves that within a linear subspace of the input space there exist directions with extremely small variance that are usable for (non-robust) classification.
- Bartoldson et al. [3] (2024)—study robust scaling laws under L∞ perturbations, concluding that matching human CIFAR-10 performance with existing techniques requires unreasonable computation.
- Data-augmentation work [1, 16, 18, 19, 40]—use diffusion models to generate CIFAR-10-style data to improve robust classifier performance; this paper, in the appendix, does scaling experiments with [40]'s 1 million generated images and reports [19]'s LiResNet (78.1% CRA) as a reference.
The authors position this paper as: using theoretical construction plus real-data experiments to establish the hypothesis that "data amount is the main limiting factor for robust classification" as an explanation more fitting reality than the trade-off account or the expressiveness account.
How does the paper address this problem?
The authors argue for the data-amount bottleneck using a "no free robustness" theorem plus scaling, subspace, and overfitting experiments with 1-Lipschitz networks on real datasets.
Overall approach: first construct a family of distributions theoretically and prove that an exponential sample complexity gap can exist between robust learning and non-robust learning; then use 1-Lipschitz networks (which allow efficient computation of certified robust accuracy) to test on real datasets the respective roles of data amount, feature magnitude, and architecture.
Theoretical construction (Theorem 1 and Theorem 2)
- Distribution family F: take data dimension d = ⌈log₂n⌉ + 7, and for each binary function ϕ on the hypercube {±1}^(d−1) define a distribution Dϕ: the first d−1 coordinates are sampled uniformly (robust, high-magnitude features, whose relationship with the label y = ϕ(x₁,…,x_{d−1}) is deterministic but hard to learn), the d-th dimension x_d = δ·ϕ(x₁,…,x_{d−1}) (a low-magnitude, non-robust feature fully correlated with the label), y = sign(x_d).
- Theorem 1 (No Free Robustness) three properties: (1) on every Dϕ there exists a classifier with 100% robust accuracy (take the sign of the robust features and then apply ϕ, robust to any ϵ < 1 的扰动);(2) 存在学习算法对任意 Dϕ 学到 100% 测试准确率的(线性)分类器(f(x) = sign(x_d));(3) 任意学习算法在 F 上平均的鲁棒准确率低于 51%——证明思路类似 No Free Lunch 定理:把 x_d 置 0 的攻击使鲁棒分类器无法利用该特征,而 ϕ 因 |Φ| 巨大难以从未见样本泛化。
- Theorem 2(匹配上界):若分布 D(数据在 [0,1]^d)上存在间隔 δ 的 L∞ 鲁棒分类器,则当 n ≥ 37⌈ 1/δ ⌉d 时,1-最近邻分类器对间隔 δ/2 可达到至少 99% 的平均 L∞ 鲁棒测试准确率;即指数级数据虽必需、但也足够。作者注记:若只假设 L2 鲁棒性,所需样本可能更多,达 O(c^d · d^(d/2))。
鲁棒准确率的度量
- 计算网络真实鲁棒准确率是 NP-hard,作者采用 1-Lipschitz 分类器 f(x) = argmax_i [g(x)]_i(g 为 1-Lipschitz),其认证鲁棒准确率(CRA)是鲁棒准确率的下界,可高效计算:CRA(f) = 1/n∑i 𝟙[ [g(xi)]yi > maxc ≠ yi[g(xi)]c + √2ϵ ].
- Unless otherwise specified, the perturbation radius is ϵ = 36/255 (a commonly used value in the literature).
Models and training setup
- SimpleConvNet (non-robust baseline): 8 convolutional layers plus 1 linear layer, BatchNorm + ReLU, MaxPooling; Softmax temperature 1/8 followed by CrossEntropy.
- 1-Lipschitz models: an 8-layer MLP or the ConvNet of [31] (input zero-padded to 64 channels, 5 blocks each containing 3 convolutional layers plus 1 1-Lipschitz linear layer), with linear layers using AOL [29] or CPL [24], activation function MaxMin, downsampling using PixelUnshuffle; loss is OffsetCrossEntropy (offset and temperature both 1/4); the only tuned hyperparameter is the peak learning rate, first training 100 epochs and selecting the learning rate by validation-set CRA, with evaluation usually training 3000 epochs.
- Randomized Smoothing: SimpleConvNet as base classifier, Gaussian noise added during training, σ = 1/8, trained 100 epochs; class probabilities approximated with 1000 samples, and this approximation is reported directly.
- Optimization: SGD + Nesterov momentum 0.9, batch size 256, OneCycleLR; preprocessing subtracts the training-set mean (no rescale); data augmentation as in [28, 41] (random crop, random flip, random zeroed patch).
Experimental design
- Scaling experiments: subsample training sets such as CIFAR-10 to obtain different sizes (48 to 50000); to keep computation constant, when the dataset is reduced by a factor k the number of epochs is multiplied by k; additionally, the appendix does a control with fixed data amount and only more epochs, and uses [40]'s 1 million diffusion-model-generated images to scale up to 10^6.
- Feature experiments: flatten CIFAR-10 images and do PCA, project onto different subsets of principal components and transform back to image space, train standard and 1-Lipschitz CPL ConvNets with the same setup, and compare accuracy and CRA on each variance subspace.
- Architecture experiments: construct a single architecture and, via the Self-NormalizingCrossEntropy loss with a trade-off parameter t (computing cross-entropy after std-normalizing the scores), switch between accuracy and CRA by changing only t, to test whether architectural limitations are the cause of poor generalization.
What experiments did the paper conduct?
The three sets of experiments—data scaling, PCA subspace, and robust overfitting—all point to the same conclusion: data quantity is the main determinant of robust performance.
Experimental setup
- Models tested: CPL ConvNet, AOL MLP (both 1-Lipschitz), SimpleConvNet (non-robust), Randomized Smoothing classifier (with SimpleConvNet as base); appendix Figure 6 additionally reports [19]'s LiResNet as a reference (not trained by the authors).
- Datasets: training-set subsamples of CIFAR-10, CIFAR-100, MNIST (CIFAR sizes 48–50000, MNIST 58–60000); the appendix uses [40]'s 1 million CIFAR-10-style generated images to extend to 10^6.
- Metrics: accuracy and certified robust accuracy (CRA, ϵ = 36/255, L2); the Theorem 2 part uses L∞.
- Training amount: evaluation usually trains 3000 epochs; in subsampling experiments, when the dataset is reduced by a factor k the epochs are multiplied by k to keep computation constant.
- Number of repetitions: the paper does not report the number of repetitions or variance for each setting.
Main results
Main results are in Figure 1, Figure 2 (line plots, with no numerical annotations in the converted text) and Table 1:
Swipe horizontally to read the table
Principal component subset Variance share Test accuracy Test CRA 1–16 72% 43% 31% 1–512 98% 91% 61% 513–3072 2% 85% 9% 2049–3072 0.02% 39% 0% 1–16 & 513–3072 74% 86% 35% 1–3072 (full) 100% 94% 62% (According to Table 1, CIFAR-10, standard network and CPL ConvNet)
- The authors state: doubling the dataset size raises CRA by about 5 points; across datasets, CRA grows approximately linearly with the logarithm of training data, in a sigmoid shape (CIFAR-100 starts near random level, MNIST flattens at the large-data end).
- The authors state: when trained long enough, the robust performance of convolutional architectures and MLPs is very close, and the convolutional inductive bias helps little for robust classification, which differs greatly from non-robust classification.
- From Table 1 the authors conclude: in CIFAR-10 there exist low-magnitude directions that are useful for classification (the standard network reaches 85% test accuracy on the 2%-variance subspace) yet cannot be used for robust classification (CRA only 9%), consistent with the construction properties of Theorem 1.
Scaling of computation and additional data (Appendix Section 9)
- Computation only: fixing dataset size and increasing training epochs (24 to 30000), Figure 5 shows the accuracy and CRA curves flattening as epochs increase, with gains far smaller than adding data; the authors consider the ideal approach to be scaling data and computation together.
- Generated-data extension: using [40]'s 1 million generated images to extend the training set to 10^6, Figure 6 shows the scaling trend continuing to larger data sizes for all models; but the authors point out that when 1-Lipschitz models are naively trained on more data (without scaling up the model), gains eventually diminish, whereas Randomized Smoothing's estimated performance grows well with data amount.
- Reference: the authors report that [19] reaches 78.1% CRA using 1 million diffusion-model-generated images (filtered by a model trained on 940 million images), and consider that the lower quality of generated data may partly explain the diminishing gains.
Robust overfitting and architecture experiments
- Robust overfitting (Figure 4): setting the loss offset to √2 and training 3000 epochs without augmentation, both CPL ConvNet and AOL MLP can robustly fit the CIFAR-10 training set—the MLP's training-set CRA remains near perfect at perturbation size 1; but test-set performance is much worse at any perturbation size. The authors emphasize: this shows capacity is not the current bottleneck, but does not mean model capacity suffices to robustly fit the data distribution.
- Architecture and generalization (Table 3, Figure 9): the same 1-Lipschitz architecture with Self-NormalizingCrossEntropy reaches 93.2% accuracy at t = 0 (CRA 0.0%) and 61.7% CRA at t = 1/10 (accuracy 76.8%). The authors state this proves the generalization ability of 1-Lipschitz architectures can rival conventional ConvNets without needing layers such as MaxPooling, and that architectural limitations are not the cause of poor generalization; at the same time the authors note that no t value achieves both simultaneously, exhibiting the accuracy-robustness trade-off observed in the literature.
Other ablations and analyses
- High-variance principal components: using only the first 16 principal components (72% variance), the standard network's training accuracy is ≥ 99% but test accuracy is about 43%; the 1-Lipschitz ConvNet reaches 64% training CRA (with augmentation) / 97% (without augmentation); the authors consider that the high-magnitude features contain only a weak generalization signal.
- No-augmentation control (Figure 8): even when projected onto only the first 16 principal components, the model can robustly overfit the training data.
- Nearest-neighbor distance (Figure 10): on CIFAR-10 the L2 distance from test points to the nearest training point decreases approximately linearly with log(n), consistent with the theoretical analysis; from this the "intrinsic dimension" is estimated as d∗ ≈ 28, and the authors calculate that for 1-NN to reach a distance close to 1 requires n ≥ 10^31, unreachable in practice.
- MNIST setup (Appendix 9.3): images zero-padded to 32×32, ConvNet base channels reduced to 16, MLP width reduced to 1024, augmentation simplified to random crop (size 4) plus random flip.
What are some points that can be further explored?
The authors point out that the capacity conclusion is limited to the current data amount, that generated-data quality may drag down scaling, and call for future work to scale data and models together.
Limitations and future directions noted by the authors
- Boundary of the capacity conclusion (Section 5.3): the robust overfitting results only show that model capacity is sufficient for the current amount of training data, not that it suffices to robustly fit the data distribution; the authors believe that after the data amount grows by several orders of magnitude, larger models will be beneficial.
- Diminishing gains from naive scaling (Appendix 9.2): when 1-Lipschitz models are trained directly on more data without scaling up, gains eventually diminish; the authors point out that carefully designed training setups in related work can sustain improvement, and that this effect may partly stem from the lower quality of generated data.
- The data amount for the nearest-neighbor route is unreachable (Section 12): the "intrinsic dimension" estimated from Figure 10 is about 28, meaning that for 1-NN to obtain a nearest neighbor at a distance close to 1 requires n ≥ 10^31, which the authors call unreachable in practice.
- Future directions (Section 7): the authors hope future research will further explore scaling both the dataset and the classifier size.
Scope of experiments
- The models tested are 4 in total: CPL ConvNet, AOL MLP, SimpleConvNet, Randomized Smoothing classifier (the appendix additionally reports [19]'s LiResNet numbers as a reference).
- The datasets are three: CIFAR-10, CIFAR-100, MNIST, plus [40]'s CIFAR-10-style generated data; all experiments are image classification.
- The robustness measure is certified robust accuracy (CRA), ϵ = 36/255, L2 norm; Theorem 2 and its proof use L∞, and the paper does not report robust accuracy for real models under L∞ or measured adversarial attacks.
- The paper does not report the number of repetitions, number of random seeds, or error bars for each experimental setting.
- The theoretical results are for the distribution family constructed by the authors; the authors state that real datasets and this construction "share certain features", based on the PCA subspace experiments (Table 1).
Summarize the main content of the paper
Theoretical plus experimental argument: the difficulty of robust classification lies in data amount—robust learning may require exponentially much data, and architecture and capacity are not the bottleneck.
A theoretical plus empirical analysis of robust image classification, answering "why can't we train classifiers that are both accurate and guaranteed robust". The authors rebut the explanation that "robust and accurate classifiers do not exist": the human visual system is a counterexample, and the problem should lie in generalization and data amount.
- Theoretical core: Theorem 1 constructs a distribution family (a hard-to-learn function ϕ on the hypercube plus a low-magnitude feature fully correlated with the label) such that a perfect robust classifier exists and a 100%-accurate classifier is easy to learn, but any learning algorithm has average robust accuracy below 51% unless the data amount grows exponentially with dimension; Theorem 2 gives a matching upper bound: when n ≥ 37⌈1/δ⌉^d, 1-NN can reach at least 99% average L∞ robust test accuracy.
- Data scaling: in the CIFAR-10 subsampling experiments, the authors state that doubling the dataset raises CRA by about 5 points, and CRA grows approximately linearly with the logarithm of data; adding only computation (epochs) yields small gains and the curve flattens; using 1 million diffusion-model-generated images can extend scaling to the 10^6 scale.
- Feature evidence: CIFAR-10's principal components 513–3072 account for only 2% of the variance; the standard network reaches 85% test accuracy on them, while robust training reaches only 9% CRA (Table 1)—the authors consider that real data and the theoretical construction share the property that "low-magnitude features can generalize but are unusable by robust classifiers".
- Architecture and capacity: 1-Lipschitz networks can robustly overfit the training set (the MLP's training CRA is near perfect at perturbation 1); the same architecture, changing only the loss parameter t, can reach 93.2% accuracy or 61.7% CRA (Table 3), and the authors state that architectural limitations are not the cause of poor generalization.
- The authors' conclusion: current model performance is mainly determined by the amount of training data; the authors hope future research will scale both the dataset and the classifier size to build better robust image classifiers.