Predicting Conditional Quantiles via Reduction to Classification

John Langford, Roberto Oliveira, Bianca Zadrozny

TL;DR

This paper introduces Quanting, a novel meta-algorithm that reduces conditional quantile regression to standard binary classification. By transforming the problem into a family of importance-weighted classification tasks, the authors provide strong theoretical regret bounds and achieve state-of-the-art, computationally efficient performance on large real-world datasets.

What Problem Does This Paper Address?

Standard regression models typically predict the conditional mean of a distribution by minimizing squared error. However, the mean is often insufficient or misleading—especially when dealing with heavy-tailed noise, asymmetric distributions, or risk assessment (e.g., estimating financial downside or predicting maximum customer spend).

Quantile regression solves this by predicting specific quantiles (like the median or the 90th percentile). Unfortunately, existing non-parametric quantile regression methods (like kernel-based approaches) suffer from massive computational and memory overhead, while simpler linear models fail to capture complex, non-linear relationships in real-world data. The authors tackle this challenge by creating a bridge from quantile regression to the highly optimized world of binary classification.

Methods

The authors propose Quanting, an algorithm that decomposes a quantile regression problem into a set of binary classification problems across different thresholds $t \in [0, 1]$.

Figure 1: Loss functions which induce quantile regression.
  • Training (Quanting-train): For a chosen quantile $q$, the algorithm creates a family of datasets indexed by threshold $t$. For each threshold, a training example $(x, y)$ is converted into a binary classification instance with the label $I(y \ge t)$. Crucially, to reflect the asymmetric "pinball loss" of quantile regression (shown in Figure 1), positive examples are weighted by $q$ and negative examples are weighted by $1-q$. Any standard importance-weighted classifier (like decision trees or logistic regression) can then be trained on these datasets.
  • Testing (Quanting-test): To predict the quantile for a new instance $x$, the algorithm integrates the predictions of the classifiers across all thresholds: $$Q(x) = E_{t \sim U(0,1)}[c_t(x)]$$

The authors also demonstrate that this process can be reduced to unweighted binary classification by utilizing a rejection sampling step to handle the example weights.

Datasets

The authors evaluated their approach on four large, publicly available real-world benchmarks:

Table 1: Dataset statistics.
  1. Adult: Predicting individual income quantiles based on demographic features.
  2. KDD-Cup 1998: Predicting charity donation amounts to optimize marketing "anchoring" strategies.
  3. California Housing: Predicting quantiles of conditional house values to establish upper and lower price bounds.
  4. Boston Housing: A smaller dataset predicting neighborhood housing values.

Key Insights and Ideas

  • The Tilted Loss Connection: The core "aha" moment is realizing that the asymmetric pinball loss function used in quantile regression can be perfectly mirrored by varying the misclassification costs (weights) of a binary classifier.
  • Reduction as a Force Multiplier: By reducing quantile regression to classification, practitioners instantly gain access to decades of optimization work in classification algorithms (e.g., decision trees, boosting, SVMs) without needing to write custom solvers for quantile loss.
  • Fast Empirical Convergence: Theoretically, an infinite number of classifiers are needed for continuous thresholds. In practice, the authors found that the algorithm converges remarkably fast—using an adaptive grid of just 50 to 100 classifiers yields highly accurate results.
Figure 2: Progress of quanting as the number of classifiers grows.

Key Results

  • Superior Accuracy: Quanting using J48 decision trees (quanting-J48) consistently outperformed both linear quantile regression and kernel-based methods on the Adult and California Housing datasets in terms of quantile loss.
  • Massive Speedups: While kernel-based quantile regression took over an hour to train on just 3,000 samples due to high memory and computational complexity, Quanting completed training in less than 8 minutes using 100 classifiers on the full datasets.
  • Linear Baseline Exception: On the KDD-Cup 1998 dataset, linear quantile regression performed best for $q=0.5$ and $q=0.9$. This occurred because the dataset contains a strong intrinsic linear correlation between one specific feature and the target label, which the linear model captured naturally but Quanting's discrete thresholds struggled to match.

Limitations and Future Work

  • Discretization Overhead: In practice, one must use a discrete mesh of thresholds rather than a continuous spectrum, which adds a predictable $1/n$ error term to the theoretical error bound.
  • Rejection Sampling Inefficiency: When reducing to unweighted classification via rejection sampling, data points are discarded, which could potentially reduce sample efficiency in data-scarce regimes.
  • Future Directions: The authors suggest exploring more sophisticated adaptive discretization schemes to minimize the number of classifiers needed while maintaining low error bounds.

Summary updated

Abstract

We show how to reduce the process of predicting general order statistics (and the median in particular) to solving classification. The accompanying theoretical statement shows that the regret of the classifier bounds the regret of the quantile regression under a quantile loss. We also test this reduction empirically against existing quantile regression methods on large real-world datasets and discover that it provides state-of-the-art performance.
BibTeX
@inproceedings{langford2006predicting,
  author = {John Langford and Roberto Oliveira and Bianca Zadrozny},
  title = {{Predicting Conditional Quantiles via Reduction to Classification}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2006},
}
Figure