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

Faster Kalman smoothing posed as a quadratic program

Estimate the state trajectory of a 23-dimensional noisy linear system over 46 steps faster than a CVXPY quadratic program, at the same optimum.

State the problem, from AlgoTune

浏览文件
@shoal shoal 2周前提交 0 个父提交 提交 d493b2ec5385cc0d0859c22b064ea5f6fbe8c9a1

显示 1 个改动的文件,新增 43 行,删除 0 行。

+43 −0 README.md 新增 查看文件
@@ -0,0 +1,43 @@
1+# Faster Kalman smoothing posed as a quadratic program
2+
3+Find the most likely state trajectory of a noisy linear dynamical system from its measurements, faster than solving the equivalent quadratic program with CVXPY. The answer is what a Kalman smoother computes, so structure-exploiting recursions compete with general-purpose solvers.
4+
5+## Task
6+
7+Given $A\in\mathbb{R}^{n\times n}$, $B\in\mathbb{R}^{n\times p}$, $C\in\mathbb{R}^{m\times n}$, measurements $y_0,\dots,y_{N-1}$, a known initial state $x_0$ and $\tau>0$, solve
8+
9+$$\min_{x,w,v}\ \sum_{t=0}^{N-1}\big(\lVert w_t\rVert_2^2+\tau\lVert v_t\rVert_2^2\big)\quad\text{s.t.}\quad x_{t+1}=Ax_t+Bw_t,\quad y_t=Cx_t+v_t,$$
10+
11+for $t=0,\dots,N-1$. In the benchmark $n=p=m=23$, $N=2n=46$ and $\tau=1$; $A$ is a standard normal matrix scaled to spectral radius just below 1, $B$ is 0.5 times a standard normal matrix, $C$ is standard normal, and the measurements are simulated with process and measurement noise of standard deviation 0.1. Output: $\hat x_0,\dots,\hat x_N$, $\hat w$ and $\hat v$. An output is accepted when the shapes are right, every entry is finite, the initial condition and each dynamics and measurement equation hold to $10^{-5}$ in Euclidean norm, and its objective is at most $J^\star(1+10^{-5})$, where $J^\star$ is the reference optimum. The reference solver is CVXPY with its default solver.
12+
13+Score: 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+
17+For Gaussian noise this quadratic program gives the maximum a posteriori state trajectory, the same estimate that a Kalman (1960) filter followed by a Rauch–Tung–Striebel (1965) backward pass computes in time linear in $N$. The task therefore measures how much a structure-aware recursion, or a banded linear solve of the optimality conditions, gains over a general-purpose modelling layer and solver.
18+
19+## Data and evaluation
20+
21+- **Instances:** 100 test and 100 development instances from the task's generator at $n=23$ (23 states over 46 steps), in the [AlgoTune dataset](https://huggingface.co/datasets/oripress/AlgoTune); the reference needs about 100 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: 85.80×, by the AlgoTuner agent driven by Gemini 3.1 Pro Preview, ahead of Gemini 3 Pro Preview (58.54×) and Claude Opus 4.5 (54.80×).
28+- 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.
29+
30+## What would count as progress
31+
32+- A solver beating 85.80× on all 100 test instances under the AlgoTune harness, with its code; anyone can rerun the checker and the timing.
33+- A numerically stable square-root or banded-Cholesky implementation whose accuracy is reported alongside its speed.
34+
35+## References
36+
37+1. 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)
38+2. R. E. Kalman. A new approach to linear filtering and prediction problems. Journal of Basic Engineering 82, 35–45 (1960). [doi:10.1115/1.3662552](https://doi.org/10.1115/1.3662552)
39+3. H. E. Rauch, F. Tung, C. T. Striebel. Maximum likelihood estimates of linear dynamic systems. AIAA Journal 3, 1445–1450 (1965). [doi:10.2514/3.3166](https://doi.org/10.2514/3.3166)
40+
41+## Source
42+
43+Imported from [AlgoTune task kalman_filter](https://github.com/oripress/AlgoTune/tree/main/AlgoTuneTasks/kalman_filter), 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.