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 ⋅ 1 x \cdot1 x ⋅ 1 vs. x + 0 x+0 x + 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} U and B \mathcal{B} B denote the finite set of unary (e.g., sin \sin sin and log \log log ) and binary operators (e.g., + , − , × , ÷ +,-,\times,\div + , − , × , ÷ ), respectively. Thus, a mathematical expression f ( x ) f(\mathbf{x}) f ( x ) is represented as a rooted tree with nodes ∈ { U , B } \in\{\mathcal{U},\mathcal{B}\} ∈ { U , B } , where x = [ x 1 , … , x n ] \mathbf{x}=[x_1,\ldots,x_n] x = [ x 1 , … , x n ] is a multivariate input vector.
A symbolic skeleton expression is an abstract representation of a function f ( x ) f(\mathbf{x}) f ( x ) that captures the functional form between a variable, or set of variables, and the system’s response using constant placeholders c i c_i c 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 ) ; x S ) \kappa(f(\mathbf{x});\mathbf{x}_S) κ ( f ( x ) ; x S ) , where x S \mathbf{x}_S x S is a subset of variables and S ⊆ { 1 , … , n } S \subseteq\{1,\ldots,n\} S ⊆ { 1 , … , n } is an index set. Thus, x S \mathbf{x}_S 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})) κ ( f ( x ) ; x ) = κ ( f ( x )) . For example, f ( x ) = 2 sin ( x 1 10 x 2 + π 2 ) 2 + 10 f(\mathbf{x})=2\sin\left(\frac{x_1}{10x_2}+\frac{\pi}{2}\right)^2+10 f ( x ) = 2 sin ( 10 x 2 x 1 + 2 π ) 2 + 10 ; then κ ( f ( x ) , x 1 ) = c 1 sin ( c 2 x 1 + c 3 ) 2 + c 4 \kappa(f(\mathbf{x}),x_1)=c_1\sin(c_2x_1+c_3)^2+c_4 κ ( f ( x ) , x 1 ) = c 1 sin ( c 2 x 1 + c 3 ) 2 + c 4 , κ ( f ( x ) , x 2 ) = c 5 sin ( c 6 x 2 + c 7 ) 2 + c 8 \kappa(f(\mathbf{x}),x_2)=c_5\sin\left(\frac{c_6}{x_2}+c_7\right)^2+c_8 κ ( f ( x ) , x 2 ) = c 5 sin ( x 2 c 6 + c 7 ) 2 + c 8 , and κ ( f ( x ) ) = c 9 sin ( c 10 x 2 + c 11 ) 2 + c 12 \kappa(f(\mathbf{x}))=c_9\sin\left(\frac{c_{10}}{x_2}+c_{11}\right)^2+c_{12} κ ( f ( x )) = c 9 sin ( x 2 c 10 + c 11 ) 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 ) = x 1 x 2 tanh ( 2 x 1 2 + x 2 2 ) f(\mathbf{x})=\frac{x_1}{x_2}\tanh\left(\sqrt{2x_1^2+x_2^2}\right) f ( x ) = x 2 x 1 tanh ( 2 x 1 2 + x 2 2 ) and that the individual variable-response relationship analysis yields e ( x 1 ) = c 1 x 1 tanh ( c 2 ∣ x 1 ∣ + c 3 ) e(x_1)=c_1x_1\tanh(c_2|x_1|+c_3) e ( x 1 ) = c 1 x 1 tanh ( c 2 ∣ x 1 ∣ + c 3 ) and e ( x 2 ) = c 4 x 2 tanh ( c 5 ∣ x 2 ∣ + c 6 ) e(x_2)=\frac{c_4}{x_2}\tanh(c_5|x_2|+c_6) e ( x 2 ) = x 2 c 4 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 c 2 ∣ x 1 ∣ + c 3 c_2|x_1|+c_3 c 2 ∣ x 1 ∣ + c 3 and c 5 ∣ x 2 ∣ + c 6 c_5|x_2|+c_6 c 5 ∣ x 2 ∣ + c 6 can be viewed as special cases of c x 1 2 + c 8 \sqrt{cx_1^2+c_8} c x 1 2 + c 8 and c x 2 2 + c 10 \sqrt{cx_2^2+c_{10}} c x 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} F be the set of all admissible univariate expressions f ( x ) f(x) f ( x ) constructed from U \mathcal{U} U and B \mathcal{B} B . Then, S s k e l \mathcal{S}_{skel} S s k e l denotes the set of all skeleton expressions (i.e., expression trees whose leaves are “x x x ” or “c i c_i c i ”) s.t. S s k e l = { κ ( f ( x ) ) : f ∈ F } \mathcal{S}_{skel}=\{\kappa(f(x)):f\in\mathcal{F}\} S s k e l = { κ ( f ( x )) : f ∈ F } . An instantiation of a skeleton s ∈ S s k e l s\in\mathcal{S}_{skel} s ∈ S s k e l is defined by a vector α = [ α 1 , … , α k ] ∈ R k \boldsymbol{\alpha}=[\alpha_1,\ldots,\alpha_k]\in\mathbb{R}^k α = [ α 1 , … , α k ] ∈ R k , where k k k is the number of placeholders in s s s . The instantiated expression is denoted s [ α ] s[\boldsymbol{\alpha}] s [ α ] .
Definition 1 (Subsumption). For s 1 , s 2 ∈ S s k e l s_1,s_2\in\mathcal{S}_{skel} s 1 , s 2 ∈ S s k e l , we say s 1 s_1 s 1 subsumes s 2 s_2 s 2 , s 1 ⪰ s 2 s_1\succeq s_2 s 1 ⪰ s 2 , if, for any instantiation β \boldsymbol{\beta} β , ∃ α \exists\boldsymbol{\alpha} ∃ α s.t. s 1 [ α ] ≡ s 2 [ β ] s_1[\boldsymbol{\alpha}]\equiv s_2[\boldsymbol{\beta}] s 1 [ α ] ≡ s 2 [ β ] . Here, ≡ \equiv ≡ represents equivalence between identically equal functions on an open interval containing 0.
For instance, consider the skeletons s 1 = c 1 x 2 + c 2 x + c 3 s_1=c_1x^2+c_2x+c_3 s 1 = c 1 x 2 + c 2 x + c 3 and s 2 = c 4 x 2 s_2=c_4x^2 s 2 = c 4 x 2 . Then, s 1 ⪰ s 2 s_1\succeq s_2 s 1 ⪰ s 2 , as s 1 [ [ β , 0 , 0 ] ] ≡ s 2 [ [ β ] ] s_1[[\beta,0,0]]\equiv s_2[[\beta]] s 1 [[ β , 0 , 0 ]] ≡ s 2 [[ β ]] . For the sake of brevity, from now on, skeletons may be expressed using unnumbered placeholders c c c (e.g., s 1 = c x 2 + c x + c s_1=cx^2+cx+c s 1 = c x 2 + c x + c ). However, each c c c is considered as an independent placeholder.
Definition 2 (Canonical atoms). We define the canonical atoms C : = c C:=c C := c (constant), L : = c x + c L:=cx+c L := c x + c (linear), and P : = P m ( x ) P:=P_m(x) P := P m ( x ) (polynomial). Here, m m m is a placeholder index, and every polynomial of finite degree belongs to the family P P P .
Definition 3 (Canonical equivalence). We define the following equivalence and closure rules between canonical atoms:
Constant: C + c ∼ C C+c\sim C C + c ∼ C , C ⋅ c ∼ C C\cdot c\sim C C ⋅ c ∼ C , U ( C ) ∼ C \mathcal{U}(C)\sim C U ( C ) ∼ C and C ∈ U C\in\mathcal{U} C ∈ U .
Linear: x + C ∼ L x+C\sim L x + C ∼ L , x ⋅ C ∼ L x\cdot C\sim L x ⋅ C ∼ L , L + C ∼ L L+C\sim L L + C ∼ L , L ⋅ C ∼ L L\cdot C\sim L L ⋅ C ∼ L , L + x ∼ L L+x\sim L L + x ∼ L .
Polynomial: L ⋅ x ∼ P L\cdot x\sim P L ⋅ x ∼ P , P + C ∼ P P+C\sim P P + C ∼ P , P ⋅ C ∼ P P\cdot C\sim P P ⋅ C ∼ P , P + x ∼ P P+x\sim P P + x ∼ P , P ⋅ x ∼ P P\cdot x\sim P P ⋅ x ∼ P , L ⋅ L ∼ P L\cdot L\sim P L ⋅ L ∼ P , P + L ∼ P P+L\sim P P + L ∼ P , L ⋅ L ∼ P L\cdot L\sim P L ⋅ L ∼ P , P + L ∼ P P+L\sim P P + L ∼ P .
Proposition 1 (Recursive Structural Decomposition). Let f ( x ) f(x) f ( x ) be defined by a finite composition of unary and binary ( + (+ ( + and × ) \times) × ) operators. Then, f ( x ) f(x) f ( x ) obeys: f ( x ) = v 0 + ∑ i v i ∏ j v i j ( v i j ( x ) ) f(x)=v_0+\sum_i v_i\prod_j v_{ij}(v_{ij}(x)) f ( x ) = v 0 + ∑ i v i ∏ j v ij ( v ij ( x )) , where v 0 , v i ∈ R v_0,v_i\in\mathbb{R} v 0 , v i ∈ R , v i j ∈ U ∪ { I } v_{ij}\in\mathcal{U}\cup\{I\} v ij ∈ U ∪ { I } , and v i j ( x ) v_{ij}(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\} B = { + , × } , 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)) Pow ( f ( x )) denotes the family { f ( x ) h : h ∈ Q } \{f(x)^h:h\in\mathbb{Q}\} { f ( x ) h : h ∈ Q } , while the specific instantiated form is obtained in Sec. IV by sampling h h h . Note that exponents outside Q \mathbb{Q} Q can be represented through compositions of exp \exp exp and log \log log . This choice constrains the expression space by excluding exponents that depend on x x x , 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.
Definition 4 (Affine expansion). For any subexpression or leaf u u u , the affine expansion operator is defined as A [ u ] = c i ⋅ u + c j \mathcal{A}[u]=c_i\cdot u+c_j A [ u ] = c i ⋅ u + c j , where c i , c j c_i,c_j c i , c j are newly instantiated placeholders.
Definition 5 (Normal form). Let N ( s ) \mathcal{N}(s) N ( s ) denote the normal form of skeleton s s s , obtained by recursively applying the affine expansion operator A [ ⋅ ] \mathcal{A}[\cdot] A [ ⋅ ] to every node and leaf of the tree, and the equivalence rules ∼ \sim ∼ , until no further transformation is possible. For example, given s ( x ) = sin ( x ) + x 2 c s(x)=\sin(x)+\frac{x^2}{c} s ( x ) = sin ( x ) + c x 2 ; then, N ( s ) = c sin ( c x + c ) + c x 2 + c = c sin ( L ) + P \mathcal{N}(s)=c\sin(cx+c)+cx^2+c=c\sin(L)+P N ( s ) = c sin ( c x + c ) + c x 2 + c = c sin ( L ) + P .
Lemma 1 (Recursive Canonical Form). Every skeleton s ( x ) ∈ S s k e l s(x)\in\mathcal{S}_{skel} s ( x ) ∈ S s k e l is subsumed by a unique finite rooted tree N ( s ) \mathcal{N}(s) N ( s ) with leaves ∈ { C , L , P } \in\{C,L,P\} ∈ { C , L , P } and internal nodes that satisfy the recursive structural decomposition defined in Proposition 1. That is, s ( x ) = c 0 + ∑ i c i ∏ j v i j ( T i j ( x ) ) s(x)=c_0+\sum_i c_i\prod_j v_{ij}(T_{ij}(x)) s ( x ) = c 0 + ∑ i c i ∏ j v ij ( T ij ( x )) , where c 0 , c i c_0,c_i c 0 , c i are constant placeholders and T i j T_{ij} T ij skeleton subtrees.
Theorem 1. Let S = { N ( s ) : s ∈ S s k e l } \mathcal{S}=\{\mathcal{N}(s):s\in\mathcal{S}_{skel}\} S = { N ( s ) : s ∈ S s k e l } be the set of canonical univariate skeletons obtained from skeletons s s s with a total unary operator count bounded by N U N_U N U and a maximum unary nesting depth bounded by N D N_D N D . Then, the set S \mathcal{S} S is finite.
Lemma 1 and Theorem 1 are proved in S.M. B-A and B-B.
Grammar-based Skeleton Generation
Theorem 1 establishes that the exhaustive canonical univariate skeletons (ExCaUS) set S \mathcal{S} S is finite under the constraints N U N_U N U and N D N_D N D . A procedure to construct S \mathcal{S} S must ensure that each element is generated exactly once, avoiding the redundant evaluation of non-canonical or functionally equivalent forms. Below, we design a CFG to produce expressions that are, by construction, in their normal form N ( s ) \mathcal{N}(s) N ( s ) .
Grammar Definition
We define a grammar G = ( V , Σ , R , σ ) G = (V, \Sigma, R, \sigma) G = ( V , Σ , R , σ ) where V V V , Σ \Sigma Σ , and R R R are the set of non-terminals, terminal symbols, and production rules, respectively, and σ \sigma σ is the start symbol. To align with the Proposition 1, the non-terminals represent the hierarchical levels of the sum-of-products form. R R R is defined as:
σ → τ , τ → C + Ω ∣ C + Ω + τ , Ω → C ⋅ Φ , \sigma\to\tau,\qquad\tau\to C + \Omega\mid C + \Omega+ \tau,\qquad\Omega\to C \cdot\Phi, σ → τ , τ → C + Ω ∣ C + Ω + τ , Ω → C ⋅ Φ ,
Φ → Ψ ∣ Ψ ⋅ Φ , Ψ → ν ( τ ) ∣ Atom , Atom → L ∣ P . \Phi\to\Psi\mid\Psi\cdot\Phi,\qquad\Psi\to\nu(\tau) \mid\operatorname{Atom},\qquad\operatorname{Atom} \to L \mid P. Φ → Ψ ∣ Ψ ⋅ Φ , Ψ → ν ( τ ) ∣ Atom , Atom → L ∣ P .
Here, Ω \Omega Ω represents an individual component of the sum, Φ \Phi Φ represents the product of unary blocks, and Ψ \Psi Ψ is either an atom or a unary operator acting on a sub-skeleton. Note that the atom C C C is excluded from the terminal production rule, as its inclusion would introduce functional redundancies. Specifically, any occurrences of C C C within a functional branch are subsumed by the existing additive and multiplicative placeholders at higher levels of the structural hierarchy. G G G serves as the blueprint for generating expressions that adhere to the recursive canonical form (Lemma 1). While the recursive nature of R R R theoretically allows for infinite functional topologies, the constraints described in the following subsections bound the search space and derive a finite and exhaustive set S S S .
Recall ν ∈ U ∪ { I } \nu\in U \cup\{I\} ν ∈ U ∪ { I } . The set U U U is selected to include the most common functional forms found across real-world engineering and physics problems [1 , 8 ] . We employ the operators: sin \sin sin , tan \tan tan , arcsin \arcsin arcsin , arctan \arctan arctan , sinh \sinh sinh , cosh \cosh cosh , tanh \tanh tanh , arsinh \operatorname{arsinh} arsinh , arcosh \operatorname{arcosh} arcosh , artanh \operatorname{artanh} artanh , exp \exp exp , log \log log , ⋅ \sqrt{\mathord{\cdot}} ⋅ , abs \operatorname{abs} abs , square \operatorname{square} square , cube \operatorname{cube} cube , Pow \operatorname{Pow} Pow , and inv \operatorname{inv} inv .
Production Constraints for Canonicality
To ensure that the grammar generates only irreducible skeletons in their normal form, we impose three logical constraints. They enforce the structural closure rules in Def. 3. These rules serve only as computational efficiency constraints that prune redundant trees early in the generation pipeline, ultimately yielding the same set S S S through systematic filtering.
Additive Independence: In the expansion of τ \tau τ , the terms { Ω i } \{\Omega_i\} { Ω i } must be functionally linearly independent. Furthermore, a sum is prohibited if the resulting expression is subsumed by an existing atomic category. For example, the combination C ⋅ P + C ⋅ L C \cdot P + C \cdot L C ⋅ P + C ⋅ L is disallowed because it reduces to the polynomial atom P P P via the closure rules.
Multiplicative Irreducibility: In the expansion of Φ \Phi Φ , we enforce that the product Ψ 1 ⋯ Ψ k \Psi_1 \cdots\Psi_k Ψ 1 ⋯ Ψ k must be unique and non-atomic. Since power operations are already defined as unary operators in U U U , repeated factors are unnecessary. In addition, products of atoms that simplify to a single atom (e.g., L ⋅ L L \cdot L L ⋅ L and L ⋅ P L \cdot P L ⋅ P , which resolve to P P P ) are also excluded.
Functional Irreducibility: A branch Ψ = ν ( σ ) \Psi= \nu(\sigma) Ψ = ν ( σ ) is permissible if it produces a functional form distinct from the atoms L L L and P P P . If a composition results in an expression equivalent to a linear or polynomial form (e.g., ln ( e x ) ∼ x \ln(e^x) \sim x ln ( e x ) ∼ x ), the production is pruned. This also prevents vacuous operations on constants, enforcing the rule ν ( C ) ∼ C \nu(C) \sim C ν ( C ) ∼ C by requiring σ \sigma σ to contain at least one instance of the variable x x x .
Figure 1. Algorithm 1 Dataset Generation of Canonical Skeletons.
Complexity Constraints
To ensure that S S S is a finite and exhaustive dataset, our derivation process is governed by two constraints:
Global Unary Bound: We consider a unary count, n u n_u n u , which is incremented globally with every application of the rule Ψ → ν ( σ ) \Psi\to\nu(\sigma) Ψ → ν ( σ ) . For any generated skeleton s s s , n u n_u n u must not exceed N U N_U N U , restricting the total functional complexity.
Compositional Nesting Bound: A local nesting depth n d n_d n d tracks the recursive depth of the functional composition. Thus, the production Ψ → ν ( σ ) \Psi\to\nu(\sigma) Ψ → ν ( σ ) increments n d n_d n d . The rule is only available if the current depth n d < N D n_d < N_D n d < N D .
To mitigate computational overhead and prevent the pipeline from producing unrealistic skeletons or expressions that are functionally equivalent to others, an additional set of simplification and filtering rules is given in S.M. C-A.
Symmetry Breaking and Uniqueness
To ensure that the resulting dataset S S S contains unique functional representatives, we must address the structural symmetries inherent in the commutativity of addition and multiplication. Without such constraints, the grammar would generate redundant entries; e.g., C sin ( L ) + C exp ( L ) C\sin(L) + C\exp(L) C sin ( L ) + C exp ( L ) and C exp ( L ) + C sin ( L ) C\exp(L) + C\sin(L) C exp ( L ) + C sin ( L ) . Thus, we enforce a strict lexicographical ordering during the expansion of the recursive rules. When generating a sum of terms (Ω \Omega Ω ) or a product of factors (Ψ \Psi Ψ ), the components are sorted according to a fixed priority:
Complexity: Components are ordered by their total number of unary operators (n u n_u n u ) and then by their nesting depth (n d n_d n d ).
Order: For elements with equal complexity, ties are broken by the alphabetical order of the string representation of their operators (e.g., exp ( ⋅ ) ≺ ln ( ⋅ ) ≺ sin ( ⋅ ) \exp(\cdot) \prec\ln(\cdot) \prec\sin(\cdot) exp ( ⋅ ) ≺ ln ( ⋅ ) ≺ sin ( ⋅ ) ) and atoms (L ≺ P L \prec P L ≺ P ).
Implementation Algorithm
The implementation of the skeleton generator is structured as a state-space expansion problem, where G G G serves as the structural foundation and the symbolic library SymPy (sympy.org) is used as an engine for algebraic normalization. By adopting a breadth-first traversal strategy, the skeletons are enumerated hierarchically according to their structural complexity. The generator stores every unique intermediate derivation string encountered in an efficient hash table.
As shown in Algorithm 1, the main loop extracts a partial expression from the queue Q Q Q to identify its leftmost non-terminal using findLeftmostNT. For each admissible production rule from G G G applied to the current expression, we generate a new candidate path (Line 12). Function getSubtree does a recursive look-back starting from the site of the most recent substitution. It identifies the most immediate parent node in the derivation tree that has transitioned into a fully resolved state, meaning the entire branch rooted at that node now consists exclusively of terminal symbols.
Once this branch is isolated, it is passed to SymPy’s simplify for algebraic simplification. If the result is found to be functionally equivalent to an atom or if its expression complexity, measured using function cmplx as the number of nodes required by the expression tree, is lower than that of the unsimplified version, the entire derivation path is rejected (Line 16). This ensures that any functional form that simplifies to a lower-complexity form is discarded, as the deterministic nature of the breadth-first traversal guarantees that the canonical representative of that form was already generated earlier.
If the extended path is not rejected, CanonicalSort (Line 18) organizes the components of the simplified subtree to enforce a unique representation. This function applies a multi-level priority sort, ordering terms or factors first by their total unary operator count and nesting depth, and then by the alphabetical string representation of their root operators. This locally canonicalized branch is then substituted back into the main derivation tree using function updateSubtree. Before a path is returned to Q Q Q , it must satisfy the global complexity constraints for N U N_U N U and N D N_D N D (Line 20). If a derivation is fully resolved, it undergoes a final algebraic reduction and sorting before being added to the hash-based set S S S (Lines 6–9).
Sampling Strategy
Below, we outline the steps for instantiating mathematical expressions and sampling corresponding numerical datasets.
Sampling Expression Constants and Support
Given a skeleton e ( x ) ∈ S e(x) \in S e ( x ) ∈ S , we construct a parameterized function f ( x ) f(x) f ( x ) . Atoms C C C are replaced with constant placeholders c c c , and atoms L L L are expanded to c x + c cx+c c x + c . Atoms P = P m ( x ) P = P^m(x) P = P m ( x ) are replaced by polynomials ∑ i = 0 m c i x i \sum_{i=0}^{m} c_i x^i ∑ i = 0 m c i x i , where the degree m m m is sampled from U ( 2 , 6 ) U(2,6) U ( 2 , 6 ) , or constrained to U ( 2 , 3 ) U(2,3) U ( 2 , 3 ) when nested within a unary operator to prevent explosive growth.
Power operators Pow(·), treated as unary in Sec. II, are instantiated by assigning a rational exponent h ∈ ( 0 , 7 ) h \in(0,7) h ∈ ( 0 , 7 ) . To avoid overriding primitive operators, values h ∈ { 0.5 , 1 , 2 , 3 } h \in\{0.5,1,2,3\} h ∈ { 0.5 , 1 , 2 , 3 } are excluded. The exponent h h h is sampled with a 70% probability as an integer and a 30% probability as a fraction p / q p/q p / q with denominator q ∈ { 2 , … , 6 } q \in\{2,\ldots,6\} q ∈ { 2 , … , 6 } . Once the symbolic structure is complete, each placeholder c c c is sampled independently from U ( − 50 , 50 ) \mathcal{U}(-50,50) U ( − 50 , 50 ) , yielding a fully parameterized function f ( x ) f(x) f ( x ) .
Finally, f ( x ) f(x) f ( x ) is evaluated to generate input–response pairs ( X , Y ) (X,Y) ( X , Y ) with n = 10 , 000 n=10,000 n = 10 , 000 points. The support vector X ∈ R n X \in\mathbb{R}^{n} X ∈ R n is drawn uniformly from U ( − 10 , 10 ) \mathcal{U}(-10,10) U ( − 10 , 10 ) . Although this domain range is held constant to maintain evaluation uniformity, the randomized sampling of the internal constants scales the functions across diverse numerical ranges naturally. The response vector is subsequently evaluated as Y = f ( X ) Y=f(X) Y = f ( X ) .
Sampling Data
To construct a robust dataset for training and evaluating SR models, ( X , Y ) (X,Y) ( X , Y ) pairs must be sampled without triggering numerical instabilities or relying on artificial protected operators. Thus, our data generation builds upon the safeguard mechanisms introduced by Morales and Sheppard [6 ] .
Our data generation process parses expressions hierarchically to handle domain constraints across three classes of “special functions”: single-bounded (e.g., log and ⋅ \sqrt{\cdot} ⋅ ), double-bounded (e.g., arcsin and arccos( x ) (x) ( x ) ), and operators with vertical singularities (e.g., inv and tan). While single- and double-bounded operations are managed via dynamic input shifting and linear scaling (see S.M. D for full tree-traversal details), our handling of vertical asymptotes represents a major point of divergence and improvement over prior work.
Existing approaches to managing vertical asymptotes safely rely on post-hoc truncation or crude grid heuristics:
Biggio et al. [1 ] employed post-hoc truncation, dropping individual input–response pairs that evaluate to undefined values (NaN). A critical drawback is that expressions such as ln ( x − 8 ) \ln(x-8) ln ( x − 8 ) yield undefined outputs across major regions of x ∈ [ − 10 , 8 ] x \in[-10,8] x ∈ [ − 10 , 8 ] , severely shrinking the target dataset and creating unrepresentative input spaces of varying lengths.
Morales and Sheppard [6 ] attempted to identify singularities by tracking zero-crossings on a uniform grid (e.g., 1000 points) and enforcing a fixed spatial exclusion window (ϵ = 0.05 \epsilon=0.05 ϵ = 0.05 ). This approach suffers from two flaws: (i) a uniform spatial threshold ignores local scaling; e.g., for f ( x ) = 1 x f(x)=\frac{1}{x} f ( x ) = x 1 , ϵ = 0.05 \epsilon=0.05 ϵ = 0.05 restricts outputs to a safe f ( 0.05 ) = 20 f(0.05)=20 f ( 0.05 ) = 20 , whereas for a steeper case like f ( x ) = 1 x 5 f(x)=\frac{1}{x^5} f ( x ) = x 5 1 , the same distance yields f ( 0.05 ) = 3.2 × 10 6 f(0.05)=3.2 \times10^6 f ( 0.05 ) = 3.2 × 1 0 6 , instantly triggering numerical overflow. (ii) Coarse grid discretization misses narrow singularities in high-frequency terms such as sin ( 20 x 2 ) \sin(20x^2) sin ( 20 x 2 ) .
To overcome these limitations, we propose a derivative-driven singularity avoidance mechanism. Hence, the exclusion boundary is determined based on the geometric slope angle of the function. We define the unsafe asymptotic regime as the region where the tangent to the curve approaches a vertical orientation, indicating a structural explosion. Formally, we project the first derivative f ′ ( x ) f'(x) f ′ ( x ) onto a bounded [ 0 , 1 ) [0,1) [ 0 , 1 ) metric representing the sine of the local slope angle. We exclude any input point x x x that satisfies the condition on the sine of the slope angle, ∣ f ′ ( x ) ∣ 1 + ( f ′ ( x ) ) 2 ≥ α \frac{|f'(x)|}{\sqrt{1+(f'(x))^2}} \geq\alpha 1 + ( f ′ ( x ) ) 2 ∣ f ′ ( x ) ∣ ≥ α , where α ∈ [ 0 , 1 ) \alpha\in[0,1) α ∈ [ 0 , 1 ) represents a hyperparameter threshold (e.g., α = 0.9995 \alpha=0.9995 α = 0.9995 , which structurally restricts the local slope angle to less than ≈ 88.2 ∘ \approx88.2^\circ ≈ 88. 2 ∘ ). By using this geometric condition, sharp asymptotes receive a tightly compressed exclusion window, whereas wide asymptotic walls prompt the window to expand, as depicted in S.M. D. Hence, this analysis yields a continuous exclusion window around each singularity point, which is stored to delineate forbidden subdomains, ensuring that the final equidistant support points are sampled exclusively within the remaining safe regions.
Experimental Results
Dataset Comparison
We compare our ExCaUS dataset to those of two neural SR approaches, SeTGAP [4 ] and NeSymRes [1 ] , with publicly available datasets. The SeTGAP dataset contains 1.65 million univariate skeletons, whereas the NeSymRes dataset comprises 10 million skeletons spanning up to three input variables. For fairness, we canonicalize both baseline datasets using our closure rules (Def. 3). To ensure consistency, we re-skeletonize NeSymRes’s expressions with respect to their primary variable, x 1 x_1 x 1 , which is present in all instances. Hence, given a multivariate skeleton s ( x 1 , x 2 , x 3 ) s(x_1, x_2, x_3) s ( x 1 , x 2 , x 3 ) , a canonical univariate skeleton is obtained as N ( κ ( s ( x 1 , x 2 , x 3 ) ; x 1 ) ) \mathcal{N}\left(\kappa(s(x_1, x_2, x_3); x_1)\right) N ( κ ( s ( x 1 , x 2 , x 3 ) ; x 1 ) ) .
Figure 1 (PDF p. 5). SR datasets comparison
To evaluate structural scale, redundancy, and complexity across datasets, in Table I , we report the total raw expression count N N N , the number of unique canonical skeletons U U U , and the resulting duplication rate, 1 − U / N 1-U/N 1 − U / N . To evaluate functional complexity, we report the mean and maximum values for both operator count per expression and unary nesting depth.
Table I. Quantitative comparison of SR datasets.
Fig. 1 depicts the datasets’ distributional characteristics:
Frequency Rank (Fig. 1a): Displays the unique skeletons’ frequency sorted by rank on a log-log scale. This is used because scalar duplication rates fail to capture frequency concentration, revealing whether dataset expansion yields structural variety or merely repeats high-frequency heads.
Unary Nesting Depth (Fig. 1b): Shows the empirical probability density function of functional nesting depth.
Operators per Expression (Fig. 1c): Probability density function of unary operator counts per expression.
Unary Operator Proportions (Fig. 1d): Illustrates the relative frequency distribution across individual operator types to evaluate operator usage balance across datasets.
Benchmarking
The dataset S S S also serves to construct a challenging benchmark, which we refer to as ExCaUS-Bench . Existing benchmarks often feature problems where evaluations readily achieve near-optimal performance. For instance, the Feynman dataset [8 ] mostly comprises additively separable equations, and the limited variable domains prevent the accurate identification of functional forms. For example, the narrow domains applied to equation I.9.18 ( G m 1 m 2 ( x 2 − x 1 ) 2 + ( y 2 − y 1 ) 2 + ( z 2 − z 1 ) 2 ) \left(\frac{Gm_1m_2}{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}\right) ( ( x 2 − x 1 ) 2 + ( y 2 − y 1 ) 2 + ( z 2 − z 1 ) 2 G m 1 m 2 ) (specifically [3 , 4 ] for x 1 , y 1 , z 1 x_1,y_1,z_1 x 1 , y 1 , z 1 and [1 , 2 ] for x 2 , y 2 , z 2 x_2,y_2,z_2 x 2 , y 2 , z 2 ) restrict a model’s capacity to infer the correct asymptotic behaviour.
Thus, we stratified S S S into three tiers of difficulty (Easy, Medium, and Hard) measured by the length of the skeleton string representation. We randomly sampled 50 skeletons per tier. Following the methodology outlined in Sec. IV, each skeleton was used to generate a single parametric equation and a corresponding dataset of 10,000 points. The resulting equations (denoted E1–E50, M1–M50, and H1–H50) and their generated curves are detailed in Tables E.1–E.3 and Figs. E.1–E.9 in S.M. E. To evaluate generalization, each dataset was divided into an interpolation set (the middle 90% of the data, bounded between the 5th and 95th percentiles) and an extrapolation set (comprising the bottom 5% and top 5% tails).
Using SRToolkit [9 ] as a unified infrastructure, we evaluated 13 SR methods: AI Feynman [8 ] , Bayesian SR (BSR) [10 ] , Deep SR (DSR) [11 ] , GPlearn (gplearn.readthedocs.io), GP-GOMEA [12 ] , ITEA [13 ] , Operon [14 ] , PySR [15 ] , NeSymReS [1 ] , E2E [3 ] , TaylorGP [16 ] , Transformer-based Planning for SR (TPSR) [17 ] , and unified DSR (uDSR) [18 ] . For hyper-parameter tuning, we performed an exhaustive grid search using one representative equation per tier (E0, M9, and H9). For fairness, each candidate configuration was executed five times per problem, selecting the hyperparameter set yielding the average mean square error (MSE) across valid (non-NaN) runs. The optimal configurations are detailed in S.M. F.
All methods were evaluated on ExCaUS-Bench with these parameters across ten independent runs per equation, training on the interpolation datasets. Figure 2 and Figure 3 show extrapolation performance in MSE and coefficient of determination, R 2 R^2 R 2 , respectively. For each problem, we computed the average metric across valid runs. Each subplot summarizes the distribution of these per-problem averages across all equations in that tier, where box boundaries represent the interquartile range (IQR), solid lines indicate medians, and individual points denote outliers. Tables F.3–F.8 of S.M. F report the per-problem performance for interpolation and extrapolation MSE and R 2 R^2 R 2 .
Figure 2. Extrapolation MSE on the (a) E, (b) M, and (c) H tiers
Figure 3. Extrapolation R 2 R^2 R 2 on the (a) E, (b) M, and (c) H tiers
Discussion
Table I and Fig. 1 show the efficiency contrast between our deterministic framework and stochastic sampling pipelines. While the NeSymRes and SeTGAP datasets require generating millions of expressions, post-hoc canonicalization reveals substantial structural redundancy, with duplication rates over 98.7% and 99.9%. As illustrated in Fig. 1a, stochastic samplers over-expose models to a small subset of trivial functions. Specifically, expressions reducing to atoms C C C , L L L , and P P P total 2927, 2089502, and 443383 in NeSymRes (25.3% of all duplicates), and 0, 2269, and 197479 in SeTGAP (11.97% of all duplicates), evidencing a strong simplicity bias. In contrast, ExCaUS achieves a flat frequency-rank curve with a 0% duplication rate, containing 71,027 unique canonical skeletons. This reduces training memory and computation requirements while providing complete coverage of the functional space.
Furthermore, Figs. 1b–d highlight how ExCaUS effectively eliminates the simplicity and operator biases inherent to probabilistic sampling. As shown in Figs. 1b and 1c, stochastic methods concentrate density heavily at low complexity levels (nesting depth 0–1 and ≤ 1 \leq1 ≤ 1 operators per expression), leaving deeper structural topologies under-represented despite maintaining long tails (e.g., maximum operator counts up to 10). In contrast, ExCaUS distributes expressions in a more balanced manner, reaching an average of 2.32 operators per expression and a mean unary nesting depth of 1.58. Crucially, Fig. 1(d) reveals extreme operator imbalance in the compared datasets, where pow dominates up to 40% of all unary instances in NeSymRes. Conversely, ExCaUS spans a larger vocabulary (16 unique operators) with a notable uniform proportion across all functional families. Although perfect operator balance is not strictly achieved due to the additional structural filtering rules introduced in S.M. C-A, this well-apportioned coverage effectively prevents operator-level bias. This ensures that when neural SR models are pre-trained on ExCaUS in future work, they will learn unbiased representations across diverse mathematical domains.
Evaluation across ExCaUS-Bench (Figure 2 and Figure 3 ) determines that state-of-the-art SR methods struggle as structural complexity increases. On the Hard tier, the leading methods in extrapolation R 2 R^2 R 2 are PySR, GPGOMEA, and TaylorGP, whereas the top three in extrapolation MSE are PySR, GPGOMEA, and Operon. R 2 R^2 R 2 assesses an expression’s capacity to capture the functional shape and variance, allowing methods like TaylorGP to achieve high R 2 R^2 R 2 despite small vertical shifts or scale mismatches that severely penalize MSE. Conversely, algorithms like Operon specialize at fine-tuning numerical constants via nonlinear parameter optimization, minimizing residuals even if subtle trend mismatches slightly lower R 2 R^2 R 2 .
Predictive capability degrades on the Medium and Hard tiers. Here, the extrapolation MSE distributions widen, producing a spread of extreme outliers. In addition, the median R 2 R^2 R 2 values shift heavily toward zero or achieve extreme negative values, indicating a complete failure to capture the underlying data variance outside the interpolation range. This drop in performance highlights the challenge introduced by ExCaUS-Bench: although modern algorithms can locally approximate numerical data within training domains, they systematically fail to deduce the underlying functional forms required for true mathematical extrapolation, even in univariate settings.
Conclusions
Neural SR models are limited by the structural redundancy and simplicity bias of traditional stochastic sampling pipelines. To address this, we presented ExCaUS, an exhaustive dataset of univariate canonical skeletons generated via a deterministic constrained CFG, alongside ExCaUS-Bench, a 150-problem SR benchmark. ExCaUS represents a compact, operator-balanced dataset that eliminates functional redundancy and simplicity bias. Furthermore, by challenging algorithms that otherwise perform well on standard benchmarks, ExCaUS-Bench serves as a rigorous, non-redundant testbed to push future improvements in SR. Building on these foundations, in the future we will focus on training neural SR models on datasets derived from ExCaUS and our proposed sampling strategy to achieve robust symbolic expression learning.
The performance of neural SR models is tied to the quality and diversity of their training datasets. Thus far, the generation of these datasets has relied on stochastic tree-sampling methods, where mathematical expressions are constructed by randomly branching from a set of operators and terminals. Lample and Charton [5 ] pioneered this approach by generating millions of equations to train Transformer models for symbolic integration and ordinary differential equation (ODE) solving. It uses a one-pass stochastic procedure designed to sample mathematical expression trees uniformly, so that every valid structure of a specific size has a similar probability of being selected. While this allows for the generation of millions of samples, it remains a probabilistic exploration. As the complexity of the expressions increases, the number of possible configurations grows exponentially, and uniform sampling can only capture a sparse fraction of the functional universe.
Building on this, Biggio et al. [1 ] utilized a similar sampling method that incorporated a dataset of 10 million equations with a strict limit of five non-leaf nodes. Their approach uses a post-processing step to simplify the resulting expression strings into skeletons. However, since the initial sampling is stochastic, the process frequently generates trees that are structurally distinct but functionally redundant (e.g., x ⋅ 1 x \cdot1 x ⋅ 1 vs. x + 0 x + 0 x + 0 ). This calls for substantial data cleansing to remove invalid or trivial expressions, a challenge also faced by Kamienny et al. [3 ] . To maximize variety, they apply random affine transformations (a x + b ax + b a x + b ) to variables and operators. While this prevents the model from seeing identical numerical realizations, it does not address the underlying collision problem. That is, different stochastic sampling paths often converge on the same functional identity, leading to a significant simplicity bias where the model is over-exposed to over-represented forms.
Valipour et al. [2 ] introduced a distinct approach. Instead of sampling trees by the number of nodes, they use a template-based strategy in which equations are generated from a balanced binary tree of fixed depth. This depth controls the number of functional nestings and, hence, expression complexity. To allow for the representation of shallower or unbalanced forms, they use terminal nodes that truncate subtrees. Constants are integrated via a probabilistic insertion ratio. Nevertheless, the approach remains a stochastic decoration of fixed templates, which does not inherently prevent the generation of functionally redundant expressions.
Furthermore, Morales and Sheppard [6 ] introduced a more controlled stochastic framework for training a Multi-Set Transformer, using a larger set of operators than Biggio et al. [1 ] and a probability-weighted sampling strategy to favor sound expressions over overly complex ones. For example, they implemented a system to prevent algebraic redundancies and numerical instabilities. They also utilized both additive and multiplicative placeholders at every expression subtree without restricting the total number of placeholders to generate more general skeletons. While these heuristics reduce the occurrence of junk expressions and improve structural diversity compared to prior random samplers, the underlying process remains probabilistic and relies on arbitrary sampling weights.
Grammar-based and constrained generation emerge as potential alternative methods. Yu et al. [7 ] proposed a framework to generate libraries of 50,000 skeleton expressions for ODE discovery. The complexity of produced expressions is strictly limited by a maximum expression length, ranging from 40 to 65 elements. For some benchmarks, they employ probabilistic CFGs, where lower probabilities are assigned to complex rules to bias the generation toward simpler functional forms. While their approach ensures that generated skeletons conform to the structural requirements of differential equations, it still represents a sampling strategy designed for exploration.
Appendix B: Lemma and Theorem Proofs
Lemma. Every skeleton s ( x ) ∈ S s k e l s(x) \in S_{skel} s ( x ) ∈ S s k e l is subsumed by a unique finite rooted tree N ( s ) \mathcal{N}(s) N ( s ) with leaves ∈ { C , L , P } \in\{C,L,P\} ∈ { C , L , P } and internal nodes that satisfy the recursive structural decomposition defined in Proposition 1. That is, s ( x ) = c 0 + ∑ c i ∏ ν i j ( T i j ( x ) ) s(x) = c_0 + \sum c_i \prod\nu_{ij}(T_{ij}(x)) s ( x ) = c 0 + ∑ c i ∏ ν ij ( T ij ( x )) , where c 0 , c i c_0,c_i c 0 , c i are constant placeholders and T i j T_{ij} T ij skeleton subtrees.
Proof. We prove the lemma by structural induction on the height h h h of the arbitrary skeleton tree s s s . For the base case, the leaf nodes, we have either the variable x x x or placeholders c c c . Applying the normalization operator: N ( x ) = A [ x ] = c 1 x + c 2 \mathcal{N}(x) = \mathcal{A}[x] = c_1x + c_2 N ( x ) = A [ x ] = c 1 x + c 2 ; i.e., the atom L L L . For a placeholder, A [ c ] \mathcal{A}[c] A [ c ] reduces to the atom C C C . In both cases, the leaves of N ( s ) \mathcal{N}(s) N ( s ) belong to the set { C , L , P } \{C,L,P\} { C , L , P } , satisfying the case for a tree of height h = 0 h = 0 h = 0 .
For the inductive case, assume that for all trees s ′ s' s ′ of height ≤ h \le h ≤ h , N ( s ′ ) \mathcal{N}(s') N ( s ′ ) exists, is finite, and follows the recursive template structure. We now consider a tree s s s of height h + 1 h + 1 h + 1 :
Unary Root (s = ν ( s ′ ) s = \nu(s') s = ν ( s ′ ) ): By the inductive hypothesis, s ′ s' s ′ has a normal form N ( s ′ ) \mathcal{N}(s') N ( s ′ ) . Applying the normalization to the root ν \nu ν : N ( s ) = A [ ν ( N ( s ′ ) ) ] = c i ν ( N ( s ′ ) ) + c j \mathcal{N}(s) = \mathcal{A}[\nu(\mathcal{N}(s'))] = c_i\nu(\mathcal{N}(s')) + c_j N ( s ) = A [ ν ( N ( s ′ ))] = c i ν ( N ( s ′ )) + c j . Since N ( s ′ ) \mathcal{N}(s') N ( s ′ ) is already a valid sum-of-products from our hypothesis, the resulting expression s s s remains a finite tree that matches the template structure for a single term.
Binary Root (s = b ( s 1 , s 2 ) s = b(s_1,s_2) s = b ( s 1 , s 2 ) ): We consider b ∈ { + , × } b \in\{+, \times\} b ∈ { + , × } . By the inductive hypothesis, s 1 s_1 s 1 and s 2 s_2 s 2 have canonical forms N ( s 1 ) \mathcal{N}(s_1) N ( s 1 ) and N ( s 2 ) \mathcal{N}(s_2) N ( s 2 ) that follow the expected template:
Addition: N ( s 1 + s 2 ) = A [ N ( s 1 ) + N ( s 2 ) ] \mathcal{N}(s_1 + s_2) = \mathcal{A}[\mathcal{N}(s_1) + \mathcal{N}(s_2)] N ( s 1 + s 2 ) = A [ N ( s 1 ) + N ( s 2 )] . Since N ( s 1 ) \mathcal{N}(s_1) N ( s 1 ) and N ( s 2 ) \mathcal{N}(s_2) N ( s 2 ) are already sums of products, their sum is a larger sum introducing new placeholders; e.g., c 1 N ( s 1 ) + c 2 + c 3 N ( s 2 ) + c 4 c_1\mathcal{N}(s_1) + c_2 + c_3\mathcal{N}(s_2) + c_4 c 1 N ( s 1 ) + c 2 + c 3 N ( s 2 ) + c 4 . The closure rules ensure the redundant placeholders collapse into a single one.
Multiplication: N ( s 1 × s 2 ) = A [ N ( s 1 ) × N ( s 2 ) ] \mathcal{N}(s_1 \times s_2) = \mathcal{A}[\mathcal{N}(s_1) \times\mathcal{N}(s_2)] N ( s 1 × s 2 ) = A [ N ( s 1 ) × N ( s 2 )] . Multiplying two sum-of-products results in a new sum-of-products, which aligns with the expected template. If N ( s 1 ) \mathcal{N}(s_1) N ( s 1 ) and N ( s 2 ) \mathcal{N}(s_2) N ( s 2 ) are canonical atomic skeletons (e.g., L L L and P P P ), the closure rules (e.g., P ⋅ L ∼ P P \cdot L \sim P P ⋅ L ∼ P ) are invoked to ensure that the product is projected onto the atomic leaf P P P rather than remaining a complex tree.
In all cases, the normalization operator N \mathcal{N} N takes an arbitrary subtree in the tree and projects it into a sum-of-products form wrapped in an affine expansion. Because this process is applied bottom-up, and the equivalence rules ensure that the atoms { C , L , P } \{C, L, P\} { C , L , P } are stable under these operations, the final tree N ( s ) \mathcal{N}(s) N ( s ) is guaranteed to be a finite representative following the recursive structural decomposition.
Finally, normalization is idempotent: N ( N ( s ) ) = N ( s ) \mathcal{N}(\mathcal{N}(s))=\mathcal{N}(s) N ( N ( s )) = N ( s ) . Because A [ A [ u ] ] \mathcal{A}[\mathcal{A}[u]] A [ A [ u ]] simplifies to A [ u ] \mathcal{A}[u] A [ u ] via the merging of arbitrary placeholders, normalizing again produces no further changes. By construction, N ( s ) \mathcal{N}(s) N ( s ) is the maximal version of the functional topology of s s s . Since every leaf and node has been expanded to its most general affine form before being reduced by ∼ \sim ∼ , any instantiation of s s s is necessarily a subset of the functions reachable by N ( s ) \mathcal{N}(s) N ( s ) , meaning N ( s ) ⪰ s \mathcal{N}(s)\succeq s N ( s ) ⪰ s .
Theorem 1
Theorem. Let S = { N ( s ) : s ∈ S s k e l } \mathcal{S}=\{\mathcal{N}(s):s\in\mathcal{S}_{\mathrm{skel}}\} S = { N ( s ) : s ∈ S skel } be the set of canonical univariate skeletons obtained from skeletons s s s with a total unary operator count bounded by N U N_{\mathrm{U}} N U and a maximum unary nesting depth bounded by N D N_{\mathrm{D}} N D . Then, the set S \mathcal{S} S is finite.
Proof. The proof follows from the combinatorial properties of the normal form N ( s ) \mathcal{N}(s) N ( s ) and the constraints placed on the structural complexity of the skeletons in S s k e l \mathcal{S}_{\mathrm{skel}} S skel .
According to Lemma 1, the normalization process N \mathcal{N} N maps any skeleton s s s to a unique tree structure where every node is labeled from a strictly finite set. Since these sets are finite by assumption, any possible canonical skeleton in S \mathcal{S} S is composed of a finite alphabet of functional blocks.
Furthermore, the constraints N U N_{\mathrm{U}} N U and N D N_{\mathrm{D}} N D define the space of the functional topologies. Because N ( s ) \mathcal{N}(s) N ( s ) follows the recursive structural decomposition, the number of ν i j \nu_{ij} ν ij operators is bounded by N U N_{\mathrm{U}} N U , the depth of the recursive composition is bounded by N D N_{\mathrm{D}} N D , and the binary operators ( + , × ) (+, \times) ( + , × ) serve only to link these unary terms in a sum-of-products form. Crucially, N \mathcal{N} N ensures that adding more binary operations or placeholders does not generate a new skeleton. For instance, the affine and polynomial closure rules ensure that repeated additions or multiplications are absorbed into existing atomic skeletons. Thus, two skeletons that differ only by the number of additive or multiplicative constants are projected onto the same unique representative in S \mathcal{S} S .
Finally, since the number of nodes is bounded and the set of possible labels for each node is finite, the total number of distinct rooted trees that can be constructed is combinatorially finite. Because N \mathcal{N} N acts as a canonical map that projects the infinite space of raw skeletons into this bounded set of maximally expanded functional shapes, it follows that S \mathcal{S} S must contain a finite number of elements.
Appendix C: Expressive Scope and Structural Extensions
In this appendix, we justify the generalizability of the recursive structural decomposition (Proposition 1). Specifically, we demonstrate how this formulation naturally accommodates piecewise-defined functions, complex-valued expressions, and differential equations.
Piecewise-Defined Functions
Piecewise functions are often perceived as problematic for continuous SR due to their localized rules. However, within our framework, a piecewise function can be seamlessly integrated through analytical operators. Discontinuous or boundary-switching behaviour can be internalized into the unary operator set U \mathcal{U} U using indicator functions, or approximated smoothly via continuous operators already present in U \mathcal{U} U , such as the hyperbolic tangent.
Consider a piecewise function split across a threshold τ \tau τ :
f ( x ) = { g ( x ) if x < τ h ( x ) if x ≥ τ f(x)=
\begin{cases}
g(x) & \text{if } x<\tau\\
h(x) & \text{if } x\ge\tau
\end{cases} f ( x ) = { g ( x ) h ( x ) if x < τ if x ≥ τ
Using the Heaviside step function H ( x ) ∈ U H(x)\in\mathcal{U} H ( x ) ∈ U (where H ( x ) = 1 H(x)=1 H ( x ) = 1 if x ≥ 0 x\ge0 x ≥ 0 and 0 0 0 otherwise), this expression is rewritten as an algebraic combination:
f ( x ) = g ( x ) ( 1 − H ( x − τ ) ) + h ( x ) H ( x − τ ) f(x)=g(x)(1-H(x-\tau))+h(x)H(x-\tau) f ( x ) = g ( x ) ( 1 − H ( x − τ )) + h ( x ) H ( x − τ )
Expanding this product yields:
f ( x ) = g ( x ) − g ( x ) H ( x − τ ) + h ( x ) H ( x − τ ) . f(x)=g(x)-g(x)H(x-\tau)+h(x)H(x-\tau). f ( x ) = g ( x ) − g ( x ) H ( x − τ ) + h ( x ) H ( x − τ ) .
If g ( x ) g(x) g ( x ) and h ( x ) h(x) h ( x ) are admissible expressions satisfying Proposition 1, their product with the unary transformations H ( x − τ ) H(x-\tau) H ( x − τ ) maps directly onto the sum-of-products decomposition. Therefore, piecewise boundaries can be treated as non-linear unary modulations of functional blocks.
Complex-Valued Variables and Fields
While Proposition 1 is introduced using real-valued functions, its algebraic foundation extends naturally to the complex domain C \mathbb{C} C . Since C \mathbb{C} C constitutes an algebraic field (i.e., it satisfies all foundational axioms for addition and multiplication), the considered set of binary operators B = { + , × } \mathcal{B}=\{+,\times\} B = { + , × } preserves the same associative, commutative, and distributive properties required by the recursive decomposition.
Let f ( x ) f(x) f ( x ) be a complex-valued expression of a real variable x x x , mapped as f : R → C f:\mathbb{R}\to\mathbb{C} f : R → C , such that f ( x ) = Re ( x ) + i Im ( x ) f(x)=\operatorname{Re}(x)+i\operatorname{Im}(x) f ( x ) = Re ( x ) + i Im ( x ) . We show that both Re ( x ) \operatorname{Re}(x) Re ( x ) and Im ( x ) \operatorname{Im}(x) Im ( x ) can be individually expressed using the recursive structural decomposition defined in Proposition 1. By definition, f ( x ) f(x) f ( x ) is built from a finite composition of operators. We proceed inductively on the structure of the expression:
Base Case: Let f ( x ) = a + i b f(x)=a+ib f ( x ) = a + ib for a , b ∈ R a,b\in\mathbb{R} a , b ∈ R . Here, Re ( x ) = a \operatorname{Re}(x)=a Re ( x ) = a and Im ( x ) = b \operatorname{Im}(x)=b Im ( x ) = b , both of which are real constants satisfying Proposition 1 with ν 0 = a \nu_0=a ν 0 = a or b b b and all other terms vanishing. If f ( x ) = x f(x)=x f ( x ) = x , then Re ( x ) = x \operatorname{Re}(x)=x Re ( x ) = x and Im ( x ) = 0 \operatorname{Im}(x)=0 Im ( x ) = 0 , which also trivially satisfies the proposition.
Unary Operators: Let f ( x ) = ν ( g ( x ) ) f(x)=\nu(g(x)) f ( x ) = ν ( g ( x )) , where ν \nu ν is a complex unary operator acting on a subexpression g ( x ) ∈ R g(x)\in\mathbb{R} g ( x ) ∈ R . Any such operator can be decomposed into its real and imaginary parts, ν ( ⋅ ) = ν r e ( ⋅ ) + i ν i m ( ⋅ ) \nu(\cdot)=\nu_{\mathrm{re}}(\cdot)+i\nu_{\mathrm{im}}(\cdot) ν ( ⋅ ) = ν re ( ⋅ ) + i ν im ( ⋅ ) , where ν r e , ν i m ∈ U \nu_{\mathrm{re}},\nu_{\mathrm{im}}\in\mathcal{U} ν re , ν im ∈ U . Thus, Re ( x ) = ν r e ( g ( x ) ) \operatorname{Re}(x)=\nu_{\mathrm{re}}(g(x)) Re ( x ) = ν re ( g ( x )) and Im ( x ) = ν i m ( g ( x ) ) \operatorname{Im}(x)=\nu_{\mathrm{im}}(g(x)) Im ( x ) = ν im ( g ( x )) , preserving the unary-transformation mapping layer.
Binary Operators:
Re ( x ) = Re g ( x ) + Re h ( x ) , \operatorname{Re}(x)=\operatorname{Re}_g(x)+\operatorname{Re}_h(x), Re ( x ) = Re g ( x ) + Re h ( x ) ,
Im ( x ) = Im g ( x ) + Im h ( x ) . \operatorname{Im}(x)=\operatorname{Im}_g(x)+\operatorname{Im}_h(x). Im ( x ) = Im g ( x ) + Im h ( x ) .
If the real and imaginary components of g ( x ) g(x) g ( x ) and h ( x ) h(x) h ( x ) satisfy Proposition 1, their sums do as well, as addition appends terms to the outer linear summation ∑ i v i \sum_i v_i ∑ i v i .
f ( x ) = ( RE g ( x ) + i IM g ( x ) ) × ( RE h ( x ) + i IM h ( x ) ) , f(x)=\left(\operatorname{RE}_g(x)+i\operatorname{IM}_g(x)\right)\times\left(\operatorname{RE}_h(x)+i\operatorname{IM}_h(x)\right), f ( x ) = ( RE g ( x ) + i IM g ( x ) ) × ( RE h ( x ) + i IM h ( x ) ) ,
RE ( x ) = RE g ( x ) RE h ( x ) − IM g ( x ) IM h ( x ) , \operatorname{RE}(x)=\operatorname{RE}_g(x)\operatorname{RE}_h(x)-\operatorname{IM}_g(x)\operatorname{IM}_h(x), RE ( x ) = RE g ( x ) RE h ( x ) − IM g ( x ) IM h ( x ) ,
IM ( x ) = RE g ( x ) IM h ( x ) + IM g ( x ) RE h ( x ) . \operatorname{IM}(x)=\operatorname{RE}_g(x)\operatorname{IM}_h(x)+\operatorname{IM}_g(x)\operatorname{RE}_h(x). IM ( x ) = RE g ( x ) IM h ( x ) + IM g ( x ) RE h ( x ) .
Because subtraction is subsumed by addition via negation (v i ∈ R v_i\in\mathbb{R} v i ∈ R allows negative coefficients), the real and imaginary components of the product are exclusively formed by the sums of products of the components of g ( x ) g(x) g ( x ) and h ( x ) h(x) h ( x ) . By induction, multiplying these structures simply increases the number of terms inside the product operators (∏ j \prod_j ∏ j ) of the final architecture.
Consequently, an SR model based on or trained on the real-valued univariate skeleton dataset proposed in this work could potentially be applied to identify complex-valued expressions. While this constitutes future work, we argue that an SR framework could be designed such that the trained model targets RE ( x ) \operatorname{RE}(x) RE ( x ) and IM ( x ) \operatorname{IM}(x) IM ( x ) using real-valued primitives while taking into account potential domain-specific constraints. For example, for holomorphic systems, the discovery process could enforce structural consistency by requiring that the derivatives of the recovered real and imaginary expressions satisfy the Cauchy-Riemann equations.
Differential Equations
Dynamical systems governed by Ordinary Differential Equations (ODEs) or Partial Differential Equations (PDEs) model the relationship between independent variables, state variables, and their respective derivatives. We show that these equations can be accommodated to comply with the recursive structural decomposition of Proposition 1. As such, an SR framework featuring an SR model trained on the univariate skeleton dataset proposed in this work could be naturally extended to discover these dynamics. This can be achieved by adopting a data-augmentation strategy similar to the Sparse Identification of Nonlinear Dynamics (SINDy) paradigm [19 , 20 ] .
In this strategy, the relevant time-derivatives or spatial partial derivatives (e.g., x ˙ \dot{x} x ˙ , y ′ y' y ′ , y ′ ′ y'' y ′′ ) are first numerically or analytically estimated directly from the raw experimental data. Once computed, they are appended to the dataset as additional independent feature columns. The justification for this is that, once the system has been augmented with these derivative variables, they represent real-valued variable expressions operated on by the same set of operators U \mathcal{U} U and B \mathcal{B} B . Because the underlying equation is built from these standard algebraic combinations, the functional blocks mapping the derivatives to the system dynamics preserve the exact recursive sum-of-products architecture required by Proposition 1. Therefore, Proposition 1 holds over the augmented space.
Specifically, by treating the pre-computed derivatives as standalone variables, the task of learning a differential equation reduces to an SR problem that can be solved in a decomposable manner. Consider an underlying differential equation G ( x , y , y ′ , y ′ ′ ) = x ( y ′ ′ ) 2 + y ′ y ′ ′ + cos ( x ) y ′ + 7 = 0 \mathcal{G}(x,y,y',y'')=x(y'')^2+y'y''+\cos(x)y'+7=0 G ( x , y , y ′ , y ′′ ) = x ( y ′′ ) 2 + y ′ y ′′ + cos ( x ) y ′ + 7 = 0 . Let the derivatives be evaluated from raw data and mapped to explicit variable tokens, such as u 1 = y ′ u_1=y' u 1 = y ′ and u 2 = y ′ ′ u_2=y'' u 2 = y ′′ , yielding the augmented input vector x a u g = { x , y , u 1 , u 2 } \mathbf{x}_{\mathrm{aug}}=\{x,y,u_1,u_2\} x aug = { x , y , u 1 , u 2 } . Because Proposition 1 remains valid, the skeleton function κ ( ⋅ ) \kappa(\cdot) κ ( ⋅ ) can isolate the variable-response relationships for each derivative track independently. For instance, e ( u 1 ) = κ ( G ; u 1 ) = c 1 u 1 + c 2 e(u_1)=\kappa(\mathcal{G};u_1)=c_1u_1+c_2 e ( u 1 ) = κ ( G ; u 1 ) = c 1 u 1 + c 2 , and e ( u 2 ) = κ ( G ; u 2 ) = c 3 u 2 2 + c 4 u 2 + c 5 e(u_2)=\kappa(\mathcal{G};u_2)=c_3u_2^2+c_4u_2+c_5 e ( u 2 ) = κ ( G ; u 2 ) = c 3 u 2 2 + c 4 u 2 + c 5 . The subsequent progressive merging process then recombines these isolated derivative skeletons with the state variable skeletons (e.g., those found for x x x and y y y ) to reconstruct the complete multivariate non-linear differential equation.
Additional Structural Filtering Rules
To mitigate unnecessary computational overhead and prevent the expression space from expanding into functionally redundant or physically unrealistic structures, we enforce a set of additional filtering rules. These rules govern operator definitions, composition nesting, and algebraic simplifications for the skeleton generation process.
Inverse and Power Operations
The Inversion Operator: The inv \operatorname{inv} inv operator is treated strictly as an algebraic rational operator rather than a transcendental transformation. Consequently, its presence does not contribute to the transcendental unary count N U N_U N U or the maximum structural depth metric N D N_D N D .
Power Domain: While Pow ( f ( x ) ) = f ( x ) h \operatorname{Pow}(f(x))=f(x)^h Pow ( f ( x )) = f ( x ) h is defined as a generic power function where h ∈ Q h\in\mathbb{Q} h ∈ Q , the operators x \sqrt{\phantom{x}} x , square, and cube are retained as independent primitives in U \mathcal{U} U due to their high prevalence in physical systems. To prevent structural overlap, the generic Pow \operatorname{Pow} Pow operator avoids values h ∉ { 0.5 , 1 , 2 , 3 } h\notin\{0.5,1,2,3\} h ∈ / { 0.5 , 1 , 2 , 3 } .
Power Atom Cost: Because the atom P P P explicitly involves the exponentiation of a variable, it is penalized by counting directly toward the unary operator budget N U N_U N U .
Structural Closure and Nesting Boundaries
Power Application to Atoms: The generic power functions cannot be applied directly to atoms L L L or P P P . This restriction is derived from the structural closure rules (Definition 3) where L h → P L^h\to P L h → P and P h → P P^h\to P P h → P .
Prohibited Products with Inversion: Based on closure rules, multiplying an atom by the inverse of L L L yields structural equivalences such as L inv ( L ) → C + C inv ( L ) L\operatorname{inv}(L)\to C+C\operatorname{inv}(L) L inv ( L ) → C + C inv ( L ) and P inv ( L ) → P + C inv ( L ) P\operatorname{inv}(L)\to P+C\operatorname{inv}(L) P inv ( L ) → P + C inv ( L ) , already accounted for by our grammar. Hence, structural configurations L inv ( L ) L\operatorname{inv}(L) L inv ( L ) and P inv ( L ) P\operatorname{inv}(L) P inv ( L ) are forbidden.
Additive Absorptions of P inv ( P ) P\operatorname{inv}(P) P inv ( P ) : Combinations involving P inv ( P ) P\operatorname{inv}(P) P inv ( P ) cannot be additively appended to canonical atoms. This prunes the redundant extensions P inv ( P ) + L → P inv ( P ) P\operatorname{inv}(P)+L\to P\operatorname{inv}(P) P inv ( P ) + L → P inv ( P ) and P inv ( P ) + P → P P\operatorname{inv}(P)+P\to P P inv ( P ) + P → P .
Nesting and Operations of inv \operatorname{inv} inv : The inversion operator cannot be nested within another inversion (e.g., inv ( C + C inv ( ⋅ ) ) \operatorname{inv}(C+C\operatorname{inv}(\cdot)) inv ( C + C inv ( ⋅ )) ) since such topologies compress algebraically into a single inversion layer. Furthermore, the sum or product of independent inverse terms is prohibited. For instance, the expression inv ( A ) + inv ( B ) \operatorname{inv}(A)+\operatorname{inv}(B) inv ( A ) + inv ( B ) is blocked because its equivalent form ( A + B ) inv ( A ⋅ B ) (A+B)\operatorname{inv}(A\cdot B) ( A + B ) inv ( A ⋅ B ) is already
expressible within the primary grammar.
Nesting of Pow: Pow cannot be nested within another Pow operator or any similar power operation (i.e., exp, sinh, cosh), and vice versa. This prevents numerical explosion during evaluation, given that Pow is restricted to exponents higher than 3. In addition, compositions such as Pow(P P P ) are prohibited by canonical closure rules.
Exponential Algebraic Simplifications
Constant Exclusion: The argument of an exponential operator does not receive the general additive constant placeholder. Under standard grammar expansions, a unary operator follows the rule ν ( τ ) → ν ( C + Ω ) \nu(\tau) \to\nu(C + \Omega) ν ( τ ) → ν ( C + Ω ) . For the exp operator, this is modified to ν ( τ ) → ν ( Ω ) \nu(\tau) \to\nu(\Omega) ν ( τ ) → ν ( Ω ) as an additive constant in the exponent is absorbed linearly into the outer constant placeholder via the algebraic identity: exp ( C + f ( x ) ) = exp ( C ) exp ( f ( x ) ) = C exp ( f ( x ) ) \exp(C + f(x)) = \exp(C)\exp(f(x)) = C\exp(f(x)) exp ( C + f ( x )) = exp ( C ) exp ( f ( x )) = C exp ( f ( x )) .
Interaction Restraints: To prevent redundant multi-term tracks, an exp ( ⋅ ) \exp(\cdot) exp ( ⋅ ) operator cannot be multiplied by another exp ( ⋅ ) \exp(\cdot) exp ( ⋅ ) operator, as the identity exp ( A ) exp ( B ) = exp ( A + B ) \exp(A)\exp(B) = \exp(A + B) exp ( A ) exp ( B ) = exp ( A + B ) allows the architecture to represent the relationship within a single unified argument. Finally, an exp ( ⋅ ) \exp(\cdot) exp ( ⋅ ) block cannot be nested inside an inv ( ⋅ ) \operatorname{inv}(\cdot) inv ( ⋅ ) operator, as this transformation is functionally identical to mapping an exponential with a negated internal coefficient.
Avoiding Invalid Operations
For completeness, we detail the recursive tree-traversal pipeline for avoiding invalid operations (outlined in Algorithm D.1), adapted from Morales and Sheppard [6 ] and extended with our derivative-driven singularity avoidance mechanism, as described in Sec. IV-B.
To systematically resolve domain violations and numerical overflows without relying on single-pass inspection, symbolic expressions are analyzed hierarchically as trees. Each tree node contains an operator (f . f u n c f.\mathrm{func} f . func ) and a vector of arguments (f . a r g s f.\mathrm{args} f . args ). The algorithm evaluates each argument independently (Line 4), treating it as a nested sub-expression tree called a r g \mathrm{arg} arg . The function c o n t a i n S p e c i a l F ( a r g ) \mathrm{containSpecialF}(\mathrm{arg}) containSpecialF ( arg ) (Line 5) traverses the subtree to determine whether it contains bounded or singular operators (e.g., ln \ln ln , ⋅ \sqrt{\cdot} ⋅ , arcsin \arcsin arcsin , tan \tan tan , or inv \operatorname{inv} inv ). If special operators are detected, i s S p e c i a l F ( a r g . f u n c ) \mathrm{isSpecialF}(\mathrm{arg.func}) isSpecialF ( arg.func ) checks whether the top operator of the subtree itself is special (Line 6). If the root is a standard operator (e.g., addition), the algorithm recursively descends deeper into the tree structure (Line 7). If the top operator is special, any deeper nested dependencies must be resolved first. Line 9 checks if another special function resides within the inner argument; if so, a recursive call is triggered (Line 10) to clear deeper constraints before modifying the parent node.
To illustrate this bottom-up traversal, consider f ( x ) = arcsin ( log ( x ) ) + x 2 + 3 f(x) = \arcsin(\log(x)) + x^2 + 3 f ( x ) = arcsin ( log ( x )) + x 2 + 3 . The top-level operator is an addition node with three arguments: [ arcsin ( log ( x ) ) , x 2 , 3 ] [\arcsin(\log(x)), x^2, 3] [ arcsin ( log ( x )) , x 2 , 3 ] . The recursive pipeline descends into the first argument, identifying arcsin as a special double-bounded operator. Before evaluating it, the algorithm parses its inner argument, discovering the nested single-bounded log ( x ) \log(x) log ( x ) sub-tree. This bottom-up resolution ensures that the inner domain constraints (e.g., enforcing x > 0 x > 0 x > 0 for log ( x ) \log(x) log ( x ) ) are satisfied and modified before the parent operator evaluates its incoming values (e.g., scaling the log values to fit within the [ − 1 , 1 ] [-1, 1] [ − 1 , 1 ] domain of arcsin).
Furthermore, because the special operators are always unary, the inner argument is extracted as a r g . a r g s [ 0 ] \mathrm{arg.args[0]} arg.args [ 0 ] (Line 11). The subtree is evaluated on the current support points x x x to produce output array v a l s \mathrm{vals} vals (Line 12). If c o n t a i n N a N s ( v a l s ) \mathrm{containNaNs}(\mathrm{vals}) containNaNs ( vals ) flags undefined outputs or numerical values exceeding 10 5 10^5 1 0 5 (Line 13), the inner function values are computed (Line 14) and adjusted according to the operator class:
Single-Bounded Operators (Line 16): Modified via m o d S B o u n d e d \mathrm{modSBounded} modSBounded by dynamically shifting or negating the inner domain to satisfy constraints (e.g., injecting horizontal offsets if ⋅ \sqrt{\cdot} ⋅ receives negative inputs).
Double-Bounded Operators (Line 18): Modified via m o d D B o u n d e d \mathrm{modDBounded} modDBounded by linearly scaling internal values to map strictly within stable boundaries (e.g., [ − 1 , 1 ] [-1, 1] [ − 1 , 1 ] ).
Operations with Singularities (Line 20): Handled via g e t A d a p t i v e I n t e r v a l s \mathrm{getAdaptiveIntervals} getAdaptiveIntervals , which computes local derivative-driven exclusion windows based on the slope threshold α \alpha α and appends them to a global list of forbidden subdomains (I e x c l \mathrm{Iexcl} Iexcl ).
Finally, the inner argument of the subtree node is updated with its modified, valid form i n n A r g \mathrm{innArg} innArg (Line 21), and the altered arguments are recompiled back into the root expression tree (Line 23), yielding a globally safe function alongside a set of forbidden sampling intervals. Fig. D.1 illustrates a data generation example using f ( x ) = 1 ( x + 4 ) 3 + e 1 x − 4 f(x) = \frac{1}{(x+4)^3} + e^{\frac{1}{x-4}} f ( x ) = ( x + 4 ) 3 1 + e x − 4 1 and α = 0.9995 \alpha= 0.9995 α = 0.9995 , demonstrating how g e t A d a p t i v e I n t e r v a l s \mathrm{getAdaptiveIntervals} getAdaptiveIntervals assigns a tightly compressed exclusion window around the sharp asymptote at x = 4 x = 4 x = 4 while expanding the window to insulate the broader asymptote at x = − 4 x = -4 x = − 4 . Fig. D.2 depicts representative functions sampled from the same canonical skeleton, demonstrating consistent and reliable singularity avoidance across diverse parameter realizations.
Table D.1.
Figure D.1. A generation example using f ( x ) = 1 ( x + 4 ) 3 + e 1 x − 4 f(x) = \frac{1}{(x+4)^3} + e^{\frac{1}{x-4}} f ( x ) = ( x + 4 ) 3 1 + e x − 4 1 . (Top) Generated data on the entire domain [ − 10 , 10 ] [-10, 10] [ − 10 , 10 ] . (Bottom) Detailed view of how singularities are avoided.
Figure D.2. Various functions generated using the canonical skeleton e ( x ) = C + L C arctan ( P ) + C tanh ( L ) e(x) = C + \frac{L}{C\arctan(P)+C}\tanh(L) e ( x ) = C + C a r c t a n ( P ) + C L tanh ( L )
Appendix E: Benchmark Datasets
This appendix provides the ExCaUS-Bench equations and the corresponding sampled datasets used to evaluate the SR
methods listed in Sec. V-B. The benchmark is organized into three difficulty tiers: Easy (E1–E50), Medium (M1–M50), and Hard (H1–H50), with the generated equations reported in Tables E.1–E.3. The corresponding plots of the sampled datasets are provided in Figs. E.1–E.9, with each figure displaying the benchmark equations within its respective tier.
Table E.1. Generated Equations for the E tier
Table E.2. Generated Equations for the M tier
Table E.3. Generated Equations for the H tier
Figure E.1. Plots for Benchmark Equations — E Tier (E1–E20)
Figure E.2. Plots for Benchmark Equations — E Tier (E21–E40)
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
(j)
Figure E.3. Plots for Benchmark Equations — E Tier (E41–E50)
Figure E.4. Plots for Benchmark Equations — M Tier (M1–M20)
Figure E.5. Plots for Benchmark Equations — M Tier (M21–M40)
Figure E.6. Plots for Benchmark Equations — M Tier (M41–M50)
Figure E.7. Plots for Benchmark Equations — H Tier (H1–H20)
Figure E.8. Plots for Benchmark Equations — H Tier (H21–H40)
Figure E.9. Plots for Benchmark Equations — H Tier (H41–H50)
Table F.1. Tuning hyperparameter grids
Appendix F: SR Benchmarking: Tuning and Results
This appendix provides the hyperparameter tuning details and per-problem results for the SR benchmarking experiments described in § 5 -B. Table F.1 reports the exhaustive hyperparameter grids evaluated for each SR method, while Table F.2 lists the corresponding optimal configurations selected through an exhaustive grid search. Tables F.3–F.8 provide the per-problem mean and standard deviation of the interpolation and extrapolation MSE and R 2 R^2 R 2 results. Cells labeled with – indicate cases where the algorithm produced invalid expressions or yielded NaN outputs during evaluation for all 10 repetitions.
Table F.2. Selected optimal hyperparameter configurations
SR Benchmarking: Tuning and Results
Table F.3. Easy Tier — MSE Performance
Table F.4. Medium Tier — MSE Performance
Table F.5. Hard Tier — MSE Performance.
Table F.6. Easy Tier — R 2 R^2 R 2 Performance
Table F.7. Medium Tier — R 2 R^2 R 2 Performance.
Table F.8. Hard Tier — R 2 R^2 R 2 Performance.