Estimating the Density Ratio between Distributions with High Discrepancy using Multinomial Logistic Regression

Akash Srivastava, Seungwook Han, Kai Xu, Benjamin Rhodes, Michael U. Gutmann
5/1/2023
stat.MLcs.LG

No official code found. Best implementation: hanseungwook/mdre (4 stars, last commit 2023-11-10).

Abstract

Functions of the ratio of the densities $p/q$ are widely used in machine learning to quantify the discrepancy between the two distributions $p$ and $q$. For high-dimensional distributions, binary classification-based density ratio estimators have shown great promise. However, when densities are well separated, estimating the density ratio with a binary classifier is challenging. In this work, we show that the state-of-the-art density ratio estimators perform poorly on well-separated cases and demonstrate that this is due to distribution shifts between training and evaluation time. We present an alternative method that leverages multi-class classification for density ratio estimation and does not suffer from distribution shift issues. The method uses a set of auxiliary densities $\{m_k\}_{k=1}^K$ and trains a multi-class logistic regression to classify the samples from $p, q$, and $\{m_k\}_{k=1}^K$ into $K+2$ classes. We show that if these auxiliary densities are constructed such that they overlap with $p$ and $q$, then a multi-class logistic regression allows for estimating $\log p/q$ on the domain of any of the $K+2$ distributions and resolves the distribution shift problems of the current state-of-the-art methods. We compare our method to state-of-the-art density ratio estimators on both synthetic and real datasets and demonstrate its superior performance on the tasks of density ratio estimation, mutual information estimation, and representation learning. Code: https://www.blackswhan.com/mdre/

View on arXivView PDF

Code Implementations(1)

hanseungwook/mdreCommunity58%

Estimating the Density Ratio between Distributions with High Discrepancy using Multinomial Logistic Regression

40Python, Jupyter NotebookMar 20, 20232 years ago

Similar Papers

Cite this paper

@article{srivastava2023estimating,
  title  = {Estimating the Density Ratio between Distributions with High Discrepancy using Multinomial Logistic Regression},
  author = {Akash Srivastava and Seungwook Han and Kai Xu and Benjamin Rhodes and Michael U. Gutmann},
  year   = {2023},
  eprint = {2305.00869},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.00869v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.00869.svg)](https://codeofpaper.com/paper/2305.00869)

Discussion