SYMBOLIC PHYSICS LEARNER: DISCOVERING GOV-ERNING EQUATIONS VIA MONTE CARLO TREE SEARCH

Abstract

Nonlinear dynamics is ubiquitous in nature and commonly seen in various science and engineering disciplines. Distilling analytical expressions that govern nonlinear dynamics from limited data remains vital but challenging. To tackle this fundamental issue, we propose a novel Symbolic Physics Learner (SPL) machine to discover the mathematical structure of nonlinear dynamics. The key concept is to interpret mathematical operations and system state variables by computational rules and symbols, establish symbolic reasoning of mathematical formulas via expression trees, and employ a Monte Carlo tree search (MCTS) agent to explore optimal expression trees based on measurement data. The MCTS agent obtains an optimistic selection policy through the traversal of expression trees, featuring the one that maps to the arithmetic expression of underlying physics. Salient features of the proposed framework include search flexibility and enforcement of parsimony for discovered equations. The efficacy and superiority of the SPL machine are demonstrated by numerical examples, compared with state-of-the-art baselines.

1. INTRODUCTION

We usually learn the behavior of a nonlinear dynamical system through its nonlinear governing differential equations. These equations can be formulated as ẏ(t) = dy/dt = F(y(t)), where y(t) = {y 1 (t), y 2 (t), ..., y n (t)} ∈ R 1×ns denotes the system state at time t, F(•) a nonlinear function set defining the state motions and n s the system dimension. The explicit form of F(•) for some nonlinear dynamics remains underexplored. For example, in a mounted double pendulum system, the mathematical description of the underlying physics might be unclear due to unknown viscous and frictional damping forms. These uncertainties yield critical demands for the discovery of nonlinear dynamics given observational data. Nevertheless, distilling the analytical form of governing equations from limited noisy data, commonly seen in practice, is an intractable challenge. Ever since the early work on the data-driven discovery of nonlinear dynamics (Džeroski & Todorovski, 1993; Dzeroski & Todorovski, 1995) , many scientists have stepped into this field of study. During the recent decade, the escalating advances in machine learning, data science, and computing power have enabled several milestone efforts of unearthing the governing equations for nonlinear dynamical systems. Notably, a breakthrough model named SINDy (Sparse Identification of Nonlinear Dynamics) (Brunton et al., 2016) has shed light on tackling this achallenge. SINDy was invented to determine the sparse solution among a pre-defined basis function library recursively through a sequential threshold ridge regression (STRidge) algorithm. SINDy quickly became one of the state-of-art methods and kindled significant enthusiasm in this field of study (Rudy et al., 2017; Long et al., 2018; Champion et al., 2019; Chen et al., 2021; Sun et al., 2021; Rao et al., 2022) . However, the success of this sparsity-promoting approach relies on a properly defined candidate function library that requires good prior knowledge of the system. It is also restricted by the fact that a linear combination of candidate functions might be insufficient to recover complicated mathematical expressions. Moreover, when the library size is massive, it empirically fails to hold the sparsity constraint. operators (Martius & Lampert, 2017; Sahoo et al., 2018; Kim et al., 2019; Long et al., 2019) . The intricate formulas are obtained via symbolic expansion of the well-trained network. This interpretation of physical laws results in larger candidate pools compared with the library-based representation of physics employed by SINDy. Nevertheless, since the sparsity of discovered expressions is primarily achieved by empirical pruning of the network weights, this framework exhibits sensitivity to userdefined thresholds and may fall short to produce parsimonious equations for noisy and scarce data. Alternatively, another inspiring work (Bongard & Lipson, 2007; Schmidt & Lipson, 2009) reenvisioned the data-driven nonlinear dynamics discovery tasks by casting them into symbolic regression problems which have been profoundly resolved by the genetic programming (GP) approach (Koza & Koza, 1992; Billard & Diday, 2003) . Under this framework, a symbolic regressor is established to identify the governing equations that best describe the underlying physics through free combination of mathematical operators and symbols, leading to great flexibility in model selection. One essential weakness of this early methodology is that, driven exclusively by the goal of empirically seeking the best-fitting expression (e.g. minimizing the mean-square error) in a genetic expansion process, the GP-based model usually over-fits the target system with numerous false-positive terms under data noise, even sometimes at a subtle level, causing huge instability and uncertainty. However, this ingenious idea has inspired a series of subsequent endeavors (Cornforth & Lipson, 2012; Gaucel et al., 2014; Ly & Lipson, 2012; Quade et al., 2016; Vaddireddy et al., 2020) . In a more recent work, Deep Symbolic Regression (DSR) (Petersen et al., 2021; Mundhenk et al., 2021) , a reinforcement learning-based model was established and generally outperformed the GP based models including the commercial Eureqa software (Langdon & Gustafson, 2010) . Additionally, the AI-Feynman methods (Udrescu & Tegmark, 2020; Udrescu et al., 2020; Udrescu & Tegmark, 2021) ameliorated symbolic regression for distilling physics laws from data by combining neural network fitting with a suite of physics-inspired techniques. This approach is also highlighted by a recursive decomposition of a complicated mathematical expression into different parts on a tree-based graph, which disentangles the original problem and speeds up the discovery. It outperformed Eureqa in the uncovering Feynman physics equations (Feynman et al., 1965) . However, this approach is built upon ad-hoc steps and, to some extent, lacks flexible automation in equation discovery. The popularity of adopting the tree-based symbolic reasoning of mathematical formulas (Lample & Charton, 2019) has been rising recently to discover unknown mathematical expressions with a reinforcement learning agent (Kubalík et al., 2019; Petersen et al., 2021; Mundhenk et al., 2021) . However, some former work attempting to apply the Monte Carlo tree search (MCTS) algorithm as an alternative to GP for symbolic regression (Cazenave, 2013; White et al., 2015; Islam et al., 2018; Lu et al., 2021) failed to leverage the full flexibility of this algorithm, resulting in the similar shortage that GP-based symbolic regressors possess as discussed earlier. Despite these outcomes, we are conscious of the strengths of the MCTS algorithm in equation discovery: it enables the flexible representation of search space with customized computational grammars to guide the search tree expansion. A sound mathematical underpinning for the trade-off between exploration and exploitation is remarkably advantageous as well. These features make it possible to inform the MCTS agent by our prior physics knowledge in nonlinear dynamics discovery rather than randomly searching in large spaces. Contribution. We propose a promising model named Symbolic Physics Learner (SPL) machine, empowered by MCTS, for discovery of nonlinear dynamics. This architecture relies on a grammar composed of (i) computational rules and symbols to guide the search tree spanning and (ii) a composite objective rewarding function to simultaneously evaluate the generated equations with observational data and enforce the sparsity of the expression. Moreover, we design multiple adjustments to the conventional MCTS by: (1) replacing the expected reward in UCT score with maximum reward to better fit the equation discovery objective, (2) employing an adaptive scaling in policy evaluation which would eliminate the uncertainty of the reward value range owing to the unknown error of the system state derivatives, and (3) transplanting modules with high returns to the subsequent search as a single leaf node. With these adjustments, the SPL machine is capable of efficiently uncovering the best path to formulate the complex governing equations of the target dynamical system.

