NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Provably Accurate Randomized Sampling Algorithm for Logistic Regression

Agniva Chowdhury, Pradeep Ramuhalli

Abstract

Training logistic regression models on massive datasets is computationally intensive, often requiring iterative algorithms that scale poorly with the number of observations. This paper introduces a randomized sampling algorithm that utilizes leverage scores to construct a small, representative subset of data. We provide the first theoretical guarantee that the resulting estimated probabilities are nearly as accurate as those derived from the full dataset. Our empirical results across multiple real-world datasets show that this method significantly reduces computational costs while maintaining, and sometimes exceeding, the performance of existing sampling methods.

Introduction

Logistic regression is a fundamental tool for binary classification. However, its standard optimization method, Iteratively Reweighted Least Squares (IRLS), becomes a bottleneck when dealing with "Big Data." Each iteration of IRLS requires $O(nd^2)$ time, where $n$ is the number of observations and $d$ is the number of features. For datasets with millions of records, this cost is prohibitive.

Previous research into "coresets"—small data subsets that approximate the loss function—often relied on complex sampling distributions like Lewis weights. These methods frequently had sampling complexities that depended on specific data distributions, leading to large sample sizes in practice. This work addresses these limitations by providing a simpler leverage-score-based sampling scheme with strong, data-independent theoretical guarantees.

Methodology

The proposed algorithm follows a two-step "sketching" process:

  1. Constructing the Sketching Matrix ($S$): Instead of processing the entire data matrix $X$, we sample $s$ rows based on their leverage scores. Leverage scores quantify the "influence" of each row on the matrix's overall structure, ensuring that critical data points are preserved in the subset.
  2. Sketched Logistic Regression: The logistic regression problem is solved only on this sampled and rescaled subset. This reduces the per-iteration cost of the IRLS algorithm from $O(nd^2)$ to approximately $O(d^3/\epsilon^2)$, where $\epsilon$ is a user-defined accuracy parameter.

The core contribution is the proof that leverage score sampling satisfies the structural conditions for randomized matrix multiplication, ensuring the subsampled log-likelihood remains a faithful proxy for the full dataset.

Experimental Setup

The algorithm was evaluated on three diverse real-world datasets from the UCI Machine Learning Repository and Kaggle:

  • Cardiovascular Disease: 70,000 records, 12 features (predicting heart disease).
  • Bank Customer Churn: 10,000 records, 10 features (predicting customer attrition).
  • Default of Credit Card Clients: 30,000 records, 24 features (predicting payment default).

Key Insights

  • Probability-Centric Analysis: Unlike previous work focusing on approximating the loss function, this research prioritizes the accuracy of the estimated probabilities, which is the primary concern for most practitioners.
  • Data-Independent Complexity: The authors demonstrate that a sample size of $O(d/\epsilon^2)$ is sufficient for a high-quality approximation. This complexity depends only on the number of features and desired accuracy, avoiding the data-dependent bottlenecks of prior methods.
  • Relative Error Bounds: The theoretical error in sketched probabilities is bounded by the residual error of the full-data model. Consequently, if the model fits the data well, the randomized approximation is exceptionally accurate.
  • Efficiency of Leverage Scores: The paper shows that standard leverage scores—easier to compute than Lewis weights—are sufficient for robust logistic regression sketching.

Key Results

Empirical tests confirm the theoretical findings. Leverage score sampling consistently matched or exceeded the performance of uniform sampling and more complex "L2S" methods.

Performance comparison of sampling methods across Cardio, Churn, and Default datasets. The top row shows relative error in estimated probabilities, while the bottom row shows misclassification rates.

As shown in the figure above, the misclassification rate of the sketched model rapidly converges to the full-data baseline as the sample size $s$ increases. Notably, on the Cardiovascular dataset, the leverage score approach outperformed competitors even at very small sample sizes.

Conclusion and Future Work

This work provides a provably accurate and efficient way to scale logistic regression. However, some challenges remain. The current proof assumes a diagonal sketching matrix (sampling with replacement); extending this to "oblivious" sketching matrices like Gaussian projections is a non-trivial next step. Additionally, future research could explore the interaction between IRLS numerical errors and sampling errors, as well as extending these bounds to high-dimensional regimes where $d \gg n$.

Summary updated

BibTeX
@inproceedings{chowdhury2024provably,
  author = {Agniva Chowdhury and Pradeep Ramuhalli},
  title = {{A Provably Accurate Randomized Sampling Algorithm for Logistic Regression}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i10.29042},
}
Figure