Sometimes less is more: Investigating inductive biases of MLPs and Transformers on noisy k-parity features
Organizations: Chalmers University of Technology
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.
Figures & tables
| Fixed, | Scaled, | Scaled, | ||||
|---|---|---|---|---|---|---|
| Training set size | train | test | train | test | train | test |
| 2,400 | 0.993 | 0.537 | 0.817 | 0.494 | 0.831 | 0.495 |
| 8,000 | 0.889 | 0.757 | 0.867 | 0.705 | 0.822 | 0.506 |
| 24,000 | 0.594 | 0.549 | 0.792 | 0.610 | 0.904 | 0.597 |
| 80,000 | 0.506 | 0.501 | 1.000 | 1.000 | 0.876 | 0.600 |
| 240,000 | – | – | 1.000 | 1.000 | 0.771 | 0.702 |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | |
|---|---|---|---|---|---|---|---|---|
| 2,400 | 1.000 | 1.000 | 1.000 | 1.000 | 0.997 | 0.993 | 0.992 | 0.992 |
| 8,000 | 1.000 | 1.000 | 1.000 | 0.999 | 0.999 | 0.889 | 0.859 | 0.825 |
| 24,000 | 1.000 | 1.000 | 0.999 | 0.999 | 0.977 | 0.594 | 0.593 | 0.603 |
| 80,000 | 1.000 | 1.000 | 0.950 | 0.900 | 0.684 | 0.506 | 0.507 | 0.507 |
| (DGP) | 1.000 | 0.752 | 0.500 | 0.499 | 0.500 | 0.500 | 0.500 | 0.500 |
| 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | |
|---|---|---|---|---|---|---|---|---|
| 2,400 | 1.000 | 1.000 | 1.000 | 1.000 | 0.902 | 0.537 | 0.502 | 0.494 |
| 8,000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 0.757 | 0.597 | 0.510 |
| 24,000 | 1.000 | 1.000 | 1.000 | 1.000 | 0.996 | 0.549 | 0.551 | 0.550 |
| 80,000 | 1.000 | 1.000 | 0.975 | 0.900 | 0.736 | 0.501 | 0.499 | 0.499 |
| (DGP) | 1.000 | 0.785 | 0.499 | 0.500 | 0.501 | 0.500 | 0.500 | 0.501 |
| 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2,400 | 1.000 | 0.999 | 0.999 | 0.997 | 0.950 | 0.817 | 0.821 | 0.831 | 0.831 | 0.819 | 0.863 | 0.811 |
| 8,000 | 1.000 | 1.000 | 1.000 | 0.999 | 0.999 | 0.867 | 0.853 | 0.822 | 0.863 | 0.839 | 0.807 | 0.808 |
| 24,000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 0.792 | 0.801 | 0.904 | 0.851 | 0.846 | 0.857 | 0.867 |
| 80,000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 0.846 | 0.876 | 0.793 | 0.843 | 0.914 | 0.853 |
| 240,000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 0.771 | 0.669 | 0.712 | 0.747 | 0.757 |
| 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2,400 | 1.000 | 1.000 | 0.999 | 0.999 | 0.896 | 0.494 | 0.511 | 0.495 | 0.513 | 0.479 | 0.496 | 0.478 |
| 8,000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 0.705 | 0.598 | 0.506 | 0.484 | 0.493 | 0.503 | 0.505 |
| 24,000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 0.610 | 0.503 | 0.597 | 0.594 | 0.498 | 0.501 | 0.500 |
| 80,000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 0.704 | 0.600 | 0.499 | 0.500 | 0.500 | 0.499 |
| 240,000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 0.702 | 0.499 | 0.499 | 0.499 | 0.502 |
| Setting | Training examples | Iterations | Expected passes per example | Total examples processed |
| Fixed | 2,400 | 10,000 | 1067 | |
| Fixed | 8,000 | 10,000 | 320 | |
| Fixed | 24,000 | 10,000 | 107 | |
| Fixed | 80,000 | 10,000 | 32 | |
| Fixed | 10,000 | 0 (no repeats) | ||
| Scaled | 2,400 | 3,000 | 320 |
| Feature name | Bits | RA | Predictivity ( ) |
|---|---|---|---|
| 4 | 1/6 | 60% | |
| 6 | 1/20 | 70% | |
| 8 | 1/70 | 80% | |
| 10 | 1/252 | 90% | |
| 12 | 1/924 | 100% |
Transformer
Transformers are neural architectures that use attention to model relationships among sequence elements in language, vision, and scientific data.
See all 544 papers