Scientists are increasingly exploring the potential of large language models to automate the discovery of fundamental equations that describe physical phenomena. Jianke Yang, Ohm Venkatachalam, Mohammad Kianezhad, Sharvaree Vadgama, and Rose Yu, all from the University of California, San Diego, present a novel agentic framework called KeplerAgent that mimics the multi-step reasoning process employed by scientists. This research details how the agent leverages tools to infer key properties and then uses these insights to refine symbolic regression engines like PySINDy and PySR. By explicitly modelling scientific reasoning, KeplerAgent demonstrates significantly improved accuracy and robustness in equation discovery benchmarks when compared with existing large language models and traditional methods, representing a substantial step towards automated scientific theory generation.
This innovative system moves beyond simply guessing equations from data, instead explicitly modelling the multi-step approach of inferring underlying physical properties and using these as constraints to narrow the search for candidate solutions. KeplerAgent combines the broad knowledge and reasoning capabilities of large language models with physics-based tools to extract structural information from data, effectively configuring symbolic regression engines like PySINDy and PySR. Across a range of equation benchmarks, this agentic framework demonstrates substantially improved accuracy and resilience to noisy data compared to both conventional methods and existing large language model approaches. Traditional symbolic regression methods, while powerful, require significant manual configuration by experts to define the search space for potential equations. These experts must carefully select function libraries, sparsity thresholds, and other parameters, a process demanding deep domain knowledge and iterative refinement. KeplerAgent automates much of this configuration, leveraging an LLM to coordinate tools that identify symmetries, dimensional constraints, and other structural properties within the data. By explicitly modelling the intermediate reasoning steps of a scientist, KeplerAgent can explore the space of possible equations more efficiently and effectively. The system’s ability to incorporate prior knowledge and physics-based tools allows it to tackle complex systems governed by coupled ordinary differential equations and partial differential equations, where physical structure plays a crucial role in reducing the search space. Evaluations across diverse benchmarks, including algebraic equations and dynamical systems, reveal that KeplerAgent consistently recovers ground-truth equations with greater frequency and produces models with improved predictive accuracy. This suggests that the framework not only discovers correct equations but also generates solutions that better generalise to unseen data and accurately represent the underlying physical processes. KeplerAgent initiates its methodology with a Large Language Model acting as an orchestrator of physics-based tools, mirroring the iterative reasoning process employed by scientists. Rather than directly predicting equations from data, the system first infers structural properties such as symmetries and conserved quantities. The LLM agent coordinates calls to specialised tools designed to extract these intermediate structural insights from observational data, specifically leveraging tools to estimate candidate symmetries and identify relevant functional terms and mathematical operators. These extracted findings are then translated into concrete configuration decisions for symbolic regression engines, including both PySINDy and PySR. Configuration encompasses defining the function libraries, specifying polynomial degree and inclusion of rational or transcendental functions, and setting sparsity regularisation thresholds. This careful configuration narrows the hypothesis space, preventing overly restrictive or excessively broad searches that plague traditional algorithmic symbolic regression. By interleaving tool calls, the agent progressively refines its understanding of the system, particularly beneficial when dealing with complex systems possessing intractably large initial search spaces. Across a suite of equation benchmarks, KeplerAgent consistently achieved substantially higher symbolic accuracy than both Large Language Model and traditional baselines. Specifically, the research demonstrated successful recovery of governing equations in 89.7% of test cases, a significant improvement over existing methods. The agent accurately identified the functional form of equations with an average R-squared value of 0.992, indicating a strong fit to the underlying data. Detailed analysis revealed that KeplerAgent correctly inferred the coefficients within these equations to a precision of at least two decimal places in 95.3% of instances. The study showcased KeplerAgent’s ability to discern complex relationships, exemplified by the accurate reconstruction of a system described by the equations ut = 1.000v3 + 0.095uxx and vt = 1.000v + 0.096vyy. Furthermore, the framework successfully recovered equations involving trigonometric functions, such as x1 = −0.052×2 1 −0.997 sin(x2), demonstrating its capacity to handle non-linear relationships. In cases involving dimensional analysis, KeplerAgent correctly identified the scaling relationships between variables, establishing v = c × 1.0 −m2 0 /m2. Robustness to noisy data was also a key achievement, with KeplerAgent maintaining an average symbolic accuracy of 82.1% even when data was perturbed by up to 10% noise. This contrasts sharply with baseline methods, which experienced a substantial drop in performance under similar conditions. The agent’s performance on coupled partial differential equations highlights its ability to handle systems with intricate spatial and temporal dependencies. The longstanding challenge of automatically discovering the underlying equations governing observed phenomena has edged closer to resolution. For decades, this task demanded painstaking human effort, relying on intuition and trial-and-error to tease out relationships from data. KeplerAgent demonstrates a crucial shift; it doesn’t just guess equations, it mimics the reasoning process of a scientist, first identifying guiding principles like symmetries before narrowing the search space. This is a move away from brute-force computation towards genuinely intelligent equation solving. KeplerAgent’s strength lies in its orchestration of existing tools, effectively acting as a conductor for symbolic regression engines. This approach sidesteps the need for entirely new algorithms, instead leveraging established methods with a layer of intelligent control. The implications are significant, potentially accelerating discovery in fields ranging from physics and chemistry to climate modelling and epidemiology, where identifying governing equations is paramount. However, the system isn’t without limitations. The current iteration still struggles with noisy data and exhibits repetitive behaviour, failing to learn effectively from unsuccessful attempts. Future development will likely focus on refining the agent’s reasoning capabilities, enabling it to better assess data quality and dynamically adjust its toolkit. More broadly, this work signals a growing trend towards agentic AI systems that don’t just perform tasks, but think about how to perform them. The next step isn’t simply building more powerful LLMs, but creating systems that can intelligently combine diverse tools and adapt their strategies based on experience, mirroring the hallmarks of human scientific inquiry.
👉 More information
🗞 Think like a Scientist: Physics-guided LLM Agent for Equation Discovery
🧠 ArXiv: https://arxiv.org/abs/2602.12259
