Sample Complexity of Scientific Discovery: PAC Learnability of Compositional Function Trees Şuayp Talha Kocabay, Talha Rüzgar Akkuş, Kerem Yalçın Abstract Scientific discovery via symbolic regression is often viewed as statistically and computationally intractable because the hypothesis space of expressions grows combinatorially with depth. This paper revisits the statistical side through the lens of PAC learning, focusing on compositional function trees built from a finite vocabulary of smooth operators (e.g., { + , × , sin , exp } \{+,\times,\sin,\exp\} and affine maps). We prove that the relevant generalization quantity—Rademacher complexity, hence the excess risk—does not necessarily blow up exponentially with the number of distinct symbolic structures, but is controlled by (i) the depth d d and (ii) the Lipschitz constants of the base operators along the composed computation graph. Concretely, under mild Lipschitz conditions on operators and bounded affine leaves, a finite-union bound over a vocabulary of size K = | ℋ base | K{=}|\mathcal{H}_{\mathrm{base}}| together with Maurer-type vector contraction yields ℜ n ​ ( ℋ comp d ) ≤ ( K ​ b ​ 2 ​ L ) d − 1 ​ ℜ n ​ ( ℋ comp 1 ) \mathfrak{R}_{n}(\mathcal{H}_{\mathrm{comp}}^{d})\leq(Kb\sqrt{2}\,L)^{d-1}\mathfrak{R}_{n}(\mathcal{H}_{\mathrm{comp}}^{1}) with arity bound b b ; corresponding high-probability risk bounds scale as 𝒪 ⁡ ( L d / n ) \mathcal{O}(L^{d}/\sqrt{n}) when K , b = O ⁡ ( 1 ) K,b{=}O(1) and ℜ n ( ℋ comp 1 ) = O ( n − 1 / 2 ) \mathfrak{R}_{n}(\mathcal{H}_{\mathrm{comp}}^{1}){=}O(n^{-1/2}) . We complement the theory with a modular codebase that trains differentiable operator trees (not MLPs) on synthetic “physics-like” targets of controlled depth and shows that the empirical generalization gap correlates positively with the predicted complexity term ( L ^ d ) / n (\widehat{L}^{d})/\sqrt{n} . 1 Introduction Scientific machine learning frequently requires interpretable functional relationships from small datasets, not only accurate predictions. While deep neural networks can approximate complex functions, they typically do not yield concise symbolic laws, raising concerns in the sciences where interpretability, extrapolation, and falsifiability are central. Symbolic regression (SR) addresses this by searching over expressions built from a vocabulary of primitives, and has led to influential systems and benchmarks ( Koza 1992 ; Schmidt & Lipson 2009a ; Schmidt & Lipson 2009b ; Udrescu & Tegmark 2020 ; Cranmer 2023 ; La Cava et al. 2021 ) . However, SR is often described as “unlearnable” because the number of candidate expressions grows exponentially with depth, and finding the best expression is NP-hard in many formulations. This view conflates computational hardness with statistical learnability. PAC learning theory ( Valiant 1984 ) separates these issues: a hypothesis class can be PAC learnable (small sample complexity) even if optimizing over it is computationally challenging. We formalize this separation for a compositional hypothesis space motivated by scientific discovery. Our core message is that statistical generalization of compositional operator trees is governed by compositional stability (Lipschitzness) rather than by the raw count of symbolic structures. Technically, we control generalization via Rademacher complexity ( Bartlett & Mendelson 2003 ; Mohri et al. 2018 ) , extending classical contraction arguments ( Ledoux & Talagrand 1991 ) to tree-structured compositions. Discrete search procedures incur computational costs proportional to the number of structures explored ( Koza 1992 ; Petersen et al. 2021 ) , whereas uniform convergence controls how reliably empirical risk ranks hypotheses once attention is restricted to a class \mathcal{H}_{\mathrm{comp}}^{d} and its continuous parameters . In practice SR couples both: a learner proposes syntax trees and fits coefficients (often nonlinearly); our bounds clarify what statistical scaling one should expect from that nonlinear estimation step when stability holds across primitives. Contributions. • We define a compositional function-tree hypothesis space \mathcal{H}_{\mathrm{comp}}^{d} capturing symbolic expressions of depth d built from a base vocabulary \mathcal{H}_{\mathrm{base}} . • Under mild Lipschitz assumptions on base operators and bounded affine leaves ( 3.2 ), we bound \mathfrak{R}_{n}(\mathcal{H}_{\mathrm{comp}}^{d}) by (Kb\sqrt{2}\,L)^{d-1}\mathfrak{R}_{n}(\mathcal{H}_{\mathrm{comp}}^{1}) for K{=}|\mathcal{H}_{\mathrm{base}}| ( Equations 14 and 4.6 ), yielding PAC-style risk bounds scaling as \mathcal{O}(L^{d}/\sqrt{n}) when K,b{=}O(1) . • We provide a clean PyTorch implementation of differentiable compositional trees and controlled-depth synthetic “physics” datasets, and empirically verify that the generalization gap tracks (\widehat{L}^{d})/\sqrt{n} . Theory versus empirical proxies. Our guarantees concern uniform convergence over \mathcal{H}_{\mathrm{comp}}^{d} and invoke population quantities (d,L) (localized when nonlinear operators such as \exp appear). The experiments substitute d by the fixed structural depth of the fitted tree and L by a finite-batch estimator \widehat{L} . Thus alignment between observed gaps and (\widehat{L}^{d})/\sqrt{n} should be read as evidence that compositional stability predicts qualitative scaling rather than as identification of sharp numerical constants. 2 Related Work Symbolic regression and scientific discovery. Classic SR is commonly instantiated via genetic programming ( Koza 1992 ) or program synthesis-style search, with modern toolchains emphasizing physics heuristics ( Udrescu & Tegmark 2020 ) , large-scale benchmarking ( La Cava et al. 2021 ) , and differentiable relaxations ( Cranmer et al. 2020 ; Cranmer 2023 ) . Recent work has also explored deep reinforcement learning and risk-seeking objectives for expression discovery ( Petersen et al. 2021 ) , as well as broader surveys of SR methodology and applications ( Makke & Chawla 2024 ) . In parallel, sparse discovery methods such as SINDy ( Brunton et al. 2016 ) target dynamical systems by searching over a pre-specified library with sparsity penalties. Our focus differs: we do not propose a new SR search algorithm; instead, we give a statistical learnability analysis of compositional operator classes and validate the predicted scaling empirically. Generalization via complexity and stability. Rademacher complexity and related uniform convergence tools are standard in learning theory ( Vapnik 1998 ; Bartlett & Mendelson 2003 ; Shalev-Shwartz & Ben-David 2014 ; Mohri et al. 2018 ) . For deep neural networks, stability and Lipschitz-like quantities (e.g., spectral norms) play central roles in generalization bounds ( Bartlett et al. 2017 ) . Our analysis is closest in spirit to compositional complexity controls (e.g., chain rules for Gaussian/Rademacher processes and vector contraction inequalities) ( Ledoux & Talagrand 1991 ; Talagrand 2014 ; van der Vaart & Wellner 1996 ; Maurer 2016a ; Maurer 2016b ) , specialized here to operator trees commonly used in scientific modeling. Depth versus width. Much neural-network theory emphasizes architectural depth jointly with width, norms, or margin quantities ( Bartlett et al. 2017 ; Neyshabur et al. 2017 ) . Here depth enters explicitly through repeated composition of a fixed vocabulary of interpretable operators and produces multiplicative Lipschitz accumulation along trees rather than implicit coupling through parameters. This distinction clarifies why symbolic/compositional models admit bounds stated directly in terms of (d,L) without appealing to implicit layers or infinite-width limits. Refined contraction and localization. Recent refinements of Talagrand-type contraction for structured vector-valued maps sharpen dependence on norms and layer geometry beyond the textbook lemma ( Truong 2022 ) . Parallel localization tools—covering-number-based local Rademacher complexities ( Lei et al. 2016 ) and offset/local frameworks that yield estimator-aware excess-risk bounds ( Kanade et al. 2024 ) —provide routes toward sharper or hypothesis-dependent guarantees than the uniform bounds emphasized here. Discrete syntax graphs versus continuous estimation. Much SR methodology emphasizes discrete structure discovery combined with numerical tuning ( Koza 1992 ; Udrescu & Tegmark 2020 ; Cranmer 2023 ) . From a learning-theoretic viewpoint it is helpful to separate (i) the outer discrete optimization problem—often akin to program synthesis ( Petersen et al. 2021 ) —from (ii) the inner regression problem induced once an architecture family is fixed. Our complexity estimates speak primarily to (ii): depth enters compositionally through gradients/Lipschitz maps rather than through enumeration over exponentially many graphs. 3 Preliminaries 3.1 Learning setup Let \mathcal{X}\subset\mathbb{R}^{p} and \mathcal{Y}\subset\mathbb{R} . Given i.i.d. data S=\{(x_{i},y_{i})\}_{i=1}^{n} drawn from an unknown distribution \mathcal{D} on \mathcal{X}\times\mathcal{Y} , we consider squared loss \ell(f(x),y)=(f(x)-y)^{2} . For a hypothesis f\in\mathcal{H} , define true risk R(f)=\mathbb{E}_{(x,y)\sim\mathcal{D}}[\ell(f(x),y)] and empirical risk \widehat{R}_{S}(f)=\frac{1}{n}\sum_{i=1}^{n}\ell(f(x_{i}),y_{i}) . 3.2 Trees, depth, and branching To make the role of depth explicit, it is useful to describe a hypothesis f\in\mathcal{H}_{\mathrm{comp}}^{d} as a rooted operator tree whose internal nodes are operators from \mathcal{H}_{\mathrm{base}} and whose leaves are either input coordinates or constants. Let b denote the maximum arity (branching factor) of operators (for our vocabulary, b\leq 2 ). We distinguish: • Depth d : maximum number of operator applications along any root-to-leaf path. • Size s : number of internal nodes (operators) in the tree. While the number of distinct trees of depth d can grow super-exponentially in d , our bounds depend on d (and weakly on b ) through stability, not enumeration. 3.3 Base operator class and compositional trees Let \mathcal{H}_{\mathrm{base}} be a finite set of (possibly parameterized) operators acting on scalars or tuples of scalars. In this paper we focus on a small differentiable vocabulary typical of SR and physics-inspired modeling: \mathcal{H}_{\mathrm{base}}\subset\Big\{\mathrm{add},\ \mathrm{mult},\ \sin,\ \cos,\ \exp,\ \mathrm{affine}\Big\}. (1) We define a compositional hypothesis space of depth d recursively. For simplicity, assume a binary tree arity (unary operators can be modeled by taking one child to be a constant function). Definition 3.1 (Compositional hypothesis space) . Let \mathcal{H}_{\mathrm{comp}}^{1} be the set of base (non-composed) hypotheses. For d\geq 2 , define \mathcal{H}_{\mathrm{comp}}^{d}=\Big\{h\circ(g_{1},g_{2})\ :\ h\in\mathcal{H}_{\mathrm{base}},\ g_{1},g_{2}\in\mathcal{H}_{\mathrm{comp}}^{d-1}\Big\}. (2) Here (g_{1},g_{2}) denotes the pair-valued map x\mapsto(g_{1}(x),g_{2}(x)) and h acts on \mathbb{R}^{2} (or \mathbb{R} in the unary case). The recursion induces a computation tree with depth d . Parameters. Leaves labeled \mathrm{affine} introduce slope/intercept parameters; compositions propagate gradients through operators exactly as in standard automatic differentiation. Assumption 3.2 (Bounded affine leaves) . Assume \mathcal{X} has bounded coordinates: \left\lVert x\right\rVert_{\infty}\leq X_{\max} almost surely. Every affine primitive x\mapsto\theta^{\top}x+\theta_{0} used at a leaf satisfies \left\lVert\theta\right\rVert_{2}\leq W_{\max} and |\theta_{0}|\leq B_{\mathrm{leaf}} . Under Assumption 3.2 , leaves have uniformly bounded outputs on \mathcal{X} , and the depth- 1 class \mathcal{H}_{\mathrm{comp}}^{1} is a finite union of bounded-parameter linear predictors; classical Rademacher bounds then yield \mathfrak{R}_{n}(\mathcal{H}_{\mathrm{comp}}^{1})=\mathcal{O}(W_{\max}X_{\max}\sqrt{p/n}) up to logarithmic factors ( Bartlett & Mendelson 2003 ; Mohri et al. 2018 ) . 3.4 Local Lipschitz constants and bounded ranges Since scientific data are bounded by measurement ranges, we work with local Lipschitz constants on the operator ranges induced by the data distribution and the hypothesis parameters. Formally, for a function f:\mathcal{X}\to\mathbb{R} , define its Lipschitz constant on \mathcal{X} as \mathrm{Lip}_{\mathcal{X}}(f):=\sup_{x\neq x^{\prime}}\frac{|f(x)-f(x^{\prime})|}{\left\lVert x-x^{\prime}\right\rVert_{2}}. (3) For operators like \exp , \mathrm{Lip}_{\mathcal{X}}(\exp\circ f) is controlled by the range of f(\mathcal{X}) (cf. Proposition 4.3 ). This is standard in empirical process arguments that localize complexity to relevant regions ( van der Vaart & Wellner 1996 ; Koltchinskii & Panchenko 2002 ) . 3.5 Rademacher complexity Given a sample S=(x_{i})_{i=1}^{n} and a real-valued function class \mathcal{F} , the empirical Rademacher complexity is \mathfrak{R}_{S}(\mathcal{F})=\mathbb{E}_{\sigma}\Big[\sup_{f\in\mathcal{F}}\frac{1}{n}\sum_{i=1}^{n}\sigma_{i}f(x_{i})\Big], (4) where \sigma_{i} are i.i.d. Rademacher signs. We denote \mathfrak{R}_{n}(\mathcal{F})=\mathbb{E}_{S}[\mathfrak{R}_{S}(\mathcal{F})] . For a vector-valued class \mathcal{G}\subset(\mathcal{X}\to\mathbb{R}^{m}) , we use the coordinatewise empirical Rademacher complexity with independent signs per coordinate ( Maurer 2016b ) : \mathfrak{R}_{S}^{(m)}(\mathcal{G})=\mathbb{E}_{\sigma}\Big[\sup_{g\in\mathcal{G}}\frac{1}{n}\sum_{i=1}^{n}\sum_{j=1}^{m}\sigma_{i}^{(j)}\,g_{j}(x_{i})\Big], (5) where \sigma_{i}^{(1)},\dots,\sigma_{i}^{(m)} are independent Rademacher signs for each sample index i . When m{=}2 and \mathcal{G}=\mathcal{F}_{1}\times\mathcal{F}_{2}=\{x\mapsto(f_{1}(x),f_{2}(x)):\ f_{1}\in\mathcal{F}_{1},f_{2}\in\mathcal{F}_{2}\} , we write \mathfrak{R}_{S}(\mathcal{F}_{1}\times\mathcal{F}_{2}):=\mathfrak{R}_{S}^{(2)}(\mathcal{G}) . Rademacher complexity yields uniform generalization bounds for Lipschitz losses ( Bartlett & Mendelson 2003 ; Mohri et al. 2018 ) . 4 Main Theoretical Results Our bounds formalize the intuition that compositional trees generalize if each layer/operator is stable . The key technical tool is a tree-structured contraction inequality, conceptually extending Ledoux–Talagrand contraction ( Ledoux & Talagrand 1991 ) and compositional Rademacher results ( Maurer 2016a ) to our setting. 4.1 Lipschitz assumptions Assumption 4.1 (Lipschitz operators) . Each base operator h\in\mathcal{H}_{\mathrm{base}} is (locally) L_{h} -Lipschitz on the relevant range of its inputs with respect to the Euclidean norm. That is, for all admissible inputs u,v , |h(u)-h(v)|\leq L_{h}\left\lVert u-v\right\rVert_{2}. Let L=\max_{h\in\mathcal{H}_{\mathrm{base}}}L_{h} . Remark 4.2 . For operators such as \exp , global Lipschitzness fails on \mathbb{R} . In scientific discovery, inputs are typically bounded by measurement ranges; our analysis is local to the operator ranges induced by the data distribution and the learned parameters. The experiments estimate \widehat{L} data-dependently on the fitted map rather than certifying a sharp uniform Lipschitz constant over all of \mathcal{H}_{\mathrm{comp}}^{d} . When L is measured relative to ranges induced by a specific hypothesis, contraction inequalities read hypothesis-dependent; uniform guarantees require either an envelope on admissible ranges (here enforced jointly by bounded outputs |f|\leq B , bounded covariates, and Assumption 3.2 ) or localization along the data-dependent slice relevant to empirical risk minimization ( Koltchinskii & Panchenko 2002 ; Lei et al. 2016 ; Kanade et al. 2024 ) . 4.2 A compositional Rademacher lemma We first state a clean inequality that captures the multiplicative depth effect. We present a proof sketch highlighting the main steps; full details are in Appendix A . Proposition 4.3 (Lipschitz calculus for common operators) . Let f,g:\mathcal{X}\to\mathbb{R} be Lipschitz with constants \mathrm{Lip}(f),\mathrm{Lip}(g) w.r.t. \left\lVert\cdot\right\rVert_{2} on \mathcal{X} . Assume moreover that |f(x)|\leq B_{f} and |g(x)|\leq B_{g} for all x\in\mathcal{X} . Then on \mathcal{X} : \displaystyle\mathrm{Lip}(f+g) \displaystyle\leq\mathrm{Lip}(f)+\mathrm{Lip}(g), (6) \displaystyle\mathrm{Lip}(f\cdot g) \displaystyle\leq B_{g}\,\mathrm{Lip}(f)+B_{f}\,\mathrm{Lip}(g), (7) \displaystyle\mathrm{Lip}(\sin\circ f) \displaystyle\leq\mathrm{Lip}(f),\qquad\mathrm{Lip}(\cos\circ f)\leq\mathrm{Lip}(f), (8) \displaystyle\mathrm{Lip}(\exp\circ f) \displaystyle\leq\exp(\sup_{x\in\mathcal{X}}f(x))\,\mathrm{Lip}(f). (9) Proof. Each inequality follows from the mean value theorem and standard product/chain rules, taking suprema over x\in\mathcal{X} . ∎ Lemma 4.4 (Vector contraction (Maurer)) . Let \mathcal{G}\subset(\mathcal{X}\to\mathbb{R}^{m}) and let \Phi:\mathbb{R}^{m}\to\mathbb{R} be L -Lipschitz w.r.t. the Euclidean norm on \mathbb{R}^{m} with \Phi(0)=0 . Define \Phi\circ\mathcal{G}=\{\Phi\circ g:g\in\mathcal{G}\} . Then for any sample S , \mathfrak{R}_{S}(\Phi\circ\mathcal{G})\leq\sqrt{2}\,L\,\mathfrak{R}_{S}^{(m)}(\mathcal{G}). (10) Proof sketch. This is Maurer’s vector-contraction inequality ( Maurer 2016b ) , stated for the coordinatewise complexity ( 5 ). If \Phi(0)\neq 0 , subtract the constant shift (Rademacher averages are unchanged by adding fixed offsets to f(x_{i}) ). ∎ Lemma 4.5 (Product classes do not multiply complexity) . Let \mathcal{F}_{1},\mathcal{F}_{2}\subset(\mathcal{X}\to\mathbb{R}) and define the paired class \mathcal{F}_{1}\times\mathcal{F}_{2}=\{x\mapsto(f_{1}(x),f_{2}(x)):\ f_{1}\in\mathcal{F}_{1},f_{2}\in\mathcal{F}_{2}\} . With the convention \mathfrak{R}_{S}(\mathcal{F}_{1}\times\mathcal{F}_{2})=\mathfrak{R}_{S}^{(2)}(\mathcal{F}_{1}\times\mathcal{F}_{2}) from ( 5 ), for any sample S , \mathfrak{R}_{S}(\mathcal{F}_{1}\times\mathcal{F}_{2})\leq\mathfrak{R}_{S}(\mathcal{F}_{1})+\mathfrak{R}_{S}(\mathcal{F}_{2}). (11) Proof. Expand \mathfrak{R}_{S}^{(2)} using independent signs \sigma_{i}^{(1)},\sigma_{i}^{(2)} and use \sup_{f_{1},f_{2}}(A(f_{1})+B(f_{2}))=\sup_{f_{1}}A(f_{1})+\sup_{f_{2}}B(f_{2}) . ∎ Lemma 4.6 (Union over a finite operator vocabulary) . Let K:=|\mathcal{H}_{\mathrm{base}}| and write \mathcal{H}_{\mathrm{base}}=\{h_{1},\dots,h_{K}\} . For each k , define \mathcal{C}_{k}=\{h_{k}\circ(g_{1},\dots,g_{b}):\ g_{j}\in\mathcal{H}_{\mathrm{comp}}^{d-1}\} . Then \mathcal{H}_{\mathrm{comp}}^{d}=\bigcup_{k=1}^{K}\mathcal{C}_{k} and, for every sample S , \mathfrak{R}_{S}(\mathcal{H}_{\mathrm{comp}}^{d})\leq\sum_{k=1}^{K}\mathfrak{R}_{S}(\mathcal{C}_{k})\leq K\cdot\max_{k\in[K]}\mathfrak{R}_{S}(\mathcal{C}_{k}). (12) At each recursive composition level the same finite union appears; hence a factor K (not the number of distinct tree shapes) enters per depth level. Proof. For fixed (\sigma_{i},x_{i}) and any f\in\bigcup_{k}\mathcal{C}_{k} , the sample average is bounded by \sum_{k=1}^{K}\sup_{g_{1},\dots,g_{b}\in\mathcal{H}_{\mathrm{comp}}^{d-1}}\frac{1}{n}\sum_{i}\sigma_{i}h_{k}(g_{1}(x_{i}),\dots,g_{b}(x_{i})) ; take expectations. ∎ Theorem 4.7 (Constant-explicit depth bound for binary trees) . Assume each internal operator is L -Lipschitz w.r.t. \left\lVert\cdot\right\rVert_{2} on the relevant range (Assumption 4.1 ) and satisfies \Phi(0)=0 after centering constants. Then for any sample S and depth d\geq 1 , \mathfrak{R}_{S}(\mathcal{H}_{\mathrm{comp}}^{d})\leq(K\cdot 2\sqrt{2}\,L)^{d-1}\,\mathfrak{R}_{S}(\mathcal{H}_{\mathrm{comp}}^{1}), (13) where K:=|\mathcal{H}_{\mathrm{base}}| is the (fixed) operator vocabulary size. Proof sketch. By Lemma 4.6 , \mathfrak{R}_{S}(\mathcal{H}_{\mathrm{comp}}^{d})\leq K\max_{h}\mathfrak{R}_{S}(\mathcal{C}_{h}) . For fixed h , apply Lemma 4.4 with m{=}2 (cost \sqrt{2}\,L_{h} ) and Lemma 4.5 on the paired child outputs (cost 2 ). Iterate over depth. ∎ Corollary 4.8 (Branching factor b ) . If each internal node has arity at most b (i.e., it combines at most b children) and is L -Lipschitz w.r.t. the Euclidean norm on \mathbb{R}^{b} , then \mathfrak{R}_{S}(\mathcal{H}_{\mathrm{comp}}^{d})\leq(K\cdot b\sqrt{2}\,L)^{d-1}\,\mathfrak{R}_{S}(\mathcal{H}_{\mathrm{comp}}^{1}), (14) where K:=|\mathcal{H}_{\mathrm{base}}| . Proof sketch. Apply Lemma 4.6 at each depth level, then Lemma 4.4 with m{=}b and the b -fold analogue of Lemma 4.5 , \mathfrak{R}_{S}(\times_{j=1}^{b}\mathcal{F}_{j})\leq\sum_{j=1}^{b}\mathfrak{R}_{S}(\mathcal{F}_{j})\leq b\max_{j}\mathfrak{R}_{S}(\mathcal{F}_{j}) . ∎ 4.3 PAC-style generalization bound We translate Equation 14 into a risk bound. Let \mathcal{F}=\mathcal{H}_{\mathrm{comp}}^{d} and assume f(x) and y are bounded in [-B,B] , which holds in our synthetic experiments by construction. For squared loss \ell(\hat{y},y)=(\hat{y}-y)^{2} , the map \hat{y}\mapsto\ell(\hat{y},y) is 4B -Lipschitz in \hat{y} whenever |\hat{y}|,|y|\leq B , and the loss is bounded by 4B^{2} . Theorem 4.9 (Generalization bound for scientific discovery) . Assume 4.1 and 3.2 and that outputs are bounded by |f(x)|\leq B and |y|\leq B almost surely for every f\in\mathcal{H}_{\mathrm{comp}}^{d} . Then for any \delta\in(0,1) , with probability at least 1-\delta over S\sim\mathcal{D}^{n} , every f\in\mathcal{H}_{\mathrm{comp}}^{d} satisfies R(f)\leq\widehat{R}_{S}(f)+\mathcal{O}\!\Big(\frac{B\,L^{d}}{\sqrt{n}}\Big)+B^{2}\sqrt{\frac{\log(1/\delta)}{2n}}. (15) In particular, holding L and d fixed, the excess risk decays as 1/\sqrt{n} ; holding n fixed, composition amplifies stability through (Kb\sqrt{2}\,L)^{d-1} ( Equation 14 ) rather than through the cardinality of symbolic structures. Exponent and arity bookkeeping. Uniform deviation bounds track terms of order \mathrm{Lip}(\ell)\,(Kb\sqrt{2}\,L)^{d-1}\mathfrak{R}_{n}(\mathcal{H}_{\mathrm{comp}}^{1}) with K{=}|\mathcal{H}_{\mathrm{base}}| and maximum arity b from Corollary 4.8 . The displayed \mathcal{O}(BL^{d}/\sqrt{n}) adopts the usual big- O shorthand in which fixed vocabulary/arity factors ( K^{d-1} , b^{d-1} ), \mathrm{Lip}(\ell) , the Maurer constant \sqrt{2} ( Maurer 2016b ) , and \mathfrak{R}_{n}(\mathcal{H}_{\mathrm{comp}}^{1})=\mathcal{O}(n^{-1/2}) under Assumption 3.2 are absorbed. Proof sketch. Standard Rademacher-based uniform convergence bounds for Lipschitz losses give \sup_{f\in\mathcal{F}}(R(f)-\widehat{R}_{S}(f))\lesssim\mathrm{Lip}(\ell)\mathfrak{R}_{n}(\mathcal{F})+B^{2}\sqrt{\log(1/\delta)/(2n)}. Apply Corollary 4.8 to obtain \mathfrak{R}_{n}(\mathcal{H}_{\mathrm{comp}}^{d})\leq(Kb\sqrt{2}\,L)^{d-1}\mathfrak{R}_{n}(\mathcal{H}_{\mathrm{comp}}^{1}) , then invoke Assumption 3.2 for \mathfrak{R}_{n}(\mathcal{H}_{\mathrm{comp}}^{1})=\mathcal{O}(n^{-1/2}) and absorb constants into Equation 15 . ∎ Implications for symbolic regression. Theorem 4.9 suggests a learnability certificate for SR-style compositional models: if the operator vocabulary is stable on the relevant range (moderate L ) and depth is modest, then small- n datasets can suffice for low excess risk. This does not remove the computational challenge of searching over structures, but it clarifies that statistical generalization need not be the bottleneck. 4.4 From complexity to sample complexity We next translate the complexity statement into a sample complexity statement of the PAC form. For a bounded loss \ell and function class \mathcal{F} , standard symmetrization and concentration yield bounds in terms of \mathfrak{R}_{S}(\mathcal{F}) ( Bartlett & Mendelson 2003 ; Mohri et al. 2018 ) . We highlight two corollaries that make the dependence on d , L , and n explicit. Corollary 4.10 (Excess risk scaling) . Under the conditions of Theorem 4.9 , for any ERM \widehat{f}\in\arg\min_{f\in\mathcal{H}_{\mathrm{comp}}^{d}}\widehat{R}_{S}(f) , \begin{split}R(\widehat{f})&-\inf_{f\in\mathcal{H}_{\mathrm{comp}}^{d}}R(f)\\ &=\mathcal{O}\!\Big(\frac{B\,L^{d}}{\sqrt{n}}\Big)+B^{2}\sqrt{\frac{\log(1/\delta)}{2n}},\end{split} (16) with probability at least 1-\delta . Corollary 4.11 (PAC sample complexity for \epsilon -excess risk) . Fix d and L . To guarantee R(\widehat{f})-\inf_{f\in\mathcal{H}_{\mathrm{comp}}^{d}}R(f)\leq\epsilon with probability at least 1-\delta , it suffices that n\;\gtrsim\;\frac{B^{2}L^{2d}}{\epsilon^{2}}+\frac{B^{4}}{\epsilon^{2}}\log\frac{1}{\delta}. (17) Interpretation. The key point is that depth affects sample complexity through multiplicative stability growth—equivalently (Kb\sqrt{2}\,L)^{2(d-1)} when arity and vocabulary are tracked explicitly ( Equation 14 )—rather than through the (typically much larger) number of distinct symbolic trees of depth d . The shorthand L^{2d} in Corollary 4.11 treats bounded arity as \mathcal{O}(1) . Cardinality versus complexity. Let \mathcal{T}_{d} denote the finite collection of distinct shapes of binary trees of depth d . Uniform convergence requires controlling complexity over the union of realizable functions associated with each shape after accounting for continuous parameterizations at leaves. Naively counting |\mathcal{T}_{d}| suggests exponential growth in discrete syntax; however, at each composition level Lemma 4.6 replaces the supremum over the finite vocabulary \mathcal{H}_{\mathrm{base}} by a sum over at most K{=}|\mathcal{H}_{\mathrm{base}}| fixed-operator subclasses, and our bounds isolate the contribution that arises purely from repeated composition along paths. Thus statistical complexity need not track worst-case enumeration when stability constants remain moderate—precisely the regime motivated by physics modeling where operators act locally smoothly on bounded domains. 4.5 A PAC-Bayes view: learning with structure priors Rademacher bounds are uniform over \mathcal{H}_{\mathrm{comp}}^{d} and do not exploit a priori preferences for simpler trees. An alternative is PAC-Bayes analysis, where one posits a prior \pi over trees (e.g., favoring smaller depth/size via MDL) and controls the risk of a posterior \rho learned from data ( McAllester 1999 ; Seeger 2002 ; Catoni 2007 ; Alquier 2024 ) . For bounded losses, a representative bound has the form \mathbb{E}_{f\sim\rho}[R(f)]\leq\mathbb{E}_{f\sim\rho}[\widehat{R}_{S}(f)]+\sqrt{\frac{\mathrm{KL}(\rho\|\pi)+\log\frac{2\sqrt{n}}{\delta}}{2(n-1)}}. (18) Combining such KL penalties with the contraction certificates above yields guarantees trading description length (via \pi ) against multiplicative stability accumulation (Kb\sqrt{2}\,L)^{d-1} on top of \mathfrak{R}_{n}(\mathcal{H}_{\mathrm{comp}}^{1}) ( McAllester 1999 ; Seeger 2002 ) . Worked PAC-Bayes + stability sketch. Suppose \pi is a fixed MDL-style prior over tree shapes T (e.g., \pi(T)\propto\exp(-\mathrm{code}(T)) ) together with a Gaussian factor over leaf weights truncated to satisfy Assumption 3.2 . Let \rho_{T} be any data-dependent posterior supported on trees of shape T . Combining Equation 18 with a union bound over shapes weighted by \pi(T) yields an expectation bound under \rho_{T} whose slack adds \sqrt{\mathrm{KL}(\rho_{T}\|\pi)/n} to the empirical risk; coupling this with the deterministic stability multiplier (Kb\sqrt{2}\,L)^{d-1} from Equation 14 gives a qualitative trade-off between Occam penalties on syntax and Lipschitz-depth amplification along the chosen architecture. Norm-based nets versus compositional primitives. Deep-network bounds often scale with parameter norms or Jacobians while treating activation composition implicitly ( Bartlett et al. 2017 ; Neyshabur et al. 2017 ) . Here each activation is an interpretable primitive with an explicit calculus ( Proposition 4.3 ), which makes it natural to express guarantees directly through operator-level Lipschitz constants accumulated along tree edges rather than through aggregated weight matrices. 5 Experiments 5.1 Setup We validate the qualitative prediction of Equation 15 : the generalization gap should scale with (L^{d})/\sqrt{n} . We implement: (i) a synthetic dataset generator for controlled-depth “physics” targets, (ii) a differentiable operator-tree model (no MLPs), (iii) a training loop and evaluation on a large test set, and (iv) logging and plotting of the gap vs. the theoretical term. Isolation of statistical scaling. We deliberately train under realizability : each ground-truth f^{\star} lies in the hypothesis family at the stated depth with matching operator vocabulary. This design separates statistical scaling from misspecification errors or discrete structure mismatch that dominate realistic SR pipelines ( La Cava et al. 2021 ) . Extensions to agnostic settings replace \inf_{f\in\mathcal{H}_{\mathrm{comp}}^{d}}R(f) by an approximation error term while preserving the same variance-type complexity multiplier. Data. Inputs are x\sim\mathrm{Unif}([-1,1]) with scalar outputs y=f^{\star}(x)+\epsilon . We consider depth d\in\{1,2,3,4\} with representative targets: \displaystyle d=1:\ \displaystyle f^{\star}(x)=wx+b, (19) \displaystyle d=2:\ \displaystyle f^{\star}(x)=\sin(wx+b_{0})+b_{1}, (20) \displaystyle d=3:\ \displaystyle f^{\star}(x)=\exp(-(ax+b_{0}))\cdot\sin(wx+b_{1}), (21) \displaystyle d=4:\ \displaystyle f^{\star}(x)=\exp(-(ax+b_{0}))\cdot\sin(wx+b_{1}) \displaystyle\qquad\quad\,+\,(cx+d). (22) We sweep n\in\{50,100,500,1000,5000\} and evaluate on a held-out test set of 10^{5} samples. Model. The hypothesis is a computation tree whose nodes are differentiable operators from \{+,\times,\sin,\cos,\exp,\mathrm{affine}\} . Each affine node has learnable parameters (a,b) , and constants are represented as affine nodes with slope fixed to zero. The implementation estimates a Lipschitz proxy \widehat{L} either by (i) sampling gradient norms \max_{i}\|\nabla_{x}f(x_{i})\|_{2} or (ii) composing local operator derivative bounds along the tree. Training protocol. For each depth d and training size n , we minimize mean squared error with Adam (learning rate 10^{-2} , batch size 256 , weight decay 0 , up to 5000 epochs). Optimization stops early when training MSE fails to improve by more than 10^{-6} for 200 consecutive epochs. Noise levels match the released configuration ( \sigma{=}0.01 for d\in\{1,2\} and \sigma{=}0.02 for d\in\{3,4\} ). The generalization gap is \mathrm{gap}=\mathrm{MSE}_{\mathrm{test}}-\mathrm{MSE}_{\mathrm{train}} on the same draws. We estimate \widehat{L} by sampling gradient norms \max_{i}\|\nabla_{x}f_{\theta}(x_{i})\|_{2} on a batch of size 8192 drawn from the same input distribution. 5.2 Results Across depths and sample sizes, the empirical generalization gap (test MSE minus train MSE) increases with depth and decreases with n . More importantly, when plotted against the complexity proxy (\widehat{L}^{d})/\sqrt{n} , the gap aligns along an approximately linear upper envelope, consistent with Equation 15 . In typical runs, depth- 4 tasks show larger \widehat{L} due to \exp(\cdot) interactions, and correspondingly larger gaps at fixed n . Figure 1 : Empirical generalization gap versus the predicted complexity term (\widehat{L}^{d})/\sqrt{n} across 400 runs. Table 1 spans both columns so numeric columns remain readable. Table 1 : Compact sweep summary (median over seeds). Depth n median |\mathrm{gap}| median \hat{L} median (\hat{L}^{d})/\sqrt{n} 1 50 1.63e-05 1.30e+00 1.83e-01 1 5000 1.25e-06 1.30e+00 1.83e-02 2 50 1.97e-05 1.77e+00 4.42e-01 2 5000 1.45e-06 1.77e+00 4.43e-02 3 50 8.30e-05 7.40e+00 5.73e+01 3 5000 5.99e-06 7.54e+00 6.07e+00 4 50 1.35e-04 1.01e+01 1.50e+03 4 5000 5.53e-06 1.01e+01 1.46e+02 Figure 2 : Median |\mathrm{gap}| versus n (IQR bands), stratified by depth. Reading Table 1 and Figure 2 . Table 1 summarizes robust trends by reporting medians over seeds at the smallest and largest training sizes ( n\in\{50,5000\} ). For shallow targets ( d\leq 2 ), \widehat{L} is essentially stable in n , so halving the horizontal uncertainty factor 1/\sqrt{n} by increasing n from 50 to 5000 yields comparable reductions in both median |\mathrm{gap}| and median (\widehat{L}^{d})/\sqrt{n} . At d=3 and especially d=4 , the same table shows that \widehat{L} remains order-one to ten while (\widehat{L}^{d})/\sqrt{n} spans orders of magnitude across depths because of exponentiation in \widehat{L}^{d} . Nevertheless, increasing n still drives median gaps downward at each depth, matching the 1/\sqrt{n} facet of Equation 15 . Figure 2 reinforces this story across all swept values of n : curves slope downward with sample size, with tighter dispersion (narrower IQR bands) where optimization finds stable minimizers. Additional diagnostics (no extra training). To further validate the factorization suggested by Equation 15 , we post-process the same runs to produce two complementary views: (i) |\mathrm{gap}| versus 1/\sqrt{n} stratified by depth, and (ii) |\mathrm{gap}| versus (\widehat{L})^{d} stratified by n . We also report a simple goodness-of-fit statistic by regressing the gap onto the single complexity predictor (\widehat{L}^{d})/\sqrt{n} with a line through the origin. These diagnostics are computationally negligible and help identify deviations caused by finite optimization error or regime changes in the local Lipschitz proxy. Figure 3 displays both views. (a) |\mathrm{gap}| vs. 1/\sqrt{n} , stratified by depth. (b) |\mathrm{gap}| vs. (\widehat{L})^{d} , stratified by training size n . Figure 3 : Factorization diagnostics computed from the same logged runs (no retraining). Figure 4 summarizes the full (d,n) grid using median \log_{10}|\mathrm{gap}| (heatmap) and the marginal distribution by depth (boxplots). (a) Heatmap of median \log_{10}|\mathrm{gap}| over depth and n . (b) Distribution of \log_{10}|\mathrm{gap}| aggregated across (n,\mathrm{seed}) within each depth. Figure 4 : Descriptive summaries of the sweep beyond scatter plots ( Figure 1 ). Quantitative fit on the full sweep. Using 400 trained models (depths d\in\{1,2,3,4\} , sample sizes n\in\{50,100,500,1000,5000\} , 20 random seeds each), we observe a positive association between the predicted term and the observed gap. On a log-log scale, the Pearson correlation between \log((\widehat{L}^{d})/\sqrt{n}) and \log|\text{gap}| is 0.48 . Fitting a power-law model \log|\text{gap}|\approx\alpha\log((\widehat{L}^{d})/\sqrt{n})+c yields \alpha\approx 0.20 with R^{2}\approx 0.23 . These summary statistics indicate that the compositional complexity term captures a meaningful fraction of the variance in generalization gaps across tasks and regimes, while leaving room for additional factors such as optimization error, noise level, and local-range effects for \exp(\cdot) . The fitted exponent \alpha\ll 1 is consistent with substantial nuisance variation—including finite-batch noise in \widehat{L} , imperfect convergence, and mismatch between local derivative norms and worst-case Lipschitz constants appearing in uniform bounds—rather than with falsification of the qualitative roles of n and compositional amplification. Per-setting means and standard deviations over seeds appear in Table 2 . Reading Figure 3 and Figure 4 . Figure 3 factorizes the predicted scaling into 1/\sqrt{n} (by depth) and (\widehat{L})^{d} (by n ); both views align qualitatively with Equation 15 . Figure 4 summarizes median \log_{10}|\mathrm{gap}| over the (d,n) grid and marginal depth distributions: larger n uniformly reduces gaps, while deeper compositions retain larger medians and heavier tails, consistent with harder optimization under \exp(\cdot) . Limitations. Our empirical study is deliberately controlled: inputs are one-dimensional and uniformly bounded, targets lie in a realizability-aligned architecture family (correct depth and operator set), and distribution shift is absent. The estimator \widehat{L} measures stability of the trained map on in-distribution inputs rather than certifying a worst-case global Lipschitz constant over all structured hypotheses at depth d ; for compositions involving \exp(\cdot) , local slopes can grow rapidly with learned ranges, so \widehat{L} need not reflect uniform worst-case operator stability without additional envelope constraints or interval arithmetic. Finally, uniform bounds such as Equation 15 can be loose compared with hypothesis-dependent bounds when stronger structural priors are available ( McAllester 1999 ; Maurer & Pontil 2011 ) . 6 Conclusion We provided a PAC learning perspective on scientific discovery with compositional function trees. Despite the combinatorial explosion of symbolic structures, the statistical generalization of depth- d compositional hypotheses is controlled by stability: Lipschitz constants accumulate multiplicatively along paths with an explicit (Kb\sqrt{2}\,L)^{d-1} prefactor on \mathfrak{R}_{n}(\mathcal{H}_{\mathrm{comp}}^{1}) ( Equation 14 ), yielding excess-risk scalings of order \mathcal{O}(L^{d}/\sqrt{n}) when K,b are treated as O(1) . Our experiments with differentiable operator trees confirm that the generalization gap tracks the predicted complexity term. These results support the view that, for stable operator vocabularies and modest depth, scientific discovery from small datasets is statistically feasible; the remaining challenge is computational search and inductive bias design. Natural extensions include multi-dimensional covariates x\in\mathbb{R}^{p} with coordinate-wise or norm-based Lipschitz bookkeeping, agnostic risk decompositions when the truth lies outside \mathcal{H}_{\mathrm{comp}}^{d} , and combining PAC-Bayes priors over discrete syntax with the contraction estimates presented here. Closing that loop would align statistical certificates more tightly with end-to-end SR systems that alternate discrete proposals with continuous refitting. Accessibility Technical content is fully stated in the main text ( Sections 3 , 4 and 5 ); figures and appendix tables are illustrative. Plots use distinct colors and markers for depth-stratified series; numeric values also appear in the referenced equations and tables. Software and Data Experiments are implemented in Python using PyTorch; dependency versions are listed alongside the code. Synthetic data are generated in closed form as described in Section 5 ; we use no confidential or personally identifiable data. Reproducibility materials are available at https://github.com/suayptalha/scientific-pac . Impact Statement This work gives learning-theoretic foundations for compositional symbolic models: stability and depth shape statistical complexity in ways that complement purely combinatorial views of expression search. The emphasis on contraction along fixed trees clarifies that bounded-depth estimation with stable primitives need not inherit worst-case syntax-counting intuitions often cited against symbolic regression. The perspective is complementary to algorithm design: it does not prescribe a particular symbolic search procedure, but clarifies the statistical scaling of nonlinear coefficient estimation once a vocabulary and depth budget are fixed. Epistemic risks include trusting compact formulas under distribution shift, misspecification, or confounding; our guarantees do not address causal correctness or out-of-distribution validity. Faster automated hypothesis discovery may also compress publication and decision timelines unless paired with scrutiny suited to the stakes. Openly stating assumed covariate ranges and validating extrapolation beyond training coverage—especially when nonlinear primitives amplify slopes—offers a lightweight mitigation aligned with the paper’s local stability viewpoint. Responsible deployment should pair such tools with domain theory, uncertainty quantification, replication, and appropriate governance in high-stakes settings. Appendix A Additional Proof Details We expand the argument underlying Lemmas 4.4 – 4.6 and Corollary 4.8 . The key tool is Maurer’s vector contraction ( Maurer 2016b ) : for an L -Lipschitz map \Phi:\mathbb{R}^{m}\to\mathbb{R} with \Phi(0)=0 and a class \mathcal{G}\subset(\mathcal{X}\to\mathbb{R}^{m}) measured by the coordinatewise complexity ( 5 ), \mathfrak{R}_{S}(\Phi\circ\mathcal{G})\leq\sqrt{2}\,L\,\mathfrak{R}_{S}^{(m)}(\mathcal{G}). In our tree setting, each internal node computes h(z_{1},\dots,z_{b}) where h\in\mathcal{H}_{\mathrm{base}} is L_{h} -Lipschitz and (z_{1},\dots,z_{b}) are subtree outputs. Define the vector-valued class \mathcal{G}_{d-1}=\{x\mapsto(g_{1}(x),\dots,g_{b}(x)):\ g_{j}\in\mathcal{H}_{\mathrm{comp}}^{d-1}\} . For fixed h_{k}\in\mathcal{H}_{\mathrm{base}} , set \mathcal{C}_{k}=\{h_{k}\circ g:\ g\in\mathcal{G}_{d-1}\} . Lemma 4.6 gives \mathfrak{R}_{S}(\mathcal{H}_{\mathrm{comp}}^{d})\leq K\max_{k}\mathfrak{R}_{S}(\mathcal{C}_{k}) . For each k , Lemma 4.4 yields \mathfrak{R}_{S}(\mathcal{C}_{k})\leq\sqrt{2}\,L_{k}\,\mathfrak{R}_{S}^{(b)}(\mathcal{G}_{d-1}) . Lemma 4.5 (and its b -fold analogue) gives \mathfrak{R}_{S}^{(b)}(\mathcal{G}_{d-1})\leq b\,\mathfrak{R}_{S}(\mathcal{H}_{\mathrm{comp}}^{d-1}) for binary b{=}2 . Combining, \mathfrak{R}_{S}(\mathcal{H}_{\mathrm{comp}}^{d})\leq Kb\sqrt{2}\,L\,\mathfrak{R}_{S}(\mathcal{H}_{\mathrm{comp}}^{d-1}) and iterating yields Equations 14 and 13 . A.1 Proof of Lemma 4.5 Let S=(x_{i})_{i=1}^{n} . For the paired class \mathcal{F}_{1}\times\mathcal{F}_{2} , define the empirical Rademacher complexity using independent signs for the two coordinates: \displaystyle\mathfrak{R}_{S}(\mathcal{F}_{1}\times\mathcal{F}_{2}) \displaystyle=\mathbb{E}_{\sigma^{(1)},\sigma^{(2)}}\Big[\sup_{f_{1}\in\mathcal{F}_{1},f_{2}\in\mathcal{F}_{2}}\frac{1}{n}\sum_{i=1}^{n}\sigma_{i}^{(1)}f_{1}(x_{i})+\sigma_{i}^{(2)}f_{2}(x_{i})\Big] (23) \displaystyle=\mathbb{E}\Big[\sup_{f_{1}\in\mathcal{F}_{1}}\frac{1}{n}\sum_{i=1}^{n}\sigma_{i}^{(1)}f_{1}(x_{i})\Big]+\mathbb{E}\Big[\sup_{f_{2}\in\mathcal{F}_{2}}\frac{1}{n}\sum_{i=1}^{n}\sigma_{i}^{(2)}f_{2}(x_{i})\Big] (24) \displaystyle=\mathfrak{R}_{S}(\mathcal{F}_{1})+\mathfrak{R}_{S}(\mathcal{F}_{2}). (25) The second line uses separability of the supremum over independent function choices. A.2 Deriving Theorem 4.7 via contraction We show the inductive step in ( 13 ). Let \mathcal{H}_{d}:=\mathcal{H}_{\mathrm{comp}}^{d} . By Lemma 4.6 , \mathfrak{R}_{S}(\mathcal{H}_{d})\leq K\max_{h\in\mathcal{H}_{\mathrm{base}}}\mathfrak{R}_{S}(\mathcal{C}_{h}) where \mathcal{C}_{h}=\{h\circ(g_{1},g_{2}):g_{1},g_{2}\in\mathcal{H}_{d-1}\} and K{=}|\mathcal{H}_{\mathrm{base}}| . Fix h and write f(x)=h(g_{1}(x),g_{2}(x)) . By Maurer’s vector contraction (Lemma 4.4 ) with m{=}2 , \mathfrak{R}_{S}(\mathcal{C}_{h})\leq\sqrt{2}\,L_{h}\ \mathfrak{R}_{S}^{(2)}(\mathcal{H}_{d-1}\times\mathcal{H}_{d-1})=\sqrt{2}\,L_{h}\ \mathfrak{R}_{S}(\mathcal{H}_{d-1}\times\mathcal{H}_{d-1}). (26) Lemma 4.5 gives \mathfrak{R}_{S}(\mathcal{H}_{d-1}\times\mathcal{H}_{d-1})\leq 2\,\mathfrak{R}_{S}(\mathcal{H}_{d-1}) . Thus \mathfrak{R}_{S}(\mathcal{C}_{h})\leq 2\sqrt{2}\,L_{h}\,\mathfrak{R}_{S}(\mathcal{H}_{d-1}) and taking \max_{h} yields \mathfrak{R}_{S}(\mathcal{H}_{d})\leq K\cdot 2\sqrt{2}\,L\,\mathfrak{R}_{S}(\mathcal{H}_{d-1}) . Iterating gives ( 13 ). A.3 Sketch: PAC-Bayes inequality ( 18 ) For completeness we recall one route to ( 18 ). Let \ell\in[0,1] be a bounded loss and define empirical and true risks as before. PAC-Bayes bounds control \mathbb{E}_{f\sim\rho}[R(f)] in terms of \mathbb{E}_{f\sim\rho}[\widehat{R}_{S}(f)] plus a complexity penalty involving \mathrm{KL}(\rho\|\pi) ; see McAllester 1999 ; Langford & Seeger 2001 ; Catoni 2007 ; Alquier 2024 for multiple variants and constants. In our context, \pi can be chosen to downweight large trees (e.g., via an MDL code length), encouraging posteriors supported on shallow/stable expressions. Appendix B Symmetrization, Tail Bounds, and Talagrand-type Contractions This section collects standard ingredients used implicitly when translating Rademacher complexity into high-probability uniform bounds ( Bartlett & Mendelson 2003 ; Mohri et al. 2018 ; Ledoux & Talagrand 1991 ) . B.1 Rademacher symmetrization Let \mathcal{F}\subset(\mathcal{X}\to\mathbb{R}) and consider the empirical process supremum Z(S)\ :=\ \sup_{f\in\mathcal{F}}\Big|\frac{1}{n}\sum_{i=1}^{n}\big(f(x_{i})-\mathbb{E}[f(X)]\big)\Big|. (27) A symmetrization argument yields \mathbb{E}[Z(S)]\ \leq\ 2\,\mathbb{E}_{S}\big[\mathfrak{R}_{S}(\mathcal{F})\big], (28) with \mathfrak{R}_{S}(\mathcal{F}) as in the main text (expectation over independent Rademacher signs). Thus controlling \mathfrak{R}_{n}(\mathcal{F})=\mathbb{E}_{S}[\mathfrak{R}_{S}(\mathcal{F})] controls the first moment of uniform deviations. B.2 McDiarmid bounded differences Assume Z=Z(x_{1:n}) satisfies bounded differences: changing one coordinate x_{i} changes Z by at most c_{i} . Then for all \varepsilon>0 , \mathbb{P}\big(Z-\mathbb{E}[Z]\geq\varepsilon\big)\ \leq\ \exp\Big(-\frac{2\varepsilon^{2}}{\sum_{i=1}^{n}c_{i}^{2}}\Big). (29) Applied with c_{i}=\mathcal{O}(1/n) for bounded-range losses yields Gaussian concentration at rate \mathcal{O}(n^{-1/2}) after centering. B.3 Scalar contraction Let \phi:\mathbb{R}\to\mathbb{R} be L -Lipschitz and \phi(0)=0 . Then for any finite sample S , \mathfrak{R}_{S}(\phi\circ\mathcal{F})\ \leq\ L\,\mathfrak{R}_{S}(\mathcal{F}). (30) This is the one-dimensional specialization of Equation 10 used repeatedly when peeling unary operators off a composition chain. B.4 Unary composition chains Let \mathcal{F}_{0}\subset(\mathcal{X}\to\mathbb{R}) and define inductively \mathcal{F}_{k}=\{\phi_{k}\circ f:\ f\in\mathcal{F}_{k-1}\} where each \phi_{k}:\mathbb{R}\to\mathbb{R} is L_{k} -Lipschitz on the relevant range. Then for every sample S , \mathfrak{R}_{S}(\mathcal{F}_{k})\ \leq\ \Big(\prod_{j=1}^{k}L_{j}\Big)\,\mathfrak{R}_{S}(\mathcal{F}_{0}). (31) Proof. Induct on k , applying scalar contraction at each layer. ∎ B.5 Dudley entropy integral (sketch) For many geometrically well-behaved classes, chaining yields \mathfrak{R}_{n}(\mathcal{F})\ \lesssim\ \inf_{\alpha\geq 0}\Big(\alpha+\frac{1}{\sqrt{n}}\int_{\alpha}^{\infty}\sqrt{\log\mathcal{N}(\varepsilon,\mathcal{F},\|\cdot\|_{n})}\,d\varepsilon\Big), (32) where \mathcal{N}(\varepsilon,\mathcal{F},\|\cdot\|_{n}) is the \varepsilon -covering number of \mathcal{F} in the empirical L_{2}(P_{n}) metric ( Dudley 1967 ; van der Vaart & Wellner 1996 ; Talagrand 2014 ) . Under Assumption 3.2 , leaves lie in Lipschitz balls of radius \mathcal{O}(W_{\max}X_{\max}\sqrt{p}) over \mathcal{X} , while each remaining primitive has bounded subgraph complexity. Thus \mathcal{H}_{\mathrm{comp}}^{1} is a finite union of uniformly Lipschitz families with bounded envelopes, giving \mathfrak{R}_{n}(\mathcal{H}_{\mathrm{comp}}^{1})=\mathcal{O}(n^{-1/2}) by standard VC/Rademacher chaining under fixed vocabulary size ( Bartlett & Mendelson 2003 ; Mohri et al. 2018 ) . B.6 Agnostic decomposition Let h^{\star}\in\arg\min_{h\in\mathcal{H}_{\mathrm{comp}}^{d}}R(h) be a population risk minimizer within the class. For any empirical risk minimizer \widehat{h} , R(\widehat{h})-\inf_{h\in\mathcal{H}}R(h)\ =\ \big(R(\widehat{h})-\widehat{R}_{S}(\widehat{h})\big)+\big(\widehat{R}_{S}(\widehat{h})-\widehat{R}_{S}(h^{\star})\big)+\big(\widehat{R}_{S}(h^{\star})-R(h^{\star})\big). (33) The middle term is \leq 0 by definition of ERM, while the two bracketed differences are controlled by uniform deviations over \mathcal{H}_{\mathrm{comp}}^{d} , yielding the \mathcal{O}(L^{d}/\sqrt{n}) variance term under bounded loss/Lipschitzness after absorbing arity factors as in Equation 14 . If the truth lies outside \mathcal{H}_{\mathrm{comp}}^{d} , add an irreducible approximation error \inf_{h\in\mathcal{H}_{\mathrm{comp}}^{d}}R(h)-R^{\star} where R^{\star} is the Bayes risk under squared loss. Appendix C Detailed Risk Bound for Bounded Squared Loss We sketch Theorem 4.9 with constants tracked only at the level of \mathcal{O}(\cdot) . Assume |y|\leq B and |f(x)|\leq B uniformly over \mathcal{H}_{\mathrm{comp}}^{d} . For squared loss \ell(\hat{y},y)=(\hat{y}-y)^{2} , on [-B,B]^{2} one has |\partial_{\hat{y}}\ell|\leq 4B , hence \ell(\cdot,y) is (4B) -Lipschitz in \hat{y} . Talagrand-type contraction for Lipschitz composition with squared loss implies \mathfrak{R}_{S}(\ell\circ\mathcal{H}_{\mathrm{comp}}^{d})\leq(4B)\cdot(Kb\sqrt{2}\,L)^{d-1}\mathfrak{R}_{S}(\mathcal{H}_{\mathrm{comp}}^{1}) up to fixed vocabulary/arity factors ( Equation 14 ). Combining symmetrization, concentration on \sup_{f\in\mathcal{H}}(R(f)-\widehat{R}_{S}(f)) , and bounded loss yields Equation 15 . Appendix D Experimental Details and Reproducibility The training code evaluates every combination of depths d\in\{1,2,3,4\} and sample sizes n\in\{50,100,500,1000,5000\} with multiple random seeds. Models are trained with Adam on MSE until training loss stops improving (patience-based early stopping). The Lipschitz proxy \widehat{L} is computed on a large batch of test-distribution inputs using either gradient norms or composed operator bounds. The primary empirical summary plots the generalization gap against (\widehat{L}^{d})/\sqrt{n} . D.1 Wide-format numeric tables Table 2 reports mean \pm std over seeds for train/test error, gap magnitude, \widehat{L} , and (\widehat{L}^{d})/\sqrt{n} . Wide numeric layouts are set in a smaller type size and scaled to the appendix text width so columns remain legible. Table 3 gives the same sweep as a compact median grid of |\mathrm{gap}| over (d,n) , consistent with Figure 4 . Table 2 : Full sweep summary (mean \pm std over seeds). d n Train MSE Test MSE |\mathrm{gap}| \hat{L} (\hat{L}^{d})/\sqrt{n} 1 50 9.44e-05 \pm 1.9e-05 1.04e-04 \pm 3.3e-06 1.73e-05 \pm 1.3e-05 1.28e+00 \pm 4.3e-01 1.81e-01 \pm 6.1e-02 1 100 9.50e-05 \pm 1.3e-05 1.02e-04 \pm 2.0e-06 1.19e-05 \pm 8.3e-06 1.28e+00 \pm 4.3e-01 1.28e-01 \pm 4.3e-02 1 500 1.02e-04 \pm 6.4e-06 1.01e-04 \pm 9.8e-07 5.16e-06 \pm 4.2e-06 1.28e+00 \pm 4.3e-01 5.72e-02 \pm 1.9e-02 1 1000 1.01e-04 \pm 4.1e-06 1.01e-04 \pm 1.2e-06 3.75e-06 \pm 2.6e-06 1.28e+00 \pm 4.3e-01 4.05e-02 \pm 1.4e-02 1 5000 1.00e-04 \pm 1.7e-06 1.00e-04 \pm 7.6e-07 1.55e-06 \pm 1.2e-06 1.28e+00 \pm 4.3e-01 1.81e-02 \pm 6.1e-03 2 50 9.08e-05 \pm 1.8e-05 1.08e-04 \pm 8.4e-06 2.08e-05 \pm 1.6e-05 1.75e+00 \pm 7.5e-01 5.08e-01 \pm 3.8e-01 2 100 9.42e-05 \pm 1.2e-05 1.04e-04 \pm 3.8e-06 1.21e-05 \pm 6.9e-06 1.75e+00 \pm 7.5e-01 3.59e-01 \pm 2.7e-01 2 500 1.01e-04 \pm 6.5e-06 1.01e-04 \pm 1.0e-06 5.04e-06 \pm 4.0e-06 1.75e+00 \pm 7.5e-01 1.60e-01 \pm 1.2e-01 2 1000 1.01e-04 \pm 4.4e-06 1.01e-04 \pm 9.1e-07 3.47e-06 \pm 2.5e-06 1.75e+00 \pm 7.5e-01 1.14e-01 \pm 8.5e-02 2 5000 1.00e-04 \pm 1.9e-06 1.01e-04 \pm 7.3e-07 1.63e-06 \pm 1.2e-06 1.75e+00 \pm 7.5e-01 5.08e-02 \pm 3.8e-02 3 50 6.24e-02 \pm 2.8e-01 8.31e-02 \pm 3.7e-01 2.07e-02 \pm 9.2e-02 8.12e+00 \pm 5.9e+00 2.09e+02 \pm 3.5e+02 3 100 3.70e-04 \pm 4.6e-05 4.18e-04 \pm 1.3e-05 5.90e-05 \pm 2.4e-05 8.82e+00 \pm 5.8e+00 1.61e+02 \pm 2.4e+02 3 500 4.04e-04 \pm 2.7e-05 4.05e-04 \pm 3.1e-06 2.17e-05 \pm 1.6e-05 8.84e+00 \pm 5.8e+00 7.27e+01 \pm 1.1e+02 3 1000 4.03e-04 \pm 1.7e-05 4.03e-04 \pm 2.5e-06 1.38e-05 \pm 1.0e-05 8.84e+00 \pm 5.8e+00 5.15e+01 \pm 7.9e+01 3 5000 4.01e-04 \pm 7.8e-06 4.02e-04 \pm 2.6e-06 6.65e-06 \pm 4.7e-06 8.84e+00 \pm 5.8e+00 2.30e+01 \pm 3.5e+01 4 50 1.37e-03 \pm 3.8e-03 1.52e-03 \pm 3.6e-03 2.26e-04 \pm 2.6e-04 1.18e+01 \pm 9.3e+00 2.26e+04 \pm 6.4e+04 4 100 1.40e-03 \pm 3.8e-03 1.42e-03 \pm 3.4e-03 2.25e-04 \pm 4.5e-04 1.18e+01 \pm 9.3e+00 1.55e+04 \pm 4.3e+04 4 500 6.83e-04 \pm 8.4e-04 7.03e-04 \pm 8.7e-04 3.67e-05 \pm 6.3e-05 1.20e+01 \pm 9.3e+00 7.05e+03 \pm 2.0e+04 4 1000 5.01e-04 \pm 2.8e-04 5.04e-04 \pm 2.9e-04 1.63e-05 \pm 1.1e-05 1.21e+01 \pm 9.3e+00 4.99e+03 \pm 1.4e+04 4 5000 4.19e-04 \pm 3.9e-05 4.20e-04 \pm 3.8e-05 6.44e-06 \pm 4.8e-06 1.21e+01 \pm 9.3e+00 2.25e+03 \pm 6.2e+03 Table 3 : Median |\mathrm{gap}| (grid over seeds). 50 100 500 1000 5000 1 1.63e-05 9.67e-06 4.22e-06 3.05e-06 1.25e-06 2 1.97e-05 1.18e-05 4.45e-06 2.74e-06 1.45e-06 3 8.30e-05 6.09e-05 1.74e-05 1.03e-05 5.99e-06 4 1.35e-04 7.58e-05 2.36e-05 1.19e-05 5.53e-06 Figure 3 (factorization panels) and Figure 4 (heatmap and boxplots) appear in the main text. Appendix E Appendix: Connection to SR Search and MDL Theorem 4.9 concerns statistical generalization for a fixed hypothesis class. Symbolic regression additionally faces discrete search over structures, often guided by minimum-description-length (MDL) principles and sparsity ( Rissanen 1978 ; Brunton et al. 2016 ) . A promising direction is to combine our Lipschitz-depth certificate with MDL priors over trees to obtain bounds that trade off depth, stability, and description length.