# A weighted-likelihood framework for class imbalance in Bayesian prediction models

arXiv: https://arxiv.org/abs/2504.17013 · HTML: https://mlsanity.com/paper/2504.17013/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 9 of its 38 references that are in the map.
- First posted on arXiv 23 Apr 2025.

## Builds on (most cited first, 9 of 9)

- [On Calibration of Modern Neural Networks](https://mlsanity.com/paper/1706.04599/) (2017)
- [A General Framework for Updating Belief Distributions](https://mlsanity.com/paper/1306.6430/) (2013)
- [A statistical theory of cold posteriors in deep neural networks](https://mlsanity.com/paper/2008.05912/) (2020)
- [Assigning a value to a power likelihood in a general Bayesian model](https://mlsanity.com/paper/1701.08515/) (2017)
- [General Bayesian Updating and the Loss-Likelihood Bootstrap](https://mlsanity.com/paper/1709.07616/) (2017)
- [The harm of class imbalance corrections for risk prediction models: illustration and simulation using logistic regression](https://mlsanity.com/paper/2202.09101/) (2022)
- [Extending F1 metric, probabilistic approach](https://mlsanity.com/paper/2210.11997/) (2022)
- [Quantifying sources of uncertainty in drug discovery predictions with probabilistic models](https://mlsanity.com/paper/2105.09474/) (2021)
- [Selecting a classification performance measure: matching the measure to the problem](https://mlsanity.com/paper/2409.12391/) (2024)

## Abstract (arXiv)

Class imbalance is a pervasive problem in predictive toxicology, where the number of non-toxic compounds often exceeds the number of toxic ones. Models trained on such data often perform well on the majority class but poorly on the minority class, which is most relevant for safety assessment. We propose a simple and general Bayesian framework that addresses class imbalance by modifying the likelihood function. Each observation's likelihood is raised to a power inversely proportional to its class proportion, with the weights normalized to preserve the overall information content. This weighted-likelihood (or power-likelihood) approach embeds cost-sensitive learning directly into Bayesian updating. The method is demonstrated using simulated binary data and an ordered logistic model for drug-induced liver injury (DILI). Weighting alters parameter estimates and decision boundaries, improving balanced accuracy and sensitivity for the minority (toxic) class. The approach can be implemented with minimal changes in standard probabilistic programming languages such as Stan, PyMC, and Turing.jl. This framework provides an easily extensible foundation for developing Bayesian prediction models that better reflect the asymmetric costs of safety-critical decisions.
