Discovering Practical Algorithms for Least Squares using Language Models
Abstract
Least squares is a central problem in scientific computing with applications across many domains such as the natural and social sciences. The design and implementation of state-of-the-art algorithms for solving least squares are often based on worst-case theoretical analysis and tailored to provide numerically stable solutions. These principles are often too conservative in real-world settings, incurring severe runtime slowdowns. Manually designing per-use-case algorithm implementations, on the other hand, requires domain knowledge and tedious trial-and-error. In this work, we leverage recent progress in large language model-guided automated discovery to automate the design of practical algorithms for numerical linear algebra applications. More specifically, our methodology frames the search for practical least squares algorithms as a meta-discovery problem: given a family of downstream solver tasks, we combine language model-guided algorithm evolution with robust meta-evaluation accounting for runtime and solver accuracy. We demonstrate the effectiveness and flexibility of our framework by discovering faster practical algorithms across an extensive list of synthetic and real-world least squares tasks. The discovered algorithms are faster than optimized baselines on large kernel regression tasks from the SUSY dataset for high-energy particle physics classification with up to one million rows. Additionally, we analyze the algorithms discovered by our framework and decompose the runtime improvements across algorithmic changes, hyperparameter optimization, and code engineering.
Create a lesson
Metadata
- Categories
- math.NA, cs.LG, cs.MS, cs.NA
- Comments
- 36 pages, 17 figures. Code available at https://github.com/SakanaAI/AutoDiscoLS
Related papers
Discontinuous least-squares finite elements for the stationary Fokker--Planck equation with absorbing boundaries
Shared title terminologymath.NAChunmei Wang
Identification of Spatially Varying Thermal Dissipation in Heterogeneous Media Using Integral Transforms and Nonlinear Least Squares
Shared title terminologymath.NAAndré J. P. de Oliveira, Trenton Lau, Diego C. Knupp et al.
Non-Intrusive Least-Squares Reduced Basis Methods: Black-Box Snapshots and Exact Residual Certificates
Shared title terminologymath.NAShun Zhang
Finite Volume Neural Networks for viscous Burgers equations in a square domain
Shared title terminologymath.NAGung-Min Gie, Chang-Yeol Jung, Junghwa Kim
Computation of Eigenvalues and Eigenvectors in Mesh Problems: Algorithms and Error Estimates (English Translation of the 1986 Russian Monograph)
Shared title terminologymath.NAAndrew V. Knyazev
RePAlg: REcover Polynomial completeness ALGorithm for arbitrary polytopal basis functions
Shared title terminologymath.NAStefano Berrone, Claudio Canuto, Moreno Pintore et al.