Density Ratio Estimation and Neyman Pearson Classification with Missing Data

Josh Givens, Song Liu, Henry W. J. Reeve

Abstract

Density Ratio Estimation (DRE) is an important machine learning technique with many downstream applications. We consider the challenge of DRE with missing not at random (MNAR) data. In this setting, we show that using standard DRE methods leads to biased results while our proposal (M-KLIEP), an adaptation of the popular DRE procedure KLIEP, restores consistency. Moreover, we provide finite sample estimation error bounds for M-KLIEP, which demonstrate minimax optimality with respect to both sample size and worst-case missingness. We then adapt an important downstream application of DRE, Neyman-Pearson (NP) classification, to this MNAR setting. Our procedure both controls Type I error and achieves high power, with high probability. Finally, we demonstrate promising empirical performance both synthetic data and real-world data with simulated missingness.

Introduction

Density Ratio Estimation (DRE) is a fundamental tool in machine learning, supporting tasks such as outlier detection, covariate shift adaptation, and generative modeling. However, DRE performance degrades significantly when data is missing. While most existing literature focuses on data "Missing At Random" (MAR), real-world scenarios often involve data Missing Not At Random (MNAR). In MNAR settings, the probability of a value being missing depends on the value itself—for instance, a medical sensor failing specifically at extreme readings.

Naive approaches, such as "complete case" analysis (discarding missing entries), introduce asymptotic bias that persists regardless of sample size. This bias is particularly critical in Neyman-Pearson (NP) classification, where the goal is to maximize power while strictly controlling Type I error. A biased density ratio estimate can lead to a classifier that unknowingly violates safety constraints.

Methodology

M-KLIEP: Restoring Consistency

We introduce M-KLIEP (Missing-KLIEP), an adaptation of the Kullback-Leibler Importance Estimation Procedure. M-KLIEP utilizes an inverse probability weighting approach to re-weight observed samples based on their probability of being missing. This mechanism effectively "undoes" the selection bias inherent in MNAR patterns.

To handle high-dimensional data, we employ a Naive Bayes assumption, allowing for dimension-by-dimension estimation of missingness patterns. While the core theory assumes the missingness function ($\phi$) is known, we provide a practical framework to estimate $\phi$ by querying a small subset of the missing values.

Robust Neyman-Pearson Classification

Building on M-KLIEP, we develop a two-stage NP classification procedure. First, the class density ratio is estimated using M-KLIEP. Second, a classification boundary is established using a "safety margin" ($\Delta$) derived from the effective sample size ($m_{eff}$). This metric accounts for both total samples and worst-case missingness, ensuring that Type I error constraints are satisfied with high probability.

Theoretical Guarantees

We provide finite sample estimation error bounds for M-KLIEP. Our analysis demonstrates that M-KLIEP is minimax optimal with respect to the effective sample size. This confirms that the procedure achieves the best possible error bounds given the information available in the presence of missingness.

Empirical Evaluation

Synthetic Consistency

In synthetic experiments using Gaussian distributions, we compared M-KLIEP against the standard Complete Case KLIEP (CC-KLIEP). As shown in Figure 2, the Mean Square Distance (MSD) of M-KLIEP converges toward zero as the sample size increases, whereas CC-KLIEP remains stuck at a high error level due to inherent bias.

Mean Square Distance (MSD) vs. Sample Size, showing M-KLIEP's consistency compared to the biased CC-KLIEP.

Real-World Performance

We evaluated the robustness of our approach on three real-world datasets: Cardiotocography (CTG), Fire detection, and Australian Weather. We artificially induced MNAR patterns to test the models' resilience.

Out-of-sample power performance on CTG, Fire, and Weather datasets under varying proportions of MNAR data.

As illustrated in Figure 4, M-KLIEP maintains high out-of-sample power even as the proportion of missing values increases. Notably, M-KLIEP performs nearly as well when the missingness function is estimated from a small sub-sample as it does when the function is perfectly known, significantly outperforming the CC-KLIEP baseline.

Conclusion

M-KLIEP and our robust NP classification framework provide a theoretically grounded and empirically validated solution for density ratio estimation under MNAR conditions. By accounting for effective sample size and utilizing inverse probability weighting, we restore consistency and safety to critical classification tasks. Future work will focus on relaxing the Naive Bayes assumption to handle complex feature dependencies and exploring scenarios with multi-class missingness patterns.

Summary updated

BibTeX
@inproceedings{givens2023density,
  author = {Josh Givens and Song Liu and Henry W. J. Reeve},
  title = {{Density Ratio Estimation and Neyman Pearson Classification with Missing Data}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2023},
  url = {https://openreview.net/forum?id=fXgssHchxy},
}
Figure