Artificial Intelligence1 min read

Keplearn: Extract Equations from Data in Seconds

By · Published by Everything Blog

In short

Named after Johannes Kepler, the tool ingests CSV or TSV files from standard input and identifies compact algebraic relationships linking features to a target measurement. It utilizes best-first recursive reduction with invertible transformations like logarithms and arcsine functions to isolate underlying patterns. Candidate laws are output as JSON alongside r-squared values, with fitted constants automatically rounding to rational numbers or known mathematical constants. Evaluations in the standard SRBench suite demonstrate strong ground-truth recovery speeds across both the Feynman and Strogatz benchmark suites.

Key points

  • The system delivers exact algebraic relationships in seconds or milliseconds directly fro…: The system delivers exact algebraic relationships in seconds or milliseconds directly from standard input tabular data.
  • Built-in verification against holdout datasets ensures simplified mathematical constants…: Built-in verification against holdout datasets ensures simplified mathematical constants maintain statistical validity.
  • Robust performance is maintained under low-noise settings, recovering 56% of Feynman equa…: Robust performance is maintained under low-noise settings, recovering 56% of Feynman equations and 42.9% of Strogatz problems at 0.001 noise.

Sources checked by our analysis pipeline: 1

Symbolic regression in seconds.

Keplearn is named after Johannes Kepler, who deduced his laws of planetary motion by studying tables of astronomical observations taken by Tycho Brahe. That is what this program attempts to do: given columns of measurements, find the compact law that relates them.

m1 | m2 | r | force

------+-------+------+-------

1.0 | 2.0 | 1.0 | 2.00

2.0 | 2.0 | 2.0 | 1.00 ┌──────────┐

1.5 | 3.0 | 3.0 | 0.50 ──► │ keplearn │ ──► force = m1 * m2 / r**2

2.5 | 1.0 | 0.5 | 10.00 └──────────┘

3.0 | 4.0 | 2.0 | 3.00

More formally, it's a deterministic symbolic regression engine (written in Rust) that recovers closed-form equations from tabular data by best-first recursive reduction.

- Reads a TSV or CSV from stdin, prints candidate equations as JSON

- Single binary, zero dependencies (fully static with the musl target)

- Designed to answer in seconds: exact laws usually resolve in

milliseconds, and

--timeout

caps the hard cases - Deterministic; the same input produces the same output, byte for byte

-…

Artificial Intelligence