Papers › AutoBalance: Optimized Loss Functions for Imbalanced Data

AutoBalance: Optimized Loss Functions for Imbalanced Data

4 Jan 2022NeurIPS 2021 12arXiv:2201.01212archive 2025-07-28

Mingchen Li, Xuechen Zhang, Christos Thrampoulidis, Jiasi Chen, Samet Oymak

Imbalanced datasets are commonplace in modern machine learning problems. The presence of under-represented classes or groups with sensitive attributes results in concerns about generalization and fairness. Such concerns are further exacerbated by the fact that large capacity deep nets can perfectly fit the training data and appear to achieve perfect accuracy and fairness during training, but perform poorly during test. To address these challenges, we propose AutoBalance, a bi-level optimization framework that automatically designs a training loss function to optimize a blend of accuracy and fairness-seeking objectives. Specifically, a lower-level problem trains the model weights, and an upper-level problem tunes the loss function by monitoring and optimizing the desired objective over the validation data. Our loss design enables personalized treatment for classes/groups by employing a parametric cross-entropy loss and individualized data augmentation schemes. We evaluate the benefits and performance of our approach for the application scenarios of imbalanced and group-sensitive classification. Extensive empirical evaluations demonstrate the benefits of AutoBalance over state-of-the-art approaches. Our experimental findings are complemented with theoretical insights on loss function design and the benefits of train-validation split. All code is available open-source.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2201.01212")

Code

Syntology Ran 6 of 14 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 3 ran · honoured contract; 2 ran · fixture could not drive it; 1 ran with no contract checked.

By repository: official repository: 14 samples from 1 repository, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

ucr-optml/autobalance officialmentioned in paperpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

14 samples harvested; 6 ran; 3 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · honoured contract
2ran · fixture could not drive it
1ran
8unverified

Licence: 0 of the 14 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from ucr-optml/autobalance. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

default_loader ucr-optml/autobalance/dataset/iNaturalist.py official repository ran MIT (permissive) · ac269a0e4b8d946e · report
drop_connect ucr-optml/autobalance/models/utils.py official repository ran · fixture could not drive it MIT (permissive) · 2dd5dfa94542911e · report
gather_flat_grad ucr-optml/autobalance/core/utils.py official repository ran · honoured contract MIT (permissive) · 739afdca8b2d673a · report
neumann_hyperstep_preconditioner ucr-optml/autobalance/core/utils.py official repository ran · fixture could not drive it MIT (permissive) · 085767456c708d9d · report
round_filters ucr-optml/autobalance/models/utils.py official repository ran · honoured contract MIT (permissive) · 826e2e91d6a9ec09 · report
round_repeats ucr-optml/autobalance/models/utils.py official repository ran · honoured contract MIT (permissive) · 4d8e794b593d34a0 · report
ResNet20 ucr-optml/autobalance/models/ResNet.py official repository unverified MIT (permissive) · a299832f4fcf0211 · report
ResNet32 ucr-optml/autobalance/models/ResNet.py official repository unverified MIT (permissive) · 80b1b62fc8826034 · report
ResNet44 ucr-optml/autobalance/models/ResNet.py official repository unverified MIT (permissive) · ec1ce8e626c3703d · report
eval_epoch ucr-optml/autobalance/core/trainer.py official repository unverified MIT (permissive) · 41d10ece707b44af · report
load_cifar10 ucr-optml/autobalance/dataset/cifar10.py official repository unverified MIT (permissive) · 8bf3be98e6cb32cb · report
load_cifar100 ucr-optml/autobalance/dataset/cifar100.py official repository unverified MIT (permissive) · 297d16d00bf739bb · report
load_taxonomy ucr-optml/autobalance/dataset/iNaturalist.py official repository unverified MIT (permissive) · cac75c3f585e4df2 · report
loss_adjust_cross_entropy ucr-optml/autobalance/core/utils.py official repository unverified MIT (permissive) · 1025abdbfd524442 · report

Tasks

Data AugmentationFairness

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections