betaFeedback

WorksComputer Science

Exhaustive Canonical Skeletons Generation: A Formal Dataset for Decomposable Symbolic Regression

Abstract

Neural symbolic regression (SR) models require diverse datasets of mathematical expressions for robust training. However, existing datasets rely predominantly on stochastic sampling methods, which suffer from high structural redundancy and incomplete functional coverage. To address this, we introduce an exhaustive dataset of univariate canonical skeletons generated via a deterministic constrained context-free grammar. A canonical skeleton acts as a generic structural representation that subsumes more specific functional forms, eliminating redundant expressions and avoiding repeated computational efforts. Although our dataset consists of univariate skeletons, it is designed to support the decomposable SR paradigm to solve multivariate SR problems without assuming linear separability. Furthermore, we pair this dataset with a sampling strategy that generates clean numerical data without triggering numerical instabilities or relying on artificial protected operators. Canonicalizing two existing neural SR datasets reveals that our dataset is substantially more compact, eliminates structural repetitions, and achieves a uniform operator distribution free of simplicity bias. Finally, we establish a benchmark of 150 SR problems across three tiers, on which state-of-the-art SR methods are shown to struggle significantly.

Introduction

Symbolic regression (SR) aims to uncover explicit, human-interpretable mathematical expressions that describe underlying patterns in numerical data. In recent years, neural SR models (i.e., deep generative models and Transformers) [1, 2, 3, 4] have made significant advances by framing equation discovery as a sequence-to-sequence translation task. However, the generalization capability of neural SR models is tied to the quality, diversity, and structural validity of their training datasets.

To construct these datasets, existing approaches rely on stochastic sampling, templates, or heuristics [1, 2, 3, 5, 6, 7] (see Supplementary Materials (S.M.) A for a review). While these methods allow the generation of large datasets, they remain probabilistic explorations of an exponentially growing search space. Thus, they suffer from severe structural redundancy: distinct derivation paths frequently collapse into functionally identical expressions after simplification (e.g., x⋅1x \cdot1 vs. x+0x+0), over-exposing models to a narrow subset of simple forms. Even when constrained by templates [2], sampling weights [6], or probabilistic grammars [7], these pipelines rely on handcrafted heuristics and fail to guarantee exhaustive and non-redundant coverage of valid functional structures.

To overcome these limitations, our first contribution is an Exhaustive dataset of Canonical Univariate Skeletons (ExCaUS), coupled with a principled sampling strategy. A symbolic skeleton replaces specific numeric parameters with constant placeholders. We extend this concept by defining a canonical skeleton as a generic structural representation that subsumes more specific instantiated representations. By formalizing explicit closure rules, canonical skeletons eliminate functional collisions and prevent repeated generation efforts.

While our dataset consists of univariate skeletons, its utility is not restricted to univariate SR problems. Instead, it is designed to serve as the foundation for training SR models under a decomposable SR paradigm [4]. As detailed in Sec. II, complex multivariate systems can be solved by first identifying the isolated functional relationship between individual variables and the system’s response in the form of univariate skeletons. These skeletons are then merged into multivariate expressions through progressive structural composition.

To construct our dataset, we establish a formal recursive structural decomposition mapped directly to a Context-Free Grammar (CFG). Unlike stochastic generation methods, our grammar-based approach provides a deterministic framework for exhaustive enumeration. Furthermore, we pair this dataset with a robust data sampling strategy designed to generate clean numerical data without triggering numerical instabilities or relying on protected operators. To validate our approach, we compared our canonical dataset against two existing datasets used by previous neural SR methods, which we canonicalized to ensure a fair evaluation. The comparison reveals that the baseline approaches present severe skewness and redundancy, while our dataset is substantially more compact and entirely free of structural duplicates. Additionally, it displays a more uniform distribution of unary operators, successfully avoiding the common bias toward overly simplistic functional forms.

Our second contribution is a rigorous SR benchmark, ExCaUS-Bench. We generated 150 problems, split into three tiers, to evaluate a suite of SR methods. Exhaustive tuning and testing show that most SR methods struggle significantly to recover the underlying functions in these problems. Unlike standard benchmarks that evaluate models over narrow intervals, our benchmark utilizes extended domain ranges, substantially increasing the difficulty of the regression.

Dataset Definition

In this section, we define the principles for constructing the dataset of symbolic skeletons. Let U\mathcal{U} and B\mathcal{B} denote the finite set of unary (e.g., sin⁡\sin and log⁡\log) and binary operators (e.g., +,−,×,÷+,-,\times,\div), respectively. Thus, a mathematical expression f(x)f(\mathbf{x}) is represented as a rooted tree with nodes ∈{U,B}\in\{\mathcal{U},\mathcal{B}\}, where x=[x1,…,xn]\mathbf{x}=[x_1,\ldots,x_n] is a multivariate input vector.

A symbolic skeleton expression is an abstract representation of a function f(x)f(\mathbf{x}) that captures the functional form between a variable, or set of variables, and the system’s response using constant placeholders cic_i that may represent numeric constants or functions of other variables. It is obtained using the skeleton function κ(⋅)\kappa(\cdot). In general, we employ it as κ(f(x);xS)\kappa(f(\mathbf{x});\mathbf{x}_S), where xS\mathbf{x}_S is a subset of variables and S⊆{1,…,n}S \subseteq\{1,\ldots,n\} is an index set. Thus, xS\mathbf{x}_S represents the set of variables with respect to which the skeleton is expressed. In particular, κ(f(x);x)=κ(f(x))\kappa(f(\mathbf{x});\mathbf{x})=\kappa(f(\mathbf{x})). For example, f(x)=2sin⁡(x110x2+π2)2+10f(\mathbf{x})=2\sin\left(\frac{x_1}{10x_2}+\frac{\pi}{2}\right)^2+10; then κ(f(x),x1)=c1sin⁡(c2x1+c3)2+c4\kappa(f(\mathbf{x}),x_1)=c_1\sin(c_2x_1+c_3)^2+c_4, κ(f(x),x2)=c5sin⁡(c6x2+c7)2+c8\kappa(f(\mathbf{x}),x_2)=c_5\sin\left(\frac{c_6}{x_2}+c_7\right)^2+c_8, and κ(f(x))=c9sin⁡(c10x2+c11)2+c12\kappa(f(\mathbf{x}))=c_9\sin\left(\frac{c_{10}}{x_2}+c_{11}\right)^2+c_{12}.

From now on, we focus on univariate symbolic skeletons. Although our dataset consists of univariate skeletons, its intended use is not restricted to univariate SR, nor does it assume linear separability. Following the decomposable SR paradigm of Morales and Sheppard [4], univariate skeletons are viewed as structural components that capture the functional relationship between a variable and the system response.

Suppose that f(x)=x1x2tanh⁡(2x12+x22)f(\mathbf{x})=\frac{x_1}{x_2}\tanh\left(\sqrt{2x_1^2+x_2^2}\right) and that the individual variable-response relationship analysis yields e(x1)=c1x1tanh⁡(c2∣x1∣+c3)e(x_1)=c_1x_1\tanh(c_2|x_1|+c_3) and e(x2)=c4x2tanh⁡(c5∣x2∣+c6)e(x_2)=\frac{c_4}{x_2}\tanh(c_5|x_2|+c_6). These skeletons do not describe the complete system independently; rather, they identify structural patterns that are consistent with the underlying system. The arguments c2∣x1∣+c3c_2|x_1|+c_3 and c5∣x2∣+c6c_5|x_2|+c_6 can be viewed as special cases of cx12+c8\sqrt{cx_1^2+c_8} and cx22+c10\sqrt{cx_2^2+c_{10}}, respectively. The subsequent task is thus to discover a multivariate composition that preserves the identified univariate structures while jointly fitting the entire dataset. As shown in [4], this can be achieved through a progressive merging process in which univariate skeletons are combined into increasingly expressive multivariate skeletons until a suitable representation of the whole system is obtained.

Let F\mathcal{F} be the set of all admissible univariate expressions f(x)f(x) constructed from U\mathcal{U} and B\mathcal{B}. Then, Sskel\mathcal{S}_{skel} denotes the set of all skeleton expressions (i.e., expression trees whose leaves are “xx” or “cic_i”) s.t. Sskel={κ(f(x)):f∈F}\mathcal{S}_{skel}=\{\kappa(f(x)):f\in\mathcal{F}\}. An instantiation of a skeleton s∈Sskels\in\mathcal{S}_{skel} is defined by a vector α=[α1,…,αk]∈Rk\boldsymbol{\alpha}=[\alpha_1,\ldots,\alpha_k]\in\mathbb{R}^k, where kk is the number of placeholders in ss. The instantiated expression is denoted s[α]s[\boldsymbol{\alpha}].

Definition 1 (Subsumption). For s1,s2∈Sskels_1,s_2\in\mathcal{S}_{skel}, we say s1s_1 subsumes s2s_2, s1⪰s2s_1\succeq s_2, if, for any instantiation β\boldsymbol{\beta}, ∃α\exists\boldsymbol{\alpha} s.t. s1[α]≡s2[β]s_1[\boldsymbol{\alpha}]\equiv s_2[\boldsymbol{\beta}]. Here, ≡\equiv represents equivalence between identically equal functions on an open interval containing 0.

For instance, consider the skeletons s1=c1x2+c2x+c3s_1=c_1x^2+c_2x+c_3 and s2=c4x2s_2=c_4x^2. Then, s1⪰s2s_1\succeq s_2, as s1[[β,0,0]]≡s2[[β]]s_1[[\beta,0,0]]\equiv s_2[[\beta]]. For the sake of brevity, from now on, skeletons may be expressed using unnumbered placeholders cc (e.g., s1=cx2+cx+cs_1=cx^2+cx+c). However, each cc is considered as an independent placeholder.

Definition 2 (Canonical atoms). We define the canonical atoms C:=cC:=c (constant), L:=cx+cL:=cx+c (linear), and P:=Pm(x)P:=P_m(x) (polynomial). Here, mm is a placeholder index, and every polynomial of finite degree belongs to the family PP.

Definition 3 (Canonical equivalence). We define the following equivalence and closure rules between canonical atoms:

  • Constant: C+c∼CC+c\sim C, C⋅c∼CC\cdot c\sim C, U(C)∼C\mathcal{U}(C)\sim C and C∈UC\in\mathcal{U}.

  • Linear: x+C∼Lx+C\sim L, x⋅C∼Lx\cdot C\sim L, L+C∼LL+C\sim L, L⋅C∼LL\cdot C\sim L, L+x∼LL+x\sim L.

  • Polynomial: L⋅x∼PL\cdot x\sim P, P+C∼PP+C\sim P, P⋅C∼PP\cdot C\sim P, P+x∼PP+x\sim P, P⋅x∼PP\cdot x\sim P, L⋅L∼PL\cdot L\sim P, P+L∼PP+L\sim P, L⋅L∼PL\cdot L\sim P, P+L∼PP+L\sim P.

Proposition 1 (Recursive Structural Decomposition). Let f(x)f(x) be defined by a finite composition of unary and binary (+(+ and ×)\times) operators. Then, f(x)f(x) obeys: f(x)=v0+∑ivi∏jvij(vij(x))f(x)=v_0+\sum_i v_i\prod_j v_{ij}(v_{ij}(x)), where v0,vi∈Rv_0,v_i\in\mathbb{R}, vij∈U∪{I}v_{ij}\in\mathcal{U}\cup\{I\}, and vij(x)v_{ij}(x) are subexpressions that admit the same decomposition recursively until reaching variables or constants.

Proposition 1 was proved by Morales and Sheppard [4]. Although the structure is defined using B={+,×}\mathcal{B}=\{+,\times\}, expressions involving other binary operations, such as subtraction or division, are subsumed by this decomposition including appropriate unary operators, such as negation and inversion. In S.M. C, we show that certain functions that may not mirror this form, such as piecewise-defined functions, can be represented using operations acting upon functional blocks that are individually expressible through this structural decomposition.

In addition, the power operator is treated as a unary operator, with the exponent regarded as a parameter external to the skeleton. That is, Pow⁡(f(x))\operatorname{Pow}(f(x)) denotes the family {f(x)h:h∈Q}\{f(x)^h:h\in\mathbb{Q}\}, while the specific instantiated form is obtained in Sec. IV by sampling hh. Note that exponents outside Q\mathbb{Q} can be represented through compositions of exp⁡\exp and log⁡\log. This choice constrains the expression space by excluding exponents that depend on xx, thereby avoiding a broader class of expressions that is not considered in this study. This restriction is consistent with the standard power-law parametrization used in scientific modeling settings, where the exponent is typically constant [8]. However, variable-exponent formulations do exist in more general mathematical settings outside our scope.

References

  1. [1]L. Biggio, T. Bendinelli, A. Neitz, A. Lucchi, and G. Parascondalo, “Neural symbolic regression that scales,” in Int. Conf. on Machine Learning, vol. 139, 2021, pp. 936–945.arxiv.org/abs/2106.06427
  2. [2]M. Valipour, B. You, M. Panju, and A. Ghodsi, “SymbolicGPT: A generative transformer model for symbolic regression,” in Adv. Neural Inf. Process. Syst., 2022.arxiv.org/abs/2106.14131
  3. [3]P.-A. Kamienny, S. d’Ascoli, G. Lample, and F. Charton, “End-to-end symbolic regression with transformers,” in Adv. Neural Inf. Process. Syst., vol. 35, 2022.
  4. [4]G. Morales and J. Sheppard, “Decomposable neuro symbolic regression,” Transactions on Machine Learning Research, 2026.arxiv.org/abs/2511.04124
  5. [5]G. Lample and F. Charton, “Deep learning for symbolic mathematics,” in Int. Conf. on Learning Representations, 2020.arxiv.org/abs/1912.01412
  6. [6]G. Morales and J. Sheppard, “Univariate skeleton prediction in multivariate systems using transformers,” in Machine Learning and Knowledge Discovery in Databases: Research Track, 2024, pp. 107–125.arxiv.org/abs/2406.17834
  7. [7]K. Yu, E. Chatzl, and G. Kessas, “Grammar-based ordinary differential equation discovery,” Mechanical Systems and Signal Processing, vol. 240, p. 113 395, Nov. 2025.DOI
  8. [8]S. Udrescu and M. Tegmark, “AI Feynman: A physics-inspired method for symbolic regression,” Science Advances, vol. 6, no. 16, 2020.DOI
  9. [9]S. Mežnar, L. Todorovski, and S. Dzeroski, “SRToolkit: Shared infrastructure for symbolic regression research,” in IEEE Congress on Evolutionary Computation: SymReg Workshop, 2026.
  10. [10]Y. Jin, W. Fu, J. Kang, J. Guo, and J. Guo, “Bayesian symbolic regression,” ArXiv, vol. abs/1910.08892, 2019.arxiv.org/abs/1910.08892
  11. [11]B. Petersen, M. Landajuela, T. Mundhenk, C. Santiago, S. Kim, and J. Kim, “Recovering mathematical expressions from data via risk-seeking policy gradients,” in Int. Conf. on Learning Representations, 2021.
  12. [12]M. Virgolin, T. Alderliesten, C. Witteveen, and P. Bosman, “Improving model-based genetic programming for symbolic regression of small expressions,” Evolutionary Computation, vol. 29, no. 2, 2021.DOI
  13. [13]F. O. de França and G. S. I. Aldeia, “Interaction-transformation evolutionary algorithm for symbolic regression,” Evolutionary Computation, vol. 29, no. 3, pp. 367–390, 2021.DOI
  14. [14]M. Kommenda, B. Burlacu, G. Kronberger, and M. Affenzeller, “Parameter identification for symbolic regression using nonlinear least squares,” Genet Program Evolvable Mach, vol. 21, pp. 471–501, 2020.DOI
  15. [15]M. Cranmer, “Interpretable machine learning for science with PySR and SymbolicRegression.jl,” ArXiv, vol. abs/2305.01582, 2023.arxiv.org/abs/2305.01582
  16. [16]B. He, Q. Lu, Q. Yang, J. Luo, and Z. Wang, “Taylor genetic programming for symbolic regression,” in Genetic and Evolutionary Computation Conference, Boston, Massachusetts, 2022, pp. 946–954.arxiv.org/abs/2205.09751
  17. [17]P. Shojaee, K. Meidani, A. Barati Farimani, and C. Reddy, “Transformer-based Planning for Symbolic Regression,” in Adv. Neural Inf. Process. Syst., vol. 36, 2023.arxiv.org/abs/2303.06833
  18. [18]M. Landajuela et al., “A unified framework for deep symbolic regression,” in Adv. Neural Inf. Process. Syst., vol. 35, 2022.DOI
  19. [19]S. Brunton, J. Proctor, and N. Kutz, “Discovering governing equations from data by sparse identification of nonlinear dynamical systems,” Proc. of the National Academy of Sciences, vol. 113, no. 15, 2016.DOI
  20. [20]S. Rudy, S. Brunton, J. Proctor, and N. Kutz, “Data-driven discovery of partial differential equations,” Science Advances, vol. 3, no. 4, 2017.

Paper details

vlnc:W_5n77hk9n
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 10

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents