Density ratios play a central role in two-sample comparison, distribution-shift adaptation, and generative-model evaluation. However, estimating a density ratio through separate estimation of the underlying densities can be unnecessarily challenging. In this paper, we develop a direct approach to the log density ratio estimation by minimizing a balanced Hellinger risk over additive ensembles of axis-aligned decision trees, trained using Newton boosting. We establish finite-sample guarantees for the estimator produced by the algorithm and derive an explicit convergence rate. Under suitable tail and Hölder smoothness conditions, together with an additional assumption on the progress made at each boosting iteration, our rate matches, up to logarithmic factors, the classical minimax-optimal L2 rate for function estimation. A key technical contribution is an optimization analysis that exploits the special exponential structure of the Hellinger risk. In particular, we show that the decrease in the second-order Taylor approximation (which is computable) of the empirical risk controls the actual decrease in that risk, yielding a direct optimization guarantee for the boosting algorithm. This allows us to establish statistical convergence guarantees for the algorithm's output without relying on an idealized empirical-risk minimizer. Experiments on synthetic data corroborate the predicted convergence behavior, while experiments on public datasets demonstrate the practical effectiveness of the proposed estimator.
Figures & tables
Figure 1: Estimation error with fixed numbers of trees and leaves. Each curve reports the mean and interquartile range over 20 independent fits.
Figure 2: Approximation error. The left panel varies the number of leaves. The right panel compares two trees with L=4 leaves, one restricted to a uniform grid of allowed split points and the other using all possible split points. Markers show the median over the 20 grids, and shading shows the interquartile range. The dashed lines have slopes −2 and 2 .
Figure 3: Decrease in the original empirical risk. Left: mean and interquartile range over five independent fits at N=1000 . Right: median and full range of the empirical-risk decrease relative to Dt , pooled over all iterations and four sample sizes. The dashed lines show the bounds in Theorem 3 .
Figure 4: Excess risk when all three errors are present. Each panel shows the two choices of the leaf limit. Markers show means over 20 independent fits, and shading shows the interquartile ranges. The dashed lines have slope −2/3 .
Task
P
Q
Raw features
d
N
UCI Machine Learning Repository ( Kelly et al., 2024 )
Avila
copyist A
copyist F
10
10
1,568
COIL 2000
class 1
class 0
85
85
278
Credit Default
default
no default
23
23
3,981
Electrical Grid
stable
unstable
12
12
2,172
Letter
A–M
N–Z
16
16
5,964
Table 1: Public-data tasks. Here N is the number of fitting observations per group after the two fitting samples are balanced, and d is the input dimension after encoding, reported as a range when it varies with the categories present in the fitting sample.
Method
Test Hellinger risk
Tasks favoring Hellinger trees
Hellinger trees (ours)
0.5108(±0.3003)
–
Logistic trees
0.5210(±0.2891)
7/10
Kernel logistic regression
0.7503(±0.1732)
9/10
uLSIF
0.9942(±0.0321)
10/10
KLIEP
0.9994(±0.0221)
10/10
Table 2: Average test Hellinger risk over the 10 tasks. Parentheses contain the standard deviation over the individual runs, and the last column gives the number of tasks on which Hellinger trees have the smaller average risk.
Figure 5: Comparison of Hellinger trees with four baseline methods on the 10 public-data tasks. For each task, a marker shows the mean difference in test risk between Hellinger trees and a baseline method over 20 independent repetitions, and the error bar shows the interquartile range. Negative values favor Hellinger trees.
When exact probabilities cannot be computed, density ratio estimation (DRE) is a key subroutine in the wide range of applications where density ratios appear, from experimental design to generative modelling and reinforcement learning. In this paper, we introduce the concept of an expected log density ratio (ELDR): log density ratios that are integrated under some third, possibly distinct measure. We show many problems with implicit densities where DRE is naïvely used are actually ELDR estimation tasks, and prove fundamental limitations on finite-sample ELDR estimation. Based on these results, we argue that the typical DRE-based approaches are unsuitable for ELDR estimation, and provide some foundational motivation towards bespoke ELDR estimators. To demonstrate, we propose a simple modification to some DRE methods that allows samples convergent to the integral distribution to appear in training data. We show through benchmarks that this can improve ELDR estimation error.
Avi Amalanshu, Chandler Squires, Yizhou Lu +1
Machine Learning Department, Carnegie Mellon University
We study density ratio estimation and importance-weighted regression under target shift with continuous outputs. Under target shift, the conditional distribution of the inputs given the outputs remains invariant across the training and test distributions, while the output marginal distribution may change. Although this problem has been extensively studied for discrete outputs, the continuous setting is substantially less understood: the importance weights are determined by an unknown density ratio function, for which existing estimation methods lack explicit finite-sample convergence rates. We propose a spectral regularization method in a reproducing kernel Hilbert space (RKHS) for estimating the continuous density ratio from labeled training samples and unlabeled test inputs. Under a source condition with regularity parameter ι>0, we establish high-probability finite-sample guarantees and show that the estimator achieves the capacity-independent minimax-optimal RKHS-norm rate O(nη−ι/(2ι+2)). We then incorporate the estimated density ratio into importance-weighted regression and characterize the propagation of density-ratio estimation error to the final predictor. When sufficiently many samples are available for density ratio estimation, the resulting regression estimator attains the minimax-optimal rates of standard kernel regression. These results establish a finite-sample theory for continuous density ratio estimation and importance-weighted learning under target shift.
Ren-Rui Liu, Zheng-Chu Guo
School of Mathematical Sciences, Zhejiang University, Hangzhou 310058, China
We study the task of density estimation, where we hope to accurately estimate a probability density from n samples. A textbook method for density estimation in total variation distance is the minimum-distance estimator approach, where we conclude both the algorithm and the analysis merely from bounding the VC dimension of a particular concept class (the so-called Yatracos class). While this technique has originally yielded sharp guarantees primarily for total variation distance, in this work we extend the minimum-distance estimator approach for learning within Hellinger distance. Our main observation is that we may produce an analogous recipe for Hellinger (where we only require bounding the VC dimension of a related concept class) by drawing connections to recent results yielding reverse data processing inequalities. This recipe is flexible enough to accommodate fast algorithms originally designed for total variation distance; by modifying the approach of Acharya et al. (2017) we conclude the first near-linear time algorithm for learning classes including univariate mixtures of log-concave densities and mixtures of Gaussians (with arbitrary variances), with near-optimal sample complexity.