AI News Feed
Market watch
Products & Applications

Tree-Search-Driven Scientific Code Writes Universal Integrator in Hours

ScienceDiscovery, an open-source tool from the openJiuwen community, uses tree-search-driven self-improvement to write universal integrators, speed up code, and derive physical equations without model training.

The report says the tool addresses a common bottleneck in research: the first version of a program is rarely good enough, and most effort goes into dozens or hundreds of trial-and-error fixes. ScienceDiscovery turns that effort into an automated search tree. Each program version is a node; at every iteration the system selects a parent node, asks a model to rewrite it, runs the new version in a sandbox, scores it, and attaches it as a child. Unsuccessful runs are marked as failed nodes; scores decide which branch the next rewrite should explore.

In one test, the system was given 38 oscillatory integrals over a half-infinite interval. Directly calling scipy.integrate.quad scored −3.40: on 19 held-out problems, only 3 fell within a 3% error tolerance, and the worst was off by roughly 2.4 billion times. By the 119th version, ScienceDiscovery scored −0.0007, meaning all 19 validation integrals were computed correctly, with an average relative error of 0.07%. The final 247-line program, produced after two hours and 236 versions with no human intervention, applies generic rules that first detect divergence and oscillation, then selects an algorithm — so it also works on unseen problems.

The report also describes a related task: double-precision evaluation of the hypergeometric function ₂F₁. Using the baseline scipy.special.hyp2f1, about one-third of points had fewer than 10 significant digits under the test parameter distribution. A 199-line program generated after 48 extension steps and 598 seconds with GLM-5.2 improved the average correct digits to 11.771 from 9.836 on 1,000 unseen points; the number of points reaching 10 or more digits increased from 659 to 965. The program discovered a classical identity that switches z to 1/z when z is below −1, avoiding a region where the standard algorithm does not converge.

On AlgoTune, a benchmark of 154 real numerical tasks from NumPy, SciPy, NetworkX and CVXPy, the requirement was to produce identical results while maximizing speedup relative to a reference implementation. The report says ScienceDiscovery ran with one fixed configuration for two seeds and averaged 2.279× speedup, cutting runtime to less than half. By comparison, the official leaderboard's best was 1.837× from Claude Opus 4.6, and MetaEvolve — which trains a dedicated model with reinforcement learning — reached 2.045×. The system used a ready-made model with no extra training.

In a symbolic regression test from LLM-SRBench's LSR-Transform subset, only a table of 4,000 sampled rows and one target column was provided. Each node in the tree was a Python program returning an analytic expression. ScienceDiscovery wrote correct equations for 41.4% of 111 problems, including deriving the principal quantum number from Bohr energy levels and recovering temperature from a Planck distribution. Each problem consumed an average of 16.5 model calls, and using DeepSeek-V4-Flash the total cost was less than 3 yuan.

The report emphasizes that all models were used as-is, with no weight changes and no hints about target techniques in prompts. Existing methods required far more resources: MetaEvolve had to be trained with reinforcement learning, and the symbolic regression baseline LaSR relied on millions of genetic mutations. Model-call counts also differed sharply; symbolic regression here averaged 16.5 calls per problem versus roughly 250 for other methods reported.

The selection policy explains how the search balances depth and breadth. Instead of walking down from the root, the system compares all nodes on the tree at once. High-ranking branches are preferred, but each selection decays a node's weight, so attention shifts away after several consecutive edits. In the integral case, the final version's parent was node 116, itself derived from version 65 — an early branch with score −2.22 that had been surpassed. At that point, the optimal node 95 had been rewritten five times without improvement, so the budget moved to the older branch.

These searches run on ScienceDiscovery, an open-source AI research workbench from the openJiuwen community. The underlying platform fixes four slots: what to modify, which candidate to start from, how to run and score, and how to merge commits. Changing the search algorithm only swaps the scoring slot; the same infrastructure also supports concurrent workers, unlike Google's ERA reference implementation, which executes one expansion at a time.

The report notes that all three cases share a precondition: results can be scored mechanically — an integral is accurate or not, a runtime is measured, an equation matches or not — and each evaluation takes seconds. Many scientific tasks require much slower verification, such as synthesizing samples or running wind-tunnel experiments. In those fields, the limiting step is not generating ideas but waiting to know whether a candidate is good. Faster and more trustworthy validation, through simulation, proxy models or automated labs, would let more tasks be handed to self-improving search.