Skip to content
equation discovery · symbolic regression

KD A platform for Knowledge Discovery

KD is a plug-in platform for equation discovery. It gives different discovery algorithms a consistent, easy-to-use interface and provides shared services such as visualization, evaluation, and experiment management, while leaving each algorithm free to implement its own search procedure.

SGA-PDE · kdv · seed 42 generation 200 / 200 · nmse 2.70e-06 · AIC -19.42
Heatmap of the kdv field u over x and t
\(u_t =\)\(-u\,u_x\)\(-0.0025\,u_{xxx}\)
An SGA-PDE run on the KdV dataset, showing the field it was given and the equation it returned.

Quick start

Install KD and run your first equation-discovery experiment in a few lines of Python. The example below uses a Burgers dataset bundled with KD. Follow Installation for Python environment setup, then activate the environment before running the code below.

1  install
python -m pip install sail-kd
uv venv
uv pip install sail-kd --torch-backend=auto
2  fit
import kd
# a 256 × 201 (x, t) field; for your own arrays, PDEDataset.from_arrays
data = kd.load_burgers()

model = kd.Model(algorithm="sga", generations=5, seed=0)
model.fit(data)
5 generations · AIC -28.78
\(u_t =\)\(-u\,u_x\)\(+0.1002\,u_{xx}\)

Experimental controller

After installing the agent extra and configuring an endpoint:

kd-agent run --data sample.npz "Find the equation governing this data."

This experimental controller uses a language model to select and run KD algorithms, inspect their results and write a search report. See the agent example for file and bundled-dataset commands, or the controller guide for configuration and interactive use.

Examples

Algorithms

KD currently provides seven equation-discovery algorithms through a common interface.

Design