Reducing Class Bias In Data-Balanced Datasets Through Hardness-Based Resampling
Pawel Pukowski, Venet Osmani · 2025
Read Reducing Class Bias In Data-Balanced Datasets Through Hardness-Based Resampling by Pawel Pukowski, Venet Osmani (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-07031.txt.
Introduction
Pawel Pukowski and Venet Osmani wrote a study from 2025 on bias in how computer models learn from data. A model may do well on one class of items and poorly on another. This gap is often blamed on having more items in one class than in the rest. The pair show that the gap can stay large even when all classes have the same count.
They argue that some classes are just harder to learn than others. Their fix picks training items based on how hard each one is, not on how often its class shows up. In tests on two image sets, the fix cut the gap in recall scores by a wide margin. It beat the usual way of picking items by class count.
Catalog record
| CREATOR | Pawel Pukowski, Venet Osmani |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 67 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2504-07031
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Reducing Class Bias In Data-Balanced Datasets Through Hardness-Based Resampling Pawel Pukowski, Venet Osmani Abstract Class-bias, that is class-wise performance disparities, is typically attributed to data imbalance and addressed through frequency-based resampling. However, we demonstrate that substantial bias persists even in perfectly balanced datasets, proving that class frequency alone cannot explain unequal model performance. We investigate these disparities through the lens of class-level learning difficulty and propose Hardness-Based Resampling (HBR), a strategy that leverages hardness estimates to guide data selection. To better capture these effects, we introduce an evaluation protocol that complements global metrics with gap- and dispersion-based measures. Our experiments show that HBR significantly reduces recall gaps—by up to 32% on CIFAR-10 and 16% on CIFAR-100, outperforming standard frequency-based resampling. We further show that we can improve fairness outcomes by selectively using the hardest samples from a state-of-the-art diffusion model, rather than randomly selecting them. These findings demonstrate that data balance alone is insufficient to mitigate class bias, necessitating a shift toward hardness-aware approaches. keywords hardness imbalance, class bias, resampling, data imbalance, diffusion models, fairness-aware learning This paper is under review at Springer’s Machine Learning journal. 1 Introduction Class bias, the phenomenon where machine learning classifiers exhibit disparate performance across categories, remains a fundamental challenge in fairness-aware learning and safety-critical applications ( Zhu et al., 2026 ; Li et al., 2025 ; Katare et al., 2025 ; Brzezinski et al., 2024 ; Rahman and Davis, 2013 ; Khushi et al., 2021 ; Zong et al., 2023 ; Tasci et al., 2022 ) . To date, this bias has been studied almost exclusively through the lens of data imbalance ( Hashimoto et al., 2018 ) . This focus is conceptually intuitive: the standard empirical risk minimization (ERM) objective assigns equal weight to all samples, allowing majority (’head’) classes to dominate optimization dynamics at the expense of minority (’tail’) classes ( Hashimoto et al., 2018 ) . Consequently, despite data imbalance not being the sole factor contributing to class bias, it has become the most convenient and well-understood stand-in for the problem. This reliance on frequency-centric approach has created a significant research gap: the persistence of class bias in datasets where class frequencies are perfectly balanced. We argue that the prevailing assumptions underlying reweighting and resampling, that data-balanced datasets are optimal ( Rahman and Davis, 2013 ) and that ’tail’ classes are inherently more difficult solely due to under-representation, do not hold universally. Empirical evidence suggests that class difficulty is often decoupled from frequency ( Sinha et al., 2020 ; Sinha et al., 2022 ) . Our experiments with ResNet18 architectures ( He et al., 2016 ) on CIFAR-10 and CIFAR-100 ( Krizhevsky et al., 2009 ) highlight this disconnect (see Fig. 1 ). Despite perfect data balance, we observe profound performance gaps: on CIFAR-10, recall for the ’cat’ class lags at 89% compared to a 95% global average. In CIFAR-100, the disparity is even more acute, with ’motorcycle’ recall (95%) nearly doubling that of the ’boy’ class (51%). These disparities cannot be explained by frequency-based differences, revealing that class bias is far more nuanced than commonly assumed, with data imbalance being merely one of the contributing factors. Figure 1: Training five ResNet18 networks on CIFAR-10 and CIFAR-100 reveals large recall gaps across classes, despite the data-balanced nature of these datasets. This highlights that classes exhibit varying degrees of inherent difficulty, a phenomenon we term hardness imbalance . This observation motivates Hardness-Based Resampling (HBR), which allows addressing class bias in data-balanced settings. We propose a shift in perspective: addressing class bias requires moving beyond frequency to analyze the unequal distribution of difficulty, or hardness imbalance. While hardness is a recognized heuristic in curriculum learning, data pruning, and many other fields ( Wang et al., 2021 ; Soviany et al., 2022 ; Settles, 2009 ; Ren et al., 2021 ; Toneva et al., 2018 ; Paul et al., 2021 ; Sorscher et al., 2022 ; Agarwal et al., 2022 ; Yang et al., 2024 ; Pleiss et al., 2020 ; Maini et al., 2022 ; Jia et al., 2023 ) , it has been overlooked as a primary driver of class-level bias. Existing hardness-aware reweighing and resampling methods, such as Focal Loss ( Lin et al., 2017 ) or ADASYN ( He et al., 2008 ) , are almost exclusively deployed in imbalanced settings to compensate for low sample counts. Even when reweighting is applied to balanced data, it is typically used to improve training efficiency rather than to mitigate systematic performance gaps. By treating hardness as a primary concern rather than a secondary effect of frequency, we identify a ’blind spot’ in current mitigation strategies: the possibility of mitigating bias by addressing the intrinsic complexity of specific classes. To bridge this gap, we introduce Hardness-Based Resampling (HBR), which leverages instance-level hardness estimates to guide resampling. To evaluate its impact on class bias, we introduce a series of gap- and dispersion-based metrics alongside traditional global metrics. Our results show that HBR consistently reduces recall-based class bias. Crucially, the mechanism differs from data-imbalanced settings: there, random oversampling reduces bias simply by balancing frequencies; here, with frequencies already balanced, only oversampling that adds new and informative content can help. Accordingly, random oversampling and SMOTE yield negligible changes, whereas a state-of-the-art diffusion model ( Karras et al., 2022 ) produces substantial reductions—closing the recall gap between average easy and hard classes by 0.014 on CIFAR-10 (from 0.043 to 0.029 ) and 0.027 on CIFAR-100 (from 0.165 to 0.138 ). We further find that when generative models are involved, harder synthetic samples are more beneficial: selecting samples based on hardness rather than chance nearly doubles the reduction in class bias. This suggests that improving generative models’ ability to produce hard samples—rather than the easy samples, which they currently favor ( Wang et al., 2026 ) —could yield further gains. Importantly, these reductions do not come at the expense of overall accuracy, which in most cases increases slightly. Altogether, these findings demonstrate that class bias is not merely a symptom of data imbalance, but a more fundamental phenomenon rooted in the unequal distribution of hardness across classes . If we are to build models that are truly fair across all classes, regardless of their frequency, the field must pivot from frequency-centric corrections toward hardness-aware methods that address bias where it actually originates. Our work provides the following contributions: • We show that hardness imbalance is a critical source of class bias that persists even when dataset sizes are equal. We demonstrate that traditional frequency-based balance is a necessary but insufficient condition for equitable class-wise performance. • We empirically demonstrate that hardness-aware resampling significantly reduces recall disparities in balanced datasets. Our analysis identifies two primary factors: the degree of induced imbalance and the quality of oversampled data. • We show that selectively leveraging the hardest samples generated by a diffusion model reduces recall gaps far more than using random generative samples. This suggests that further gains can be made by improving generative models’ ability to produce hard samples, rather than the easy samples which they currently favor. • We establish novel measures of class bias that integrate global performance metrics with gap- and dispersion-based measures. These measures provide a