Symbolic regression benchmark¶
The pilot compares search modes on three equations with known answers. Each run fits 41 rows with the first variable in [0, 1]. The validation set contains the 40 midpoints, and the extrapolation set contains 121 rows in [1.05, 3]. Six additional unlabeled points define probe feasibility and the semantic descriptors. The rational problem adds an independently sampled second variable and Gaussian noise with a standard deviation of 0.015 to training and validation targets.
Problem |
Signal |
|---|---|
Polynomial |
|
Keijzer-1 |
|
Rational, noisy |
|
Each QDpy run used the same operator set, 1,200 tree proposals, 48 cells for the semantic CVT or 48 slots for GP, and up to 72 training evaluation calls per distinct structure. The structural grid has one cell per legal combination of three counts. The realized population sizes vary by mode and case. The scorer selects the validation winner, with smaller expression size breaking ties, before looking at the extrapolation labels. Near-fit models lie within 2% of the peak absolute training target in validation RMSE above that winner. Probe spread is the largest difference between their bounded descriptor coordinates on any probe.
The optional exact-recovery check requires extrapolation RMSE below one millionth of the training scale followed by a SymPy equality check. It can snap coefficients to small rationals or rational multiples of π within the stated tolerance in the benchmark script. It checks symbolic equality and sampled validity on this benchmark. Domain singularities can still occur between sampled points.
QDpy results¶
Timing excludes assessment and includes archive initialization. All three seeds (11, 22, and 33) used a single thread on an Intel Xeon E5-2630 v4, with Python 3.11.16, NumPy 2.4.6, SciPy 1.17.1, and scikit-learn 1.9.1. The table shows medians across seeds. Each mode proposed 1,200 trees and fitted each unique tree at most once.
Problem |
Search |
Exact recoveries |
Validation RMSE |
Extrapolation RMSE |
Near-fit models |
Probe spread |
Fit calls |
Seconds |
|---|---|---|---|---|---|---|---|---|
Polynomial |
Structural |
3/3 |
0 |
0 |
18 |
1.613 |
18,896 |
7.07 |
Polynomial |
Semantic |
3/3 |
0 |
0 |
1 |
0 |
15,147 |
6.15 |
Polynomial |
GP |
3/3 |
0 |
0 |
48 |
1.584 |
24,904 |
9.67 |
Keijzer-1 |
Structural |
0/3 |
0.0681 |
0.522 |
2 |
1.176 |
19,246 |
7.30 |
Keijzer-1 |
Semantic |
0/3 |
0.0721 |
0.563 |
2 |
0.613 |
20,508 |
7.03 |
Keijzer-1 |
GP |
0/3 |
0.0475 |
2.220 |
1 |
0 |
29,478 |
10.79 |
Rational, noisy |
Structural |
0/3 |
0.0699 |
0.855 |
3 |
0.083 |
23,635 |
8.71 |
Rational, noisy |
Semantic |
0/3 |
0.0843 |
0.652 |
1 |
0 |
17,575 |
6.23 |
Rational, noisy |
GP |
0/3 |
0.0750 |
0.810 |
1 |
0 |
25,792 |
10.75 |
Every mode recovered the polynomial. The archive modes had lower median extrapolation error than GP on Keijzer-1, although all nine QDpy searches missed the true equation at this budget. Fitting the supplied Keijzer-1 structure, as in the tutorial, recovered the amplitude and frequency. The semantic archive had the lowest median extrapolation error on the noisy rational case, with more than one near-fit model in one of three runs. These runs give a way to test descriptor choices and fitting budgets on larger suites.
The separate tutorial uses noisy data on the narrower interval [0, 0.6]. It retained 15 semantic elites. Five selected equations had validation RMSE between 0.0144 and 0.0148. Their predictions at x = 3 ranged from −156 to 11.7. The error on observed data gives little basis for choosing a forecast at that point.

External references¶
The reference runs use the same input rows and outer model-selection procedure. Their software budgets count different operations from the QDpy proposal and fit counters. QDSR checks a soft limit on distinct structures at generation boundaries and can halt early. PySR’s evaluation limit is internal to SymbolicRegression.jl.
QDSR commit 40133d2, using the least-squares solver with dimensional
analysis disabled, recovered the polynomial and Keijzer-1 in the
seed-11 run. Its extrapolation RMSE was 0.986 on the noisy rational
case. The three runs saw 222, 479, and 1,230 distinct structures,
respectively. They used Python 3.12.14 and the upstream pinned
dependencies.
PySR 2.7.3 ran serially at seed 11 with an internal cap of 1,200 evaluations. The validation winners had extrapolation RMSE of 193.57 on the polynomial, 3.05 on Keijzer-1, and 0.95 on the noisy rational case. None met the exact-recovery check. The first fit took 49.38 seconds including Julia JIT compilation. The next two took 0.36 and 0.21 seconds. These single-seed reference runs use different budget units and give no throughput ranking across libraries.
Reproduce the run¶
From the checkout, run the following with the base package installed.
Add SymPy in the benchmark environment to use --exact.
python -m pip install sympy==1.13.3
OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 \
python scripts/benchmark_symbolic_regression.py --exact
Use a Python 3.12 environment with the dependencies pinned by the
QDSR reference repository and pass
--methods qdsr --qdsr-root /path/to/QDSR --seeds 11 --exact.
Use a separate environment with pysr==2.7.3 and pass
--methods pysr --seeds 11 --exact. PySR initializes Julia on its first
import. Reported timings exclude that import. Both reference
adapters save their intermediates under the chosen --workdir.
The raw records include the validation winners and their available evaluation counters. All 27 QDpy records matched a repeat run apart from elapsed time.
The 2019 study introduced the structural comparison and used CMA-ES for coefficients. QDSR added physical dimension constraints and least-squares fitting. Both reference projects have different search operators and budget accounting. 2019 study · QDSR paper · PySR paper