Class imbalance: a map of the problem
Links
Code: checks.py.
The problem
With class priors \pi_y very unequal, a classifier trained on the average loss is rewarded for the head classes. Three separate things go wrong, and papers differ on which they target:
- The decision rule. p(y\mid x)\propto\pi_y p(x\mid y) bakes the prior into the logit, so the rule optimal for plain accuracy is not the one for balanced accuracy. (Two Gaussians, minority prior 0.05: balanced accuracy 0.656 vs 0.841 once \log\pi_y is subtracted.)
- The classifier weights. Head classes get larger weight norms.
- The features. With few examples the minority is memorised (Lyu 2026), and at extreme ratios the minority class means collapse (Fang 2021).
Reading order
| Paper | What it fixes | Core object |
|---|---|---|
| Menon 2021 | the rule | f_y-\tau\log\pi_y |
| Cao 2019 | the margin | \gamma_j\propto n_j^{-1/4} |
| Cui 2019 | the weights | E_n=\frac{1-\beta^n}{1-\beta} |
| Kang 2020 | the classifier only | w_j/\lVert w_j\rVert^\tau |
| Fang 2021 | (explains) feature geometry | simplex ETF, Minority Collapse |
| Lyu 2026 | (explains) overfitting in a linear probe | truncated logits |
Also downloaded for this section (not yet annotated)
Local PDFs in Theory_oriented_papers/class_imbalance/:
Huang et al. universal features (2019) and ISIT 2017,
Hastie–Tibshirani–Buja FDA (1994), Wan et al. L-GM loss (2018), Andrew
et al. Deep CCA (2013), Papyan et al. neural collapse (2020), and three
evaluation-methodology papers (Demšar 2006, Bouthillier 2021, Agarwal
2021).
Questions and doubts
- Several fixes are the same offset in different clothes (a \log\pi_y shift, a margin \Delta_j, a weight norm); I have not worked out when they are exactly equivalent.
- The five new paper notes are short and written from abstracts plus
the headline formulas; only the formulas in
checks.pywere checked.
Takeaways
- Identify which of rule, weights or features is broken before choosing a fix.
- Report balanced accuracy, and compare against post-hoc logit adjustment first: it costs nothing.