Guiding Data Allocation for Robust Subpopulation Generalization
Organizations: Elmore Family School of Electrical and Computer Engineering, Purdue University
Abstract
Machine learning models often achieve high average accuracy in the training data while performing poorly on test data due to subpopulation shift. A common data-centric solution is to enforce balanced subgroup proportions, but full balance can be costly, infeasible, and not always necessary. In this work, we study whether balanced training data is the unique optimal configuration for robust subpopulation generalization. We extend a Gaussian feature-model framework to theoretically characterize the performance landscape across general training subgroup distributions. We show that multiple configurations, including substantially imbalanced ones, can perform comparably to the balanced one. We further derive gradient-based directions for adjusting subgroup proportions to improve adjusted accuracy and worst-group accuracy more efficiently. These findings suggest that strategically allocating data offers a more flexible and principled path to robust performance than simple balancing. The code is available at https://github.com/zhaoyingpan/subpop-data-allocation.
Figures & tables
| Method | Adjusted Acc. | WGA |
|---|---|---|
| Original | 0.766 | 0.376 |
| Over-sampling | 0.768 | 0.366 |
| Over-sampling + Grad | 0.821 | 0.541 |
| Under-sampling | 0.777 | 0.837 |
| Under-sampling + Grad | 0.901 | 0.848 |
| Waterbirds | CelebA | ||||
|---|---|---|---|---|---|
| Method | Metric | Original | Grad | Original | Grad |
| DFR | WGA | 89.30 0.55 | 89.10 0.75 | 87.49 1.27 | 87.36 0.13 |
| AA | 91.37 0.45 | 91.60 0.19 | 90.87 0.82 | 90.39 0.33 | |
| SELF | WGA | 88.28 1.37 | 88.53 0.76 | 82.59 2.31 | 82.18 3.81 |
| AA | 91.50 0.26 | 91.74 0.26 | 90.52 0.57 | 90.74 0.72 | |
| GSR | WGA | 91.90 1.42 | 91.96 0.95 | 85.74 2.57 | 86.67 0.96 |
Appendix figures & tables25 assets
Supplementary material from the paper’s appendix.
Appendix
| Waterbirds-syn | UrbanCars-syn | CelebA-subset | CivilComments-subset | |
|---|---|---|---|---|
| 2.142 | 0.567 | 1.903 | 0.977 | |
| 8.0 | 0.789 | 2.0 | 2.0 |
| Example 1 | 0.848 | 0.695 | 0.059 |
|---|---|---|---|
| Example 2 | 0.976 | 0.184 | 0.128 |
| Example 3 | 0.397 | 0.883 | 0.862 |
| Waterbirds-syn | UrbanCars-syn | CelebA-subset | CivilComments-subset | |
|---|---|---|---|---|
| Example 1 | 84.15 / 79.68 | 57.87 / 50.93 | 80.19 / 69.26 | 59.70 / 54.46 |
| Example 2 | 73.24 / 65.79 | 40.80 / 29.87 | 63.98 / 51.79 | 32.30 / 30.12 |
| Example 3 | 90.47 / 88.41 | 49.33 / 45.87 | 76.94 / 75.54 | 61.61 / 51.42 |
| Waterbirds-syn | UrbanCars-syn | CelebA-subset | CivilComments-subset | |
|---|---|---|---|---|
| Example 1 | 19.95 / 19.41 | 12.30 / 10.95 | 18.35 / 16.76 | 13.63 / 12.32 |
| Example 2 | 17.00 / 14.88 | 8.21 / 6.06 | 13.53 / 11.07 | 7.82 / 6.95 |
| Example 3 | 21.84 / 21.44 | 11.12 / 10.21 | 18.02 / 17.74 | 14.86 / 12.96 |
| Direction | AA@15 | WGA@15 | AA-AUC | WGA-AUC |
|---|---|---|---|---|
| AA-derived | ||||
| WGA-derived |
| Method | AA | WGA | AA-AUC | WGA-AUC |
|---|---|---|---|---|
| Scaling-law allocation | 91.78 | 79.38 | 22.69 | 19.40 |
| Grad (ours) | 92.50 | 84.15 | 22.78 | 19.95 |
| Method | Group 1 | Group 2 | Group 3 | Group 4 |
|---|---|---|---|---|
| Original | 1124 | 28 | 6404 | 1444 |
| Over-sampling | 6404 (+5280) | 6404 (+6376) | 6404 (+0) | 6404 (+4960) |
| Over-sampling (Grad) | 5799 (+4675) | 857 (+829) | 6404 (+0) | 811 (-633) |
| Under-sampling | 28 (-1096) | 28 (+0) | 28 (-6376) | 28 (-1416) |
| Under-sampling (Grad) | 190 (-934) | 28 (+0) | 209 (-6195) | 27 (-1417) |
| Waterbirds-syn | UrbanCars-syn | CelebA-subset | CivilComments-subset | |
|---|---|---|---|---|
| Example 1 | .055 / .062 | .066 / .028 | .003 / .003 | .056 / .060 |
| Example 2 | .012 / .0001 | .012 / .005 | .001 / .002 | .246 / .010 |
| Example 3 | .037 / .017 | .081 / .024 | .007 / .030 | .002 / .011 |
| Accuracy Range | Accuracy at Balanced Setup | |
|---|---|---|
| ResNet50 | 0.959 - 0.966 | 0.953 |
| ViT | 0.958 - 0.973 | 0.961 |
| Dataset | Accuracy Range |
|---|---|
| Waterbirds-syn | 0.954 0.003 – 0.965 0.002 |
| Urbancars-syn | 0.826 0.007 – 0.844 0.007 |
| CelebA-subset | 0.893 0.003 – 0.902 0.002 |
| CivilComments-subset | 0.796 0.003 – 0.807 0.003 |