arXiv:2609.31368stat.MLSep 2026

Manuscript Offprint

arXiv:2609.31368

Equation discovery with Bayesian tree-adjoining grammars

Christopher A. Lindley, Nikolaos Dervilis, Keith Worden

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Tree-Adjoining Grammars (TAGs) have recently been introduced to Nonlinear System Identification (NLSI) as a means of encoding an entire model class as a finite set of grammatical rules, from which candidate models are assembled as trees. Existing TAG-based identifiers rely on evolutionary optimisation and return point estimates of the model structure. This paper instead proposes the TAG framework within a Bayesian setting. A generative prior is defined over tree structures and their parameters, and a Reversible-Jump MCMC sampler with structure-preserving tree moves is used to infer the joint posterior over model structure, parameters and predictions. Two training objectives are considered; that is, a one-step-ahead objective with conjugate parameter proposals, and a simulation-based objective handled by likelihood-free inference. The approach is validated on a simulated polynomial NARX system, the Silverbox benchmark, and wave-loading data from the Christchurch Bay Tower, where embedding Morison's equation as a fixed initial tree yields a grey-box model that outperforms the physics-driven baseline. The results demonstrate that Bayesian TAGs are well suited to quantifying uncertainty in equation discovery for dynamical systems and to fitting physics-informed models.

Keywords Nonlinear System Identification (NLSI) · Bayesian Inference · Tree-Adjoining Grammar (TAG) · Reversible-Jump MCMC · Grey-Box Models

1 Introduction

It is perhaps safe to argue that a primary goal in structural dynamics is to develop models from which predictions are consistent with past and future observations. The proof of this statement is evident in the vast and ever-growing literature surrounding this subject.

The question of interest here emerges from scrutinising what is meant by making “better” predictions. Concretely, model predictions can be said to be the result of a mathematical construct made to accurately represent a system of interest. Although this definition is given somewhat informally, it is enough to set the stage regarding the issue of model fidelity; that is, how well a model represents reality. What should be acknowledged about modelling is that the outcome is from an approximation of the system itself. The discrepancy between model and reality exists because several factors inherent to the system cannot be seamlessly incorporated into the corresponding model. More precisely, these factors tend to involve random effects or phenomena that are too complex to analyse and/or compute, and are often encompassed as noise in the predictions as a result. It then becomes clear that by minimising sources of noise one can improve the fidelity of a model and, therefore, yield better predictions.

However, in practice, the solution is not nearly as straightforward as the manner in which the problem has been posed. While several means to address the issue have been proposed in all areas of science and engineering, the concern in this work is narrowed down to structural system identification in the presence of nonlinearities. In a broader context, the term system identification is sometimes used to refer to the development of models from input and output measurements [1]. The presence of nonlinearities can further complicate identification, given that the principle of superposition does not generally apply to nonlinear systems [2]. This caveat asserts that the functional that maps the input to the output is not clearly defined, and one is required to detect and determine the type of nonlinearity before attempting to identify the system appropriately. Such an unknown could be considered, for example, a source of epistemic uncertainty that may hinder fidelity if identified incorrectly.

When the type of nonlinearity is known, the overall problem can then be broken down into two essential components: structure detection 1^{1}, and parameter estimation. If unknown, however, the type of nonlinearity may be assumed, but this must be done warily. From the point of view of statistics and machine learning, these components are constituents of the model selection problem, and since system identification is primarily a data-driven approach, both perspectives can be viewed equivalently regarding model development.

By posing the problem in a statistical framework, one gains access to the myriad of powerful methods associated with machine learning for structure detection and parameter estimation. While no one method stands out as all-encompassing, two prevalent groups of algorithms have emerged offering the prospect of a general framework; namely, Evolutionary Optimisation and Bayesian Inference. Within the group of algorithms about the former, a promising development in Nonlinear System Identification (NLSI) has been the introduction of Tree-Adjoining Grammars (TAGs) by Khandelwal, Schoukens and Toth [3]. Defined originally by Joshi et al. [4], TAGs are tree-generating systems that build grammatical representations via the composition of smaller elementary trees. The original work of Khandelwal et al. demonstrated that TAGs can be used in the same way to encode model classes as a set of grammatical rules. The promise of this approach for system identification was demonstrated with the development of an appropriate grammar for polynomial NARX (p-NARX) models and nonlinear state-space models, among others.

An attractive advantage of using TAGs is that they can unify many nonlinear model structures within a single framework. Moreover, the model class (or grammar) is separated from the numerical tools used for discovering system dynamics (or tree-structure representation), meaning that one is free to use any valid search algorithm as long as the rules defined by the grammar are obeyed. So far, the use of TAGs has only been explored with Evolutionary Algorithms (EA) to automatically determine the structure and complexity of a model from data. While the EA-based approach demonstrated promising capabilities, some limitations remained that a Bayesian-based approach could overcome. One such limitation of the original method was that it produced point estimates of the model structures. A Bayesian algorithm can instead fit distributions over models in terms of both parameters and tree structure, offering a more systematic framework for model selection.

The present work aims to explore the benefits of implementing Bayesian inference as a means of determining the best model for a given system with the use of TAGs. The probabilistic nature of Bayesian inference also offers the possibility to introduce prior beliefs about the tree structure, and to quantify uncertainty in the predictions.

The outline of this paper is the following. A background on TAGs and Bayesian methods is first covered in Section 2; the methodology employed is then detailed in Section 3, whereby the procedure and application of Bayesian TAGs for dynamical systems are presented. The new approach is demonstrated using the p-NARX grammar and validated on three problems in Section 4. The first case study considers an academic example aimed at determining whether the proposed method is capable of identifying a simulated nonlinear system. The second and third case studies involve experimental data; in particular, they look at the “Silverbox” nonlinear benchmark data and at wave-loading data from the Christchurch Bay Tower experiments. Finally, overall insights and suggestions are provided in Section 5.

References (29)