Logistic regression is a workhorse of modern machine learning, but as datasets grow into the millions or billions of rows, even "efficient" algorithms start to crawl. One popular solution to this scaling problem is the use of coresets—small, weighted subsets of the original data that act as a proxy. By running optimization on this tiny fraction of the data, you can achieve nearly the exact same result in a fraction of the time.
However, while coresets exist for problems like $k$-means clustering or linear regression, logistic regression has proven notoriously tricky. Previous attempts often required adding regularization (which fundamentally changes the problem) or lacked rigorous proofs for how small the coreset could actually be.
In this paper, researchers provide a reality check on coresets for logistic regression. They prove exactly when compression is impossible and offer a novel sampling scheme for "well-behaved" data.
The Impossibility of a "One-Size-Fits-All" Coreset
The authors begin with a surprising negative result: in the worst case, it is mathematically impossible to compress data for logistic regression into a sublinear size. Using a reduction from communication complexity (specifically, the INDEX game), they demonstrate that for certain "nasty" datasets, any valid coreset must be nearly as large as the original dataset itself.
This fundamental limitation explains why a universal, one-size-fits-all compression algorithm for logistic regression has eluded researchers for so long.
A New Path Forward: $\mu(X)$ and Square-Root Sampling
Since we cannot compress every dataset, the authors introduce a complexity measure, $\mu(X)$, to quantify the "hardness" of a dataset. This measure evaluates the balance and overlap between classes. If a dataset is extremely imbalanced or perfectly separable, $\mu(X)$ is high, and compression is difficult. By introducing $\mu(X)$, the authors shift the conversation from "Does this work for everything?" to "Under what statistical conditions does this work?"
To compress datasets with a manageable $\mu(X)$, the authors propose a novel sampling scheme. The standard approach to building coresets is "sensitivity sampling," where points are picked based on their importance (leverage scores). However, the authors discovered a crucial theoretical pivot: for logistic regression, you shouldn't sample proportional to standard $\ell_2$ leverage scores.
Instead, they sample proportional to the square root of these scores. Because the logistic loss function behaves more linearly (like an $\ell_1$ function) for large values, taking the square root helps preserve the necessary mathematical structure, creating the first provably accurate, sublinear coresets for this problem.
Key Results and Performance
The authors evaluated their "QR-sampling" (square-root) approach against uniform sampling and $k$-means-based sampling on three real-world benchmark datasets:
- Webb Spam: 350,000 web pages (127 features).
- Covertype: 581,012 forest observations (54 features).
- KDD Cup ’99: 494,021 network connections (41 features). This was the most challenging dataset due to its high $\mu(X)$ complexity.
The experimental results highlight several major advantages of the proposed method:
- Superior Accuracy and Size Trade-off: The QR-sampling method consistently outperformed both uniform and $k$-means sampling, achieving lower mean relative log-likelihood errors at smaller sample sizes.
- High Efficiency: The algorithm runs in "input sparsity time," meaning it only processes the non-zero entries of the data. This makes it exceptionally fast, even for sparse, high-dimensional datasets.
- Conquering the KDD Challenge: On the difficult KDD Cup '99 dataset, competing methods exhibited errors exceeding 15% or failed to converge entirely. In contrast, the QR-sampling method maintained errors below 4% as the sample size increased.
- Stability: The proposed method demonstrated significantly lower variance in error across multiple runs, making it a highly reliable choice for production environments.
Limitations and the "Curse of Separability"
The primary limitation of this approach is its dependence on the dataset's complexity, $\mu(X)$. Counter-intuitively, if your data is "too easy" to solve—meaning the classes are perfectly separable—it becomes "too hard" to compress. In a perfectly separable dataset, $\mu(X)$ approaches infinity, meaning you might need nearly every single point to define the decision boundary accurately.
Future work may explore ways to handle high-$\mu$ datasets, potentially by combining coresets with regularization techniques or by identifying new complexity measures that capture different types of data compressibility.
Summary updated