Least-Squares Conditional Density Estimation

Masashi Sugiyama, Ichiro Takeuchi, Taiji Suzuki, Takafumi Kanamori, Hirotaka Hachiya, Daisuke OkanoharaIEICE Trans. Information and Systems 2010 · DOI

Introduction

Standard regression analysis typically focuses on finding the conditional mean—the "average" output $y$ for a given input $x$. While this approach is foundational to statistics, it is often insufficient for complex, real-world phenomena. Consider a robot learning inverse kinematics: for a specific hand position ($x$), there may be multiple valid elbow configurations ($y$). A standard regression model would average these distinct possibilities, potentially suggesting a physically impossible middle position.

To address such "multi-modal" data or scenarios where noise levels fluctuate with the input (heteroscedasticity), we require Conditional Density Estimation (CDE). CDE provides the entire probability profile $p(y|x)$, offering a complete picture of uncertainty and potential outcomes. However, traditional CDE methods face significant hurdles: Kernel Density Estimation (KDE) scales poorly with dimensionality, while Mixture Density Networks (MDN) rely on non-convex neural network optimization that is slow and prone to local optima.

LS-CDE accurately estimates the true density in a bimodal toy dataset, whereas standard regression would fail by averaging the peaks.

Methodology: Direct Density Ratio Estimation

The authors propose Least-Squares Conditional Density Estimation (LS-CDE), a method that avoids the pitfalls of previous approaches by modeling the conditional density directly. Mathematically, the conditional density is defined as the ratio of the joint density to the marginal density: $p(y|x) = p(x, y) / p(x)$.

Rather than estimating the numerator and denominator separately—a process that often magnifies estimation errors—LS-CDE models the ratio $r(x, y)$ using a linear combination of basis functions, such as Gaussian kernels. By minimizing the squared error between the model and the true (but unknown) density ratio, the authors derive an objective function where complex integrals are replaced by simple sample averages. This transformation turns a difficult distribution-fitting problem into a straightforward system of linear equations: $(H + \lambda I)\alpha = h$.

This approach ensures a unique, analytically derived global solution. Furthermore, a post-processing "rounding" step ensures non-negativity and induces sparsity, significantly increasing computational efficiency during the prediction phase.

Experimental Validation

The performance of LS-CDE was validated across a diverse array of datasets, ranging from synthetic toy problems to complex real-world benchmarks:

  • Toy Datasets: Designed to test the model's ability to handle heteroscedastic Gaussian, bimodal, and skewed distributions.
  • Real-World Benchmarks: 20 datasets including the "Old Faithful" geyser eruption data and "Bone Mineral Density" studies in adolescents.
  • Robotics: Transition estimation for Pendulum and Khepera mobile robot simulators, where the task is to predict the next state given current state-action pairs.

Key Results and Discussion

LS-CDE demonstrates a remarkable balance of accuracy and speed. In benchmark tests, it consistently matched or exceeded the accuracy of Mixture Density Networks (MDN) and Kernel Quantile Regression (KQR) in terms of Negative Log-Likelihood (NLL).

LS-CDE captures the distinct clusters and probability profiles of geyser eruption durations relative to waiting times, demonstrating its utility on real-world multi-modal data.

The computational gains are even more pronounced. LS-CDE was found to be up to 267 times faster than MDNs on standard benchmarks and over 1,000 times faster on robot transition tasks. This efficiency, combined with its ability to naturally incorporate unlabeled data (semi-supervised learning), makes LS-CDE a powerful candidate for real-time applications like model-based reinforcement learning in continuous domains.

While the method currently relies on fixed basis functions, future work may involve integrating dimensionality reduction or automated kernel width selection to further enhance its flexibility in high-dimensional spaces.

Summary updated

BibTeX
@article{sugiyama2010least,
  author = {Masashi Sugiyama and Ichiro Takeuchi and Taiji Suzuki and Takafumi Kanamori and Hirotaka Hachiya and Daisuke Okanohara},
  title = {{Least-Squares Conditional Density Estimation}},
  journal = {IEICE Trans. Information and Systems},
  year = {2010},
  doi = {10.1587/transinf.e93.d.583},
}
Figure