Better Conditional Density Estimation for Neural Networks

Wesley Tansey, Karl Pichotta, James G. ScottarXiv 2016 · DOI

Abstract

The vast majority of the neural network literature focuses on predicting point values for a given set of response variables, conditioned on a feature vector. In many cases we need to model the full joint conditional distribution over the response variables rather than simply making point predictions. In this paper, we present two novel approaches to such conditional density estimation (CDE): Multiscale Nets (MSNs) and CDE Trend Filtering. Multiscale nets transform the CDE regression task into a hierarchical classification task by decomposing the density into a series of half-spaces and learning boolean probabilities of each split. CDE Trend Filtering applies a k-th order graph trend filtering penalty to the unnormalized logits of a multinomial classifier network, with each edge in the graph corresponding to a neighboring point on a discretized version of the density. We compare both methods against plain multinomial classifier networks and mixture density networks (MDNs) on a simulated dataset and three real-world datasets. The results suggest the two methods are complementary: MSNs work well in a high-data-per-feature regime and CDE-TF is well suited for few-samples-per-feature scenarios where overfitting is a primary concern.

Introduction

Most neural networks used for regression are "point estimators," designed to output a single predicted value for a given input. However, real-world applications often demand a more nuanced understanding of uncertainty. We require the Conditional Density: the full range of possible outcomes and their associated probabilities. This is particularly critical in scenarios exhibiting conditional heteroskedasticity, where the level of uncertainty varies depending on the input features.

Existing solutions for Conditional Density Estimation (CDE) face significant hurdles. Simple discretization into bins often results in "lumpy" estimates that ignore the relationship between neighboring values. Mixture Density Networks (MDNs), while popular, assume a specific distribution (usually a mix of Gaussians) and are notoriously difficult to train for multi-dimensional outputs due to the instability of estimating covariance matrices. To address these issues, we propose two complementary architectures: Multiscale Nets (MSNs) and CDE Trend Filtering (CDE-TF).

Methodology

1. Multiscale Nets (MSNs)

Multiscale Nets treat density estimation as a hierarchical classification task. The model utilizes a dyadic partition of the output space, represented as a binary tree. At each node, the network predicts the probability that the response variable lies in the left half versus the right half of the current interval.

Hierarchical decomposition of density in Multiscale Nets (MSNs).

By decomposing the density into this series of "half-space" splits, MSNs can learn complex, non-parametric shapes without assuming a specific underlying distribution like a Gaussian. This hierarchical approach allows the model to capture both coarse and fine-grained details of the distribution effectively.

2. CDE Trend Filtering (CDE-TF)

CDE-TF builds upon a standard multinomial classifier but introduces a graph trend filtering penalty. This penalty acts as a mathematical "leash" on the unnormalized logits of the network. It forces the model to ensure that predicted probabilities for neighboring bins are smooth, preventing the erratic, disjointed predictions common in simple discretization. This regularization makes CDE-TF particularly robust in low-data regimes where overfitting is a major risk.

Experimental Evaluation

We evaluated our methods across a variety of benchmarks, including a synthetic MNIST distribution task and real-world datasets such as Parkinson’s disease telemonitoring (low-sample), Mercedes S-Class pricing (high-sample), and real estate rental data.

Key Results

Our experiments revealed that MSNs and CDE-TF have complementary strengths. As shown in the MNIST benchmark, CDE-TF significantly outperforms other models when data is sparse.

Mean Total Variation (TV) error on MNIST digits across varying sample sizes.

In the low-sample regime (e.g., 500 to 5,000 samples), CDE-TF maintains a much lower Mean Total Variation (TV) error compared to standard multinomial models and MDNs. However, as the sample size increases toward 60,000, Multiscale Nets and MDNs catch up, with MSNs dominating in high-data scenarios like the Mercedes dataset (~30k samples).

Discussion and Insights

One of the most striking findings is the "Free Lunch" effect: modeling the full density actually improved the accuracy of point estimates (RMSE). By forcing the network to understand the entire distribution, it became more proficient at identifying the single most likely value than networks trained solely for point regression.

Furthermore, these non-parametric approaches frequently outperformed MDNs. This is largely because they avoid the computational bottlenecks and numerical instabilities associated with Cholesky decompositions required for MDN covariance matrices in higher dimensions.

Conclusion

Multiscale Nets and CDE Trend Filtering provide a robust toolkit for conditional density estimation. MSNs offer high flexibility for large datasets, while CDE-TF provides essential regularization for small datasets. Future work will explore adaptive splitting for MSNs and the integration of these CDE methods into reinforcement learning frameworks, where accurate distribution modeling of future rewards is essential.

Summary updated

BibTeX
@misc{tansey2016better,
  author = {Wesley Tansey and Karl Pichotta and James G. Scott},
  title = {{Better Conditional Density Estimation for Neural Networks}},
  year = {2016},
  eprint = {1606.02321},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1606.02321},
}
Figure