betaFeedback

WorksComputer Science

Sometimes less is more: Investigating inductive biases of MLPs and Transformers on noisy k-parity features

Abstract

We empirically investigate how MLPs and Transformers differ when trained on data sets containing one or more features encoded by noisy k-parity. Noisy k-parity gives us hard synthetic data sets in which we can control the predictivity and availability of every feature. Across a range of data distributions, data scales and model sizes, we find large differences in the training dynamics and inductive biases of the two architectures: Transformers are more robust to noisy features but struggle to learn complex, low-availability features, whereas MLPs show the opposite trend and improve steadily with more data. We also find that, under a fixed training budget, increasing the number of unique training examples can slow Transformer optimisation enough to reduce final accuracy, so that a smaller data set performs better. Training-accuracy results show this is an optimisation-speed effect; it shrinks, but does not vanish, when the budget is scaled with the data set size. By giving precise control over feature predictivity and availability, this testbed offers a clear starting point for understanding when and why Transformers and MLPs learn differently, and for designing data and training budgets that exploit those differences.

Introduction

Neural network (NN) architectures exhibit different training dynamics and inductive biases ([5, 20]), which influence the types of functions learnt throughout training ([57, 38]). While most NNs can approximate most functions ([14, 25, 34]), these biases can affect how many optimiser iterations a model requires to achieve a good performance on a given training set ([42, 66, 67]), as well as the generalisation performance away from the training data ([55]). Better understanding these biases is key to guide future research and design choices in ML systems ([21, 5]).

One of the best understood inductive biases is the Simplicity Bias (SB) where, due to common architectural choices ([58]) NN architectures are biased toward learning “simple” functions. This phenomenon acts like Occam’s razor and can be a benefit or drawback depending on the relative complexity of the desired function to be learnt from the data. The SB can be highly beneficial if the desired function is the simplest that minimises the loss over the training data. However, if the problem is underspecified and there are simpler predictive features1, commonly named “shortcuts”, that do not generalise to the test environment, the SB can result in poor performance. Indeed, there are many examples of NN trained using “shortcuts” ([19]) to make predictions instead of some desired attributes or “labelling function” ([46, 31]). Moreover, it has been shown that parameter settings corresponding to “simple functions” occupy the majority of the solution space2 ([50]). However, there are many differing definitions over what features are “simple”3. To sidestep this issue Hermann et al. [24] introduced the notion of availability which is a measure of how easily a feature can be learnt by an NN, where more available features are preferred. Due to this implied preference ordering, if a data set contains multiple equally predictive features it is likely that the encoded function at test time will make most use of the most available feature. Thus, any features of interest with higher complexity, or lower availabilities, may not be learnt during training, as more available features are sufficient to minimise the loss. In this way more available features can be seen as distractors, that prevent the learning of more complex features [19].

In this manuscript we empirically investigate how the differing biases of MLPs and Transformers [64], affects the learning dynamics of these two architectures, on data sets containing multiple features with specified predictabilities and availabilities. We do this by constructing data sets that contain multiple noisy k-parity features. K-parity is useful as a proxy for real problems requiring axis-aligned feature learning [16]. The goal of this investigation is to provide new insights on the differing inductive biases of these models on a well studied class of hard non-linear feature, showing where theory matches with practice and where it does not. Specifically, our contributions are as follows:

  1. A simple framework for creating hard non-linear data sets with any number of features of specified availability and predictivity, for investigating the simplicity bias. Using this framework we conduct extensive experiments to explore the inductive biases of MLPs and Transformers.

  1. We show that, for data sets whose features are k-parities and under a fixed training budget, training on more i.i.d. samples can slow the optimisation of Transformers enough to reduce final accuracy (Figure 1). Training accuracy and test accuracy side by side (Table 1) show that this is an optimisation-speed effect rather than a change in the achievable generalisation: at large data set sizes the training accuracy itself stays low within the budget. The effect persists, in weaker form, when the iteration budget is scaled with the data set size, where more data extends the frontier of learnable features while still optimising more slowly in the partially learned regime.

Test accuracy versus k-parity size

Figure 1. Test accuracy vs. k-parity size dd. Red: m=10m = 10, N=8000N = 8000, T=104T = 10^{4}. Blue: m=20m = 20, N=240000N = 240000, T=2×104T = 2 \times10^{4}. Scaling up all three gives worse results (§ 4.2).

Training set size NNFixed, d=18d = 18 trainFixed, d=18d = 18 testScaled, d=18d = 18 trainScaled, d=18d = 18 testScaled, d=22d = 22 trainScaled, d=22d = 22 test
2,4000.9930.5370.8170.4940.8310.495
8,0000.8890.7570.8670.7050.8220.506
24,0000.5940.5490.7920.6100.9040.597
80,0000.5060.5011.0001.0000.8760.600
240,000––1.0001.0000.7710.702
∞ (DGP)0.5000.500–––…

Table 1. GPT train and test accuracy on a noiseless k-parity feature under the fixed budget (T=104T = 10^4) and the scaled budget (T=1.25NT = 1.25N). Rows give the training set size NN. Under the fixed budget, large data sets are not fitted even on the training set (undertraining), and under the scaled budget the training accuracy at d=22d = 22 is lower for the largest data set than for N=24,000N = 24{,}000 despite ten times more iterations. Full tables are in Appendix E.

  1. We show the stronger SB of Transformers means they are less prone to over-fitting and better at learning from noisy data. However, this also means they have difficulty in learning complex yet highly predictive features even with large amounts of training data and iterations. Conversely, for highly complex features MLPs with a lower SB scale much better when presented with more data.

Related Work

Simplicity Bias. In their work Learning Qualitatively Diverse and Interpretable Rules for Classification, Ross et al. (2018) introduced a way to identify a maximal set of distinct but accurate models for a dataset, demonstrating empirically that SGD tends to recover simpler, more interpretable classifiers. Valle-Perez et al. [61] suggested the good generalisation performance of neural networks is because the parameter-function map is biased towards simple functions. Nakkiran et al. [40] showed that SGD-trained NNs learn functions of increasing complexity, starting with a linear model retained even to convergence. Scimeca et al. [50] show that Kolmogorov-simple solutions are abundant in parameter space and thus more likely found by NNs. More recently, Bell & Sagun [6] showed that SB can lead to larger performance disparities between subsets of the input distribution, and Mingard et al. [37] claim NNs have an inbuilt Occam’s razor with a strong bias toward low Kolmogorov complexity functions. Tenen et al. (2024) proposed that SB depends on architectural components such as non-linearities, residual connections, and layer normalizations, and in follow-up work Teney et al. [58] design NNs with specialised activations that instead induce a complexity bias. Shah et al. [51] was the first to focus on the negative consequences of SB, showing that: (i) SB can be extreme, causing networks to rely solely on the simplest feature; (ii) extreme SB exacerbates degradation under distribution shifts and adversarial attacks; (iii) SB can hinder generalisation even when simpler features are less predictive; and (iv) common mitigations like ensembles and adversarial training struggle to address it. Theoretically, Soudry et al. [55]; Morwani et al. [39] showed that ERM with the CE loss finds a maximum margin model when one exists, and Puli et al. [46] showed this implicit bias can prevent linear models from using the label when it appears in the input, proposing losses to address this.

Repetition and Data Diversity. Charton & Kempe [12] show that, for a fixed training budget, transformers trained on algorithmic tasks can learn faster and perform better when trained on smaller data sets with repeated examples than on larger single-use data sets. Liu et al. [33] show that small data sets can speed up training and analyse the role of repetition in detail. Our fixed-budget results are consistent with this line of work. The main differences are the setting (kk-parity, where statistical-query hardness results give a precise notion of difficulty), the comparison with MLPs, and our scaled-budget experiments, which keep the expected number of passes per example constant.

Learning Parities with Neural Networks. The kk-parity function has long served as a canonical hard case for gradient-based learning, with its difficulty rooted in the SQ framework of Kearns [29], which establishes that any SQ algorithm requires exponentially many queries to learn a worst-case parity. The staircase property of [1, 2] provides a necessary and nearly sufficient condition for SGD learnability of sparse functions on depth-2 networks, revealing that kk-parity’s key obstacle is its inability to decompose hierarchically into lower-order correlations. Abbe et al. [3] characterised the saddle-to-saddle dynamics governing sequential feature acquisition, showing SGD complexity for parity matches Correlational SQ lower bounds. On the positive side, Daniely & Malach [15] showed gradient-trained networks can learn parities under non-uniform input distributions that break the SQ barrier, and Kou et al. [32] showed two-layer networks trained with sign-SGD can solve kk-sparse parity with sample complexity matching the SQ lower bound. Shoshani & Shamir [53] formalised the hardness of fixed parities for one-hidden-layer ReLU networks, proving exponential-in-kk failure guarantees. Edelman et al. [16] reframed the SQ lower bound as a multi-resource trade-off over data, width, compute, and randomness. Han & Ghoshdastidar [22] showed theoretically that a single attention head can efficiently identify the relevant kk coordinates of a kk-parity where an equivalently parameterised MLP cannot. Barak et al. [4] demonstrated that standard architectures can learn sparse parities near the SQ limit, exhibiting sharp phase transitions at approximately nO(k)n^{O(k)} iterations, driven by gradual amplification of a “Fourier gap” invisible to the loss curve. This behaviour was corroborated by Merrill et al. [36], which attributed the transition to rapid norm growth in a small neuron subset. Our work is most similar to Peters et al. [44], who investigate the simplicity bias of Transformers and LSTMs on sparse Boolean functions including kk-parity. They show that the extreme simplicity bias of Transformers makes it possible to construct data sets where they fail to learn from noisy data. We build on this by studying how data set size and training budget interact with feature complexity, and by contrasting Transformers with MLPs under identical conditions. Our findings on noise robustness are consistent with theirs; the dependence of Transformer optimisation speed on data diversity is, to our knowledge, not covered by their study. Orthogonal to this body of work, we ask where kk-parity features are learnt rather than how, examining datasets containing one or more kk-parity-encoded features across different data and model scales.

Preliminaries

Scope. We follow the long line of research that investigates NN training on synthetic data sets ([23, 45, 41, 17, 63, 60]). We design data sets with a number of different features so they each have a desired predictivity (see § 3.1) and availability (Hermann et al. [24]). In order to simplify our analysis and let us precisely control the relative availability of different features we follow a large body of work that restricts their analyses to training of NNs on classes of boolean (or ternary functions) ([47, 35, 15, 23, 4, 11] (Bathamishra et al. 2023)). Concretely we only consider binary classification data sets, where the input space is X≜{−1,0,1}din\mathcal{X} \triangleq\{-1,0,1\}^{d_{\mathrm{in}}}, and the label space is Y≜{−1,1}\mathcal{Y} \triangleq\{-1,1\}.4 Features. To formalise a precise notion of features we use the definition presented in Ilyas et al. [26]. According to their definition, a feature is some function of the input space to a single scalar that represents the presence or lack of a given attribute or concept. Formally:

Fall={f:X→R},(1)\mathcal{F}_{\mathrm{all}} = \{f : \mathcal{X} \to\mathbb{R}\}, \tag*{(1)}

where Fall\mathcal{F}_{\mathrm{all}} is the space of all features. In practice data sets contain a continuum of different features rather than a discrete set, however, to promote understanding we construct data sets that contain a finite set FF of one or more carefully designed features.

Predictivity and Availability

We adopt the definitions of predictivity and availability from Hermann et al. [24]. Predictivity quantifies the correlation of a given feature with the label.

Definition 1 (Predictivity). A feature fi(x)f_i(x) has a predictivity of αi\alpha_i over a data set DN≜{(xn,yn)}n=1N\mathbb{D}_N \triangleq\{(x_n,y_n)\}_{n=1}^{N} given by the following relation:

αi≜P{x,y}∼DN(y=sign⁡(fi(x)))(2)\alpha_i \triangleq\mathbb{P}_{\{x,y\}\sim\mathbb{D}_N}\left(y = \operatorname{sign}(f_i(x))\right) \tag*{(2)}

In words, the predictivity of feature fif_i over a data set DN\mathbb{D}_N is the fraction of examples for which the sign of fi(x)f_i(x) matches the label y∈{−1,1}y \in\{-1,1\}.

Definition 2 (Availability). More-available features are easier for models to extract and leverage [24].

Availability is much harder to uniquely define mathematically. It has been shown by the extensive work on the simplicity bias that neural networks find simpler features easier to learn and thus more available. However, there is no consensus on the definition of “simple”. Shah et al. [51] define the simplicity of a function by the minimum number of linear pieces in the decision boundary that achieves optimal classification accuracy using that function. Unfortunately, this definition is not easy to quantify outside of toy data sets. Wang et al. [65] suggest low frequency features are simple and hence learnt first. Vasudeva et al. [62] define simple as those that can be learnt by models with fewer parameters. Conversely, Hermann & Lampinen [23] look at what features convolutional neural networks (CNNs) learn first and suggest simple features are those that can be most easily decoded by linear probing before training. Morwani et al. [39] suggest simple features can be characterised by a low dimensional projections of the inputs. Several works ([50, 37]) have suggested NN are biased toward learning Kolmogorov simple functions. More recently Fel et al. [18] introduced V-information to quantify the computational transformations required for visual features to be extracted. We note all these metrics corresponds to some measure of the information required in describing the function and thus, in practice, outside of carefully constructed functions are likely to be highly correlated. In this work we use the bit-string length of a k-parity to encode the availability of a feature.

k-parity

In this work every feature fi∈Ff_i \in\mathcal{F} encodes a noisy k-parity function with k=⌈d/2⌉k = \lceil d/2 \rceil, where dd is the length of the bit string of the domain of fif_i. By increasing the size of did_i we can decrease the availability of the ithi^{th} feature making it harder to learn. We use noisy k-parity as our feature of choice as k-parity is simple, well studied theoretically ([15, 4, 32]), provably hard to learn ([29, 52, 8, 53]), and gives us easy control of both predictivity and complexity. Before introducing noisy k-parity we first introduce the noiseless version of k-parity.

Definition 3 (k-parity). k-parity is a binary function gd:{0,1}d→{0,1}g_d : \{0,1\}^{d} \to\{0,1\} given by the following relation:

gd(x)≜⟨x,h⟩ mod 2,(3)g_d(x) \triangleq\langle x,h\rangle\bmod2, \tag*{(3)}

where h∈{0,1}d\mathbf{h} \in\{0,1\}^{d} is an unknown latent vector with ∥h∥1=k=⌈d/2⌉\|\mathbf{h}\|_{1}=k=\lceil d/2\rceil that must be learnt via samples (xn,yn)(\mathbf{x}_{n},y_{n}) where yn≜gk(xn)y_{n}\triangleq g_{k}(\mathbf{x}_{n}) [47, 15]. In this paper we sample h\mathbf{h} uniformly from {h∈{0,1}d:∥h∥1=⌈d/2⌉}\{\mathbf{h}\in\{0,1\}^{d}:\|\mathbf{h}\|_{1}=\lceil d/2\rceil\}.

In other words, we ensure approximately half the elements of h\mathbf{h} are 1 and half are 0. As dd increases the number of possible h\mathbf{h} vectors increases as (dd/2)\binom{d}{d/2}. Note, in this formulation dd corresponds to the total number of bits, rather than the bit width of latent vector h\mathbf{h}. One effect of this choice is approximately half of the input encodes the label and the other half is uncorrelated noise. The k-parity learning task is effectively identifying these two subsets [13].

Definition 4 (Noisy k-parity) Noisy k-parity is a stochastic binary function g^d:{0,1}d→{0,1}\hat{g}_{d}:\{0,1\}^{d}\to\{0,1\} given by:

g^d≜(⟨x,h⟩+Bernoulli⁡(1−α)) mod 2,(4)\hat{g}_{d} \triangleq\left(\langle\mathbf{x},\mathbf{h}\rangle+\operatorname{Bernoulli}(1-\alpha)\right)\bmod2, \tag*{(4)}

where h\mathbf{h} is sampled via the same process for k-parity. In words, noisy k-parity returns the same label as the noiseless k-parity with probability α\alpha and with probability 1−α1-\alpha returns the wrong label.

The Predictivity of noisy k-parity is given exactly by α\alpha and a measure of its availability scales with the inverse of the number of bits dd, this makes it an ideal candidate function for constructing data sets with many features where we want to have precise control of these quantities. Thus, in this paper all features considered are simply different versions of the noisy k-parity function.

For data sets with FF features; these data sets can be described by a list of FF tuples where each tuple contains the number of bits of each feature dd and α\alpha for a given feature. In order to have data sets containing multiple features, non-overlapping subsets of the input space X\mathcal{X} form the domain to different noisy k-parity functions. For example, for a data set with only two features, f1,f2f_{1},f_{2} the first din/2d_{\mathrm{in}}/2 dimensions of the input would encode f1f_{1} with a noisy k-parity feature with a given k1k_{1}, α1\alpha_{1} and h1\mathbf{h}_{1} and the second din/2d_{\mathrm{in}}/2 dimension would encode a different noisy k-parity feature with a different k2k_{2}, α2\alpha_{2} and h2\mathbf{h}_{2}.5 To create larger data sets containing even more features we simply concatenate more features together. For the exact details of the Data Generating Process see Appendix § 11.

Experiments

Models and Training Procedure

We investigate two classes of models, a decoder only Transformer (Vaswani et al., [64]) which we denote (GPT), and a standard multi-layer perceptron (MLP). These models are three blocks and three layers deep, respectively. We run experiments at a number of model scales by increasing the width of the model or parameters and attention heads for the Transformer in each layer, by a width factor mm, with a default value of m=10m=10.⁶ The GPT like model has approximately 35 times the parameter count of the MLP for the same value of mm. We did not match the models on parameter count, FLOPs or any other single axis: no one choice of matching is unambiguously fair between architecture classes, since parameters, FLOPs, memory and wall-clock time all differ. Instead, the two sizes were chosen so that both models exhibit interesting variation over a similar range of k-parity feature sizes, i.e. the regime in which neither model trivially succeeds or fails. This is a deliberate design decision; the consequences for interpreting the comparison are discussed in § 7. The two models also differ in regularisation and learning rate: the GPT model uses weight decay (10−310^{-3}), dropout (0.1), gradient clipping and a learning rate of 10−410^{-4}, while the MLP uses no weight decay or dropout and a learning rate of 3×10−43\times10^{-4} (Appendix § 12).

Input format. The MLP receives the input vector x∈{−1,0,1}din\mathbf{x}\in\{-1,0,1\}^{d_{\mathrm{in}}} directly. The GPT model treats the same input as a sequence of dind_{\mathrm{in}} tokens, one per input coordinate, each taking one of three values (Appendix § 12). Classification uses the output at the final sequence position, which under the causal mask attends to every earlier token. Both models therefore have access to the complete input, and the comparison is not confounded by information restrictions from the causal mask. All models were trained with the same procedure, unless stated otherwise. The MLP was trained with Adam [30] and the GPT model with AdamW, in both cases for T=104T = 10^{4} iterations (the fixed budget) or until the training accuracy hit 99.99%. Where stated, the budget is instead scaled with the training set size as T=1.25NT = 1.25N. Throughout, NN in this scaling rule denotes the number of training examples, e.g. a data set of N=8,000N = 8{,}000 training examples and T=104T = 10^{4} under the scaled budget. With a batch size of 256 this gives an expected 320 passes over each training example, independent of NN. An “infinite” data set (N=∞N = \infty) means every batch is sampled fresh from the DGP. A noiseless test set is one in which all features are fully predictive. For all experiments at least 5 runs with different seeds were performed and the results averaged. Where relevant: shaded areas show one standard deviation calculated across these runs. For details of the exact models and hyperparameters see Appendix § 12.

K-Parity Experiments

We train both models (MLP & GPT) on data sets containing a single noiseless k-parity feature for a fixed training budget (T=104T = 10^{4}). These data sets contain differing numbers of data points and size of k-parity feature. The accuracies of the models trained in these experiments are shown in Figure 2. The results for the MLP model show that the larger the k-parity the more difficult it is to learn, As dd increases the test accuracy decreases. The point at which this decreases from 100% accuracy on the test set depends on the size of the training set; with larger k-parity features requiring more training examples to learn reliably. For a training data set of 8000 examples the MLP can reliably learn a k-parity feature up to d=16d = 16, this increases to d=22d = 22 when the data set size is increased by a factor of 10.

Test accuracy on a noiseless k-parity feature with a fixed training budget

Figure 2. Test accuracy on a noiseless k-parity feature with a fixed training budget (T=104T = 10^{4}, finite training sets and N=∞N = \infty). Left two panels: MLP. Right two panels: GPT. For each model the first panel shows accuracy against feature size dd and the second against training set size NN. Corresponding training accuracies are in Appendix § 15.

For the Transformer model (GPT) we again see the same trend for feature sizes where larger, more complex, less available features are harder to learn from the same amount of data. However, the behaviour with regard to data set size is quite different to that of the MLP. Specifically, as the data set size increases the maximum size of feature that is learnt first increases, but then decreases again. The best results for all feature sizes are achieved at a data set size of 8000, for which the GPT model also reliably learns a k-parity feature with d=16d = 16. Conversely, the GPT model trained directly on samples from the DGP performs worst failing to learn the k-parity features for d>10d > 10. This is a surprising result: for a fixed iteration budget, greater data diversity hurts test performance even when train and test sets are sampled i.i.d. from the same DGP. This does not contradict Transformer scaling laws ([27]), which describe the benefit of more data when training is scaled appropriately, but it shows that under a fixed budget more data is not always better. The training curves (Figure 13 and Figure 14 in the Appendix) and the training accuracies in Appendix § 15 show what is happening. Larger data diversity leads to substantially slower training for the Transformer, and two distinct failure modes appear depending on the data set size. At small NN the model fits the training set but fails to generalise (overfitting): for N=2,400N = 2{,}400 and d=18d = 18 the training accuracy is 0.993 but the test accuracy is 0.537. At large NN the model cannot fit the training set within the budget (undertraining): for N=80,000N = 80{,}000 and d=18d = 18 the training accuracy is only 0.506. The extreme case is N=∞N = \infty, where the model never sees an example twice and fails to fit the training distribution for d≥12d \ge12. In our fixed-budget experiments an intermediate training set size (N=8,000N = 8{,}000) is the sweet spot at which the model both fits the training set and generalises. Our claim is therefore specifically that, for a fixed iteration budget, increasing data diversity slows Transformer optimisation on k-parity, and that smaller data sets can be preferable as a result. It is not a claim that more data lowers the final achievable accuracy, nor a challenge to scaling laws in general. Notably, this slowdown occurs even though a large number of works prove lower bounds on the number of unique queries required to learn k-parity [29, 44, 32, 53]: extra unique examples should not make the problem harder in a statistical sense, so the effect is one of optimisation. Related repetition effects have been reported for other tasks [33, 12], and Liu et al. [33] give a detailed account of how repetition and sampling bias from small data sets can speed up training. Our results complement this line of work by showing that the same phenomenon arises for Transformers on k-parity, a setting with a precise notion of difficulty, and by contrasting it with the behaviour of MLPs. In Figure 1 we exploit this phenomenon to create an example where scaling up data, model size and training iterations leads to worse results, noting that the iteration budget grows far more slowly than the data set.

Training plots for dataset size of N = 8000

Figure 13. Training Plots for dataset size of N=8000N = 8000

MLP Validation Accuracy and GPT Validation Accuracy plots

Figure 14. Validation Plots for dataset size N=8000N = 8000

In Figure 15 (Appendix) we show the results for the transformer model when scaling the number of training iterations proportionally to the data set size, specifically T=1.25NT = 1.25N, so that with a batch size of 256 each sample is expected to appear in a batch approximately 320 times regardless of NN. Here the results more closely match those of the MLP with a fixed budget, where more samples generally lead to better performance: the frontier of learnable feature sizes moves from d=14d = 14 at N=2400N = 2400 to d=20d = 20 at N=240,000N = 240{,}000 (Appendix E). However, the optimisation slowdown does not disappear in the partially learned regime. At d=22d = 22, N=24,000N = 24{,}000 reaches a training accuracy of 0.904 whereas N=240,000N = 240{,}000 reaches only 0.771, even though the latter is given ten times more iterations. The slowdown with more diverse data is therefore a persistent property of Transformer k-parity learning, not only an artefact of a fixed iteration budget. We also note that we are using a much larger budget for the GPT model in this setting than in the fixed-budget experiments.

Feature Size vs Test Accuracy, Training Set Size vs Test Accuracy, Feature Size vs Train Accuracy, and Training Set Size vs Train Accuracy plots

Figure 15. Plots of accuracies on noiseless k-parity when the training iterations is scaled with the data set size (T=1.25NT = 1.25N) Left: Test Accuracy for GPT model. Right: Train Accuracy for GPT model

Separating repetition, undertraining and diversity

The experiments above separate the candidate explanations as follows. Repetition: in the fixed-budget experiments the expected number of passes per example falls as 1/N1/N by construction (Table 6), so these results alone cannot separate repetition from diversity; the scaled-budget experiments hold the expected passes per example constant. Undertraining: the training accuracies show that the large-NN fixed-budget failures are undertraining rather than overfitting. Diversity: the N=∞N = \infty runs remove repetition entirely and are the slowest to optimise, and the scaled-budget results show that more diverse data remains harder to optimise at constant passes per example. These experiments build on the careful analysis of repetition by Liu et al. [33].

The observation of more data leading to slower training under a fixed budget suggests an efficient method of learning k-parities with Transformers using a curriculum. This agrees with the findings of Cornachia & Mossel [13] that curricula can be used to efficiently learn parities. However, we find this to be most effective for Transformers which was not part of their study. We investigate the following scheme where only a subset of the full data set is used for training for the first fraction of the training budget, before later switching to the full training set. We show this is indeed effective by restricting training to a 10th10^{th} of the training set for the first c%c\% of training, and then using the full data set for the remaining 100−c%100-c\% of training.

We experiment with c∈{10,50,90}c \in\{10, 50, 90\} and N=80000N = 80000. The result of this experiment is shown in Figure 16. The curriculum with a 90/10 split performs best. This is further evidence that care is required to efficiently train Transformers on certain classes of hard functions.

Feature Size vs Test Accuracy and Feature Size vs Train Accuracy plots

Figure 16. Effect on train and test accuracy of a Curriculum on the performance on GPT style model at learning k-parity. All runs use a fixed iteration budget of 10410^{4} and full data set size of 8×1048 \times10^{4}, the curriculum splits the indicated the fraction of training where only 1/10th1/10^{th} of the training set is used.

Finally, it is worth noting there are many examples where both models achieve perfect test accuracy when trained on data set sizes containing far lower then the number of possible input vectors (2d2^d). For d=16d = 16 there exist 2162^{16} unique strings however both models manage to learn the “correct” boolean function and generalise perfectly from 8000 ≈213\approx2^{13} training examples or roughly one eighth of all possible input strings. This shows that the inductive biases of both models encourage them to learn the kk-parity function over other less structured function that would also give zero training loss, such as memorisation. This is an example of the SB working in our favour.

Key Finding 1 For Transformers trained on kk-parity, greater data diversity leads to markedly slower optimisation. Under a fixed training budget this can make smaller data sets give better train and test performance, and it is possible to construct cases where scaling up the data, model size and iterations gives worse results (Figure 1). When the budget is scaled with the data set size, more data extends the frontier of learnable features, but larger data sets still optimise more slowly in the partially learned regime.

Noisy k-parity Experiments

We now investigate the performance of both models on noisy kk-parity, that is features where the predictivity is less than 1.0. Similar to section 4.2 we again create a selection of data sets with a single feature f1f_1 and vary the following key quantities, the data set size NN, the size of the single feature d1d_1 and the predictivity of said feature α1∈{0.6,0.7,0.8,0.9,1.0}\alpha_1 \in\{0.6, 0.7, 0.8, 0.9, 1.0\}.

Figure 3 shows the test accuracies on a noiseless test set for the MLP and GPT models when the budget is scaled with the data set size (T=1.25NT = 1.25N). Results for α1=0.8\alpha_1 = 0.8 are shown in more detail in Figure 17 (GPT, scaled budget) and 18 (both models, fixed budget) in the appendix. Train accuracies and test accuracies on i.i.d test set are additionally shown in Figure 19 within the appendix. We observe a global trend that holds for both models and all data set sizes, as the predictivity decreases, the test accuracy decreases. Features more highly correlated with the output are more easy to disentangle from noise. Additionally large less available features are harder to learn. However, again there are marked differences between the two models particularly when scaling up the data set size. The MLP excels at learning low noise features with low availability especially as the data set size is increased, but often fails on noisy features due to overfitting to the training set, as shown in Figure 3, Figure 19 & Figure 18. Conversely, as noted by Vasudeva et al., [63]; Peters et al. [44] the GPT model is highly biased to learning simple functions, resulting in it preferentially learning kk-parity over memorising the training data. This corroborates the result of Peters et al. [44] that Transformers are effective at learning from noisy data, but we additionally show how data set size amplifies this ability while doing little to help the learning of large low availability features. In Figure 4 we show how the normalised average accuracy of the models changes with the feature size and predictivity average across all data. We show results both on a noiseless test set and an i.i.d test set. In both cases we observe when learning kk-parity features Transformers are relatively less sensitive to noise (lower predictivity) but are more sensitive to feature size (lower availability) than MLPs.

Test accuracy grids for GPT and MLP models

Figure 3. Test accuracy on a noiseless test set for models trained on a noisy k-parity feature with a scaled iteration budget (T=1.25NT = 1.25N). Each panel shows accuracy as a function of feature size d1d_1 and predictivity α1\alpha_1. Top row: GPT. Bottom row: MLP. Columns correspond to N=2400,8000,24000,80000N = 2400, 8000, 24000, 80000.

Comparison of MLP and GPT inductive biases

Figure 4. Comparison of MLP and GPT inductive biases toward predictivity and availability, with a scaled iteration budget (T=1.25NT = 1.25N), averaged over data set sizes. Left two panels: average accuracy against feature availability (larger features are less available), on a noiseless test set and on an i.i.d. test set respectively. Right two panels: average accuracy against feature predictivity, on a noiseless and an i.i.d. test set respectively. Here Transformers are relatively less sensitive to noise (lower predictivity) but are more sensitive to feature size (lower availability) than MLPs.

GPT accuracy plots for a noisy $k$-parity feature

Figure 17. GPT accuracy on a noisy kk-parity feature, α1=0.8\alpha_{1}=0.8, with the iteration budget scaled with the data set size (T=1.25NT=1.25N). Left two panels: test accuracy. Right two panels: train accuracy.

Accuracy plots for a noisy $k$-parity feature under a fixed budget

Figure 18. Accuracy on a noisy kk-parity feature, α1=0.8\alpha_{1}=0.8, under a fixed budget (T=104T=10^{4}). Left: MLP. Right: GPT.

Accuracies for MLP and GPT models trained on a noisy k-parity feature with Scaling Iteration Budget

Figure 19. Accuracies for MLP and GPT models trained on a noisy k-parity feature with Scaling Iteration Budget (T=1.25NT = 1.25N), Top Two Rows: Train Accuracy, Middle Two Rows: Test Accuracy (i.i.d) to train set, Bottom Two Rows: Noiseless Test Accuracy.

For a fixed training budget we again observe the trend that increasing the data set size for the transformer first increases the test performance but then leads to a sharp drop off where the transformer fails to learn the function within the given training budget (Figure 18 & Figure 20 in the appendix).

Test Accuracy on i.i.d test set for models trained on a noisy k-parity feature with Constant Iteration Budget

Figure 20. Test Accuracy on i.i.d test set for models trained on a noisy k-parity feature with Constant Iteration Budget (T=10000T = 10000). An “infinite” data set size is achieved by directly sampling from the DGP.

Data sets of Two features

In this section we perform experiments on data sets that contain exactly two features. These features are designed to form a strict hierarchy see Sec. C. Similar to Hermann & Lampinen [23], this lets us probe when the two models learn the most predictive feature. We construct a data set with a feature f1f_1 which we vary the size and predictivity of. Specifically we consider d1∈{6,8,10,12}d_1 \in\{6, 8, 10, 12\} and α1∈{0.5,0.6,0.7,0.8,0.9,1.0}\alpha_1 \in\{0.5, 0.6, 0.7, 0.8, 0.9, 1.0\}. The other feature, f2f_2 has a fixed size of d2=8d_2 = 8 bits and a predictivity of α2=0.85\alpha_2 = 0.85. The test accuracy of the resulting two models are shown in Figure 5 for a variety of sizes of the training set. Here we only scale the training iterations of the GPT model in line with the data set size; the MLP uses the fixed budget T=104T = 10^4.

Two Feature Experiments

Figure 5. Two Feature Experiments Top: MLP with constant compute budget (T=10000T = 10000), Bottom: Transformer with compute budget proportional to data set size (T=1.25NT = 1.25N). Each panel shows test accuracy as a function of d1d_1 and α1\alpha_1. Under these different regimes the models exhibit similar learning to use the optimal feature in all cases for N≥80,000N \ge80,000.

Under this regime the models exhibit similar biases resulting in similar test performances at different scales and predictivities and availabilities for f1f_1. While slight, the GPT model typically performs better at learning f2f_2 when f1f_1 has lower predictivity, whereas the MLP typically does better at learning f1f_1 when it has high predictivity but low availability.

Results on data set containing five weak features and one strong feature

Results for the GPT model with a fixed training budget are shown in Figure 21 within the Appendix. With a fixed budget we see more training data slows the GPT training to a point where a smaller data set size is optimal.

Results for the GPT model with a fixed training budget

Figure 21.

Key Finding 2 When learning noisy k-parity features Transformers are less sensitive to noise (lower predictivity) but are more sensitive to feature size (lower availability) relative to MLPs. Increasing the data set size amplifies these differences.

Data Sets with Larger Numbers of Features

We now turn our attention to data sets with more than two features. These data sets are designed to highlight difference in the SB of the two models and be more representative of hard data sets that one might encounter in practice.

One Strong vs Many Weak Features. Here we construct data sets containing six features F={f1,…,f6}\mathcal{F} = \{f_1, \ldots, f_6\}, five “weak” features and one “strong” feature. The features f1,…,f5f_1, \ldots, f_5 are the “weak” features and have low predictivities, αi=0.6\alpha_i = 0.6 for i∈{1,…,5}i \in\{1, \ldots, 5\}, but high availability. This high availability, is achieved by using a low number of bits. We run experiments with di∈{2,4,6}d_i \in\{2, 4, 6\} for i∈{1,…,5}i \in\{1, \ldots, 5\}. We additionally have one “strong” feature with perfect predictivity α6=1.0\alpha_6 = 1.0 whose availability we vary, specifically d6∈{2,4,…,14}d_6 \in\{2, 4, \ldots, 14\}. We train models for a longer 10510^5 iterations, at two data scales N=8000N = 8000 and sampling batches directly from the DGP.

We report the test accuracies in Figure 6. For (N=8000N = 8000), despite both models achieving ∼99.9%\sim99.9\% for all three data sets they struggled to learn to use f6f_6 for d6≥10d_6 \ge10, except in the case where d1,…,d5=2d_1, \ldots, d_5 = 2 where both models only fail to learn f6f_6 for d6≥14d_6 \ge14. The models simply do not have enough data to learn to correctly use f6f_6 which is required to have good generalisation performance. When training directly on the DGP we see the MLPs accuracy improve across the board. However, the Transformer often performs worse, despite the greater data diversity and larger training budget. The strong bias for learning simple functions means in the cases when there are no predictive simple functions, such as when memorisation is not possible, transformers struggle to learn anything at all.

Results on data settings containing five weak features and one strong feature

Figure 6. Results on data settings containing five weak features and one strong feature (T=105T = 10^{5}, fixed budget). Left two panels: finite training set. Right two panels: batches sampled directly from the DGP (N=∞N = \infty). When highly complex the transformer fails to learn the strong feature at all data scales. “wfs”: weak feature size.

Hierarchical Data Set. Finally, we investigate the models on a data set where the features form a strict hierarchy see Sec. C, that is, there are five features that become more predictive but less available. In order to correctly classify all examples the models must rely on the most predictive features, as for certain fractions of the data set the weaker features are totally uncorrelated with the label. Table 7 in the Appendix shows the Availability and Predictability of the five features.

Feature nameBitsRAPredictivity (αi\alpha_i)
f1f_141/660%
f2f_261/2070%
f3f_381/7080%
f4f_4101/25290%
f5f_5121/924100%

Table 7. Data Set with 5 features with linearly scaling size. In order to help quantify the relative availability (RA) of different features in a given data set we also report the inverse of the number of unique hh vectors for a feature of that many bits.

The results for models at various scales trained on this data set are shown in Figure 7 with a scaling iteration budget. The full results can be found in Figure 22 and Figure 23 within the Appendix. Data sets of this form are very difficult for models to learn as by definition the weaker features act as shortcuts. This is confirmed by no model achieving close to 100% generalisation performance despite the train and test data sets being i.i.d. and the data set only having an effective dimensionality of 40. We again see marked differences between the two models. The GPT model performs better at low data regimes (the m=2m = 2 model) achieving close to 78% accuracy when trained with 8000 samples, far above the best performing MLP. At this low scale the MLP models nearly all overfit to the training data and generalise poorly. Conversely, for larger data scales the MLP model dominates the Transformer which never interpolates the training set. Again the Transformer often has worse training performance with more training data despite the increasing number of training iterations used. Additionally the optimal size of data set for the transformer depends on the size of model being used with only two of the model sizes performing best on the largest training set. Lastly, in our experiments MLPs were a more parameter and compute efficient approach for learning kk-parities than Transformers, which differs from what the asymptotic theoretical results of Han & Ghoshdastidar [22] might suggest, see Figure 24 within the Appendix.

Train and test accuracy on the tiered data set

Figure 7. Train (first and third panels) and test (second and fourth panels) accuracy on the tiered data set with a scaled iteration budget (T=1.25NT = 1.25N). Left two panels: MLP. Right two panels: GPT.

Test accuracy for Tiered Data Set with a fixed training budget

Figure 22. Test accuracy for Tiered Data Set with a fixed training budget Top: MLP. Bottom: GPT.

Test accuracy for Tiered Data Set with a scaling training budget

Figure 23. Test accuracy for Tiered Data Set with a scaling training budget Top: MLP. Bottom: GPT.

Plots showing train accuracy and test accuracy against parameter count × total iterations, with legends for GPT, Mixed Iteration Budget, MLP, Scaling Iteration Budget, and model sizes 1, 2, 5, 10, and 20

Figure 24. Plots showing accuracy against parameter times training iterations for models trained on the hierarchical data set described in Section C. On this hard non-linear data set composed for 5 noisy kk-parity features MLPs offer an order of magnitude more efficient learner.

Key Finding 3 The same extreme SB that makes Transformers excel at learning noisy data makes them poorly suited for learning certain classes of highly complex non-linear features in the presence of shortcuts, where they will often fail to minimise the loss.

Discussion

Our experiments separate the effects of repetition, undertraining and diversity (§ 4.2) and point towards a possible mechanism without yet identifying one. A natural hypothesis, consistent with the theoretical literature on parity learning ([4, 22]), is that the attention mechanism lets the Transformer identify the relevant coordinates quickly, but that this process depends on the signal-to-noise ratio of the gradient updates, which falls as the data become more diverse. Testing this hypothesis through gradient statistics or Fourier-gap measurements is a promising direction that the present testbed is well suited to support.

KK-parity is motivated as a proxy for problems that require axis-aligned feature learning (Edelman et al., [16]), and our study follows the established practice of using small synthetic tasks to understand phenomena, such as grokking, that are hard to observe under standard training regimes but are informative about the behaviour of these architectures [45, 41, 54]. We therefore view the results as a controlled study of two architecture families on a hard class of functions. We speculate similar effects would be most likely to appear in tabular or structured settings with limited compute budgets; natural data, whose feature distributions are typically long-tailed, and other nonlinear functions (for example cryptographic or other algorithmically generated functions) would be valuable places to look next.

Limitations

The scope of our conclusions is set by the experimental design, which we chose to keep tightly controlled. The “less data is more” effect is a statement about optimisation under a fixed iteration budget: smaller data sets are preferable because they are optimised faster rather than because they yield a better final model, and with a scaled budget larger data sets extend the frontier of learnable features. In several settings, for example large NN or large dd, the models do not fit the training set within the budget (Appendix § 15), so conclusions in these regimes describe optimisation speed under our budgets rather than ultimate capacity. Our scaled-budget experiments hold the expected number of passes per example constant, and a fixed-FLOPs comparison that accounts for differences in per-step cost would complement them.

The comparison between architectures is intended to highlight the differences between these models rather than be taken as a head to head evaluation. The GPT model has about 35 times more parameters than the MLP at the same width factor, and the two differ in input format, regularisation and learning rate, so the differences we observe reflect the architecture class together with these choices. Similarly, all experiments use Adam (AdamW for the GPT model). We avoided SGD because it is highly sensitive to the learning rate [49] and is known to perform poorly on parity learning, so a failure to learn would not cleanly isolate the effect of data diversity, and extending the study to SGD with momentum or sign-based optimisers would show how general the effect is, but we leave this to future work.

Finally, we study one decoder-only Transformer family (a minGPT variant) and one MLP family at small scale compared with frontier models [9], on data sets with noisy kk-parity features and uniformly sampled inputs. Other Transformer variants, the effects of batch size, further hyperparameters and kk-parity sparsity are natural next steps. The current investigation comprised over 50,000 training runs, the longest requiring over two GPU days.

Conclusion

We investigate the performance of MLPs and Transformers on data sets where every feature is a carefully chosen noisy kk-parity across a number of model sizes and data scales. We show across multiple data sets that i) under a fixed training budget, increasing data diversity leads to markedly slower training for Transformers, so that smaller data sets can perform better; with a scaled budget more data extends the frontier of learnable features but larger data sets still optimise more slowly; and ii) the same strong simplicity bias of Transformers that makes them well suited for learning from noisy data makes them poorly suited for learning complex low-availability features. Our findings give further explanation for phenomena where Transformers often encode algorithms using simple heuristics rather than complex algorithms [43].

Broader Impact Statement

This work is a fundamental empirical study on synthetic data and does not involve personal data, human subjects or deployed systems. We do not foresee direct negative societal impacts. More broadly, understanding when and why different architectures prefer simple features may help practitioners anticipate shortcut learning and design more reliable training data, although we have not tested whether our findings transfer to natural data.

Appendix Roadmap

The appendix is organised as follows. Section A gives the data generating process. Section B gives the model hyperparameters, the compute resources (Section B.4), the Transformer learning-rate sweeps (Figures 8 and 9) and the model-size sweeps (Figures 10, 11 and 12). Section E reports train and test accuracy tables for the fixed budget (Tables 2 and 3) and the scaled budget (Tables 4 and 5), and the effective number of passes (Table 6). Section C describes hierarchical data sets (Table 7). Section F contains additional plots: training and validation curves (Figures 13 and 14), the scaled-budget single-feature results (Figure 15), the curriculum experiment (Figure 16), the noisy k-parity grids (Figures 17, 18, 19 and 20), the two-feature and tiered data sets (Figures 21, 22 and 23) and the parameter and compute scatter plot (Figure 24).

Data Generating Process

In this section we explain in detail the data generating process (DGP) so that the resulting data set encodes the desired set of features. For the nthn^{\mathrm{th}} data point we first sample the label yny_n uniformly in {−1,1}\{-1,1\}, then we sample an input vector zi,n∈{0,1}diz_{i,n} \in\{0,1\}^{d_i} for each feature fif_i independently, except where stated otherwise (see Section C). This sampling is done by uniformly selecting an input zi,nz_{i,n} from the set {z∈{0,1}di:gdi(z)=y}\{z \in\{0,1\}^{d_i}: g_{d_i}(z)=y\}, where did_i is the number of bits of the ithi^{\mathrm{th}} feature (identifying y∈{−1,1}y \in\{-1,1\} with the parity output via y=2g−1y=2g-1). This process is repeated for all features fi∈Ff_i \in\mathcal{F}. In order to precisely set the predictivity we introduce 1−α1-\alpha feature noise similar to Peters et al. [44], so for 1−α1-\alpha % of examples the zi,nz_{i,n} is made unpredictive of the label.8 For convenience each ziz_i is then padded by the mean input value (0.5) so that all features are the same length, giving z^i,n∈{0,0.5,1}dmax, ∀i\hat{z}_{i,n} \in\{0,0.5,1\}^{d_{\mathrm{max}}},\ \forall i, where dmaxd_{\mathrm{max}} is one more than the maximum features size (dd) of all features in the data set. Next z^i,n\hat{z}_{i,n} are concatenated for all ii. Finally, the input data is rescaled. Specifically, the nthn^{\mathrm{th}} input in D\mathcal{D}, specifically xn\boldsymbol{x}_n is given by xn=2∗[z^i,n,…,z^f,n]−1\boldsymbol{x}_n = 2 * [\hat{z}_{i,n},\ldots,\hat{z}_{f,n}] - 1 where we rescale the data so the input lives in xn∈{−1,0,1}dmax×F\boldsymbol{x}_n \in\{-1,0,1\}^{d_{\mathrm{max}}\times F}. This also normalises the data to have zero mean and roughly unit variance. This means the input dimension to the model din=dmax×Fd_{\mathrm{in}} = d_{\mathrm{max}} \times F, where FF is the total number of features. The test, train and validation data sets are sampled using the exact same DGP, except if stated otherwise. We note that this DGP gives each sample x∈{−1,0,1}din\boldsymbol{x} \in\{-1,0,1\}^{d_{\mathrm{in}}} equal likelihood of being sampled for a data set D\mathcal{D}, which is a convenient property but unrealistic of most real world data sets which have long tails of less common examples of certain features.

Models and Hyperparameters

MLP

The MLP model is a simple MLP of three layers alternating linear layers with ReLU activations. The input dimension dind_{\mathrm{in}} is set to din=dmax×Fd_{\mathrm{in}} = d_{\mathrm{max}} \times F. As we are performing binary classification dout=2d_{\mathrm{out}} = 2. The MLP has three linear layers with a hidden dimension of m×32m \times32. The input is feed directly into the model with no tokenisation.

GPT

The Transformer model used was adapted directly from MINGPT (Karpathy [28]) with changes only made to the model hyperparameters. The embedding dimension was set to m×32m \times32, the number of heads per layer to m×2m \times2 and the vocabulary size was changed to three. All inputs x\boldsymbol{x} considered in this paper all live in x∈{−1,0,1}din\boldsymbol{x} \in\{-1,0,1\}^{d_{\mathrm{in}}} where din=dmax×Fd_{\mathrm{in}} = d_{\mathrm{max}} \times F, as described in Section A. Hence they can be modelled as a language with a vocabulary over three tokens. For the GPT model a weight decay of 10−310^{-3} and drop percentage of 0.1 were used.

Hyperparameters

The Adam optimiser [30] (AdamW for the GPT model, see above) with a batch size of 256 was used for all experiments. SGD can be highly sensitive to its learning rate [49] and hence in order to avoid the need for recalibration it was not used. A learning rate of 3×10−43 \times10^{-4} was used for the MLP model for all experiments. For the GPT model a learning rate of 1×10−41 \times10^{-4} was used instead. The Val and Test sets have a size of 0.1N0.1N or 25600 when N=inf⁡N = \inf, where NN is the training set size.

Compute Resources

All experiments were run on NVIDIA T4 GPUs. The longest single runs took approx 2.5 GPU days. The majority took significantly less. We performed over 50,000 unique training runs. We estimate all experiments could be rerun using ∼2000\sim2000 T4 GPU days, depending on the number of repeats performed.

Transformer Learning Rate

In this section we show that the trends observed for learning kk-parities with transformers hold when a smaller learning rate of 3×10−43 \times10^{-4} is used. In Figure 8 and Figure 9 we show the difference in performance when altering the learning rate of the GPT model at learning noisy kk-parity as described in § 4.4 and the two features learning experiments shown in § 4.5.

Test accuracy heatmaps for GPT models with different dataset sizes and learning rates

Figure 8. Test Accuracy on i.i.d test set for models trained on a noisy k-parity feature with Constant Iteration Budget (T=10000T = 10000). Top: GPT with a learning rate of η=3×10−4\eta= 3 \times10^{-4}. Bottom: GPT with a learning rate of 10−410^{-4}. While the learning rate has some localised effect it does not effect the trend observed in Section 4.4 with the performance increasing then decreasing when increasing the data set size.

Two Feature Experiments with constant compute budget

Figure 9. Two Feature Experiments with constant compute budget (T=10000T = 10000). Top: GPT with a learning rate of η=3×10−4\eta= 3 \times10^{-4}. Bottom: GPT with a learning rate of 10−410^{-4}. While the learning rate has some localised effect it does not effect the trend observed in § 4.5 where the performance increasing then decreasing when increasing the data set size.

Hierarchical Data Sets

For data sets with multiple independent weakly predictive features a bagging approach [10] has proven to be an effective means of prediction where “a vote” from multiple features is used. When constructing data sets with a large number of features it may be desirable to prevent models using bagging and force the model to learn the most predictive features to get best results. To action this we create strictly hierarchical data sets, where the features are not sampled independently. Instead the features are sampled to ensure that if fif_i has higher predictivity than fjf_j, (1−αk>1−αj)(1 - \alpha_k > 1 - \alpha_j) the feature fj(zj,n)≠ynf_j(z_{j,n}) \ne y_n if any fi(zi,n)≠ynf_i(z_{i,n}) \ne y_n for all inputs xx. In words for the data sets shown 7 we ensure 10% of the data can only be correctly classified using f5f_5, there is another non-overlapping 10% that can only be correctly predicted using f4f_4 or f5f_5 and so on. Thus the features form a strict hierarchy, and this allows us to have a data set with many features, but ensure the only way to achieve high performance on all samples is to learn the feature with the highest predictivity, or conversely learn a less predictive feature and memorise the examples where where it is not predictive.

Data sets containing a hierarchy of features are worthy of particular study because this property is representative of vast majority of machine learning data sets. Indeed, the activations of a neural network trained on a data set form a hierarchy of features where the later layers represent more complex and predictive features of the input than the early layers [59]. While in practice these complex feature are typically a composition of weaker features, in this work for ease of analysis we instead make them separate, uncorrelated features, following a similar approach to that of the collages data set introduced in Teney et al. [56].

Model Scaling

In this section, we report the results of repeating the experiment detailed in section 4.2 for models with width factors m∈{1,10,20}m \in\{1, 10, 20\}. As one might expect increasing the width of the model increases, its capacity and hence the size of the k-parity that the model is capable of learning in 10410^4 iterations. When trained directly on the DGP the MLP model with a a width factor m=1m = 1 has 2k parameters, but still manages to learn k-parity reliably up to 18 bits. Conversely the GPT model with m=1m = 1 has roughly 40k parameters and still struggles to learn an k-parity of even 8 bits. We chose not to run larger models due to the compute costs required in running repeats across all the settings considered. We also note both models seem to find learning k-parity easier for even dd which motivated our choice to primarily use even values of dd in the other experiments.

In Figure 10, Figure 11 and Figure 12 we shows similar results for 10410^4 training iterations and data set sizes n∈{8000,inf⁡}n \in\{8000, \inf\}. Here we also include training accuracy and training iterations. In nearly all cases the the increase in data set size boost the test performance of the MLP, while drastically decreasing the test performance of the GPT model.

GPT and MLP model scaling plots for dataset size inf

Figure 10. Model Scaling for models trained directly on the DGP for T=104T = 10^{4} include odd dd

GPT and MLP model scaling plots for dataset size inf

Figure 11. Model Scaling for models trained directly on the DGP for T=104T = 10^{4}

GPT Model Scaling (Dataset Size: 8000)

(a)

MLP Model Scaling (Dataset Size: 8000)

(b)

Figure 12. Model Scaling for models trained on finite data of N=8000N = 8000, T=104T = 10^{4}

Training Accuracy and Effective Repetitions

The tables below report the train and test accuracy of the GPT model on a single noiseless k-parity feature for the fixed-budget experiments (T=104T = 10^4, Figure 2) and the scaled-budget experiments (T=1.25NT = 1.25N, Figure 15). Columns are feature sizes dd and rows are training set sizes NN; the N=∞N = \infty row samples fresh examples from the DGP at every iteration, so the model never sees the same example twice. They show two failure modes for a fixed budget: overfitting at small NN (high train, low test accuracy) and undertraining at large NN (train accuracy near chance). The row for N=24,000N = 24,000 vs. N=240,000N = 240,000 at d=22d = 22 in Table 4 shows that more diverse data remain harder to optimise even when the budget is scaled with NN.

NN\textbackslashdd81012141618202224262830
2,4001.0000.9990.9990.9970.9500.8170.8210.8310.8310.8190.8630.811
8,0001.0001.0001.0000.9990.9990.8670.8530.8220.8630.8390.8070.808
24,0001.0001.0001.0001.0001.0000.7920.8010.9040.8510.8460.8570.867
80,0001.0001.0001.0001.0001.0001.0000.8460.8760.7930.8430.9140.853
240,0001.0001.0001.0001.0001.0001.0001.0000.7710.6690.7120.7470.757

Table 4. GPT train accuracy, scaled budget (T=1.25NT = 1.25N).

Effective repetitions. Table 6 gives the expected number of passes per training example and the total number of examples processed, for a batch size of 256, assuming the full iteration budget is used (runs stop early if training accuracy reaches 99.99%). In the fixed-budget setting the expected passes per example scale as 1/N1/N, whereas in the scaled-budget setting they are constant at 320 and the total number of samples processed scales with NN.

SettingTraining examples NNIterations TTExpected passes per exampleTotal examples processed
Fixed2,40010,00010672.56×1062.56 \times10^{6}
Fixed8,00010,0003202.56×1062.56 \times10^{6}
Fixed24,00010,0001072.56×1062.56 \times10^{6}
Fixed80,00010,000322.56×1062.56 \times10^{6}
Fixed∞\infty10,0000 (no repeats)2.56×1062.56 \times10^{6}
Scaled2,4003,0003207.7×1057.7 \times10^{5}
Scaled8,00010,0003202.56×1062.56 \times10^{6}
Scaled24,00030,0003207.7×1067.7 \times10^{6}
Scaled80,000100,0003202.56×1072.56 \times10^{7}
Scaled240,000300,0003207.7×1077.7 \times10^{7}

Table 6. Expected number of passes per training example and total examples processed (batch size 256) under the fixed and scaled budgets.

Additional Plots

In this section we provide additional plots that there was no room to include in the main body of the paper.

NN\textbackslashdd810121416182022
2,4001.0001.0001.0001.0000.9970.9930.9920.992
8,0001.0001.0001.0000.9990.9990.8890.8590.825
24,0001.0001.0000.9990.9990.9770.5940.5930.603
80,0001.0001.0000.9500.9000.6840.5060.5070.507
∞\infty (DGP)1.0000.7520.5000.4990.5000.5000.5000.500

Table 2. GPT train accuracy, fixed budget (T=104T = 10^{4}).

NN\textbackslashdd810121416182022
2,4001.0001.0001.0001.0000.9020.5370.5020.494
8,0001.0001.0001.0001.0001.0000.7570.5970.510
24,0001.0001.0001.0001.0000.9960.5490.5510.550
80,0001.0001.0000.9750.9000.7360.5010.4990.499
∞\infty (DGP)1.0000.7850.4990.5000.5010.5000.5000.501

Table 3. GPT test accuracy, fixed budget (T=104T = 10^{4}).

NN\textbackslashdd81012141618202224262830
2,4001.0001.0000.9990.9990.8960.4940.5110.4950.5130.4790.4960.478
8,0001.0001.0001.0001.0001.0000.7050.5980.5060.4840.4930.5030.505
24,0001.0001.0001.0001.0001.0000.6100.5030.5970.5940.4980.5010.500
80,0001.0001.0001.0001.0001.0001.0000.7040.6000.4990.5000.5000.499
240,0001.0001.0001.0001.0001.0001.0001.0000.7020.4990.4990.4990.502

Table 5. GPT test accuracy, scaled budget (T=1.25NT = 1.25N).

Test accuracies for Two Feature Experiments

Figure 21 (PDF p. 26). Test accuracies for Two Feature Experiments Section 4.4 for the GPT Model with constant compute budget (T=10000T = 10000). As the data set increases in size the model fails to learn either feature within the training budget. An “infinite” data set size is achieved by directly sampling from the DGP.

References

  1. [1]Emmanuel Abbe, Enric Boix Adsera, Matthew S Brennan, Guy Bresler, and Dheeraj Nagaraj. The staircase property: How hierarchical structure can guide deep learning. Advances in Neural Information Processing Systems, 2021.arxiv.org/abs/2108.10573
  2. [2]Emmanuel Abbe, Enric Boix Adsera, and Theodor Misiakiewicz. The merged-staircase property: a necessary and nearly sufficient condition for sgd learning of sparse functions on two-layer neural networks. In Conference on Learning Theory. PMLR, 2022.arxiv.org/abs/2202.08658
  3. [3]Emmanuel Abbe, Enric Boix Adsera, and Theodor Misiakiewicz. Sgd learning on neural networks: leap complexity and saddle-to-saddle dynamics. In The Thirty Sixth Annual Conference on Learning Theory. PMLR, 2023.arxiv.org/abs/2302.11055
  4. [4]Boaz Barak, Benjamin Edelman, Surbhi Goel, Sham Kakade, Eran Malach, and Cyril Zhang. Hidden progress in deep learning: SGD learns parities near the computational limit. Advances in Neural Information Processing Systems, 35:21750–21764, 2022.arxiv.org/abs/2207.08799
  5. [5]Peter W Battaglia, Jessica B Hamrick, Victor Bapst, Alvaro Sanchez-Gonzalez, Vinicius Zambaldi, Mateusz Malinowski, Andrea Tacchetti, David Raposo, Adam Santoro, Ryan Faulkner, et al. Relational inductive biases, deep learning, and graph networks. arXiv preprint arXiv:1806.01261, 2018.arxiv.org/abs/1806.01261
  6. [6]Samuel James Bell and Levent Sagun. Simplicity bias leads to amplified performance disparities. In Proceedings of the 2023 ACM Conference on Fairness, Accountability, and Transparency, pp. 355–369, 2023.DOI
  7. [8]Avrim Blum, Adam Kalai, and Hal Wasserman. Noise-tolerant learning, the parity problem, and the statistical query model. Journal of the ACM (JACM), 2003.
  8. [9]Rishi Bommasani, Drew A Hudson, Ehsan Adeli, Russ Altman, Simran Arora, Sydney von Arx, Michael S Bernstein, Jeannette Bohg, Antoine Bosselut, Emma Brunskill, et al. On the opportunities and risks of foundation models. arXiv preprint arXiv:2108.07258, 2021.arxiv.org/abs/2108.07258
  9. [10]Leo Breiman. Bagging predictors. Machine learning, 24(2):123–140, 1996.
  10. [11]Ido Bronstein, Alon Brutzkus, and Amir Globerson. On the inductive bias of neural networks for learning read-once DNFs. In Proceedings of the Thirty-Eighth Conference on Uncertainty in Artificial Intelligence, 2022.
  11. [12]François Charton and Julia Kempe. Emergent properties with repeated examples. arXiv preprint arXiv:2410.07041, 2024.arxiv.org/abs/2410.07041
  12. [13]Elisabetta Cornacchia and Elchanan Mossel. A mathematical model for curriculum learning for parities. In International Conference on Machine Learning, pp. 6402–6423. PMLR, 2023.arxiv.org/abs/2301.13833
  13. [14]George Cybenko. Approximation by superpositions of a sigmoidal function. Mathematics of control, signals and systems, 2(4):303–314, 1989.
  14. [15]Amit Daniely and Eran Malach. Learning parities with neural networks. Advances in Neural Information Processing Systems, 33:20356–20365, 2020.arxiv.org/abs/2002.07400
  15. [16]Benjamin Edelman, Surbhi Goel, Sham Kakade, Eran Malach, and Cyril Zhang. Pareto frontiers in deep feature learning: Data, compute, width, and luck. Advances in Neural Information Processing Systems, 36, 2023.DOI
  16. [17]Nelson Elhage, Tristan Hume, Catherine Olsson, Nicholas Schiefer, Tom Henighan, Shauna Kravec, Zac Hatfield-Dodds, Robert Lasenby, Dawn Drain, Carol Chen, et al. Toy models of superposition. arXiv preprint arXiv:2209.10652, 2022.arxiv.org/abs/2209.10652
  17. [18]Thomas Fel, Louis Bethune, Andrew Lampinen, Thomas Serre, and Katherine Hermann. Understanding visual feature reliance through the lens of complexity. Advances in Neural Information Processing Systems, 37:69888–69924, 2024.arxiv.org/abs/2407.06076
  18. [19]Robert Geirhos, Jörn-Henrik Jacobsen, Claudio Michaelis, Richard Zemel, Wieland Brendel, Matthias Bethge, and Felix A Wichmann. Shortcut learning in deep neural networks. Nature Machine Intelligence, 2(11): 665–673, 2020.DOI
  19. [20]Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep Learning. MIT Press, 2016.
  20. [21]Anirudh Goyal and Yoshua Bengio. Inductive biases for deep learning of higher-level cognition. Proceedings of the Royal Society A, 2022.arxiv.org/abs/2011.15091
  21. [22]Yaomengxi Han and Debarghya Ghoshdastidar. Attention learning is needed to efficiently learn parity function. arXiv preprint arXiv:2502.07553, 2025.
  22. [23]Katherine Hermann and Andrew Lampinen. What shapes feature representations? exploring datasets, architectures, and training. Advances in Neural Information Processing Systems, 33:9995–10006, 2020.
  23. [24]Katherine Hermann, Hossein Mobahi, FEL Thomas, and Michael Curtis Mozer. On the foundations of shortcut learning. In The Twelfth International Conference on Learning Representations, 2024.arxiv.org/abs/2310.16228
  24. [25]Kurt Hornik, Maxwell Stinchcombe, and Halbert White. Multilayer feedforward networks are universal approximators. Neural Networks, 1989.DOI
  25. [26]Andrew Ilyas, Shibani Santurkar, Dimitris Tsipras, Logan Engstrom, Brandon Tran, and Aleksander Madry. Adversarial examples are not bugs, they are features. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett (eds.), Advances in Neural Information Processing Systems. Curran Associates, Inc., 2019.arxiv.org/abs/1905.02175
  26. [27]Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361, 2020.arxiv.org/abs/2001.08361
  27. [28]Andrej Karpathy. mingpt: A minimal PyTorch re-implementation of the OpenAI GPT. https://github.com/karpathy/minGPT, 2020. GitHub repository, MIT License.
  28. [29]Michael Kearns. Efficient noise-tolerant learning from statistical queries. J. ACM, 1998.
  29. [30]Diederik P Kingma. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.arxiv.org/abs/1412.6980
  30. [31]Polina Kirichenko, Pavel Izmailov, and Andrew Gordon Wilson. Last layer re-training is sufficient for robustness to spurious correlations. ICLR, 2023.arxiv.org/abs/2204.02937
  31. [32]Yiwen Kou, Zixiang Chen, Quanquan Gu, and Sham M. Kakade. Matching the statistical query lower bound for $k$-sparse parity problems with sign stochastic gradient descent. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=EbSSBvvUWw.
  32. [33]Jingwen Liu, Ezra Edelman, Surbhi Goel, and Bingbin Liu. Less data, faster training: Repeating smaller datasets speeds up learning via sampling biases. arXiv preprint arXiv:2605.20314, 2026.
  33. [34]Zhou Lu, Hongming Pu, Feicheng Wang, Zhiqiang Hu, and Liwei Wang. The expressive power of neural networks: A view from the width. Advances in neural information processing systems, 2017.arxiv.org/abs/1709.02540
  34. [35]Eran Malach and Shai Shalev-Shwartz. Learning boolean circuits with neural networks. arXiv preprint arXiv:1910.11923, 2019.arxiv.org/abs/1910.11923
  35. [36]William Merrill, Nikolaos Tsilivis, and Aman Shukla. A tale of two circuits: Grokking as competition of sparse and dense subnetworks. arXiv preprint arXiv:2303.11873, 2023.arxiv.org/abs/2303.11873
  36. [37]Chris Mingard, Henry Rees, Guillermo Valle-Pérez, and Ard A Louis. Deep neural networks have an inbuilt Occam’s razor. Nature Communications, 2025a.DOI
  37. [38]Chris Mingard, Lukas Seier, Niclas Göring, Andrei-Vlad Badelita, Charles London, and Ard Louis. Characterising the inductive biases of neural networks on Boolean data. arXiv preprint arXiv:2505.24060, 2025b.arxiv.org/abs/2505.24060
  38. [39]Deepen Morwani, Jatin Batra, Prateek Jain, and Praneeth Netrapalli. Simplicity bias in 1-hidden layer neural networks. NeurIPS, 2023.arxiv.org/abs/2302.00457
  39. [40]Preetam Nakkiran, Gal Kaplun, Dimitris Kalimeris, Tristan Yang, Benjamin L Edelman, Fred Zhang, and Boaz Barak. SGD on neural networks learns functions of increasing complexity. NeurIPS, 2019.arxiv.org/abs/1905.11604
  40. [41]Neel Nanda, Lawrence Chan, Tom Lieberum, Jess Smith, and Jacob Steinhardt. Progress measures for grokking via mechanistic interpretability. arXiv preprint arXiv:2301.05217, 2023. URL https://arxiv.org/abs/2301.05217.
  41. [42]Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nati Srebro. Exploring generalization in deep learning. Advances in neural information processing systems, 2017.
  42. [43]Yaniv Nikankin, Anja Reusch, Aaron Mueller, and Yonatan Belinkov. Arithmetic without algorithms: Language models solve math with a bag of heuristics. ICLR, 2025.arxiv.org/abs/2410.21272
  43. [44]Evan Peters, Ando Deng, Matheus H Zambianco, Devin Blankespoor, and Achim Kempf. Trapped by simplicity: When Transformers fail to learn from noisy features. ICLR, 2026.arxiv.org/abs/2602.08695
  44. [45]Alethea Power, Yuri Burda, Harri Edwards, Igor Babuschkin, and Vedant Misra. Grokking: Generalization beyond overfitting on small algorithmic datasets. arXiv preprint arXiv:2201.02177, 2022.arxiv.org/abs/2201.02177
  45. [46]Aahlad Puli, Lily Zhang, Yoav Wald, and Rajesh Ranganath. Don’t blame dataset shift! shortcut learning due to gradients and cross entropy. NeurIPS, 2023.arxiv.org/abs/2308.12553
  46. [47]Ran Raz. Fast learning requires good memory: A time-space lower bound for parity learning. Journal of the ACM (JACM), 66(1):1–18, 2018.
  47. [49]Tom Schaul, Sixin Zhang, and Yann LeCun. No more pesky learning rates. In International conference on machine learning, 2013.
  48. [50]Luca Scimeca, Seong Joon Oh, Sanghyuk Chun, Michael Poli, and Sangdoo Yun. Which shortcut cues will dnns choose? a study from the parameter-space perspective. arXiv preprint arXiv:2110.03095, 2021.arxiv.org/abs/2110.03095
  49. [51]Harshay Shah, Kaustav Tamuly, Aditi Raghunathan, Prateek Jain, and Praneeth Netrapalli. The pitfalls of simplicity bias in neural networks. Advances in Neural Information Processing Systems, 33:9573–9585, 2020.arxiv.org/abs/2006.07710
  50. [52]Shai Shalev-Shwartz, Ohad Shamir, and Shaked Shammah. Failures of gradient-based deep learning. In International Conference on Machine Learning, 2017.
  51. [53]Itamar Shoshani and Ohad Shamir. Hardness of learning fixed parities with neural networks. arXiv preprint arXiv:2501.00817, 2025.arxiv.org/abs/2501.00817
  52. [54]Jaisidh Singh, Diganta Misra, and Antonio Orvieto. Explaining grokking in Transformers through the lens of inductive bias. arXiv preprint arXiv:2602.06702, 2026.arxiv.org/abs/2602.06702
  53. [55]Daniel Soudry, Elad Hoffer, Mor Shpigel Nacson, Suriya Gunasekar, and Nathan Srebro. The implicit bias of gradient descent on separable data. The Journal of Machine Learning Research, 2018.arxiv.org/abs/1710.10345
  54. [56]Damien Teney, Maxime Peyrard, and Ehsan Abbasnejad. Predicting is not understanding: Recognizing and addressing underspecification in machine learning. In European Conference on Computer Vision, pp. 458–476. Springer, 2022.arxiv.org/abs/2207.02598
  55. [57]Damien Teney, Armand Mihai Nicolicioiu, Valentin Hartmann, and Ehsan Abbasnejad. Neural redshift: Random networks are not random functions. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4786–4796, 2024.arxiv.org/abs/2403.02241
  56. [58]Damien Teney, Liangze Jiang, Florin Gogianu, and Ehsan Abbasnejad. Do we always need the simplicity bias? looking for optimal inductive biases in the wild. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 79–90, 2025.
  57. [59]Rishabh Tiwari and Pradeep Shenoy. Sifer: Overcoming simplicity bias in deep networks using a feature sieve. ICML, 2023.arxiv.org/abs/2301.13293
  58. [60]William L Tong and Cengiz Pehlevan. MLPs learn in-context on regression and classification tasks. arXiv preprint arXiv:2405.15618, 2024.arxiv.org/abs/2405.15618
  59. [61]Guillermo Valle-Perez, Chico Q Camargo, and Ard A Louis. Deep learning generalizes because the parameter-function map is biased towards simple functions. ICLR, 2019.
  60. [62]Bhavya Vasudeva, Kameron Shahabi, and Vatsal Sharan. Mitigating simplicity bias in deep learning for improved OOD generalization and robustness. Submitted to Transactions on Machine Learning Research, 2024. URL https://openreview.net/forum?id=XccFHGakyU. Under review.arxiv.org/abs/2310.06161
  61. [63]Bhavya Vasudeva, Deqing Fu, Tianyi Zhou, Elliott Kau, Youqi Huang, and Vatsal Sharan. Transformers learn low sensitivity functions: Investigations and implications. ICLR, 2025.arxiv.org/abs/2403.06925
  62. [64]Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017.arxiv.org/abs/1706.03762
  63. [65]Shunxin Wang, Raymond Veldhuis, Christoph Brune, and Nicola Strisciuglio. What do neural networks learn in image classification? a frequency shortcut perspective. ICCV, 2023.arxiv.org/abs/2307.09829
  64. [66]Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. arXiv preprint arXiv:1611.03530, 2016.arxiv.org/abs/1611.03530
  65. [67]Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning (still) requires rethinking generalization. Communications of the ACM, 64(3):107–115, 2021.DOI

Paper details

vlnc:W_5ujmwwhz
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents