Abstract
While deep learning has flourished on GPUs, classical machine learning algorithms with constraints have largely remained CPU-bound. This paper presents a GPU-efficient implementation of the L-BFGS-B algorithm that overcomes the sequential bottlenecks of traditional methods. By utilizing a working set approach and integrating with the GENO framework, the proposed solver achieves speedups of several orders of magnitude over existing state-of-the-art GPU solvers.
Introduction
The success of deep learning is inextricably linked to the availability of high-performance GPU kernels for unconstrained optimization. However, many classical machine learning models—such as Support Vector Machines (SVMs) and fairness-constrained logistic regression—require solving optimization problems with box constraints or linear equalities. The standard algorithm for these problems, L-BFGS-B, is notoriously difficult to parallelize due to its sequential Cauchy point calculation. Consequently, standard GPU implementations of L-BFGS-B often fail to outperform CPU versions.
Methodology
To address these limitations, we propose a modified L-BFGS-B algorithm designed for massive parallelism:
- Working Set Strategy: We replace the sequential Cauchy point search with a working set approach. In each iteration, variables are partitioned into those at their boundaries and "free" variables. This allows the underlying quasi-Newton system to be solved in parallel across GPU cores.
- Projection-Based Search: Instead of scalar-heavy line searches, we employ a projection step to maintain feasibility, combined with a parallelizable backtracking line search satisfying the Armijo condition.
- Augmented Lagrangian: For general constraints beyond simple box bounds, the solver is embedded within an Augmented Lagrangian framework.
- Automatic Code Generation: The solver is integrated into the Generic Optimization (GENO) framework, which generates optimized Python/CuPy code from high-level mathematical specifications, eliminating the need for manual CUDA programming.
Experimental Results
We evaluated the proposed solver on several benchmark tasks, including fairness-constrained logistic regression and dual SVM problems.
Fairness in Machine Learning
We applied the solver to logistic regression with fairness constraints using the Adult and Census-income datasets. As shown in Figure 1, the proposed GPU solver consistently outperforms existing baselines like Fairlearn and SCS GPU, often by multiple orders of magnitude.
Support Vector Machines
The performance gains are equally pronounced for dual SVM problems. On the Adult dataset (a1a-a8a), our solver demonstrated a 100x speedup over cuOSQP and nearly a 1000x speedup over SCS GPU.
Conclusion
This work demonstrates that with appropriate algorithmic modifications, classical machine learning can benefit from GPU acceleration as much as deep learning. By removing sequential bottlenecks in L-BFGS-B and leveraging automatic code generation through GENO, we provide a path for scaling constrained optimization to massive datasets. Future work will explore extending this framework to non-differentiable objectives and evolving hardware architectures.
Summary updated