[Paper Review] The biglasso Package: A Memory- and Computation-Efficient Solver for Lasso Model Fitting with Big Data in R
The paper introduces the biglasso R package, a memory- and computation-efficient solver for fitting lasso models on big data by leveraging memory-mapped files for out-of-core computation and novel hybrid safe-strong feature screening rules. It enables fitting lasso models on datasets larger than available RAM—demonstrated by successfully analyzing a 31 GB genome-wide association study on a laptop with only 16 GB RAM—while achieving 1.5x to 4x speedups over existing packages like glmnet.
Penalized regression models such as the lasso have been extensively applied to analyzing high-dimensional data sets. However, due to memory limitations, existing R packages like glmnet and ncvreg are not capable of fitting lasso-type models for ultrahigh-dimensional, multi-gigabyte data sets that are increasingly seen in many areas such as genetics, genomics, biomedical imaging, and high-frequency finance. In this research, we implement an R package called biglasso that tackles this challenge. biglasso utilizes memory-mapped files to store the massive data on the disk, only reading data into memory when necessary during model fitting, and is thus able to handle out-of-core computation seamlessly. Moreover, it's equipped with newly proposed, more efficient feature screening rules, which substantially accelerate the computation. Benchmarking experiments show that our biglasso package, as compared to existing popular ones like glmnet, is much more memory- and computation-efficient. We further analyze a 31 GB real data set on a laptop with only 16 GB RAM to demonstrate the out-of-core computation capability of biglasso in analyzing massive data sets that cannot be accommodated by existing R packages.
Motivation & Objective
- To address the limitation of existing R packages like glmnet and ncvreg in handling ultrahigh-dimensional, multi-gigabyte datasets that exceed available RAM.
- To develop a scalable, out-of-core lasso solver in R that can process data sets larger than main memory.
- To reduce memory and computational overhead through optimized data handling and feature screening.
- To enable practical big data analysis in R on standard hardware, such as laptops, without requiring high-end computing resources.
Proposed method
- Utilizes memory-mapped files to store large datasets on disk and load only necessary portions into memory during computation, enabling seamless out-of-core processing.
- Employs a pathwise coordinate descent algorithm with warm starts, known for high efficiency in solving lasso problems.
- Introduces a new hybrid screening rule, SSR-BEDPP, combining safe and strong rules to eliminate irrelevant features earlier and accelerate convergence.
- Implements memory-efficient data handling by avoiding redundant data copies, reducing memory usage by at least 2x compared to glmnet.
- Leverages C++ for performance-critical computations and OpenMP for shared-memory parallelism across multiple CPU cores.
- Uses the bigmemory package to manage large matrices as persistent disk-backed objects accessible like in-memory R objects.
Experimental results
Research questions
- RQ1Can lasso model fitting be efficiently performed on datasets larger than available RAM using standard R packages?
- RQ2How does the performance of the proposed hybrid screening rule (SSR-BEDPP) compare to existing rules like SSR and SEDPP in terms of speed and accuracy?
- RQ3To what extent can memory-mapped file I/O and out-of-core computation reduce memory usage while maintaining computational efficiency?
- RQ4How does the biglasso package scale on real-world big data, such as a 31 GB genome-wide association study?
- RQ5Can the package achieve significant speedups over existing R packages like glmnet and ncvreg without sacrificing model accuracy?
Key findings
- The biglasso package successfully fitted a lasso model on a 31 GB dataset using only 16 GB of RAM on a standard laptop, demonstrating true out-of-core computation.
- The package achieved 1.5x to 4x speedup over existing packages like glmnet by using the new SSR-BEDPP screening rule.
- The SSR-BEDPP rule reduced total computation time from 286 minutes (SSR) to 103 minutes (SSR-BEDPP) when λ_min/λ_max = 0.5, with 4 cores.
- biglasso consumed at least 2x less memory than glmnet due to elimination of redundant data copies and efficient memory management.
- The solution path for the 31 GB GWAS data was computed in 94 minutes for linear regression and 146 minutes for logistic regression using 4 cores.
- At λ = 0.06, the model selected 23 variables, with coefficient estimates and variable selection results accurately recovered.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.