NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

OCDE: Odds Conditional Density Estimator

Alex Akira Okuno, Felipe Maia PoloOpenReview 2021 · DOI · OpenReview

TL;DR

This paper introduces the Odds Conditional Density Estimator (OCDE), a novel method for estimating conditional probability densities. OCDE cleverly reframes the challenging CDE problem into a more tractable binary classification task by introducing an instrumental distribution, making it competitive with existing state-of-the-art methods.

What Problem Does This Paper Address?

Conditional Density Estimation (CDE) is a crucial task in statistics and machine learning, aiming to model the probability distribution of a target variable y given some input features x. While traditional regression focuses on predicting the average value of y (i.e., E[y|x]), CDE seeks to understand the entire distribution of y for a given x. This is vital for quantifying uncertainty, understanding variability, and making more informed decisions, especially when the conditional distribution is complex (e.g., multi-modal or asymmetric). The core challenge lies in directly estimating the full conditional density $p_{y|x}(y|x)$, which often involves estimating joint densities ($p_{x,y}(x,y)$) and marginal densities ($p_x(x)$), a notoriously difficult task, particularly in high dimensions.

Methods

The proposed Odds Conditional Density Estimator (OCDE) tackles this by transforming the CDE problem into a binary classification problem. The key idea is to introduce an "instrumental" random variable $\tilde{y}$ with a known distribution $p_{\tilde{y}}$ that shares the same support as the target variable $y$. This allows the conditional density $p_{y|x}(y|x)$ to be rewritten as a ratio of density ratios:

$$p_{y|x}(y|x) = p_{\tilde{y}}(y) \frac{p_{x,y}(x,y)}{p_{x,\tilde{y}}(x,y)}$$

The paper then leverages the concept of "Probabilistic Classification" for density ratio estimation. They create a synthetic dataset where samples are labeled based on whether they originate from the joint distribution $p_{x,y}(x,y)$ or the instrumental joint distribution $p_{x,\tilde{y}}(x,y)$. By training a binary probabilistic classifier (like a neural network or gradient boosting model) to distinguish between these two sources, the classifier learns to estimate the probability of a sample belonging to the original distribution, $p_{s|x,y}(s=1|x,y)$. This probability, combined with the known instrumental density $p_{\tilde{y}}(y)$, forms the OCDE estimator for the conditional density:

$$p_{y|x}(y|x) = p_{\tilde{y}}(y) \frac{p_{s|x,y}(s=1|x,y)}{p_{s|x,y}(s=0|x,y)}$$

This approach bypasses the direct estimation of $p_{x,y}$ and $p_x$, simplifying the problem. The authors suggest optimizing binary cross-entropy loss for the classifier and note that probability calibration might be needed. They also propose a practical fix for cases where the estimated density doesn't integrate to 1 by discretizing into a histogram and normalizing.

Datasets

The paper uses two types of data:

  • Simulated (Toy) Data: A synthetic dataset is generated using sinusoidal functions and noise to create a scenario where the conditional density is multi-modal and the expectation $E[y|x]$ might not align with high-density regions of $y$. The instrumental variable $\tilde{y}$ is sampled uniformly from $[-10, 10]$.
  • Real-World Regression Datasets: 13 standard regression datasets are used, with target variables being univariate. For each dataset, up to 5,000 data points are kept, columns are normalized to $[0, 1]$, and data is split into 80% training and 20% testing sets. A portion of the training set (20%) is used for validation.

Key Insights and Ideas

  • Reframing CDE as Classification: The core innovation is transforming a difficult density estimation problem into a more standard classification task, leveraging existing powerful classification algorithms.
  • Instrumental Distribution is Key: The introduction of an instrumental distribution $\tilde{y}$ is crucial for matching the domains of the relevant densities and enabling the classification-based approach.
  • Beyond Expectation: The paper highlights that focusing solely on $E[y|x]$ can be misleading when the conditional density is complex, as the expectation might fall in low-probability regions of $y$. OCDE aims to capture this richer information.
  • Competitive Performance: OCDE demonstrates strong performance against established CDE methods, suggesting its practical viability.

Key Results

  • Toy Experiment: Visualizations show that OCDE can effectively capture the multi-modal nature of the conditional density for different values of x, providing a good qualitative intuition for the method.
  • Real Datasets: In experiments comparing OCDE, OCDE (Smooth), FlexCoDE, and NN-K on 13 regression datasets, OCDE achieved the best CDE Loss on 8 datasets. NN-K was best on 6, OCDE (Smooth) on 5, and FlexCoDE on 4. This indicates OCDE is competitive and often superior.
  • Speed: OCDE is significantly faster than other methods, with an average running time of 2.26 seconds compared to FlexCoDE (125.18s) and OCDE (Smooth) (128.96s). This is attributed to OCDE not requiring hyperparameter tuning.

Limitations and Future Work

  • Non-Smoothness: The use of standard classifiers like CatBoost can lead to non-smooth density estimates. The authors suggest using techniques like the Fast Fourier Transform (FFT) for smoother estimates (as explored in OCDE (Smooth)).
  • Instrumental Distribution Choice: The choice of the instrumental distribution $p_{\tilde{y}}$ is noted as non-trivial, though a uniform distribution over a bounded range is suggested as a standard starting point.
  • Future Work: The authors propose exploring OCDE's performance with varying sample sizes and target dimensions, optimizing the choice of the instrumental random vector $\tilde{y}$, and comparing OCDE against other benchmark approaches.

Summary updated

BibTeX
@misc{okuno2021ocde,
  author = {Alex Akira Okuno and Felipe Maia Polo},
  title = {{OCDE: Odds Conditional Density Estimator}},
  year = {2021},
  eprint = {2107.04118},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.04118},
  howpublished = {OpenReview},
}
Figure