Minimax-Optimal Aggregation for Density Ratio Estimation

Lukas Gruber, Markus Holzleitner, Sepp Hochreiter, Werner ZellingerICLR 2026

Density ratio estimation (DRE) is a fundamental technique in machine learning and statistics, particularly useful for tasks like domain adaptation and two-sample testing. However, DRE methods are notoriously sensitive to hyperparameter selection. Suboptimal choices often lead to poor convergence rates and weak empirical performance. To address this, researchers have developed a novel algorithm that optimally combines multiple density ratio estimators instead of trying to select just one.

By minimizing a theoretically grounded upper bound on error, this method achieves minimax-optimal convergence rates and sets a new state-of-the-art in large-scale domain adaptation tasks across image, text, and sensory data.

The Challenge of Density Ratio Estimation

If you have samples from two different distributions, $p$ and $q$, DRE attempts to learn the function $\beta(x) = p(x)/q(x)$. This is vital for domain adaptation—adjusting a model trained on "clean" source data to work on "noisy" or shifted real-world target data.

The main catch is that DRE is highly sensitive to hyperparameters, such as regularization strength or kernel bandwidth. Unlike supervised learning, where you can easily check accuracy on a validation set, DRE has no "ground truth" labels for the ratio. Standard cross-validation (CV) is often computationally expensive and can fail to find the best settings, leading to poor performance.

The "Don't Pick, Aggregate" Strategy

Instead of using cross-validation to select a single "best" model from a sequence of candidates, the proposed method trains $K$ different models ($f_1, \dots, f_K$) using various hyperparameter settings and then learns an optimal weighting ($\alpha$) to combine them.

Aggregation perfectly matches the true density ratio, outperforming individual candidate models.

Even if none of the individual candidate models are perfect, a weighted combination can recover the true density ratio with high precision. Standard model averaging (like a simple mean) can be dragged down by a few terrible models in the pool. In contrast, this method's least-squares construction naturally "down-weights" unstable or noisy models because they don't correlate well with the target signal.

The Objective Function

The core innovation lies in how the weights $\alpha$ are found. The authors derive an upper bound on the Bregman divergence (a generalized measure of distance between distributions) between the estimated ratio and the true ratio.

  1. Analytic Solution: The optimal weights can be found by solving a simple linear system: $\alpha = \mathbf{G}^{-1}\mathbf{r}$.
  2. Gram Matrix ($\mathbf{G}$): This matrix captures the relationships between the candidate models, weighted by the second derivative of the loss function.
  3. Inner Product Vector ($\mathbf{r}$): This aligns the candidates with the target distribution.
  4. Self-Concordance: The theory relies on "pseudo self-concordant" loss functions (like logistic or square loss), which allow for strong theoretical guarantees on convergence without needing to know the "smoothness" of the underlying density ratio in advance.

Computational Efficiency and Robustness

The aggregation step is significantly faster than $n$-fold cross-validation. While $n$-fold CV requires retraining models $n$ times for every parameter setting, this method only requires training each candidate once and then solving a quick linear system.

The proposed aggregation method requires significantly fewer trained models than cross-validation while maintaining the lowest and most stable error rate as the number of models increases.

As the number of candidate models increases, standard ensembling methods often show performance degradation or instability. This method remains robust, with the error curve flattening out or continuing to improve as more models are added. Furthermore, it achieves minimax-optimal error rates—the best possible theoretical convergence—without requiring prior knowledge of the mathematical "smoothness" of the ratio being estimated.

Empirical Validation

The authors performed an exhaustive evaluation using diverse datasets:

  • Geometric Benchmarks: Synthetic datasets consisting of Gaussian Mixture Models in 50-dimensional space.
  • MiniDomainNet: A large-scale image dataset for domain adaptation involving five distinct domains.
  • Amazon Reviews: A text-based sentiment analysis dataset testing domain shift across product categories.
  • HHAR: A time-series/sensory dataset involving smartphone and smartwatch data.

In total, over 9,000 neural networks were trained to validate the approach. The method outperformed cross-validation and advanced baselines (like Bayesian Model Averaging and Super Learner) across almost all benchmarks. On the MiniDomainNet benchmark, the aggregated estimators consistently improved the accuracy of downstream classifiers.

Limitations and Future Work

  • Candidate Dependency: The method is only as good as the "pool" of models it aggregates. If all candidate models are fundamentally incapable of representing the ratio, the aggregation will still fail (though it will likely still be better than picking one).
  • RKHS Assumptions: Much of the formal proof assumes the functions live in a Reproducing Kernel Hilbert Space (RKHS). While the empirical results on deep neural networks are excellent, bridging the theoretical RKHS proofs and deep learning architectures remains an area for further refinement.
  • Future Directions: The authors suggest applying this aggregation framework to other "unsupervised" estimation problems where hyperparameter tuning is traditionally difficult, such as generative modeling or mutual information estimation.

Summary updated

BibTeX
@inproceedings{gruber2026minimax,
  author = {Lukas Gruber and Markus Holzleitner and Sepp Hochreiter and Werner Zellinger},
  title = {{Minimax-Optimal Aggregation for Density Ratio Estimation}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=gDxJK8yvZU},
}
Figure