Table of Contents
Fetching ...

A CDF-First Framework for Free-Form Density Estimation

Chenglong Song, Mazharul Islam, Lin Wang, Bing Chen, Bo Yang

Abstract

Conditional density estimation (CDE) is a fundamental task in machine learning that aims to model the full conditional law $\mathbb{P}(\mathbf{y} \mid \mathbf{x})$, beyond mere point prediction (e.g., mean, mode). A core challenge is free-form density estimation, capturing distributions that exhibit multimodality, asymmetry, or topological complexity without restrictive assumptions. However, prevailing methods typically estimate the probability density function (PDF) directly, which is mathematically ill-posed: differentiating the empirical distribution amplifies random fluctuations inherent in finite datasets, necessitating strong inductive biases that limit expressivity and fail when violated. We propose a CDF-first framework that circumvents this issue by estimating the cumulative distribution function (CDF), a stable and well-posed target, and then recovering the PDF via differentiation of the learned smooth CDF. Parameterizing the CDF with a Smooth Min-Max (SMM) network, our framework guarantees valid PDFs by construction, enables tractable approximate likelihood training, and preserves complex distributional shapes. For multivariate outputs, we use an autoregressive decomposition with SMM factors. Experiments demonstrate our approach outperforms state-of-the-art density estimators on a range of univariate and multivariate tasks.

A CDF-First Framework for Free-Form Density Estimation

Abstract

Conditional density estimation (CDE) is a fundamental task in machine learning that aims to model the full conditional law , beyond mere point prediction (e.g., mean, mode). A core challenge is free-form density estimation, capturing distributions that exhibit multimodality, asymmetry, or topological complexity without restrictive assumptions. However, prevailing methods typically estimate the probability density function (PDF) directly, which is mathematically ill-posed: differentiating the empirical distribution amplifies random fluctuations inherent in finite datasets, necessitating strong inductive biases that limit expressivity and fail when violated. We propose a CDF-first framework that circumvents this issue by estimating the cumulative distribution function (CDF), a stable and well-posed target, and then recovering the PDF via differentiation of the learned smooth CDF. Parameterizing the CDF with a Smooth Min-Max (SMM) network, our framework guarantees valid PDFs by construction, enables tractable approximate likelihood training, and preserves complex distributional shapes. For multivariate outputs, we use an autoregressive decomposition with SMM factors. Experiments demonstrate our approach outperforms state-of-the-art density estimators on a range of univariate and multivariate tasks.

Paper Structure

This paper contains 25 sections, 22 equations, 9 figures, 3 tables, 1 algorithm.

Figures (9)

  • Figure 1: Comparison on toy tasks with complex support geometry: (top) disconnected squares and (bottom) ring-shaped densities. Our CDF-first model (second column) accurately recovers the ground-truth distribution (leftmost column), preserving sharp boundaries and topological holes. In contrast, MDN oversmooths multimodality, normalizing flows (NSF/MAF) fill topological voids, and DDN reduces spikiness but still blurs structural details. This demonstrates that modeling the CDF directly enables superior representation of free-form conditional densities.
  • Figure 2: End-to-end architecture of the CDF-first framework: input normalization, stochastic noise injection, autoregressive masked SMM networks for CDF estimation, and boundary normalization with finite-difference PDF derivation.
  • Figure 3: Ablation study on the Elastic Ring task. Each row shows conditional density estimates at $x = -0.75, 0, 0.75$ for a variant of our CDF-first framework, with sum-of-squared-errors (SSE) reported per column. Only the full model (bottom row) accurately recovers the ring’s topology; removing noise, replacing SMM with hard Min-Max, or using an MLP baseline all degrade structural fidelity, demonstrating the necessity of both noise injection and smooth SMM networks for accurate density estimation.
  • Figure 4: Conditional density estimation on four toy tasks (Squares, Half Gaussian, Gaussian Stick, Elastic Ring) at $x = \{-0.75, -0.25, 0.25, 0.75\}$. Our CDF-First model consistently recovers ground-truth structures, including disconnected modes, sharp boundaries, and topological holes, outperforming all baselines (DDN, MAF, MDN, NSF, RNF) in both visual fidelity and SSE.
  • Figure 5: Reliability diagrams for CDF-First and DDN on Concrete (a,b) and Fish (c,d) datasets. CDF-First shows closer alignment to the diagonal (perfect calibration) and lower ECE values, indicating superior calibration performance.
  • ...and 4 more figures