Abstract
Quantile regression provides a comprehensive view of data distributions by estimating conditional quantiles, yet its computational demands often make it impractical for massive datasets. This paper introduces a randomized algorithm designed to solve over-constrained quantile regression problems ($n \gg d$) in nearly linear time. By utilizing a novel conditioning method called SPC3 and importance sampling, the algorithm produces a $(1+\epsilon)$ approximation of the true solution while processing only a tiny fraction of the original data. Experimental results on terabyte-scale datasets demonstrate that this approach maintains high mathematical accuracy and scales efficiently in distributed environments like MapReduce.
Introduction
Most traditional regression models, such as standard Least-Squares, focus on predicting the conditional mean of a variable. While useful, the mean can be a poor representation of data in the presence of outliers or highly skewed distributions. Quantile regression offers a more robust alternative, allowing researchers to examine the full distribution of data—such as the bottom 10% of birth weights or the top 1% of earners.
Despite its utility, quantile regression is typically formulated as a linear programming problem. Standard solvers, including simplex and interior-point methods, are effective for small to medium datasets but fail when applied to the terabyte regime. When datasets contain billions of rows ($n$) but a relatively small number of features ($d$), traditional solvers run out of memory or require excessive computation time. This paper addresses this scalability gap by introducing a randomized approach that compresses massive datasets into manageable subproblems.
Methodology
The proposed solution bypasses the need to process the entire dataset by employing randomized linear algebra. The authors prove that low-distortion subspace embeddings, previously used for $\ell_1$ (median) regression, can be adapted for the asymmetric loss functions inherent in general quantile regression.
The algorithm follows a four-step process:
- Conditioning (SPC3): To avoid the pitfalls of uniform sampling on skewed data, the authors introduce SPC3. This method combines Sparse Cauchy Transforms with QR factorization to compute an $\ell_1$ "well-conditioned basis" for the data extremely quickly.
- Importance Scoring: Using this basis, the algorithm calculates an importance score for every row in the dataset based on $\ell_1$ row norms.
- Subsampling: Rows are sampled according to their importance scores, ensuring that rare but critical data points are preserved.
- Optimization: Standard quantile regression is performed on the significantly smaller sampled dataset.
Experimental Evaluation
The authors evaluated the algorithm across three distinct scenarios:
- Simulated Skewed Data: Synthetic tests designed to stress-test the sampling mechanism. These tests confirmed that while naive uniform sampling fails on imbalanced data, importance sampling remains robust.
- US 2000 Census Data: A real-world application predicting annual salaries based on demographic features (5 million rows).
- Terabyte-Scale Data: To test MapReduce scalability, the authors created massive matrices with up to $2.5 \times 10^9$ rows and 50 columns.
Key Insights and Results
Independence of $n$
A significant mathematical finding of this work is that the number of rows required for an accurate sample depends primarily on the number of features ($d$) and the desired error tolerance ($\epsilon$), rather than the total number of rows ($n$). This allows for extreme compression; on a dataset of 2.5 billion rows, the algorithm achieved high accuracy by sampling only 50,000 rows (0.001% of the data).
Computational Efficiency
The algorithm operates in $\mathcal{O}(\text{nnz}(A) \log n)$ time, meaning the runtime scales almost perfectly linearly with the number of non-zero elements in the dataset. Because the process is embarrassingly parallel and requires only a few passes over the data, it is highly compatible with distributed frameworks like Hadoop and MapReduce.
The SPC3 Advantage
The new SPC3 conditioning method was found to provide the optimal practical trade-off between the mathematical condition number (which determines the required sample size) and the time required to perform the conditioning step itself.
Limitations and Future Directions
While the algorithm scales infinitely with the number of rows, it faces a bottleneck as the number of features ($d$) increases. The conditioning step involves operations on a matrix whose size scales polynomially with $d$. Currently, if $d$ exceeds approximately 150–200, the intermediate matrices may exceed the RAM capacity of a single machine. Future work will likely focus on improving $\ell_1$ conditioning methods to further push the boundaries of high-dimensional quantile regression.
Summary updated