The Pitfalls of Simplicity Bias in Neural Networks
Harshay Shah, Kaustav Tamuly, Aditi Raghunathan, Prateek Jain, Praneeth Netrapalli
Introduction
Understanding the superior generalization ability of neural networks, despite their high capacity to fit randomly labeled data , has been a subject of intense study. One line of recent work proves that linear neural networks trained with Stochastic Gradient Descent (SGD) on linearly separable data converge to the maximum-margin linear classifier, thereby explaining the superior generalization performance. However, maximum-margin classifiers are inherently robust to perturbations of data at prediction time, and this implication is at odds with concrete evidence that neural networks, in practice, are brittle to adversarial examples and distribution shifts . Hence, the linear setting, while convenient to analyze, is insufficient to capture the non-robustness of neural networks trained on real datasets. Going beyond the linear setting, several works argue that neural networks generalize well because standard training procedures have a bias towards learning simple models. However, the exact notion of “simple" models remains vague and only intuitive. Moreover, the settings studied are insufficient to capture the brittleness of neural networks
Our goal is to formally understand and probe the simplicity bias (SB) of neural networks in a setting that is rich enough to capture known failure modes of neural networks and, at the same time, amenable to theoretical analysis and targeted experiments. Our starting point is the observation that on real-world datasets, there are several distinct ways to discriminate between labels (e.g., by inferring shape, color etc. in image classification) that are (a) predictive of the label to varying extents, and (b) define decision boundaries of varying complexity. For example, in the image classification task of white swans vs. bears, a linear-like “simple" classifier that only looks at color could predict correctly on most instances except white polar bears, while a nonlinear “complex" classifier that infers shape could have almost perfect predictive power. To systematically understand SB, we design modular synthetic and image-based datasets wherein different coordinates (or blocks) define decision boundaries of varying complexity. We refer to each coordinate / block as a feature and define a precise notion of feature simplicity based on the simplicity of the corresponding decision boundary.
Figure 1 illustrates a stylized version of the proposed synthetic dataset with two features, and , that can perfectly predict the label with 100% accuracy, but differ in simplicity.
The simplicity of a feature is precisely determined by the minimum number of linear pieces in the decision boundary that achieves optimal classification accuracy using that feature. For example, in Figure 1, the simple feature requires a linear decision boundary to perfectly predict the label, whereas complex feature requires four linear pieces. Along similar lines, we also introduce a collection of image-based datasets in which each image concatenates MNIST images (simple feature) and CIFAR-10 images (complex feature). The proposed datasets, which incorporate features of varying predictive power and simplicity, allow us to systematically investigate and measure SB in SGD-trained neural networks.
The ideal decision boundary that achieves high accuracy and robustness relies on all features to obtain a large margin (minimum distance from any point to decision boundary). For example, the orange decision boundary in Figure 1 that learns and attains 100% accuracy and exhibits more robustness than the linear boundary because of larger margin. Given the expressive power of large neural networks, one might expect that a network trained on the dataset in Figure 1 would result in the larger-margin orange piecewise linear boundary. However, in practice, we find quite the opposite—trained neural networks have a linear boundary. Surprisingly, neural networks exclusively use feature and remain completely invariant to . More generally, we observe that SB is extreme: neural networks simply ignore several complex predictive features in the presence of few simple predictive features. We first theoretically show that one-hidden-layer neural networks trained on the piecewise linear dataset exhibit SB. Then, through controlled experiments, we validate the extreme nature of SB across model architectures and optimizers.
Theoretical analysis and controlled experiments reveal three major pitfalls of SB in the context of proposed synthetic and image-based datasets, which we conjecture to hold more widely across datasets and domains:
(i) Lack of robustness: Neural networks exclusively latch on to the simplest feature (e.g., background) at the expense of very small margin and completely ignore complex predictive features (e.g., semantics of the object), even when all features have equal predictive power. This results in susceptibility to small adversarial perturbations (due to small margin) and spurious correlations (with simple features). Furthermore, in Section 4, we provide a concrete connection between SB and data-agnostic and model-agnostic universal adversarial perturbations observed in practice.
(ii) Lack of reliable confidence estimates: Ideally, a network should have high confidence only if all predictive features agree in their prediction. However due to extreme SB, the network has high confidence even if several complex predictive features contradict the simple feature, mirroring the widely reported inaccurate and substantially higher confidence estimates reported in practice .
(iii) Suboptimal generalization: Surprisingly, neural networks exclusively rely on the simplest feature even if it less predictive of the label than all complex features in the synthetic datasets. Consequently, contrary to conventional wisdom, extreme SB can hurt robustness as well as generalization.
In contrast, prior works only extol SB by considering settings where all predictive features are simple and hence do not reveal the pitfalls observed in real-world settings. While our results on the pitfalls of SB are established in the context of the proposed datasets, the two design principles underlying these datasets—combining multiple features of varying simplicity & predictive power and capturing multiple failure modes of neural networks in practice—suggest that our conclusions could be justifiable more broadly.
This work makes two key contributions. First, we design datasets that offer a precise stratification of features based on simplicity and predictive power. Second, using the proposed datasets, we provide theoretical and empirical evidence that neural networks exhibit extreme SB, which we postulate as a unifying contributing factor underlying key failure modes of deep learning: poor out-of-distribution performance, adversarial vulnerability and suboptimal generalization. To the best of our knowledge, prior works only focus on the positive aspect of SB: the lack of overfitting in practice. Additionally, we find that standard approaches to improve generalization and robustness—ensembles and adversarial training—do not mitigate simplicity bias and its shortcomings on the proposed datasets. Given the important implications of SB, we hope that the datasets we introduce serve (a) as a useful testbed for devising better training procedures and (b) as a starting point to design more realistic datasets that are amenable to theoretical analysis and controlled experiments.
Organization. We discuss related work in Section 2. Section 3 describes the proposed datasets and metrics. In Section 4, we concretely establish the extreme nature of Simplicity Bias (SB) and its shortcomings through theory and empirics. Section 5 shows that extreme SB can in fact hurt generalization as well. We conclude and discuss the way forward in Section 6.
Related Work
Out-of-Distribution (OOD) performance: Several works demonstrate that NNs tend to learn spurious features & low-level statistical patterns rather than semantic features & high-level abstractions, resulting in poor OOD performance . This phenomenon has been exploited to design backdoor attacks against NNs as well. Recent works that encourage models to learn higher-level features improve OOD performance, but require domain-specific knowledge to penalize reliance on spurious features such as image texture and annotation artifacts in vision & language tasks. Learning robust representations without domain knowledge, however, necessitates formalizing the notion of features and feature reliance; our work takes a step in this direction.
Adversarial robustness: Neural networks exhibit vulnerability to small adversarial perturbations . Standard approaches to mitigate this issue—adversarial training and ensembles —have had limited success on large-scale datasets. Consequently, several works have investigated reasons underlying the existence of adversarial examples: suggests local linearity of trained NNs, indicates insufficient data, suggests inevitability in high dimensions, suggests computational barriers, proposes limitations of neural network architectures, and proposes the presence of non-robust features. Additionally, Jacobsen et al. show that NNs exhibit invariance to large label-relevant perturbations. Prior works have also demonstrated the existence of universal adversarial perturbations (UAPs) that are agnostic to model and data .
Implicit bias of stochastic gradient descent : Brutzkus et al. show that neural networks trained with SGD provably generalize on linearly separable data. Recent works also analyze the limiting direction of gradient descent on logistic regression with linearly separable and non-separable data respectively. Empirical findings provide further evidence to suggest that SGD-trained NNs generalize well because SGD learns models of increasing complexity. Additional recent works investigate the implicit bias of SGD on non-linearly separable data for linear classifiers and infinite-width two-layer NNs , showing convergence to maximum margin classifiers in appropriate spaces. In Section 4, we show that SGD’s implicit bias towards simplicity can result in small-margin and feature-impoverished classifiers instead of large-margin and feature-dense classifiers.
Feature reliance: Two recent works study the relation between inductive biases of training procedures and the set of features that models learn. Hermann et al. use color, shape and texture features in stylized settings to show that standard training procedures can (a) increase reliance on task-relevant features that are partially decodable using untrained networks and (b) suppress reliance on non-discriminative or correlated features. Ortiz et al. show that neural networks learned using standard training (a) develop invariance to non-discriminative features and (b) adversarial training induces a sharp transition in the models’ decision boundaries. In contrast, we develop a precise notion of feature simplicity and subsequently show that SGD-trained models can exhibit invariance to multiple discriminative-but-complex features. We also identify three pitfalls of this phenomenon—poor OOD performance, adversarial vulnerability, suboptimal generalization—and show that adversarial training and standard ensembles do not mitigate the pitfalls of simplicity bias.
Multiple works mentioned above (a) differentially characterize learned features and desired features—statistical regularities vs. high-level concepts , syntactic cues vs. semantic meaning , robust vs. non-robust features —and (b) posit that the mismatch between these features results in non-robustness. In contrast, our work probes why neural networks prefer one set of features over another and unifies the aforementioned feature characterizations through the lens of feature simplicity.
Preliminaries: Setup and Metrics
Next, we introduce two metrics that quantitatively capture the extent to which a model relies on different input coordinates (or features). Let denote some subset of coordinates and denote the -randomized distribution, which is obtained as follows: given , the marginal distribution of , independently samples and and then outputs . In , the coordinates in are rendered independent of the label . The two metrics are as follows.
Given data distribution and subset of coordinates , the -randomized AUC of classifier equals the area under the precision-recall curve of distribution .
Our experiments use {, }-randomized metrics—accuracy, AUC, logits—to establish that depends exclusively on some features and remains invariant to the rest .
First, if (a) -randomized accuracy and AUC equal and (b) -randomized logit distribution is a random shuffling of the original distribution (i.e., logits in the original distribution are randomly shuffled across true positives and true negatives), then depends exclusively on . Conversely, if (a) -randomized accuracy and AUC are equal to standard accuracy and AUC and (b) -randomized logit distribution is essentially identical to the original distribution, then is invariant to ; Table 1 summarizes these observations.
1 Datasets
One-dimensional Building Blocks: Our synthetic datasets use three one-dimensional data blocks—linear, noisy linear and -slabs—shown in top row of Figure 2. In the linear block, positive and negative examples are uniformly distributed in and [\scalebox{0.75}[1.0]{-}1,\scalebox{0.75}[1.0]{-}0.1] respectively. In the noisy linear block, given a noise parameter , fraction of points are distributed like the linear block described above and fraction of the examples are uniformly distributed in [\scalebox{0.75}[1.0]{-}0.1,0.1]. In -slab blocks, positive and negative examples are distributed in well-separated, alternating regions.
Multi-dimensional Synthetic Datasets: We now outline four -dimensional datasets wherein each coordinate corresponds to one of three building blocks described above. See Figure 2 for illustration.
LMS-k: Linear and multiple -slabs; the first coordinate is a linear block and the remaining d\scalebox{0.75}[1.0]{-}1 coordinates are independent -slab blocks; we use LMS-5 & LMS-7 datasets in our analysis.
L̂MS-k: Noisy linear and multiple -slab blocks; the first coordinate is a noisy linear block and the remaining d\scalebox{0.75}[1.0]{-}1 coordinates are independent -slab blocks. The noise parameter is by default.
MS-(5,7): 5-slab and multiple 7-slab blocks; the first coordinate is a 5-slab block and the remaining d\scalebox{0.75}[1.0]{-}1 coordinates are independent -slab blocks, as shown in Figure 2.
MS-5: Multiple 5-slab blocks; all coordinates are independent 5-slab blocks.
We now describe the LSN (linear, 3-slab & noise) dataset, a stylized version of LMS-k that is amenable to theoretical analysis. We note that recent works empirically analyze variants of the LSN dataset. In LSN, conditioned on the label , the first and second coordinates of are singleton linear and -slab blocks: linear and -slab blocks have support on \{\scalebox{0.75}[1.0]{-}1,1\} and \{\scalebox{0.75}[1.0]{-}1,0,1\} respectively. The remaining coordinates are standard gaussians and not predictive of the label.
The synthetic datasets comprise features of varying simplicity; in LMS-k, L̂MS-k, and MS-(5,7), the first coordinate is the simplest feature and in MS-5, all features are equally simple. All datasets, even L̂MS-k, can be perfectly classified via piecewise linear classifiers. Though the -slab features are special cases of linear periodic functions on which gradient-based methods have been shown to fail for large , we note that we use small values of which are quickly learned by SGD in practice. Note that we (a) apply a random rotation matrix to the data and (b) use -dimensional synthetic data (i.e., ) by default. Note that all code and datasets are available at the following repository: https://github.com/harshays/simplicitybiaspitfalls.
MNIST-CIFAR Data: The MNIST-CIFAR dataset consists of two classes: images in class \scalebox{0.75}[1.0]{-}1 and class are vertical concatenations of MNIST digit zero & CIFAR-10 automobile and MNIST digit one & CIFAR-10 truck images respectively, as shown in Figure 2. The training and test datasets comprise 50,000 and 10,000 images of size . The MNIST-CIFAR dataset mirrors the structure in the synthetic LMS-k dataset—both incorporate simple and complex features. The MNIST and CIFAR blocks correspond to the linear and -slab blocks in LMS-k respectively. Also note that MNIST images are zero-padded & replicated across three channels to match CIFAR dimensions before concatenation.
Appendix B provides details about the datasets, models, and optimizers used in our experiments. In Appendix C, we show that our results are robust to the exact choice of MNIST-CIFAR class pairs.
Simplicity Bias (SB) is Extreme and Leads to Non-Robustness
We first establish the extreme nature of SB in neural networks (NNs) on the proposed synthetic datasets using SGD and variants. In particular, we show that for the datasets considered, if all features have full predictive power, NNs rely exclusively on the simplest feature and remain invariant to all complex features . Then, we explain why extreme SB on these datasets results in neural networks that are vulnerable to distribution shifts and data-agnostic & transferable adversarial perturbations.
We consider the LSN dataset (described in Figure 2) that has one linear coordinate and one 3-slab coordinate, both fully predictive of the label on their own; the remaining d\scalebox{0.75}[1.0]{-}2 noise coordinatesI do not have any predictive power. Now, a "large-margin" one-hidden-layer NN with ReLU activation should give equal weight to the linear and 3-slab coordinates. However, we prove that NNs trained with standard mini-batch gradient descent (GD) on the LSN dataset (described in Figure 2) provably learns a classifier that exclusively relies on the “simple" linear coordinate, thus exhibiting simplicity bias at the cost of margin. Further, our claim holds even when the margin in the linear coordinate (minimum distance between linear coordinate of positives and negatives) is significantly smaller than the margin in the slab coordinate. The proof of the following theorem is presented in Appendix F.
Let denote a one-hidden-layer neural network with hidden units and ReLU activations. Set w.p. . Let denote i.i.d. samples from LSN where for some . Then, given and initial , after iterations, mini-batch gradient descent (over ) with hinge loss, step size \eta=\Omega{{(\log d)^{\nicefrac{{\scalebox{0.75}[1.0]{-}1}}{{2}}}}}, mini-batch size , satisfies:
Test error is at most
The learned weights of hidden units satisfy:
with probability greater than . Note that is a universal constant.
2 Simplicity Bias (SB) is Extreme in Practice
We now establish the extreme nature of SB on datasets with features of varying simplicity—LMS-5, MS-(5,7), MNIST-CIFAR (described in Section 3)—across multiple model architectures and optimizers. Recall that (a) the simplicity of one-dimensional building blocks is defined as the number of pieces required by a piecewise linear classifier acting only on that block to get optimal accuracy and (b) LMS-5 has one linear block & multiple -slabs, MS-(5,7) has one -slab and multiple -slabs and MNIST-CIFAR concatenates MNIST and CIFAR10 images. We now use to denote the simplest feature in each dataset: linear in LMS-5, 5-slab in MS-(5,7), and MNIST in MNIST-CIFAR.
We first consistently observe that SGD-trained models trained on LMS-5 and MS-(5,7) datasets exhibit extreme SB: they exclusively rely on the simplest feature and remain invariant to all complex features . Using -randomized & -randomized metrics summarized in Table 1, we first establish extreme SB on fully-connected (FCN), convolutional (CNN) & sequential (GRU ) models. We observe that the -randomized AUC is 0.5 across models. That is, unsurprisingly, all models are critically dependent on . Surprisingly, however, -randomized AUC of all models on both datasets equals 1.0. That is, arbitrarily perturbing coordinates has no impact on the class predictions or the ranking of true positives’ logits against true negatives’ logits. One might expect that perturbing would at least bring the logits of positives and negatives closer to each other. Figure 3(a) answers this in negative—the logit distributions over true positives of (100,1)-FCNs (i.e., with width 100 & depth 1) remain unchanged even after randomizing all complex features . Conversely, randomizing the simplest feature randomly shuffles the original logits across true positives as well as true negatives. The two-dimensional projections of FCN decision boundaries in Figure 3(c) visually confirm that FCNs exclusively depend on the simpler coordinate and are invariant to all complex features .
Note that sample size and model architecture do not present any obstacles in learning complex features to achieve 100% accuracy. In fact, if is removed from the dataset, SGD-trained models with the same sample size indeed rely on to attain 100% accuracy. Increasing the number of complex features does not mitigate extreme SB either. Figure 3(b) shows that even when there are 249 complex features and only one simple feature, (2000,1)-FCNs exclusively rely on the simplest feature ; randomizing keeps AUC score of intact but simply randomizing drops the AUC score to . (2000,1)-FCNs exhibit extreme SB despite their expressive power to learn large-margin classifiers that rely on all simple and complex features.
Similarly, on the MNIST-CIFAR dataset, MobileNetV2 , GoogLeNet , ResNet50 and DenseNet121 exhibit extreme SB. All models exclusively latch on to the simpler MNIST block to acheive 100% accuracy and remain invariant to the CIFAR block, even though the CIFAR block alone is almost fully predictive of its label—GoogLeNet attains 95.4% accuracy on the corresponding CIFAR binary classification task. Figure 3(a) shows that randomizing the simpler MNIST block randomly shuffles the logit distribution of true positives whereas randomizing the CIFAR block has no effect—the CIFAR-randomized and original logit distribution over true positives essentially overlap.
3 Extreme Simplicity Bias (SB) leads to Non-Robustness
Now, we discuss how our findings about extreme SB in Section 4.2 can help reconcile poor OOD performance and adversarial vulnerability with superior generalization on the same data distribution.
Poor OOD performance: Given that neural networks tend to heavily rely on spurious features , state-of-the-art accuracies on large and diverse validation sets provide a false sense of security; even benign distributional changes to the data (e.g., domain shifts) during prediction time can drastically degrade or even nullify model performance. This phenomenon, though counter-intuitive, can be easily explained through the lens of extreme SB. Specifically, we hypothesize that spurious features are simple. This hypothesis, when combined with extreme SB, explains the outsized impact of spurious features. For example, Figure 3(b) shows that simply perturbing the simplest (and potentially spurious in practice) feature drops the AUC of trained neural networks to , thereby nullifying model performance. Randomizing all complex features —5-slabs in LMS-5, 7-slabs in MS-(5,7), CIFAR block in MNIST-CIFAR—has negligible effect on the trained neural networks—-randomized and original logits essentially overlap—even though and have equal predictive power This further implies that approaches that aim to detect distribution shifts based on model outputs such as logits or softmax probabilities may themselves fail due to extreme SB.
To summarize, through theoretical analysis and extensive experiments on synthetic and image-based datasets, we (a) establish that SB is extreme in nature across model architectures and datasets and (b) show that extreme SB can result in poor OOD performance and adversarial vulnerability, even when all simple and complex features have equal predictive power.
Extreme Simplicity Bias (SB) can hurt Generalization
In this section, we show that, contrary to conventional wisdom, extreme SB can potentially result in suboptimal generalization of SGD-trained models on the same data distribution as well. This is because exclusive reliance on the simplest feature can persist even when every complex feature in has significantly greater predictive power than .
We verify this phenomenon on L̂MS-7 data defined in Section 3. Recall that L̂MS-7 has one noisy linear coordinate with 95% predictive power (i.e., 10% noise in linear coordinate) and multiple 7-slab coordinates , each with 100% predictive power. Note that our training sample size is large enough for FCNs of depth and width trained on only (i.e., after removing from data) to attain 100% test accuracy. However, when trained on L̂MS-7 (i.e., including ), SGD-trained FCNs exhibit extreme SB and only rely on , the noisy linear coordinate. In Table 2, we report accuracies of SGD-trained FCNs that are selected based on validation accuracy after performing a grid search over four SGD hyperparameters: learning rate, batch size, momentum, and weight decay. The train, test and randomized accuracies in Table 2 collectively show that FCNs exclusively rely on the noisy linear feature and consequently attain 5% generalization error.
To summarize, the mere presence of a simple-but-noisy feature in L̂MS-7 data can significantly degrade the performance of SGD-trained FCNs due to extreme SB. Note that our results show that even an extensive grid search over SGD hyperparameters does not improve the performance of SGD-trained FCNs on L̂MS-7 data but does not necessarily imply that mitigating SB via SGD and its variants is impossible. We provide additional information about the experiment setup in Appendix D.
Conclusion and Discussion
We investigated Simplicity Bias (SB) in SGD-trained neural networks (NNs) using synthetic and image-based datasets that (a) incorporate a precise notion of feature simplicity, (b) are amenable to theoretical analysis and (c) capture the non-robustness of NNs observed in practice. We first showed that one-hidden-layer ReLU NNs provably exhibit SB on the LSN dataset. Then, we analyzed the proposed datasets to empirically demonstrate that SB can be extreme, and can help explain poor OOD performance and adversarial vulnerability of NNs. We also showed that, contrary to conventional wisdom, extreme SB can potentially hurt generalization.
Can we mitigate SB? It is natural to wonder if any modifications to the standard training procedure can help in mitigating extreme SB and its adverse consequences. In Appendix E, we show that well-studied approaches for improving generalization and adversarial robustness—ensemble methods and adversarial training—do not mitigate SB, at least on the proposed datasets. Specifically, “vanilla" ensembles of independent models trained on the proposed datasets mitigate SB to some extent by aggregating predictions, but continue to exclusively rely on the simplest feature. That is, the resulting ensemble remains invariant to all complex features (e.g., -Slabs in LMS-5). Our results suggest that in practice, the improvement in generalization due to vanilla ensembles stem from combining multiple simple-but-noisy features (such as color, texture) and not by learning diverse and complex features (such as shape). Similarly, adversarially training FCNs on the proposed datasets increases margin (and hence adversarial robustness) to some extent by combining multiple simple features but does not achieve the maximum possible adversarial robustness; the resulting adversarially trained models remain invariant to all complex features.
Our results collectively motivate the need for novel algorithmic approaches that avoid the pitfalls of extreme SB. Furthermore, the proposed datasets capture the key aspects of training neural networks on real world data, while being amenable to theoretical analysis and controlled experiments, and can serve as an effective testbed to understand deep learning phenomena. evaluating new algorithmic approaches aimed at avoiding the pitfalls of SB.
Broader Impact
Our work is foundational in nature and seeks to improve our understanding of neural networks. We do not foresee any significant societal consequences in the short term. However, in the long term, we believe that a concrete understanding of deep learning phenomena is essential to develop reliable deep learning systems for practical applications that have societal impact.
References
Appendix A Additional Related Work
In this section, we provide a more thorough discussion of relevant work related to margin-based generalization bounds, adversarial attacks and robustness, and out-of-distribution (OOD) examples.
Margin-based generalization bounds: Building up on the classical work of , recent works try to obtain tighter generalization bounds for neural networks in terms of normalized margin . Here, margin is defined as the difference in the probability of the true label and the largest probability of the incorrect labels. While these bounds seem to capture generalization of neural networks at a coarse level, it has been argued that these approaches may be incapable of fully explaining the generalization ability of neural networks. Furthermore, it is unclear if the notion of model complexity used in these works, based on Lipschitz constant, captures generalization ability accurately. In any case, our results suggest that due to extreme simplicity bias (SB), even if a formulation captures both margin and model complexity accurately, current optimization techniques may not be able to find the optimal solution in terms of generalization and robustness-, as they are strongly biased towards small-margin classifiers that exclusively rely on the simplest features.
Detecting OOD Examples: Neural networks trained using standard training procedures tend to rely on low-level features and spurious correlations and hence exhibit brittleness to benign distributional changes to the data. Recent works thus aim to detect OOD examples using generative models , statistical tests , and model confidence scores . Our experiments in Section 4 that validate extreme SB in practice also show that detectors that directly or indirectly rely on model scores to detect OOD examples may not work well as SGD-trained neural networks can exhibit complete invariance to predictive-but-complex features.
Appendix B Experiment Details
In this section, we provide additional details on the datasets, models, optimization methods and training hyperparameters used in our experiments.
One-dimensional Building Blocks: We first describe the data generation process underlying each building block: linear, noisy linear, and -slab. Then, we introduce a noisy version of the -slab block, which we later use in Appendix D.
Linear: The linear block is parameterized by the effective margin and width . The distribution first samples a label y\in\{\scalebox{0.75}[1.0]{-}1,1\} uniformly at random, and then given , is sampled as follows: where is the uniform distribution on $$.
NoisyLinear: The noisy linear block is parameterized by effective margin , width , and noise parameter . Linear classifiers can attain the optimal classification accuracy of . Given label y\in\{\scalebox{0.75}[1.0]{-}1,1\} sampled uniformly at random, is sampled as follows:
Slab: The -slab block is parameterized by effective margin , width , and number of slabs . We use in our paper. The width of each slab, , in the -slab block is chosen such that the farthest points are at \scalebox{0.75}[1.0]{-}B and . For example, given label y\in\{\scalebox{0.75}[1.0]{-}1,1\} and random sign z\in\{\scalebox{0.75}[1.0]{-}1,1\} sampled unif. at random, we can sample from a -slab block as follows:
For -slab blocks with , the probability of sampling from the two slabs (one on each side) that are farthest away from the origin are and respectively to ensure that the variance of instances in positive and negative classes, and , are equal.
NoisySlab: Analogous to the noisy linear block, the noisy variant of the -slab block is additionally parameterized by a noise parameter . In this setting, a (k\scalebox{0.75}[1.0]{-}1)-piecewise linear classifier can attain the optimal classification accuracy of . For example, For example, given label y\in\{\scalebox{0.75}[1.0]{-}1,1\} and random sign z\in\{\scalebox{0.75}[1.0]{-}1,1\} sampled uniformly at random, we can sample from a -noisy -slab block as follows:
Datasets: We now outline the default hyperparameters for generating the synthetic datasets used in the paper, provide additional details on the LSN dataset, and introduce two additional synthetic datasets as well as multiple versions of the MNIST-CIFAR dataset (i.e., with different class pairs).
Synthetic Dataset Hyperparameters: Recall that we use four -dimensional synthetic datasets—LMS-k, L̂MS-k, MS-(5,7), and MS-5—wherein each coordinate corresponds to one of the building blocks described above. Unless mentioned otherwise, for all four datasets, we set the effective margin parameter , width parameter , and noise parameter in all blocks/coordinates. Also recall that each dataset comprises at most one “simple" feature and multiple independent complex features . In our experiments, all datasets have sample sizes that are large enough for all models considered in the paper to learn complex features and attain optimal test accuracy, even in the absence of ; we use sample sizes of for LMS-5 and MS-5 and for L̂MS-7.
LSN Dataset: Recall that the LSN dataset (described in Section 3) is a stylized version of the LMS-k that is amenable to theoretical analysis. In LSN, conditioned on the label , the first and second coordinates of are singleton linear and -slab blocks: linear and -slab blocks have support on \{\scalebox{0.75}[1.0]{-}1,1\} and \{\scalebox{0.75}[1.0]{-}1,0,1\} respectively. The remaining coordinates are standard gaussians and not predictive of the label. Each data point can be sampled as follows:
Additional Datasets: We now introduce M̂S-(5,7), the noisy version of MS-(5,7), and three MNIST-CIFAR datasets, each with different MNIST and CIFAR10 classes.
M̂S-(5,7): Noisy 5-slab and multiple noiseless 7-slab blocks; the first coordinate is a noisy 5-slab block and the remaining d\scalebox{0.75}[1.0]{-}1 coordinates are independent -slab blocks. Note that this dataset comprises a noisy-but-simpler -slab block and multiple noiseless -slab blocks; a -piecewise linear classifier can attain 100% accuracy by learn any -slab block.
MNIST-CIFAR datasets: Recall that images in the MNIST-CIFAR datasets are concatenations of MNIST and CIFAR10 images. We introduce additional variants of the MNIST-CIFAR using different class pairs to show that our results in the paper are robust to the exact choice of pairs:
Models: Here, we briefly describe the models (and its abbreviations) used in the paper. We use fully-connected (FCNs), convolutional (CNNs), and sequential neural networks (GRUs ) on synthetic datasets. Abbreviations -FCN denotes FCN with width and depth , -CNN denotes -layer CNNs with filters of size in each layer with and -GRU denotes -layer -layer GRU with input dimensionality and hidden state dimensionality . On MNIST-CIFAR, we train MobileNetV2 , GoogLeNet , ResNet50 and DenseNet121 .
Training Procedures: Unless mentioned otherwise, we use the following hyperparameters for standard training and adversarial training on synthetic and MNIST-CIFAR data:
Appendix C Additional Results on the Extreme Nature of Simplicity Bias (SB)
Recall that Section 4 of the paper establishes the extreme nature of SB: If all features have full predictive power, NNs rely exclusively on the simplest feature and remain invariant to all complex features —in Section 4 of the paper. Now, we further validate the extreme nature of SB across model architectures, datasets, optimizers, activation functions and regularization. We also analyze the effect of input dimensionality, number of complex features, choice and scaling of random initialization and non-random initialization.
In this section, we supplement our results in Section 4 of the paper by showing that extreme simplicity bias (SB) persists across several model architectures and on synthetic as well as image-based datasets. In Table 4, we present {, }-Randomized AUCs for FCNs, CNNs and GRUs with depth {1,2} trained on LMS and MS-(5,7) datasets and state-of-the-art CNNs trained on MNIST-CIFAR:A. While the -randomized AUC equals (perfect classification), we see that the -randomized AUCs are approximately for all models. This is because all models essentially only rely on the simplest feature and remain invariant to all complex features , even though all features have equal predictive power.
C.2 Effect of MNIST-CIFAR Class Pairs
In this section, we supplement our results on MNIST-CIFAR (in Section 4) in order to show that extreme SB observed in MobileNetV2 , GoogLeNet , ResNet50 and DenseNet121 does not depend on the exact choice of MNIST and CIFAR10 class pairs used to construct the MNIST-CIFAR datasets. To do so, we evaluate the MNIST-randomized and CIFAR10-randomized metrics of the aforementioned models on three datasets–MNIST-CIFAR:A, MNIST-CIFAR:B, MNIST-CIFAR:C—described in Appendix B.
Table 5 presents the standard, MNIST-randomized and CIFAR10-randomized AUC values of MobileNetV2, GoogLeNet, ResNet50 and DenseNet121 on three MNIST-CIFAR datasets. We observe that randomizing over the simpler MNIST block is sufficient to fully degrade the predictive power of all models; for instance, randomizing the MNIST block drops the AUC values of ResNet50 from to (i.e., equivalent to random classifier). However, randomizing the CIFAR10 block has no effect—standard AUC and CIFAR10-randomized AUCs equal . In contrast, an ideal classifier that relies on MNIST & CIFAR10 would attain non-trivial AUC even when the MNIST block is randomized.
C.3 Effect of Optimizers and Activation Functions
Now, we study the effect of activation function and optimizer on extreme SB. That is, can the usage of different activation functions and optimizer encourage trained neural networks to rely on complex features in addition to the simplest feature ?
Table 6 presents the -randomized AUCs of -FCNs with multiple activation functions—ReLU, Leaky ReLU , PReLU , and Tanh—trained on LMS-7 and MS-(5,7) datasets using multiple commonly-used optimizers: SGD, Adam ,and RMSProp . We observe that for all combinations of activations and optimizers, trained FCNs still only rely on simplest feature ; -randomized and -randomized AUCs are approximately and respectively for all optimizers and activation functions. Therefore, in addition to SGD, commonly used first-order optimization methods such as Adam and RMSProp cannot jointly learn large-margin classifiers that rely on learn slab-structured features in the presence of a noisy linear structure. To summarize, the experiment in Section C.2 shows that simply altering the choice of optimizer and activation function does not have any effect on extreme SB. Similar to the experiments in Section 4 of the paper, all models exclusively rely on simplest feature and remain invariant to complex features .
C.5 Effect of Input Dimension and Number of Complex Features
In this section, we evaluate the performance of FCNs trained on LMS-7 data using SGD to show the extreme SB persists in the low-dimensional setting () and also with varying number of -slab features .
As shown in Table 8, decreasing the input dimension or the number of complex features has no effect on extreme SB of FCNs trained on the LMS-7 dataset. Similar to our results in Figure 3, the standard and randomized AUCs collectively show that the SGD-trained (100,1)-FCNs exclusively rely on the linear component and do not rely on the -slab coordinates.
C.6 Effect of Random Initialization Scale
Now, we analyze the effect of the choice and scale (i.e., magnitude of the weights of randomly initialized FCNs) of random initialization on simplicity bias using FCNs trained on LMS-7 data.
As shown in Table 9, the choice (Kaiming and Xavier) and the scale of random initialization do not alter the extreme SB phenomenon on the LMS-7 dataset. That is, scaling the randomly initialized models by up to and has no effect on simplicity bias—SGD-trained (100,1)-FCNs exclusively rely on the linear component and do not rely on the -slab coordinates.
C.7 Effect of Non-random Initialization
In this section, we investigate the effect of non-random initialization on simplicity bias using FCNs trained on MS-7 and LMS-7 data. The goal of this experiment is to determine the extent to which simplicity bias persists when the untrained network (at timestep ) attains non-random standard accuracy by relying on one or more “complex" -slab features.
To vary the degree of non-random initialization , we obtain model by linearly interpolating the weights of a randomly initialized network and a network that exclusively relies on one or more “complex" -slab features to attain accuracy on the LMS-7 dataset. That is, . Note that is trained on MS-7 data to attain standard accuracy by relying on one or more -slab coordinates. As shown in Figure 5(a), increasing the interpolation constant monotonically increases the standard accuracy of on MS-7 data.
Now, we use the linearly interpolated model (for varying values of ) as initialization and train on LMS-7 data, which additionally consists of a “simple" linearly-separable coordinate. To maintain the input dimensionality, we obtain LMS-7 data by replacing a -slab coordinate by the simpler linear coordinate. In order to maintain the non-random accuracy of , we use coordinate-randomized AUCs to choose and replace a -slab coordinate that the model does not depend on.
Appendix D Additional Results on the Effect of Extreme SB on Generalization
Recall that in Section 5 of the paper, we showed that extreme SB can result in suboptimal generalization of SGD-trained models on the same data distribution. In this section, we present additional information about the experiment setup used in Section 5 to show that SB can worsen standard generalization.
We now provide additional information about the experimental setup used in Section 5 of the paper, where we show that extreme simplicity bias can result in suboptimal generalization. We train fully-connected networks (FCNs) of width and depth using SGD on -dimensional L̂MS-7 dataset of samples, which comprises of a noisy linear coordinate ( noise) and -slab coordinates. For each model architecture, we perform a grid search over SGD hyperparameters—learning rate, batch size, momentum, and weight decay—and report standard and randomized test accuracies of the model (in Table 2) that perform best on a L̂MS-7 validation dataset. We perform a grid search over the following SGD hyperparameters:
Learning rate:
Appendix E Can we mitigate Simplicity Bias?
In this section, we investigate whether standard approaches for improving generalization error and adversarial robustness—ensembles and adversarial training—help in mitigating SB.
We now study the extent to which ensembles mitigate SB and its adverse effect on generalization. Specifically, we evaluate the performance of ensembles of fully-connected networks (FCNs) that are trained on two datasets: L̂MS-7 and MS-5. Recall that the L̂MS-7 data comprises one simple-but-noisy linear coordinate and multiple relatively complex -slab coordinates that have no noise, whereas MS-5 data comprises multiple noiseless -slab coordinates only.
To better highlight the effect of ensembles on generalization, we choose a sample size (for both datasets) such that individual models (a) overfit to training data (i.e., non-zero generalization gap) but (b) still attain non-trivial test accuracy. We now discuss the performance of ensembles of independently trained models on MS-5 and L̂MS-7 datasets:
MS-5 data: Recall that MS-5 data comprises multiple independent 5-slab blocks, one in each coordinate, that have equal simplicity and predictive power. Thus, since all features have equal simplicity, independent SGD-trained (100,2)-FCN end up relying on different -slab coordinates due to random initialization, as shown in Figure 6(b). As the training sample size is small, FCNs overfit to the training data and attain approximately test accuracy, as shown in Figure 6. Consequently, as shown in Figure 6, ensembles of these models rely on all -slab coordinates learned by the individual models and attain better test accuracy by aggregating model predictions and averaging out overfitting. For example, Figure 6 shows that ensembles of size and improves generalization by approximately and respectively.
L̂MS-7 data: Recall that L̂MS-5 data comprises one simple-but-noisy linear block (with noise) and multiple independent -slab blocks that have no noise. Now, due to extreme SB, every independently trained FCN exclusively latches on (and overfits to) the simpler-but-noisy linear block, as shown in Figure 6(b). As a result, all models collectively lack diversity and essentially learn the same decision boundary because of extreme SB. Therefore, ensembles of these models do not improve generalization because the independent models make misclassifications on the same instances. As shown in Figure 6(a), ensembles of size , and do not improve generalization—the test accuracy remains .
The ensemble performance on MS-5 data indicates that when datasets have multiple equally simple features, ensembles of independently trained models mitigate SB to some extent by aggregating predictions of models that rely on simple features. Conversely, the ensemble performance on L̂MS-7 data suggests that when datasets comprise few features that the more noisy and less predictive than the rest, ensembles may not improve generalization. Our results also suggest that the generalization improvements using ensemble methods in practice may stem from combining multiple simple-but-noisy features (such as color, texture) and not by learning complex features (such as shape).
E.2 Adversarial Training
We now investigate the extent to which adversarial training mitigates SB and its adverse effect on adversarial robustness using two datasets: MNIST-CIFAR and AdvMS-(5,7).
Now, we first introduce AdvMS-(5,7), a variant of the MS-(5,7) dataset, and then investigate if adversarially trained FCNs that improve adversarial robustness by some extent also mitigate extreme simplicity bias (SB).
AdvMS-(5,7) dataset: Recall that -dimensional MS-(5,7) data, introduced in Section 3, consists of -slab coordinates and a single relatively simpler -slab coordinate, all of which have perfect predictive power. Similar to MS-(5,7) data, the -dimensional AdvMS-(5,7) data comprises -slab and -slab coordinates. Specifically, the first coordinates correspond to independent -slabs, each with effective margin and the other coordinates correspond to independent -slabs with effective margin . In contrast to MS-(5,7) data, the AdvMS-(5,7) dataset (a) comprises -slab coordinates and (b) the -slabs and -slabs do not necessarily share the same effective margin. In our experiments below, we set , and . That is, we conduct our experiments on -dimensional data in which the the simple features and complex features correspond to the small-margin -slab and large-margin -slab coordinates respectively.
Also note that (a) adversarial perturbations are generated using PGD attacks , (b) -FCNs and -FCNs are expressive enough to learn the maximum-margin classifier on the -dimensional AdvMS-(5,7) data, (c) FCNs are adversarially trained for epochs with initial learning rate that decays by a multiplicative factor of after every epochs, and (d) the training data comprises data points, which is enough for SGD-trained -FCNs to learn -slab coordinates and attain generalization.
Adversarial trained FCNs do not learn maximum-margin classifiers. When , -FCNs learn classifiers that attain standard and -robust accuracies. However, when , due to optimization-related issues, adversarially trained -FCNs are unable to learn a non-trivial classifier that obtains more than standard and -robust accuracy. Increasing the model width from to improves adversarial robustness to some extent—adversarially trained -FCNs learn classifiers with standard and robust accuracies when . However, when (dashed purple line), adversarially trained -FCNs are unable to learn -robust classifiers as well. We note that further increasing the model width to does not improve robustness. Consequently, adversarial training does not result in maximum-margin classifiers that have optimal adversarial robustness (i.e., classifiers with -robust accuracy) on AdvMS-(5,7) data. These results reconcile two phenomena observed in practice: larger capacity models can improve adversarial robustness , but large-epsilon adversarial training can “fail" and result in trivial classifiers due to optimization-related issues .
Adversarial training does not mitigate extreme SB. The {, }-randomized accuracies of adversarially trained FCNs collectively show that adversarial training does not mitigate extreme SB. When the perturbation budget , adversarially trained -FCNs exhibit robustness by exclusively relying on multiple “simple" -slab coordinates. That is, randomizing drops the model accuracy to , but randomizing the more complex -slab coordinates has no effect on model accuracy. Conversely, when , classifiers with -robust accuracy must rely on features in and . However, as shown in Figure 7, when , adversarial training fails and results in trivial classifiers that attain standard and robust accuracy.
E.2.2 Adversarially training CNNs on MNIST-CIFAR data
Table 11 evaluates the standard, -robust and CIFAR10-randomized accuracies of SGD-trained and adversarially trained MobileNetV2, ResNet50 and DenseNet121 using the MNIST-CIFAR dataset. First, we observe that adversarial training with perturbation norm significantly improves -robust accuracies over those of SGD-trained models, without degrading the models’ standard test accuracies. However, the CIFAR10-randomized accuracies indicate that the adversarial training does not lead to reliance on the CIFAR10 block—adversarially trained CNNs continue to remain invariant to the CIFAR10 block even though it is almost fully predictive of the label. Consequently, these results suggest that adversarial training improves robustness but does not achieve the best -robust accuracy on the MNIST-CIFAR dataset.
To summarize, our experiments on AdvMS-(5,7) and MNIST-CIFAR datasets show that while adversarial training does improve the -robust accuracy over that of SGD-trained model, adversarially trained models continue to remain susceptible to extreme SB and consequently do not achieve maximum possible adversarial robustness.
Appendix F Proof of Theorem 1
In this section, we first re-introduce the data distribution and theorem. Then, we describe the proof sketch and notation, before moving on to the proof.
Linear-Slab-Noise (LSN) data: The LSN dataset is a stylized version of LMS-k that is amenable to theoretical analysis. In LSN, conditioned on the label , the first and second coordinates of are singleton linear and -slab blocks: linear and -slab blocks have support on \{\scalebox{0.75}[1.0]{-}1,1\} and \{\scalebox{0.75}[1.0]{-}1,0,1\} respectively. The remaining coordinates are standard gaussians and not predictive of the label. Each data point from LSN can be sampled as follows:
According to Theorem 1 (re-stated), one-hidden-layer ReLU neural networks trained with standard mini-batch gradient descent (GD) on the LSN dataset provably learns a classifier that exclusively relies on the “simple" linear coordinate, thus exhibiting simplicity bias at the cost of margin.
Let denote a one-hidden-layer neural network with hidden units and ReLU activations. Set w.p. . Let denote i.i.d. samples from LSN where for some . Then, given and initial , after iterations, mini-batch gradient descent (over ) with hinge loss, step size \eta=\Omega{{(\log d)^{\nicefrac{{\scalebox{0.75}[1.0]{-}1}}{{2}}}}}, mini-batch size , satisfies:
Test error is at most
The learned weights of hidden units satisfy:
with probability greater than . Note that is a universal constant.
Proof Sketch Since the number of iterations , we partition the dataset into minibatches each of size samples. This means that each iteration uses a fresh batch of samples and the iterations together form a single pass over the data. The overall outline of the proof is as follows. If the step size is , then for iterations, with probability ,
Lemma 2 shows that the hinge loss is “active" (i.e., ) for all data points in a given batch.
Under this condition, we derive closed-form expressions for population gradients in Lemmas 4, 5 and 6.
Lemma 1 uses the above lemmas to establish precise estimates of the linear, slab and noise coordinates for all iterations until .
The proof is organized as follows. Appendix F.1 presents the main lemmas that will directly lead to Theorem 1. Appendix F.2 derives closed form expressions for population gradients and Appendix F.3 presents auxiliary lemmas that are useful in the main proofs.
The proof directly follows from Lemma 1 and Lemma 2. In Lemma 1, we show that the weights in the linear coordinate are larger than the weights in the slab and noise coordinates. Applying Lemma 1 at gives the following result:
where is due to .
The error of the function at timestep is small as well, because we can directly use Lemma 2 to get . Therefore, the error is at most . ∎
In this section, we use proof by induction to show that for the first steps, (1) the hinge loss is “active" for all data points (Lemma 2) and (2) hidden layer weights in the linear coordinate are larger than the hidden layer weights in the slab and noise coordinates (Lemma 1).
Let and initialization . Also let , and . Then, for all , , and , w.p. greater than , we have:
First, we prove that equations (2), (3) & (4) hold at initialization (i.e., ) with high probability. Using 7 and 1:
Therefore, and and . Since equations (2), (3) & (4) hold at , we can use Lemma 2 to show that the hinge loss is “active" with high probability:
Now, we assume that the inductive hypothesis—equations (1), (2), (3) and (4)—is true after every timestep where .
We now prove that the inductive hypothesis is true at timestep , after applying gradient descent using the batch. Since z(1) holds at timestep , we can use the closed-form expression of the gradient along the linear coordinate (lemma 4) to prove that equation (2) holds at timestep as well:
where is via equation (12) in Lemma 3, is because and is due to .
Similarly, since equation (1) holds at timestep (via the inductive hypothesis), we can use the closed-form expression of the gradient along the slab coordinate (lemma 5) to show that the weights in the slab (i.e., second) coordinate are small (equation (3)) at timestep as well:
where is due to equations (11) in Lemma 3, (3) and .
Finally, we can use the closed-form expression of the gradient along the noise coordinate (lemma 6) to prove that the norm of the gradient along the noise coordinates (i.e., coordinates to ) is small (equation (4)) at timestep :
We first show that the the first part of the noise gradient, , is at most :
where is because , is due to equation (4) and is because . ∎
Since equations (2), (3) & (4) hold at timestep (from Lemma 1), we can show that the hinge loss is positive (i.e., ) for all data points with high probability as well.
Let denote a set of i.i.d. samples from LSN, where and . Suppose equations (2), (3) & (4) hold at timestep . Also let where . Then, w.p. greater than , we have:
We use equations (2), (3) & (4) to obtain simplify the dot product between & and the indicator . First, we show that the dot product between and is in the band with high probability:
where is because , is via lemma 7 & , and is because . Next, when , we can simplify as follows:
We can now use equations (6) & (8) to show that is in the band with high probability:
where is due to and follows from when ∎
If equations (2), (3) & (4) hold at timestep , and , we have:
Let and . To prove Equation 10, we show that an upper bound on is less than a lower bound on , which subsequently implies that because is an increasing function for all .
First, we find the maximizer of as follows:
where follows from lemma 11. Next, we lower bound the maximizer of :
From lemma 11, we know that is an increasing function for all . This implies that . Therefore, when and , we obtain the desired result as follows:
Now, we can prove equations (11), (12) and (13) using equation (10) as follows:
F.2 Closed-form Gradient Expressions
In this section, we provide closed-form expressions for gradients along the linear, slab and noise coordinates: , and . First, we provide a closed-form expression for the gradient along the linear coordinate:
If and , then w.p. greater than :
where is due to & and is due to . ∎
Similarly, we provide a closed-form expression for the gradient along the slab coordinate:
If and , then w.p. greater than :
where is due to & and is due to . ∎
Next, we provide a closed-form expression for the gradient along the noise coordinates:
If and , then w.p. greater than :
where is some unit vector orthogonal to .
Next, we show that the projection of onto (i.e., case 2) has small norm w.p. greater than :
where is because , is via fact 1 and is due to . Next, we show that the norm of the gradient in the direction of (i.e., case 1) is close to w.h.p.:
where is because and is because is due to . Therefore, by combining the results in case 1 and 2, the following holds w.p. greater than :
F.3 Miscellaneous Lemmas
Let and . Then, with probability greater than ,
Let denote the probability density function of the standard normal. Also let . Then, for , we have:
where is because \varphi^{\prime}(x)=\scalebox{0.75}[1.0]{-}x\varphi(x). Using union bound with gives the desired result. ∎
Let and denote the cumulative distribution function and the probability density function of the standard gaussian. Then, for any and :
The expectation can be simplified as follows:
where is due to \varphi^{\prime}(x)=\scalebox{0.75}[1.0]{-}x\varphi(x). ∎
Let and . Let and . Then:
Let and . Let and . Then:
Therefore, w.p. at least . ∎
Let be defined as g_{z}(x)=\frac{1}{x}\exp(\scalebox{0.75}[1.0]{-}\frac{z^{2}}{2x^{2}}). Then, (1) and \scalebox{0.75}[1.0]{-}|z| are the global maximizer and minimizer respectively, and (2) monotonically increases from \scalebox{0.75}[1.0]{-}|z| to .
Note that g^{\prime}_{z}(x)=\frac{1}{x^{2}}\exp(\scalebox{0.75}[1.0]{-}\frac{z^{2}}{2x^{2}})(\frac{z^{2}}{x^{2}}-1). Therefore, the critical points of are and \scalebox{0.75}[1.0]{-}|z|. Let . Note that for all and for all . Therefore, (1) and (2) hold. ∎
Let denote a -dimensional gaussian vector. Then, from , w.p. greater than :