Skip to main content

srbf

Symbolic Regression Benchmark Framework

PyPI · Docs · Interactive results

srbf: Symbolic Regression Benchmark Framework

Publications

srbf visual abstract: benchmarks and methods go through one fair protocol (same expressions, wall-clock budgets, paired statistics, pre-declared corrected comparisons) into the interactive explorer with four-state verdicts.

srbf evaluates symbolic-regression models on shared benchmarks with shared metrics. It is the Symbolic Regression Benchmark Framework carved out of flash-ansr: the Benchmark driver, model adapters, and metrics, over symbolic-data catalogs. It depends one-way on flash-ansr (srbf imports flash-ansr; flash-ansr never imports srbf).

Built for contributions. Developers of SR methods add their model with an adapter that runs in the method's own environment (any torch, simplipy or Julia version): srbf new mymethod writes the worker, its suite config, an environment recipe and a test; srbf check runs it on real problems; srbf run and srbf analyze give the numbers. The pull request carries those files. Methods compatible with srbf's pins can instead register an in-process adapter class. The built-in adapters (flash_ansr, pysr, nesymres, e2e, lample_charton, brute_force) are reference examples, not a closed set. See the adapter contribution guide and CONTRIBUTING.md.

The benchmark seam (srbf.core Protocols + the Benchmark driver) is model-agnostic, the data source is always a symbolic-data catalog, and adapters are a thin mapper over each model (flash-ansr via FlashANSR.infer()). Inline !sweep config cross-products and multi-draw bootstrap reporting (bootstrap_report / draw_distribution) are built in.

Install

pip install srbf                 # benchmark driver + metrics + the flash-ansr adapter (usable out of the box)
pip install "srbf[baselines]"    # + PySR and other pip baseline deps (sympy, pysr, omegaconf)

srbf pulls in flash-ansr, symbolic-data, and simplipy automatically, and requires Python >= 3.12. The PySR adapter ships in the base wheel but the pysr package (plus a Julia precompile) comes with the [baselines] extra, so a bare install does not include a runnable PySR baseline. The unpackaged research baselines (NeSymReS, E2E) are provisioned out-of-band; see docs/models.md.

Quickstart

# 1. point srbf at a tree holding configs/, data/, and models/ (your srbf checkout works)
export FLASH_ANSR_ROOT=$(pwd)

# 2. get a model to evaluate (flash-ansr's CLI ships with srbf)
flash_ansr install psaegert/flash-ansr-v25.0-T7-3M

# 3. run an evaluation. The config names a symbolic-data catalog (`fastsrb`); it is fetched from
#    Hugging Face on first use and cached, so there is no local data-build step. The config is a
#    sweep over candidate counts; --sweep-filter picks one rung for a smoke test.
srbf run -c configs/evaluation/scaling/flash-ansr-v25.0-T7-3M_fastsrb.yaml --sweep-filter ladder=32 --limit 50 -v

Outputs land under results/evaluation/.../*.pkl, one row per evaluated problem with the raw prediction columns (derive FVU / recovery / F1 in a separate step; see docs/running.md). Run programmatically instead:

from srbf import Benchmark

# A config with inline !sweep / experiments expands to several runs; expand and run each one.
for benchmark in Benchmark.runs_from_config("configs/evaluation/scaling/flash-ansr-v25.0-T7-3M_fastsrb.yaml"):
    benchmark.run()  # resume-aware; a no-op if that run's configured target is already reached

# For a single, fully-resolved run (no !sweep / experiments), use from_config directly:
# Benchmark.from_config(config_dict).run()

Documentation

Guide What it covers
Running evaluations the srbf run CLI, config anatomy (data_source / model_adapter / runner / experiments / !sweep), outputs, resume, reporting
Benchmarks & datasets the data_source catalog block, the shipped catalog (fastsrb), custom catalogs
Models & provisioning installing/patching the built-in models; the model_adapter block per type
Fairness & provenance one protocol for every method, the upstream-defaults policy, config-provenance labels, blessed configs
Adding your model the adapter protocol + registry, and the PR flow to contribute a new SR method

Development

pip install -e ".[dev]"
pre-commit run --all-files
pytest tests

License

MIT (see LICENSE). Third-party attributions in THIRD_PARTY_LICENSES.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

srbf-0.15.0.tar.gz (148.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

srbf-0.15.0-py3-none-any.whl (155.3 kB view details)

Uploaded Python 3

File details

Details for the file srbf-0.15.0.tar.gz.

File metadata

  • Download URL: srbf-0.15.0.tar.gz
  • Upload date:
  • Size: 148.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for srbf-0.15.0.tar.gz
Algorithm Hash digest
SHA256 9d9842cdf76a25ef415aeface564df1ea2ca42cbd9c5ed2fab01d7cebb234e76
MD5 d9ef7cdf997284e1d810949afd378f18
BLAKE2b-256 b8c117d1da28cf6726f339d50b5d5f7c1ce417b768a2de6aabe657d3689c4a9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for srbf-0.15.0.tar.gz:

Publisher: publish.yaml on psaegert/srbf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file srbf-0.15.0-py3-none-any.whl.

File metadata

  • Download URL: srbf-0.15.0-py3-none-any.whl
  • Upload date:
  • Size: 155.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for srbf-0.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 017e6ba5df3d7f63504464b8c768e8037d399a4ad1166bddb6187ccf8aeb3edd
MD5 73096eec18e6357d3c2c4f4b04af6a68
BLAKE2b-256 53f598842dd1e3036b3de4a00d4ee0a5d326ffcbb989f2f27d0fa4d2dbcb6590

See more details on using hashes here.

Provenance

The following attestation bundles were made for srbf-0.15.0-py3-none-any.whl:

Publisher: publish.yaml on psaegert/srbf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.18.0

2 files

0.17.0

2 files

0.16.1

2 files

0.16.0

2 files

0.15.1

2 files

This release

0.15.0 This release

2 files

0.14.0

2 files

0.13.0

2 files

0.12.0

2 files

0.11.1

2 files

0.11.0

2 files

0.10.1

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page