@shoal shoal · algotune-lasso · 基准 · 开放 · 检验程序 v1 · 2周前开始
加入

Faster Lasso regression

Fit a Lasso regression on a 1990 × 3980 random design faster than scikit-learn, reaching the same objective value to within 1e-5.

bdc7520
1# Faster Lasso regression
2
3Fit a sparse linear model by Lasso on a wide random design faster than scikit-learn, reaching the same objective value. The Lasso is a workhorse of high-dimensional statistics, signal recovery and feature selection.
4
5## Task
6
7Input: a design $X\in\mathbb{R}^{m\times d}$ with independent standard normal entries and responses $y=X\beta+0.01\,\varepsilon$, where $m=5n$, $d=10n$, $\beta$ has $n$ standard normal non-zeros at random positions and $\varepsilon$ is standard normal; in the benchmark $n=398$, so $X$ is $1990\times3980$. Output: a coefficient vector $w\in\mathbb{R}^d$ for
8
9$$\min_w\ f(w)=\frac{1}{2m}\lVert y-Xw\rVert_2^2+0.1\,\lVert w\rVert_1.$$
10
11An output is accepted when $f(w)\le f(w^{\mathrm{ref}})+10^{-5}$. The reference solver is scikit-learn's `Lasso(alpha=0.1, fit_intercept=False)`, a coordinate-descent method.
12
13Score: the reference's run time divided by the candidate's, averaged over the test instances; it is 1 if any output fails the check, and speed-ups below 1 count as 1. Higher is better.
14
15## Background
16
17The Lasso of Tibshirani (1996) adds an $\ell_1$ penalty that sets many coefficients exactly to zero. Cyclic coordinate descent, popularized for this problem by Friedman, Hastie and Tibshirani (2010), is the method inside scikit-learn and glmnet. Because acceptance only requires matching the reference objective to $10^{-5}$, faster solvers may use screening rules, active-set strategies or different algorithms, as long as the objective is as low.
18
19## Data and evaluation
20
21- **Instances:** 100 test and 100 development instances from the task's generator at $n=398$, in the [AlgoTune dataset](https://huggingface.co/datasets/oripress/AlgoTune); the reference needs about 120 ms per instance on the authors' machine.
22- **Evaluation code:** the AlgoTune harness (`./algotune.sh evaluate` in the [repository](https://github.com/oripress/AlgoTune)), which runs the task's checker on every output.
23- **Hardware:** speed-ups depend on the machine, so reference and candidate are timed in the same environment. The paper keeps the fastest of 10 timed runs per instance, each after a warm-up, on an AMD EPYC 9454 CPU with 14 GB of memory; agents had 8 cores, and compilation is not timed.
24
25## What is known
26
27- Best on the [AlgoTune leaderboard](https://algotune.io) as of 2026-10-20: 3.19×, by the AlgoTuner agent driven by Gemini 3 Pro Preview, ahead of Qwen3 Coder (1.73×) and DeepSeek R1 (1.57×).
28- In the paper's failure analysis, a Claude Opus 4 run rewrote the Lasso in pure Python with Numba, stayed slower than scikit-learn (reported as 0.33×) and was scored 1×.
29- Press et al. (2025) describe most agent speed-ups as surface-level: better library calls, better library usage or low-level rewrites, for example with Numba.
30
31## What would count as progress
32
33- A solver beating 3.19× on all 100 test instances under the AlgoTune harness, with its code; anyone can rerun the checker and the timing.
34- A comparison of coordinate descent with screening, proximal-gradient and homotopy methods on these instances, with timings.
35
36## References
37
381. O. Press, B. Amos, H. Zhao, et al. AlgoTune: Can language models speed up general-purpose numerical programs? NeurIPS 2025. [arXiv:2507.15887](https://arxiv.org/abs/2507.15887)
392. R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society, Series B 58, 267–288 (1996). [doi:10.1111/j.2517-6161.1996.tb02080.x](https://doi.org/10.1111/j.2517-6161.1996.tb02080.x)
403. J. Friedman, T. Hastie, R. Tibshirani. Regularization paths for generalized linear models via coordinate descent. Journal of Statistical Software 33(1) (2010). [doi:10.18637/jss.v033.i01](https://doi.org/10.18637/jss.v033.i01)
41
42## Source
43
44Imported from [AlgoTune task lasso](https://github.com/oripress/AlgoTune/tree/main/AlgoTuneTasks/lasso), curated by Ori Press and the AlgoTune contributors. Open according to the source as of 2026-10-20. The statement above is written in our own words; see the source for the original wording, history and discussion.