Papers › Learning Imbalanced Datasets with Label-Distribution-Aware Margin Loss

Learning Imbalanced Datasets with Label-Distribution-Aware Margin Loss

18 Jun 2019NeurIPS 2019 12arXiv:1906.07413archive 2025-07-28

Kaidi Cao, Colin Wei, Adrien Gaidon, Nikos Arechiga, Tengyu Ma

Deep learning algorithms can fare poorly when the training dataset suffers from heavy class-imbalance but the testing criterion requires good generalization on less frequent classes. We design two novel methods to improve performance in such scenarios. First, we propose a theoretically-principled label-distribution-aware margin (LDAM) loss motivated by minimizing a margin-based generalization bound. This loss replaces the standard cross-entropy objective during training and can be applied with prior strategies for training with class-imbalance such as re-weighting or re-sampling. Second, we propose a simple, yet effective, training schedule that defers re-weighting until after the initial stage, allowing the model to learn an initial representation while avoiding some of the complications associated with re-weighting or re-sampling. We test our methods on several benchmark vision tasks including the real-world imbalanced dataset iNaturalist 2018. Our experiments show that either of these methods alone can already improve over existing techniques and their combination achieves even better performance gains.

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="1906.07413")

Code

Syntology Ran 2 of 11 code samples harvested from 4 repositories linked to this paper; 9 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 1 ran with no contract checked.

By repository: community (archive-listed): 11 samples from 4 repositories, 2 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

kaidic/LDAM-DRW officialmentioned in papermentioned on GitHubpytorchMIT report
feidfoe/AdjustBnd4Imbalance mentioned on GitHubpytorch report
ihaeyong/maximum-margin-ldam mentioned on GitHubpytorchMIT report
j3soon/arxiv-utils mentioned on GitHubMIT report
karurb92/ldam_str_bn mentioned on GitHubtf report
orparask/VS-Loss mentioned on GitHubpytorch 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

11 samples harvested; 2 ran; 0 honoured the contract we drafted; 9 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.

1ran · our draft was wrong
1ran
9unverified

Licence: 3 of the 11 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 4 repositories linked to this paper, official or community; each sample names its own and says which. “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.

LDAMLoss karurb92/ldam_str_bn/losses.py community (archive-listed) ran no licence file found · pointer only · 62c8aa90e3fb2973 · report
focal_loss ihaeyong/maximum-margin-ldam/losses.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · 4dcf06ba28983266 · report
LDAMLoss orparask/VS-Loss/class_imbalance/losses.py community (archive-listed) unverified no licence file found · pointer only · 6683ac6a76084b68 · report
LDAMLoss jackhck/subclass-balancing-contrastive-learning/SimCLR/loss.py community (archive-listed) unverified no licence file found · pointer only · a3ce423c36d71133 · report
accuracy ihaeyong/maximum-margin-ldam/utils.py community (archive-listed) unverified MIT (permissive) · 688c38ac8517471a · report
ldam_loss ihaeyong/maximum-margin-ldam/cifar_train.py community (archive-listed) unverified MIT (permissive) · 6feb1ddb1872cd29 · report
obj_margins ihaeyong/maximum-margin-ldam/cifar_train.py community (archive-listed) unverified MIT (permissive) · 26d27ecdc945d123 · report
plot_confusion_matrix ihaeyong/maximum-margin-ldam/utils.py community (archive-listed) unverified MIT (permissive) · e5ce72a1e8d9bc22 · report
resnet32 ihaeyong/maximum-margin-ldam/models/resnet_cifar.py community (archive-listed) unverified MIT (permissive) · 11d038f53d77a8d2 · report
to_onehot ihaeyong/maximum-margin-ldam/utils.py community (archive-listed) unverified MIT (permissive) · 83b8128b16e83cfc · report
weight ihaeyong/maximum-margin-ldam/cifar_train.py community (archive-listed) unverified MIT (permissive) · 75d3d8bc39a6d61b · report

Tasks

Long-tail LearningLong-tail learning with class descriptors

Datasets

Introduced by this paper, per the archive.

CIFAR100-LT

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Long-tail Learning CIFAR-10-LT (ρ=10) LDAM-DRW Error Rate 11.84 #39 of 50 Archive leaderboard report
Long-tail Learning CIFAR-10-LT (ρ=10) Class-balanced Resampling Error Rate 13.21 #47 of 50 Archive leaderboard report
Long-tail Learning CIFAR-10-LT (ρ=10) Empirical Risk Minimization (ERM, CE) Error Rate 13.61 #49 of 50 Archive leaderboard report
Long-tail Learning CIFAR-10-LT (ρ=100) LDAM-DRW Error Rate 22.97 #27 of 28 Archive leaderboard report
Long-tail Learning CIFAR-100-LT (ρ=10) LDAM-DRW Error Rate 41.29 #30 of 31 Archive leaderboard report
Long-tail Learning CIFAR-100-LT (ρ=100) LDAM-DRW Error Rate 57.96 #61 of 66 Archive leaderboard report
Long-tail Learning COCO-MLT LDAM(ResNet-50) Average mAP 40.53 #13 of 13 Archive leaderboard report
Long-tail Learning VOC-MLT LDAM(ResNet-50) Average mAP 70.73 #12 of 13 Archive leaderboard report
Long-tail learning with class descriptors AWA-LT LDAM Long-Tailed Accuracy 93.5 #5 of 5 Archive leaderboard report
Long-tail learning with class descriptors AWA-LT LDAM Per-Class Accuracy 69.1 #5 of 5 Archive leaderboard report
Long-tail learning with class descriptors CUB-LT LDAM Long-Tailed Accuracy 64.1 #4 of 5 Archive leaderboard report
Long-tail learning with class descriptors CUB-LT LDAM Per-Class Accuracy 50.1 #4 of 5 Archive leaderboard report
Long-tail learning with class descriptors SUN-LT LDAM Long-Tailed Accuracy 36.4 #5 of 5 Archive leaderboard report
Long-tail learning with class descriptors SUN-LT LDAM Per-Class Accuracy 29.8 #5 of 5 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

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