A lightweight benchmark suite to test symbolic distillation with SymTorch + PySR on:
x²sin(x)(noisy)x·exp(-x²)- Normal PDF
- Black-Scholes call pricing (2D input)
x·y(2D interaction)
- Trains small MLPs on known target functions.
- Distills trained models into symbolic equations with SymTorch/PySR.
- Reports both neural-network and symbolic metrics.
- Writes a Markdown report for each run.
- Python 3.11 recommended
- Julia (PySR may install/configure it automatically on first run)
Install packages:
pip install -r requirements.txtQuick mode (faster iteration):
python symtorch_benchmark.py --quick --report quick_benchmark_report.mdFull mode:
python symtorch_benchmark.py --report benchmark_report.mdIf --report is omitted, an auto-named report is generated in the project root.
- Markdown summary report in project root (e.g.
quick_benchmark_report.md) - PySR artifacts in
SR_output/
- Quick mode reduces samples/epochs/iterations, while keeping learning meaningful.
- Training uses
ReduceLROnPlateauand early stopping. - Symbolic metrics are computed from symbolic model predictions (not placeholders).
symtorch_benchmark.py— benchmark runnerrequirements.txt— Python dependenciessymtorch_benchmark_guide.md— benchmark design notesquick_benchmark_report_v2.md— latest example report