betaFeedback

WorksComputer Science

Arithmetic Actor Heads and Training Stabilization for Out-of-Distribution Reinforcement Learning

Abstract

Reinforcement learning (RL) policies can deteriorate under out-of-distribution (OOD) magnitude shifts. Starting from soft actor-critic (SAC) and its Bayesian Amnesic Piecewise-Robust (BAPR) predecessor, we study the causal-symbolic BAPR (CS-BAPR) family. The practical method combines six training-stabilization settings with alternative actor heads: a Neural Addition Unit (NAU) with a Neural Multiplication Unit (NMU)-inspired quadratic correction, a Kolmogorov-Arnold Network (KAN), or a multilayer perceptron (MLP) with rectified linear unit (ReLU) or hyperbolic-tangent activations.

Introduction

Policies trained under nominal conditions may perform poorly when passenger demand or other exogenous inputs increase beyond the training range. We call this setting magnitude extrapolation. SAC provides the underlying continuous-control training framework [1]; BAPR supplies change-sensitive adaptation [2], and robust ensemble SAC (RE-SAC) supplies the critic ensemble and risk regularization [3].

Magnitude extrapolation connects two questions: whether training produces a stable controller, and whether the resulting policy responds appropriately to larger inputs. Arithmetic layers offer a useful inductive bias for numerical extrapolation [4, 5], but a linear output layer alone does not make a nonlinear policy linear in the original state. We therefore distinguish the layer-level calculation, the conditional whole-policy error bound, and the observed control returns. CS-BAPR combines four base stabilization settings with two recipes ported from BAPR: minimum-ensemble critic targets, reward-scale normalization, an entropy-temperature floor, removal of the behavior cloning (BC) anchor for stabilized variants, change-detection warmup and penalty scaling, and rollout-based one-sided surprise. Bayesian online changepoint detection (BOCD) provides the belief tracker [6]. The architectural variants share this training backbone.

The contributions are:

  • A transit-focused comparison of four actor-head choices under the same stabilization recipe, against an unstabilized and a legacy BAPR implementation.

  • A policy-output extrapolation bound with explicit boundary errors and derivative-growth assumptions (Theorem 5.25), together with layer-level NAU, quadratic-unit, and ReLU calculations (§ 5.2).

  • A frozen Bellman-operator contraction result (Theorem 5.17) and a counterexample showing how sufficiently strong value-dependent penalties can destroy contraction (Theorem 5.19).

  • Conditional symbolic-reference results that state the required action-space alignment and cross-environment accuracy explicitly (§ 5.4 and § 5.5).

The complete proofs and their dependencies are linked in Appendix § 10; implementation details appear in Appendices § 13–§ 17.

Related work

Generalization and robust RL

Simulation-trained locomotion can generalize to previously unseen terrain [7]. Robust Markov decision processes (MDPs) instead optimize performance over specified transition uncertainty sets [8, 9]. Recent robust actor-critic and fitted-value methods extend such analyses to function approximation and offline or hybrid data [10, 11]. Their guarantees depend on their uncertainty and coverage assumptions; they are not generally restricted to interpolation in a convex hull of training environments. Epistemic partially observable MDPs explain why uncertainty about test conditions can require adaptive behavior even when each individual environment is fully observed [12]. Our bound concerns the output of a fixed deterministic policy map along a state-space segment.

Arithmetic networks and equation learning

Neural Arithmetic Logic Unit (NALU) networks introduce gated arithmetic computations for numerical extrapolation [4]. NAUs and NMUs separate addition and multiplication and use constrained weights with sparsity regularization [5]. The NAU is an addition/subtraction unit; the paper title Neural Arithmetic Units denotes the broader family. Equation-learning networks recover analytic relations for extrapolation and control [13]; this is a distinct architecture rather than an application of NAUs. KANs use learnable spline functions on edges [14]. We compare these architectural ideas in one training framework without claiming priority for applying arithmetic structure to control.

Symbolic dynamics and invariance

SINDy identifies sparse governing dynamics from a candidate library [15]; SINDy-RL combines interpretable dynamics, reward, and policy models with RL [16]. AI Feynman exploits structural properties of equations for symbolic regression [17]. These works motivate equation identification but do not imply that a dynamics Jacobian equals an optimal-policy Jacobian.

IRM seeks representations whose optimal predictor is shared across training environments [18]. Causal representation learning and causal RL involve additional assumptions about interventions, latent variables, and causal structure [19, 20]; structural causal models (SCMs) provide a separate formal account [21]. Our optional selector is inspired by cross-environment invariance and uses prediction-error variance. Its mathematical results assume the stated derivative accuracy; they do not establish causal discovery from the selector alone.

Derivative regularity and ensemble stabilization

Rowan analyzes ReLU failures in physics-informed objectives, including mis-specified automatic-differentiation gradients of discontinuous fields [22]. That result concerns physics-informed training, rather than a general inability of ReLU networks to approximate smooth functions or extrapolate. Here we use the elementary derivative jump at the scalar ReLU kink to delimit a smooth-derivative certificate. Ensemble pessimism also appears in offline RL [23]; this motivates the minimum-ensemble comparison but does not transfer an offline performance guarantee to our online controller. Our Bellman analysis follows the frozen-parameter template of RE-SAC and BAPR [3, 2].

Scope and applicability

The primary empirical setting is transit holding under changes in passenger-demand magnitude. The six stabilization settings and the actor-head choice are evaluated jointly, with symbolic losses disabled. A demand multiplier changes the distribution of visited states; it is not itself the state-space displacement appearing in the theorem.

The optional symbolic extension requires an action-valued reference constructed from an identified model or other control information. A sparse dynamics model alone is insufficient: its state-evolution output has different physical units and generally a different dimension from the policy action. Tracking and counteraction tasks can both admit model-based feedback, but each requires an explicit dynamics-to-control construction. The transit results do not validate such a construction.

Cross-environment filtering additionally requires environments that reveal the invariant relation of interest. The configurable three-environment default is an implementation choice, not a universal identifiability threshold from IRM. The empirical and theoretical limits are collected in § 7.1.

Preliminaries

Notation. Let E=RdxE = \mathbb{R}^{d_x} and F=RdaF = \mathbb{R}^{d_a} be the ambient state and action spaces, where dxd_x and dad_a are their dimensions. The admissible spaces are S⊆ES \subseteq E and A⊆FA \subseteq F. We use xx for a state, aa for an action, tt for environment time, and jj for a training update. The stochastic actor has density pθ(a∣x)p_\theta(a \mid x), where θ\theta denotes actor parameters. Its pre-squash Gaussian mean is μθ(x)\mu_\theta(x); π(x)\pi(x) denotes the deterministic action map after squashing and scaling. Thus pθp_\theta, μθ\mu_\theta, and π\pi name different objects.

The training domain is DtrainD_{\mathrm{train}}; Ω⊆E\Omega\subseteq E is the convex analysis domain containing the segment of interest. πref:Ω→F\pi_{\mathrm{ref}}:\Omega\to F is an action-valued reference. Write d=xood−x0d = x_{\mathrm{ood}} - x_0 for displacement from a fixed x0∈Dtrainx_0 \in D_{\mathrm{train}} to an OOD state xoodx_{\mathrm{ood}}. DD denotes the Fréchet derivative; vector norms are Euclidean and derivative norms are induced operator norms unless a Frobenius norm ∥⋅∥F\lVert\cdot\rVert_F is specified. ∥Q∥∞\lVert Q\rVert_\infty denotes the supremum norm of a state-action value function.

The nonnegative constants δ\delta and ε\varepsilon bound reference-value and derivative error at x0x_0. LπL_\pi and MM bound the derivative Lipschitz constants of π\pi and πref\pi_{\mathrm{ref}}, and Lerr=Lπ+ML_{\mathrm{err}} = L_\pi+ M bounds their derivative-error growth. A subscript identifies the object whose regularity is bounded; the constant for a generic head HH is LHL_H. The operators E\mathbb{E} and Var⁡\operatorname{Var} denote expectation and variance.

Maximum-entropy objective

Following SAC [1], the stochastic actor maximizes

Jent(pθ)=Epθ,p[∑t=0∞γt(R(xt,at)+αH(pθ(⋅∣xt)))].(1)J_{\mathrm{ent}}(p_\theta)=\mathbb{E}_{p_\theta,p}\left[\sum_{t=0}^{\infty}\gamma^t\left(R(x_t,a_t)+\alpha\mathcal{H}(p_\theta(\cdot\mid x_t))\right)\right]. \tag*{(1)}

Here PP is the transition kernel, RR is the one-step reward, 0≤γ<10 \le\gamma< 1 is the discount factor, α>0\alpha> 0 is the entropy temperature, and H(p)=−∫p(a)log⁡p(a) da\mathcal{H}(p) = -\int p(a)\log p(a)\,\mathrm{d}a is differential entropy for continuous actions. The experiments report unaugmented episode return, not the objective (1).

BAPR backbone

Let M\mathcal{M} be the finite mode set, ℓ∈M\ell\in\mathcal{M} a mode, and ρ(ℓ)\rho(\ell) its BOCD-derived belief probability. BAPR uses a frozen mixture of mode-conditional operators [2],

TρBAPRQ(x,a)=∑ℓ∈Mρ(ℓ)TℓQ(x,a).(2)\mathcal{T}_{\rho}^{\mathrm{BAPR}}Q(x,a) = \sum_{\ell\in\mathcal{M}} \rho(\ell)\mathcal{T}_{\ell}Q(x,a). \tag*{(2)}

RE-SAC supplies aleatoric regularization and epistemic ensemble penalties [3]. The contraction analysis of the mixture (2) fixes the actor density, entropy temperature, belief, and penalty values while comparing two value functions. It is an operator result for a fixed backup.

Methodology

The extrapolation comparison

We compare π\pi with πref\pi_{\mathrm{ref}} on the segment joining x0x_0 and xoodx_{\mathrm{ood}}. In the default analysis, the reference is the affine tangent

πref(x)=π(x0)+Dπ(x0)(x−x0).(3)\pi_{\mathrm{ref}}(x) = \pi(x_0) + D\pi(x_0)(x - x_0). \tag*{(3)}

The tangent reference (3) gives δ=ε=M=0\delta= \varepsilon= M = 0 at x0x_0. The resulting bound measures deviation from the policy’s own tangent; closeness to an optimal policy requires a separate reference.

Assumption 5.1 (Reference and boundary accuracy). The policy and reference are continuously differentiable on a neighborhood of the segment, with ∥π(x0)−πref(x0)∥≤δ\|\pi(x_0)-\pi_{\mathrm{ref}}(x_0)\| \le\delta and ∥Dπ(x0)−Dπref(x0)∥≤ε\|D\pi(x_0)-D\pi_{\mathrm{ref}}(x_0)\| \le\varepsilon.

Assumption 5.2 (Reference derivative regularity). For x,y∈Ωx,y \in\Omega, ∥Dπref(x)−Dπref(y)∥≤M∥x−y∥\|D\pi_{\mathrm{ref}}(x)-D\pi_{\mathrm{ref}}(y)\| \le M\|x-y\|, with finite M≥0M \ge0. An affine reference has M=0M = 0.

Assumption 5.3 (Whole-policy derivative regularity). For x,y∈Ωx,y \in\Omega, ∥Dπ(x)−Dπ(y)∥≤Lπ∥x−y∥\|D\pi(x)-D\pi(y)\| \le L_{\pi}\|x-y\|, with finite Lπ≥0L_{\pi} \ge0. This is a condition on the complete deterministic action map, including its feature extractor and output transformations.

Definition 5.4 (Jacobian consistency (JC)). For an action-valued symbolic reference πsym:Ω→F\pi_{\mathrm{sym}}:\Omega\to F and nonnegative alignment-error bound ε2\varepsilon_2, π\pi is ε2\varepsilon_2-Jacobian consistent on Ω\Omega when ∥Dπ(x)−Dπsym(x)∥≤ε2\|D\pi(x)-D\pi_{\mathrm{sym}}(x)\| \le\varepsilon_2 for every x∈Ωx \in\Omega.

Definition 5.5 (Derivative regularity). A differentiable head HH has derivative Lipschitz constant LHL_H when the norm of its derivative difference is at most LHL_H times input distance. We use this property to quantify curvature; it is shared by many smooth non-arithmetic maps.

Arithmetic and alternative actor heads

NAU. An NAU [5] computes HNAU(z)=WNAUzH_{\mathrm{NAU}}(z) = W_{\mathrm{NAU}}z, where z∈Rdzz \in\mathbb{R}^{d_z} is a feature vector, dzd_z is feature dimension, and WNAUW_{\mathrm{NAU}} is a fixed weight matrix at evaluation. Training clamps weights to [−1,1][-1,1] and encourages the entries toward {−1,0,1}\{-1,0,1\}.

Theorem 5.6 (NAU derivative constancy). For every fixed real matrix WNAUW_{\mathrm{NAU}}, DHNAU(z)=WNAUD H_{\mathrm{NAU}}(z) = W_{\mathrm{NAU}} for all zz, so LHNAU=0L_{H_{\mathrm{NAU}}} = 0.

Proof. Differentiation of a linear map gives its fixed matrix. The derivative difference between any two feature vectors is zero. Discrete weights are unnecessary for this derivative identity.

Simplified quadratic correction. The published NMU multiplies selected input coordinates [5]. Our implementation uses the simpler scalar quadratic map Hquad(z)=cquadz2H_{\mathrm{quad}}(z)=c_{\mathrm{quad}}z^2, with fixed real coefficient cquadc_{\mathrm{quad}}, as an NMU-inspired correction.

Theorem 5.7 (Scalar quadratic derivative regularity). Hquad′(z)=2cquadzH'_{\mathrm{quad}}(z)=2c_{\mathrm{quad}}z has derivative Lipschitz constant 2∣cquad∣2|c_{\mathrm{quad}}|. A subsequent fixed scalar NAU weight wNAUw_{\mathrm{NAU}} gives constant 2∣wNAUcquad∣2|w_{\mathrm{NAU}}c_{\mathrm{quad}}|.

Proof. ∣Hquad′(z1)−Hquad′(z2)∣=2∣cquad∣∣z1−z2∣|H'_{\mathrm{quad}}(z_1)-H'_{\mathrm{quad}}(z_2)|=2|c_{\mathrm{quad}}||z_1-z_2|. Multiplication by wNAUw_{\mathrm{NAU}} scales both sides by ∣wNAU∣|w_{\mathrm{NAU}}|.

Theorem 5.8 (Scalar ReLU derivative jump). The scalar map HReLU(z)=max⁡(0,z)H_{\mathrm{ReLU}}(z)=\max(0,z) has no finite Lipschitz derivative on any interval containing negative and positive inputs.

Proof. For z<0z<0 the derivative is zero; for z>0z>0 it is one. If a finite LHReLU>0L_{H_{\mathrm{ReLU}}}>0 bounded the derivative difference, taking z1=−qz_1=-q and z2=qz_2=q with 0<q<(2LHReLU)−10<q<(2L_{H_{\mathrm{ReLU}}})^{-1} would require 1≤2LHReLUq<11\le2L_{H_{\mathrm{ReLU}}}q<1. Here qq is a positive test offset. LHReLU=0L_{H_{\mathrm{ReLU}}}=0 is also impossible, and the derivative is undefined at zero.

This statement does not rule out affine ReLU networks, segments staying in one activation region, or piecewise analyses. Smooth MLPs and sufficiently smooth spline networks can satisfy the whole-map condition on a specified domain; the constant also depends on their weights and output transformations.

Remark 5.9 (Composition requires derivative control of the inner map). Write the deterministic normalized action as π=tanh⁡∘Hmix∘G\pi=\tanh\circ H_{\mathrm{mix}}\circ G, where G:E→RdzG:E\to\mathbb{R}^{d_z} is the feature extractor and Hmix:Rdz→FH_{\mathrm{mix}}:\mathbb{R}^{d_z}\to F is the mixed arithmetic head. If GG and a head HH are continuously differentiable, their derivative norms are bounded by KG,KHK_G,K_H, and their derivative Lipschitz constants are LG,LHL_G,L_H, then

LH∘G≤LHKG2+KHLG.(4)L_{H\circ G}\le L_HK_G^2+K_HL_G. \tag*{(4)}

Thus a function-Lipschitz inner map is insufficient. LeakyReLU features have derivative jumps across activation boundaries; a tanh output also introduces curvature and saturation. Appendix § 15.§ 1 proves (4), gives the action-squashing term in (17), and derives the revised smooth-feature certificate. The isolated NAU constant cannot be substituted for LπL_\pi of the historical actor.

Appendix § 15 gives the architecture and weight regularizer (16). In the historical comparison, csbapr-tanh uses smooth MLP activations; csbapr-no-nau retains ReLU hidden activations.

Training stabilization

We use six settings in the BAPR training backbone. Exponential moving average (EMA) normalization stabilizes reward scale, while temporal-difference (TD) targets and entropy tuning retain the SAC structure. The stabilized variants also use actor weight decay, with head-specific regularizers where applicable. These settings are evaluated as a package; the tables do not identify an individual setting’s causal contribution.

Four base settings.

(A1) Minimum-ensemble target. Replace per-critic next-state targets by Qmin⁡(x′,a′)=min⁡1≤k≤NcritQϕk(x′,a′)Q_{\min}(x',a')=\min_{1\le k\le N_{\mathrm{crit}}}Q_{\phi_k}(x',a'), where NcritN_{\mathrm{crit}} is ensemble size, ϕk\phi_k are critic parameters, and ϕˉk\bar{\phi}_k are target-network parameters. The full target is given in (13).

(A2) Reward normalization. At training update jj, set σr,j+12=0.99σr,j2+0.01Var⁡(rbatch)\sigma^2_{r,j+1}=0.99\sigma^2_{r,j}+0.01\operatorname{Var}(r_{\mathrm{batch}}) and divide rewards by max⁡(σr,j+1,10−6)\max(\sigma_{r,j+1},10^{-6}). Here σr,j\sigma_{r,j} is the running reward scale and rbatchr_{\mathrm{batch}} is a replay-batch reward vector.

(A3) Entropy floor. Enforce α≥αmin⁡=0.01\alpha\ge\alpha_{\min}=0.01 during temperature tuning.

(A4) BC removal. In the current transit script, set the BC coefficient βbc=0\beta_{\mathrm{bc}}=0 for all four stabilized variants. The pristine baseline retains βbc=0.001\beta_{\mathrm{bc}}=0.001. Thus BC removal is part of the stabilization comparison, not a difference between the four stabilized heads.

Two BAPR recipes.

(B1) Warmup and penalty scaling. Set the belief-weighted penalty strength λw\lambda_{\mathrm{w}} to zero during the first 100 updates, then use βeff=−2−cpenλw\beta_{\mathrm{eff}}=-2-c_{\mathrm{pen}}\lambda_{\mathrm{w}} with cpen=2c_{\mathrm{pen}}=2 rather than 5. Here βeff\beta_{\mathrm{eff}} is the actor ensemble-pessimism coefficient and cpenc_{\mathrm{pen}} its scale. At λw=0.3\lambda_{\mathrm{w}}=0.3, the coefficients are −2.6-2.6 and −3.5-3.5, respectively.

(B2) Recent-rollout, one-sided surprise. Compute BOCD surprise on the latest Ntail=256N_{\mathrm{tail}}=256 rollout transitions when supplied by the training script. For the ensemble-spread signal σQ,t\sigma_{Q,t}, use max⁡(σQ,t/σQ,t−1−1,0)\max(\sigma_{Q,t}/\sigma_{Q,t-1}-1,0) instead of a two-sided absolute change. The implementation stabilizes the ratio numerically. The scalar surprise is denoted χt\chi_t, reserving symbolic coefficients for equation identification.

Table 8 in Appendix § 17 lists implementation defaults and overrides, and Algorithm 1 shows their place in the training loop.

QuantityValue
Discount γ\gamma0.99
Target interpolation τ\tau0.005
Initial entropy temperature α\alpha0.2, automatically tuned
Optimizer step size ηopt\eta_{\mathrm{opt}}3×10−43 \times10^{-4}
Critics NcritN_{\mathrm{crit}}; batch size NbatchN_{\mathrm{batch}}5; 256; transit critics: 3
Run-length count HmaxH_{\mathrm{max}}; hazard phazp_{\mathrm{haz}}20; 0.02
Norm offset λreg\lambda_{\mathrm{reg}}0.01
Critic spread βood\beta_{\mathrm{ood}}0.1
BC βbc\beta_{\mathrm{bc}}0.001; stabilized transit: 0
Symbolic target λsym\lambda_{\mathrm{sym}}0.01; transit: 0
Actor consistency λJC\lambda_{\mathrm{JC}}0.01; transit: 0
NAU regularizer λNAU\lambda_{\mathrm{NAU}}0.01
Entropy floor αmin⁡\alpha_{\min}0.01
Penalty scale cpenc_{\mathrm{pen}}2
Recent rollout count NtailN_{\mathrm{tail}}256
Warmup; gradient-norm clipping100 updates; 1.0
SINDy threshold; polynomial degree0.1; 2
Exploration episodes; environments NenvN_{\mathrm{env}}50; 3

Table 8. Shared defaults and the primary transit overrides.

Optional symbolic-reference extension

A dynamics model and a policy reference have different roles. Let fdyn(x,a)f_{\mathrm{dyn}}(x,a) be the conditional mean one-step state increment and fsym(x,a)f_{\mathrm{sym}}(x,a) its identified counterpart, both with values in EE. This convention matches the implemented discrete fitting target. For a state-only fit, the action argument is absent and the fitted relation describes data collected under the exploration policy.

SINDy uses a scalar basis library φ=(φ1,…,φNlib)\varphi=(\varphi_1,\ldots,\varphi_{N_{\mathrm{lib}}}), where NlibN_{\mathrm{lib}} is the number of basis terms. With coefficient matrix Ξ\Xi, fsym(x,a)=Ξφ(x,a)f_{\mathrm{sym}}(x,a)=\Xi\varphi(x,a). The regression data comprise joint state-action input matrix XX, output matrix YY, and library design matrix Φ(X)\Phi(X). The implementation uses sequentially thresholded least squares (STLSQ) [15]. The revised fitting and frozen wrapper both consume actions; Appendix § 14 specifies their alignment and state-increment target.

Assumption 5.10 (Action-valued symbolic reference). For the optional theorem, a control construction CC produces an action-valued reference πsym=C(fsym):Ω→F\pi_{\mathrm{sym}}=C(f_{\mathrm{sym}}):\Omega\to F. Its derivative error relative to πref\pi_{\mathrm{ref}} is bounded by ϵ1\epsilon_1 on the stated domain. This condition must be established after the control construction; it does not follow solely from a small dynamics prediction error.

For a homogeneous linear discrete fit, the revised LQR construction uses fsym(x,a)=(A^−I)x+B^inaf_{\mathrm{sym}}(x,a)=(\hat{A}-I)x+\hat{B}_{\mathrm{in}}a, where A^\hat{A} and B^in\hat{B}_{\mathrm{in}} are the identified state and input matrices and II is the identity matrix. Given state and normalized-action cost matrices QcostQ_{\mathrm{cost}} and RcostR_{\mathrm{cost}}, a discrete algebraic Riccati solver determines feedback gain K^fb\hat{K}_{\mathrm{fb}}. The action-valued reference is πsym(x)=tanh⁡(−K^fbx)\pi_{\mathrm{sym}}(x)=\tanh(-\hat{K}_{\mathrm{fb}}x), with componentwise tanh. It is a smooth bounded reference, rather than the constrained LQR optimum. Its derivative Lipschitz constant is at most 433∥K^fb∥2\frac{4}{3\sqrt{3}}\lVert\hat{K}_{\mathrm{fb}}\rVert^2. The input matrices come from collected transitions, not from the simulator’s true matrices; only the task costs enter the control construction. Symbolic penalties require this action-valued construction and are not applied directly to a state-valued dynamics model.

Theorem 5.11 (Symbolic-reference error composition). On the same domain and against the same identified reference, if ∥Dπsym−Dπref∥≤ϵ1\lVert D\pi_{\mathrm{sym}}-D\pi_{\mathrm{ref}}\rVert\le\epsilon_1 and ∥Dπ−Dπsym∥≤ϵ2\lVert D\pi-D\pi_{\mathrm{sym}}\rVert\le\epsilon_2, then ∥Dπ−Dπref∥≤ϵ1+ϵ2\lVert D\pi-D\pi_{\mathrm{ref}}\rVert\le\epsilon_1+\epsilon_2.

Proof. Insert DπsymD\pi_{\mathrm{sym}} and apply the triangle inequality. The domain and both codomains must agree.

To encourage the alignment in Theorem 5.4, the ideal action-valued JC loss is

LJC=Ex∼D[∥Dπ(x)−Dπsym(x)∥F2],(5)\mathcal{L}_{\mathrm{JC}}=\mathbb{E}_{x\sim\mathcal{D}}\left[\left\lVert D\pi(x)-D\pi_{\mathrm{sym}}(x)\right\rVert_{\mathrm{F}}^2\right], \tag*{(5)}

where D\mathcal{D} denotes the replay sampling distribution. The revised implementation evaluates the full deterministic-action Jacobian, with one row per action coordinate, and uses the squared Frobenius loss in (5). Symbolic Jacobians are detached; the critic uses a detached batch scalar and the actor uses the unclipped loss with gradient-norm clipping. The historical symbolic implementation instead compared summed state-increment gradients with the pre-squash actor mean. Its scalar maps were ψpol(x)=∑ia=1daμθ,ia(x)\psi_{\mathrm{pol}}(x)=\sum_{i_a=1}^{d_a}\mu_{\theta,i_a}(x) and ψsym(x)=∑ix=1dxfsym,ix(x)\psi_{\mathrm{sym}}(x)=\sum_{i_x=1}^{d_x}f_{\mathrm{sym},i_x}(x), where iai_a and ixi_x index action and state coordinates, respectively. Its historical loss was

Lproj=Ex∼D[∥∇xψpol(x)−∇xψsym(x)∥2dx].(6)\mathcal{L}_{\mathrm{proj}}=\mathbb{E}_{x\sim\mathcal{D}}\left[\frac{\left\lVert\nabla_x\psi_{\mathrm{pol}}(x)-\nabla_x\psi_{\mathrm{sym}}(x)\right\rVert^2}{d_x}\right]. \tag*{(6)}

The historical diagnostic (6) does not establish full action-valued JC. The revised loss removes coordinate cancellation and matches the action units of the reference. Primary transit runs disable both symbolic weights.

Theorem 5.12 (Conditional symbolic-to-OOD pipeline). Under the two derivative-error bounds in Theorem 5.11 everywhere on the segment and base error at most δ\delta,

∥π(xood)−πref(xood)∥≤δ+(ε1+ε2)∥d∥.(7)\left\lVert\pi(x_{\mathrm{ood}})-\pi_{\mathrm{ref}}(x_{\mathrm{ood}})\right\rVert\leq\delta+(\varepsilon_1+\varepsilon_2)\lVert d\rVert. \tag*{(7)}

If only the boundary errors are known, the linear guarantee (7) is replaced by Theorem 5.25, adding the term Lerr∥d∥2/2L_{\mathrm{err}}\lVert d\rVert^2/2 under its regularity assumptions.

The linear result uses uniform segment-wide derivative accuracy; it does not require Lπ=0L_\pi=0. Its proof is in Appendix § 12.§ 4. A replay-average loss alone supplies neither a uniform boundary certificate nor an OOD guarantee.

Optional cross-environment filtering

Let e∈Etraine\in\mathcal{E}_{\mathrm{train}} index a training environment, where Nenv=∣Etrain∣N_{\mathrm{env}}=\lvert\mathcal{E}_{\mathrm{train}}\rvert. Write πrefe\pi_{\mathrm{ref}}^e for its action-valued reference. IRM [18] motivates looking for relations shared across environments. The current code selects symbolic models using variance of prediction errors; it does not implement the gradient-penalty formulation of IRM (IRMv1) in this selector. Appendix § 16 gives the exact criterion in (18).

Definition 5.13 (Cross-environment derivative accuracy). A shared action-valued reference πsym\pi_{\mathrm{sym}} is εirm\varepsilon_{\mathrm{irm}}-accurate when ∥Dπref(x)−Dπsym(x)∥≤εirm\lVert D\pi_{\mathrm{ref}}(x)-D\pi_{\mathrm{sym}}(x)\rVert\leq\varepsilon_{\mathrm{irm}} on every stated environment domain.

Proposition 5.14 (Conditional tightening). If a selected reference satisfies εirm≤εraw\varepsilon_{\mathrm{irm}}\leq\varepsilon_{\mathrm{raw}}, where εraw\varepsilon_{\mathrm{raw}} is the corresponding single-environment derivative-error bound, adding the same policy-alignment error ε2\varepsilon_2 preserves this ordering. Selection by error variance alone does not imply the premise.

Proof. Add ε2\varepsilon_2 to both sides of the assumed inequality.

Proposition 5.15 (Invariant-component decomposition). Suppose πrefe=πinv+πvare\pi_{\mathrm{ref}}^e=\pi_{\mathrm{inv}}+\pi_{\mathrm{var}}^e, where πinv\pi_{\mathrm{inv}} is the environment-invariant component and πvare\pi_{\mathrm{var}}^e is an environment-dependent residual. Assume an invariant model πsyminv\pi_{\mathrm{sym}}^{\mathrm{inv}} approximates πinv\pi_{\mathrm{inv}} with derivative error at most εinv\varepsilon_{\mathrm{inv}} on the test domain. Also assume a single-environment model πsyme0\pi_{\mathrm{sym}}^{e_0} approximates πinv+πvare0\pi_{\mathrm{inv}}+\pi_{\mathrm{var}}^{e_0} with the same error bound on that test domain, where e0e_0 is its training environment. At test environment e⋆e_\star, the respective upper bounds are

εinv+εvare⋆andεinv+εvare0+εvare⋆,\varepsilon_{\mathrm{inv}}+\varepsilon_{\mathrm{var}}^{e_\star} \qquad\text{and}\qquad \varepsilon_{\mathrm{inv}}+\varepsilon_{\mathrm{var}}^{e_0}+\varepsilon_{\mathrm{var}}^{e_\star},

where εvare\varepsilon_{\mathrm{var}}^e bounds ∥Dπvare(x)∥\lVert D\pi_{\mathrm{var}}^e(x)\rVert on the test domain.

The difference between these upper bounds is not a lower bound on the realized benefit. The proof and that distinction appear in Appendix § 12.§ 5; identifying the invariant component remains an assumption.

Corollary 5.16 (Conditional filtering-to-OOD pipeline). If Theorem 5.13 and policy alignment with error ε2\varepsilon_2 hold on the whole test segment in environment e⋆e_\star, then ∥π(xood)−πrefe⋆(xood)∥≤δ+(εirm+ε2)∥d∥\left\lVert\pi(x_{\mathrm{ood}})-\pi_{\mathrm{ref}}^{e_\star}(x_{\mathrm{ood}})\right\rVert\leq\delta+(\varepsilon_{\mathrm{irm}}+\varepsilon_2)\lVert d\rVert, with base error δ\delta at x0x_0 in the same environment.

Appendix § 12.§ 5 supplies the proof. The environment-diversity requirement depends on the model class and interventions; IRM does not imply a universal three-environment sufficiency rule.

Frozen Bellman operator

Fix a stochastic actor density pθp_\theta and define

VQ(x)=∫Apθ(a∣x)(Q(x,a)−αlog⁡pθ(a∣x)) da.(8)V^Q(x)=\int_{\mathcal{A}}p_\theta(a\mid x)\bigl(Q(x,a)-\alpha\log p_\theta(a\mid x)\bigr)\,\mathrm{d}a. \tag*{(8)}

Assume its entropy contribution and all frozen reward and penalty terms are bounded. For mode ℓ\ell, transition kernel PℓP_\ell and reward RℓR_\ell, define

TℓCSQ(x,a)=Rℓ(x,a)+γ[∫SVQ(x′)Pℓ(dx′∣x,a)−λepiΓepiℓ(x,a)−λsymΓsymℓ(x,a)−κaleℓ(x,a)].(9)\mathcal{T}^{\mathrm{CS}}_\ell Q(x,a)=R_\ell(x,a)+\gamma\left[\int_{\mathcal{S}}V^Q(x')P_\ell(\mathrm{d}x'\mid x,a)-\lambda_{\mathrm{epi}}\Gamma^\ell_{\mathrm{epi}}(x,a)-\lambda_{\mathrm{sym}}\Gamma^\ell_{\mathrm{sym}}(x,a)-\kappa^\ell_{\mathrm{ale}}(x,a)\right]. \tag*{(9)}

Here λepi,λsym≥0\lambda_{\mathrm{epi}},\lambda_{\mathrm{sym}}\ge0 are penalty coefficients; Γepiℓ\Gamma^\ell_{\mathrm{epi}} is a fixed ensemble uncertainty penalty, Γsymℓ\Gamma^\ell_{\mathrm{sym}} a fixed symbolic discrepancy, and κaleℓ\kappa^\ell_{\mathrm{ale}} a fixed signed aleatoric offset. The mixture is

TρCSQ=∑ℓ∈Mρ(ℓ)TℓCSQ.(10)\mathcal{T}^{\mathrm{CS}}_\rho Q=\sum_{\ell\in\mathcal{M}}\rho(\ell)\mathcal{T}^{\mathrm{CS}}_\ell Q. \tag*{(10)}

Theorem 5.17 (Frozen-operator contraction). For stochastic transition kernels, a fixed probability vector ρ\rho, fixed pθp_\theta, α\alpha, and fixed bounded penalty fields, the operator (10), built from the soft value (8) and mode backups (9), is a γ\gamma-contraction on bounded value functions in the supremum norm, with a unique fixed point.

Proof sketch. The fixed entropy and penalties cancel between backups. ∣VQ1(x)−VQ2(x)∣≤∥Q1−Q2∥∞\lvert V^{Q_1}(x)-V^{Q_2}(x)\rvert\le\lVert Q_1-Q_2\rVert_\infty, and averaging with probability kernels and ρ\rho preserves the bound. Appendix § 12.§ 1 gives the full argument.

Corollary 5.18 (Contraction after belief update). For nonnegative mode likelihoods L(ℓ)\mathcal{L}(\ell) and Zρ=∑ℓρ(ℓ)L(ℓ)>0Z_\rho=\sum_\ell\rho(\ell)\mathcal{L}(\ell)>0, the posterior ρ+(ℓ)=ρ(ℓ)L(ℓ)/Zρ\rho^+(\ell)=\rho(\ell)\mathcal{L}(\ell)/Z_\rho defines another frozen γ\gamma-contractive operator.

This is a per-operator property; changing the actor or belief between updates changes the operator and possibly its fixed point. Appendix § 12.§ 2 proves the probability normalization.

Theorem 5.19 (Value-dependent penalty counterexample). On a one-state, one-action MDP with 0<γ<10<\gamma<1, let Γsym(Q)=Csym−νQ\Gamma_{\mathrm{sym}}(Q)=C_{\mathrm{sym}}-\nu Q, where CsymC_{\mathrm{sym}} is a constant and ν≥0\nu\ge0 is coupling sensitivity. The affine backup has Lipschitz factor γ(1+λsymν)\gamma(1+\lambda_{\mathrm{sym}}\nu). It fails to contract when this factor is at least one; below that threshold it remains contractive.

A constant can make the discrepancy nonnegative on the bounded comparison interval. Appendix § 12.§ 3 gives the exact calculation. Freezing is a sufficient way to recover the γ\gamma template; the counterexample does not prove that every non-frozen design fails.

The abstract operator retains separate frozen penalties, following BAPR’s proof template. In the shared-critic implementation, epistemic spread is penalized in the critic and actor losses; the symbolic term is a detached batch average of (6). Appendix § 13 distinguishes these update equations from the abstract operator.

Boundary errors and whole-policy regularity

Proposition 5.20 (Derivative-error propagation). Under Theorems 5.1 to 5.3, for x∈Ωx\in\Omega,

∥Dπ(x)−Dπref(x)∥≤ε+Lerr∥x−x0∥,Lerr=Lπ+M.(11)\lVert D\pi(x)-D\pi_{\mathrm{ref}}(x)\rVert\le\varepsilon+L_{\mathrm{err}}\lVert x-x_0\rVert,\qquad L_{\mathrm{err}}=L_\pi+M. \tag*{(11)}

Proof. Insert both derivatives at x0x_0 and apply the triangle inequality and the two derivative Lipschitz bounds. Appendix § 11.§ 4 spells out the three terms.

The smoothness premise covers the OOD segment. This removes the need to assume OOD Jacobian alignment, but it does not remove all OOD-domain assumptions. Applying a constant worst-case segment bound gives the conservative expression δ+ε∥d∥+Lerr∥d∥2\delta+ \varepsilon\lVert d\rVert+ L_{\mathrm{err}}\lVert d\rVert^2; integrating the increasing envelope gives the tighter factor 1/21/2 below.

Policy-output extrapolation bound

All maps in this subsection are continuously differentiable on a neighborhood of the relevant closed segment, and all error-bound constants are nonnegative. The arguments use the mean value theorem (MVT) and integration of a derivative envelope.

Lemma 5.21 (Scalar linear error growth). For scalar policy and reference on an interval [b−,b+][b_-,b_+] with b−≤b+b_- \le b_+, if ∣π′(x)−πref′(x)∣≤Cder|\pi'(x)-\pi'_{\mathrm{ref}}(x)| \le C_{\mathrm{der}} throughout the interval, then the change in π−πref\pi-\pi_{\mathrm{ref}} between endpoints is at most Cder(b+−b−)C_{\mathrm{der}}(b_+ - b_-). Here b−,b+b_-,b_+ are interval endpoints and CderC_{\mathrm{der}} is a uniform derivative-error bound.

Appendix B.1 proves the scalar and vector-valued versions.

Theorem 5.22 (Scalar quadratic error bound). If ∣π(b−)−πref(b−)∣≤δ|\pi(b_-) - \pi_{\mathrm{ref}}(b_-)| \le\delta and ∣π′(x)−πref′(x)∣≤ε+Lerr(x−b−)|\pi'(x) - \pi'_{\mathrm{ref}}(x)| \le\varepsilon+ L_{\mathrm{err}}(x-b_-) on [b−,b+][b_-,b_+], then ∣π(b+)−πref(b+)∣≤δ+ε(b+−b−)+Lerr(b+−b−)2/2|\pi(b_+) - \pi_{\mathrm{ref}}(b_+)| \le\delta+ \varepsilon(b_+ - b_-) + L_{\mathrm{err}}(b_+ - b_-)^2/2.

The full proof is in Appendix B.2.

Theorem 5.23 (Vector-valued linear error bound). If the base error is at most δ\delta and ∥Dπ(x)−Dπref(x)∥≤Cder\lVert D\pi(x) - D\pi_{\mathrm{ref}}(x)\rVert\le C_{\mathrm{der}} on the segment, then ∥π(xood)−πref(xood)∥≤δ+Cder∥d∥\lVert\pi(x_{\mathrm{ood}}) - \pi_{\mathrm{ref}}(x_{\mathrm{ood}})\rVert\le\delta+ C_{\mathrm{der}}\lVert d\rVert.

This is the result used by the uniform symbolic pipelines; see Appendix B.1.

Lemma 5.24 (Path-envelope bound). Let υ∈[0,1]\upsilon\in[0,1] parameterize the segment ζ(υ)=x0+υd\zeta(\upsilon) = x_0 + \upsilon d, and set epath(υ)=π(ζ(υ))−πref(ζ(υ))e_{\mathrm{path}}(\upsilon) = \pi(\zeta(\upsilon)) - \pi_{\mathrm{ref}}(\zeta(\upsilon)). If ∥epath(0)∥≤δ\lVert e_{\mathrm{path}}(0)\rVert\le\delta and ∥epath′(υ)∥≤ε∥d∥+Lerr∥d∥2υ\lVert e'_{\mathrm{path}}(\upsilon)\rVert\le\varepsilon\lVert d\rVert+ L_{\mathrm{err}}\lVert d\rVert^2\upsilon, then ∥epath(1)∥≤δ+ε∥d∥+Lerr∥d∥2/2\lVert e_{\mathrm{path}}(1)\rVert\le\delta+ \varepsilon\lVert d\rVert+ L_{\mathrm{err}}\lVert d\rVert^2/2.

Its integration proof appears in Appendix B.3.

Theorem 5.25 (Quadratic OOD bound). Under Theorems 5.1 to 5.3,

∥π(xood)−πref(xood)∥≤δ+ε∥d∥+Lerr2∥d∥2.(12)\lVert\pi(x_{\mathrm{ood}}) - \pi_{\mathrm{ref}}(x_{\mathrm{ood}})\rVert\le\delta+ \varepsilon\lVert d\rVert+ \frac{L_{\mathrm{err}}}{2}\lVert d\rVert^2. \tag*{(12)}

Proof sketch. Use (11) along ζ(υ)\zeta(\upsilon), apply the chain rule to epathe_{\mathrm{path}}, and invoke Theorem 5.24. Appendix B.5 gives the complete proof. □

The three terms describe boundary value error, boundary derivative mismatch, and subsequent derivative drift. They are conditional properties of the compared maps. An affine action map with an affine reference has Lerr=0L_{\mathrm{err}} = 0; a linear feature-space head inside the implemented actor does not establish that case. SAC return optimization alone also does not certify δ\delta against an arbitrary reference.

Implemented training loop

Algorithm 1 summarizes the primary pipeline. The replay buffer B\mathcal{B} supplies sampling distribution D\mathcal{D}; NupdN_{\mathrm{upd}} is the number of gradient updates per collection step. The optional symbolic loss coefficients are λsym\lambda_{\mathrm{sym}} for the critic target and λJC\lambda_{\mathrm{JC}} for the actor. The primary transit configuration sets both to zero.

Algorithm 1 CS-BAPR training with optional symbolic diagnostics

  1. Initialize actor parameters θ\theta, critics {ϕk}\{\phi_k\}, targets {ϕˉk}\{\bar{\phi}_k\}, replay buffer B\mathcal{B}, and BOCD belief ρ\rho.

  2. if symbolic diagnostics are enabled then

  3. Collect exploration transitions; fit fsymf_{\mathrm{sym}}; optionally select across environments; freeze its coefficients.

  4. For symbolic penalties, construct and freeze the action-valued reference πsym=C(fsym)\pi_{\mathrm{sym}} = \mathcal{C}(f_{\mathrm{sym}}).

  5. end if

  6. for each collection step do

  7. Collect transitions; append to B\mathcal{B} and the recent-rollout tail.

  8. Compute surprise χt\chi_t and update ρ\rho.

  9. for each of NupdN_{\mathrm{upd}} gradient updates do

  10. Sample a replay batch; apply reward normalization and entropy floor.

  11. Compute λw\lambda_w and warmup-adjusted βeff\beta_{\mathrm{eff}}.

  12. Freeze target values, actor sample, belief, and symbolic discrepancy for the critic target.

  13. Compute critic gradients with (14) and the minimum-target setting; clip and update critics.

  14. Compute actor gradients with (15) and the BC-removal setting.

  15. Clip actor gradients; update the actor; softly update target networks.

  16. end for

  17. end for

The target and loss definitions are in Appendix § 13. Disabling symbolic diagnostics retains this training recipe and the fixed-backup contraction template.

Experiments

We evaluate the transit-focused training recipe, with optional symbolic losses disabled. ID operation uses nominal demand. The questions are whether stabilization improves the BAPR implementation, whether the actor-head choice changes OOD performance, and how the behavior transfers to different disturbance axes.

Transit benchmark and evaluation protocol

Environment. MultiLineEnv is an event-driven holding simulator for 12 urban bus lines, using SUMO-calibrated headway and dwell dynamics. The single-agent fleet formulation follows the bus-control setting of Zhang [24]. At station arrivals, the normalized action a∈[−1,1]a \in[-1,1] is converted to hold duration hhold=30(a+1)h_{\mathrm{hold}} = 30(a+1) s, with a maximum of 60 s. This keeps the replay action in normalized coordinates and the physical hold time in seconds. The 15-dimensional state includes headways, load, boarding rate, speed, delay, previous action, and line/station/time descriptors. Poisson passenger arrivals use line-specific nominal rates.

Approximate linearity diagnostic. Headway-based control [25] and optimal linear schedule-reliability control [26] motivate feedback that is locally linear in timing deviations. The recorded diagnostic for a strong learned controller uses 47,247 decisions over five ID episodes: a 50/50 train/test split gives a held-out coefficient of determination R2=0.70R^2 = 0.70 for an ordinary-least-squares fit from normalized state to hold time. The recorded ID clamp rate is zero. This diagnostic suggests approximate local linearity; it does not establish a globally linear policy or prove that optimal holding scales with demand.

OOD protocols. The demand multiplier mm scales the nominal Poisson arrival rate:

  • Static: m∈{1,2,5,10,20,50}m \in\{1, 2, 5, 10, 20, 50\} for the full 18,000 s episode.

  • Abrupt: m=1m = 1 before t=3600t = 3600 s, followed by one switch to m∈{5,10,20,50}m \in\{5, 10, 20, 50\}.

  • Oscillating: piecewise-constant within-episode schedules. commuter_day uses multipliers (1, 10, 2, 20, 5, 50) at times (0, 3600, 7200, 10800, 14400, 16200) s. square_wave_20x alternates 1 and 20 every 1800 s, starting at 1, for nine switches. escalating_10x uses (1, 2, 5, 15, 50) at (0, 3600, 7200, 10800, 14400) s; the name is a configuration identifier.

Configurations. The six reported transit configurations are bapr-pristine (ReLU MLP, six settings disabled), bapr (historical legacy preset), csbapr-no-nau (ReLU MLP with stabilization), csbapr (mixed arithmetic head with stabilization), csbapr-tanh (tanh-hidden MLP with stabilization), and csbapr-kan (KAN with stabilization). The BC coefficient follows § 5.3. Every transit row uses Nseed=10N_{\mathrm{seed}} = 10 seeds and 500 training episodes per seed, with the selected ID checkpoint evaluated under the OOD protocols. Selection is based on the best ID score rather than an OOD score. Tables report medians across seeds except Table 1, which reports mean and standard deviation. Return-unit suffixes K and M mean 10310^3 and 10610^6; higher return is better. Appendix § 17 documents defaults and overrides.

MethodNseedN_{\mathrm{seed}} seedsID total return (K)
bapr-pristine (ReLU + no fixes)10−850±37-850 \pm37
bapr (historical legacy)10−793±34-793 \pm34
csbapr-no-nau (ReLU-MLP + 6 fixes)10−780±55-780 \pm55
csbapr (NAU + 6 fixes)10−772±36-772 \pm36
csbapr-tanh (smooth-MLP + 6 fixes)10−817±54-817 \pm54
csbapr-kan (KAN + 6 fixes)10−759±35-759 \pm35

Table 1. ID total return across the 12 lines at m=1m = 1. Higher is better. Mean ±\pm standard deviation, Nseed=10N_{\mathrm{seed}}=10 seeds per row.

ID convergence

Table 1 reports ID total return across the 12 lines. The arithmetic actor is comparable to the stabilized ReLU variant, and KAN has the highest mean. Different aggregation explains why these means differ from the medians at m=1m = 1 in Table 2.

Table 2. Static OOD demand sweep, total episode return (K, higher is better). Median episode return over Nseed=10N_{\mathrm{seed}}=10 seeds per row. m=1m=1 is ID. bapr-pristine disables all six stabilization settings; bapr is a historical legacy configuration. Bold: best in column.

Methodm=1m=1m=2m=2m=5m=5m=10m=10m=20m=20m=50m=50
bapr-pristine (ReLU, no fixes)−861−862−939−1134−1267−1416
bapr (historical legacy)−791−799−878−1025−1196−1428
csbapr-no-nau (ReLU-MLP+6 fixes)−770−776−827−919−1076−1314
csbapr (NAU+6 fixes)−772−778−807−950−1098−1293
csbapr-tanh (smooth-MLP+6 fixes)−786−824−897−986−1087−1239
csbapr-kan (KAN+6 fixes)−756−762−820−971−1121−1335

Demand OOD and stabilization ablation

Table 2 to Table 4 report the three demand protocols, and Table 5 reports severe seed outcomes. The stabilization comparison holds the ReLU architecture fixed: relative to bapr-pristine, csbapr-no-nau reduces absolute static return loss by 10.6%, 11.9%, 19.0%, 15.1%, and 7.2% at m=1,5,10,20,50m = 1, 5, 10, 20, 50, respectively. Relative improvement here means the return difference divided by the absolute baseline return.

Table 4. Oscillating OOD protocol: within-episode piecewise-constant demand schedule. Total episode return (K), median over Nseed=10N_{\mathrm{seed}}=10 seeds. Schedules: commuter_day has 5 switches with peak 50×; square_wave_20x has 9 switches with peak 20×; escalating_10x has 4 switches with peak 50×.

Methodcommuter_daysquare_wave_20xescalating_10x
bapr-pristine−998−1111−956
bapr (legacy)−954−1045−920
csbapr-no-nau−859−921−845
csbapr (NAU)−865−927−853
csbapr-tanh−929−990−908
csbapr-kan−914−972−912

Table 5. Crash rate at m=20×m=20\times across multiple severity thresholds. Each cell reports the fraction of seeds whose return at m=20×m=20\times falls below the threshold (lower is better). All six methods use Nseed=10N_{\mathrm{seed}}=10 seeds. Thresholds show both typical poor performance and severe tail outcomes.

MethodNseedN_{\mathrm{seed}}< −1,200K< −1,500K< −1,800K< −2,000KWorst seed (K)
bapr-pristine (ReLU, no fixes)1070%0%0%0%−1,422
bapr (historical legacy)1050%0%0%0%−1,367
csbapr-no-nau (ReLU-MLP+6 fixes)1040%0%0%0%−1,309
csbapr (NAU+6 fixes)1020%10%10%0%−1,851
csbapr-tanh (smooth-MLP+6 fixes)1030%0%0%0%−1,257
csbapr-kan (KAN+6 fixes)1030%10%0%0%−1,551

The arithmetic variant’s corresponding gains over bapr-pristine are 10.3%, 14.1%, 16.2%, 13.3%, and 8.7%. Its gain over the stabilized ReLU variant at m=5m = 5 is about 2.4%. The head comparison includes different architectures and head regularizers, rather than an isolated intervention on derivative curvature.

No architecture dominates. KAN has the best static medians at m=1,2m = 1, 2 and the best burst-5×\times value. The arithmetic variant is best at static m=5m = 5; the stabilized ReLU variant is best at static and burst m=10,20m = 10, 20 and all three oscillating schedules; the tanh variant is best at static and burst m=50m = 50. These are rankings of the reported medians, without a significance claim.

The crash thresholds distinguish typical performance from severe tails. At m=20m = 20, the arithmetic variant has one seed at −1,851-1{,}851K, KAN has one at −1,551-1{,}551K, and no configuration has a seed below −2,000-2{,}000K. The arithmetic head therefore does not eliminate severe outcomes. The reported returns cannot establish that an outlier was caused by a particular weight constraint or derivative constant.

Table 3. Abrupt-burst protocol: m=1m=1 for t∈[0,3600)t \in[0,3600) s, then abrupt switch to the specified multiplier. Total episode return (K), median over Nseed=10N_{\mathrm{seed}}=10 seeds.

Methodburst 5×burst 10×burst 20×burst 50×
bapr-pristine−909−1021−1178−1354
bapr (legacy)−836−963−1104−1316
csbapr-no-nau−792−858−982−1205
csbapr (NAU)−792−881−1000−1196
csbapr-tanh−847−932−1017−1152
csbapr-kan−790−909−1054−1224

Return degradation diagnostic

Figure 1 plots ΔJ(m)=J(1)−J(m)\Delta J(m) = J(1) - J(m), where J(m)J(m) is the static-table median episode return at demand multiplier mm. Thus the plot is a difference of medians, not a median of paired seed differences. It visualizes degradation of the same reported configurations and data in Table 2.

Figure 1. Static-demand return degradation relative to each configuration’s ID median. Every point is computed from Table 2, with Nseed=10N_{\mathrm{seed}} = 10 for each underlying median. Lower degradation is better relative to that configuration’s own ID level. The figure reports a difference of aggregate medians and has no seed-level uncertainty bands.

The demand axis mm is not the state displacement dd in (12), and return has different units from action-output error. We therefore compare the observed degradation directly, without overlaying an unmeasured policy-output certificate.

Auxiliary benchmarks

Exploratory LQR amplitude sweep. A point-mass double integrator with quadratic cost is a simple reference setting. In the unsaturated discrete linear model, xt+1=Axt+Binatx_{t+1} = A x_t + B_{\mathrm{in}} a_t and the optimal feedback is a∗=−Kfbxa^* = -K_{\mathrm{fb}}x, where AA is the state-dynamics matrix, BinB_{\mathrm{in}} the input matrix, and KfbK_{\mathrm{fb}} the feedback gain determined by dynamics and cost. An identified AA alone is not that feedback gain. Initial-state radius is multiplied by mampm_{\mathrm{amp}}, and the reported historical cells are shown in Table 6.

Methodmamp=1m_{\mathrm{amp}}=1mamp=2m_{\mathrm{amp}}=2mamp=5m_{\mathrm{amp}}=5mamp=10m_{\mathrm{amp}}=10mamp=20m_{\mathrm{amp}}=20mamp=50m_{\mathrm{amp}}=50
bapr (no SINDy, no NAU)−168–−138K−1.28M–−9.40M
csbapr-no-sindy (NAU, no SINDy)−1,164–−105K−2.26M–−11.85M
csbapr-no-nau (MLP+SINDy)−2,301–−18K−0.94M–−9.84M
csbapr (NAU+SINDy, full)−2,916–−10K−0.90M–−11.45M

Table 6. Exploratory LQR initial-amplitude sweep, median unaugmented episode return over Nseed=3N_{\mathrm{seed}}=3 seeds. Higher is better. K and M denote 10310^3 and 10610^6 return units; – denotes an unreported cell. The symbolic-enabled configurations were labeled with SINDY_WITH_CONTROL=1; the implementation limitation is discussed in § 7.1. Bold: best reported value in the column.

Within the reported later sweep, the symbolic-enabled arithmetic configuration improves absolute return loss over csbapr-no-sindy by about 90.5% at mamp=5m_{\mathrm{amp}} = 5 (−10K versus −105K) and 60.2% at mamp=10m_{\mathrm{amp}} = 10 (−0.90M versus −2.26M). The earlier state-only configuration reported −381K and −2.65M at those amplitudes; comparing the two versions gives 97.4% and 66.0%, a different comparison from the no-SINDy ablation. At ID, BAPR is best, and at mamp=50m_{\mathrm{amp}} = 50 its −9.40M is also the highest reported return. The symbolic-enabled results are retained as exploratory configuration comparisons; the action-input and JC limitations are stated in § 7.1.

Hopper-v4 wind. A constant horizontal force acts on the torso:

Fwind=ωmtorsog,F_{\mathrm{wind}}=\omega m_{\mathrm{torso}}g,

where ω∈{0,1,2,5,10,20}\omega\in\{0,1,2,5,10,20\} is dimensionless wind amplitude, mtorsom_{\mathrm{torso}} is torso mass, and gg is gravitational acceleration. Training uses ω=0\omega=0; evaluation sweeps the full range. Table 7 reports the medians.

MethodID (ω=0\omega=0)ω=1\omega=1ω=2\omega=2ω=5\omega=5ω=10\omega=10ω=20\omega=20
bapr-pristine (ReLU, no fixes)63529427685127197
bapr/csbapr-relu (legacy, Nseed=2N_{\mathrm{seed}}=2)99521622114499107
csbapr-tanh (smooth-MLP+6 fixes)97533025120323956
csbapr-no-nau (ReLU-MLP+6 fixes)1,008317270255256224
csbapr (NAU+6 fixes)990289175628174

Table 7. Hopper-v4 wind sweep, median episode return over Nseed=3N_{\mathrm{seed}}=3 seeds except the legacy comparison (Nseed=2N_{\mathrm{seed}}=2, interrupted runs excluded). The pristine row disables the six stabilization settings; the legacy row is retained as a historical comparison. Wind amplitude ω=0\omega=0 is ID. Bold: best in the column.

The stabilized ReLU variant has the highest ID median and is best at ω=5,10,20\omega=5,10,20. The pristine variant is best at ω=2\omega=2, and tanh is best at ω=1\omega=1. The arithmetic variant falls from 990 at ID to 62 at ω=5\omega=5 and 74 at ω=20\omega=20, so its transit ranking does not transfer to this disturbance axis. Holding ReLU fixed, stabilization raises return from 635 to 1008 at ID, from 85 to 255 at ω=5\omega=5, and from 197 to 224 at ω=20\omega=20. This supports a useful training recipe in these evaluated cases, with task-dependent architectural behavior.

Discussion and conclusion

The strongest empirical finding is that the stabilization recipe improves the evaluated BAPR implementation on the transit demand protocols. Changing the actor head provides smaller, regime-dependent differences: arithmetic is best at static 5× demand, KAN at nominal and near-nominal demand, stabilized ReLU at several mid-to-high demand and switching conditions, and tanh at the 50× tail.

The theoretical finding is the conditional action-output bound [12], whose constants include both policy and reference regularity. The layer calculations in Theorems 5.6 to 5.8 explain one source of curvature control, while the composition analysis identifies the additional assumptions needed for a complete policy certificate. The frozen Bellman analysis retains the predecessor’s fixed-backup contraction template. The proof map in Appendix § 10 connects each result to the supplied proof rather than to an unavailable formal artifact.

Limitations

Whole-policy certification and performance. The historical arithmetic actor has LeakyReLU feature layers, a quadratic correction, and tanh squashing. It has not been certified to satisfy Theorem 5.3 across the OOD segments; its earlier curvature surrogate was not a valid LπL_{\pi}. The revised smooth-nau variant uses tanh features and computes a whole deterministic-policy bound, including the quadratic projection and action squash, as detailed in Appendix § 15.§ 1. It leaves the historical actor available and reports no finite certificate for that actor or a hard mean clamp. The certificate covers normalized action outputs, not sampled-action distributions, episode return, or deep actor-critic convergence. It can be conservative. The reported tables do not evaluate the new variant.

Symbolic and invariance components. The historical symbolic implementation omitted actions and used the projected loss (6). The revised code supplies actions to fitting and prediction, constructs an LQR feedback reference, and implements (5). These repairs are implementation changes, not retrospective validation of Table 6; new performance experiments are needed. Other tasks require their own action-valued control construction. Prediction-error variance can prefer a consistently inaccurate model; the selector neither proves derivative accuracy nor establishes SCM causality. IRM filtering is inactive in the reported primary runs.

Experimental scope and accounting. The 12-line transit simulator is one application setting; LQR and Hopper have three seeds per principal configuration. The legacy Hopper comparison has two completed seeds with interrupted runs excluded, and does not match the pristine baseline. The historical transit bapr row predates later defaults; the current bapr entrypoint inherits those defaults and does not by itself reproduce that older configuration. Actor weight decay and regularizer strengths also belong to the compared recipe, so the pristine comparison is not a six-factor causal ablation. Standard SAC, domain-randomized training, and robust adversarial RL (RARL) are not included in the primary result tables. The comparisons establish improvement over the evaluated predecessor configurations, with no universal claim for the stabilization package or head.

Reproducibility and proof artifacts. The manuscript-level comma-separated values (CSV) file transcribes aggregate table values. It does not replace original seed-level logs, checkpoint-selection records, or traces supporting the linear-fit diagnostic; those historical artifacts are absent from the retained package following storage cleanup. The diagnostics and statistical comparisons cannot be independently reconstructed from this CSV alone. This repository snapshot supplies mathematical proofs but no executable Lean project for the CS-BAPR results. Formalization tags in earlier drafts were not a machine-checking certificate.

The next empirical step is a fresh comparison of the revised smooth actor and action-valued feedback alignment, retaining per-seed returns and checkpoint-selection records. Boundary value and operator-norm derivative errors in (12) are measured at the stated boundary point, not inferred from replay-average losses or sample counts. Larger auxiliary seed sweeps and additional standard baselines would then assess transfer beyond transit demand scaling.

Code and Data Availability

Code is available at https://github.com/erzhu419/CS-BAPR. Aggregate source values for Tables 1 to 7 are transcribed in paper/source_data/reported_tables.csv. The figure is regenerated from its static-sweep rows. Original seed-level evidence is not included in the retained manuscript package.

Acknowledgments

This work was supported by the National Natural Science Foundation of China (Grant No. 72371251), the Natural Science Foundation for Distinguished Young Scholars of Hunan Province (Grant No. 2024JJ2080), and the Key Research and Development Program of Hunan Province of China (Grant No. 2024JK2007).

[17] S.-M. Udrescu and M. Tegmark, “AI Feynman: a Physics-Inspired Method for Symbolic Regression,” arXiv preprint, arXiv:1905.11481v2, 2020. https://arxiv.org/abs/1905.11481v2.

[18] M. Arjovsky, L. Bottou, I. Gulrajani, and D. Lopez-Paz, “Invariant Risk Minimization,” arXiv preprint, arXiv:1907.02893v3, 2020. https://arxiv.org/abs/1907.02893v3.

[19] B. Schölkopf, F. Locatello, S. Bauer, N. R. Ke, N. Kalchbrenner, A. Goyal, and Y. Bengio, “Towards Causal Representation Learning,” arXiv preprint, arXiv:2102.11107v1, 2021. https://arxiv.org/abs/2102.11107v1.

[20] Y. Zeng, R. Cai, F. Sun, L. Huang, and Z. Hao, “A Survey on Causal Reinforcement Learning,” arXiv preprint, arXiv:2302.05209v3, 2023. https://arxiv.org/abs/2302.05209v3.

[21] J. Peters, D. Janzing, and B. Schölkopf, Elements of Causal Inference: Foundations and Learning Algorithms. MIT Press, 2017. https://mitpress.mit.edu/9780262344296/elements-of-causal-inference/.

[22] C. Rowan, “On the failure of ReLU activation for physics-informed machine learning,” arXiv preprint, arXiv:2512.11184v2, 2025. https://arxiv.org/abs/2512.11184v2.

[23] G. An, S. Moon, J.-H. Kim, and H. O. Song, “Uncertainty-Based Offline Reinforcement Learning with Diversified Q-Ensemble,” arXiv preprint, arXiv:2110.01548v1, 2021. https://arxiv.org/abs/2110.01548v1.

[24] Y. Zhang, “Single Agent Robust Deep Reinforcement Learning for Bus Fleet Control,” arXiv preprint, arXiv:2508.20784v1, 2025. https://arxiv.org/abs/2508.20784v1.

[25] C. F. Daganzo, “A headway-based approach to eliminate bus bunching: Systematic analysis and comparisons,” Transportation Research Part B: Methodological, vol. 43, no. 10, pp. 913–921, 2009. https://doi.org/10.1016/j.trb.2009.04.002.

[26] Y. Xuan, J. Argote, and C. F. Daganzo, “Dynamic bus holding strategies for schedule reliability: Optimal linear control and performance analysis,” Transportation Research Part B: Methodological, vol. 45, no. 10, pp. 1831–1845, 2011. https://doi.org/10.1016/j.trb.2011.07.009.

Proof map

The appendix supplies mathematical proofs and implementation equations. The main text invokes each proof at the result it supports. The dependency map is:

These are paper proofs; an executable Lean project is not included in the current artifact.

Extrapolation proofs

Linear derivative-error bounds

Proof of Theorem 5.21. Put eout(x)=π(x)−πref(x)e_{\mathrm{out}}(x)=\pi(x)-\pi_{\mathrm{ref}}(x). By the fundamental theorem of calculus,

∣eout(b+)−eout(b−)∣=∣∫b−b+eout′(x) dx∣≤∫b−b+Cder dx=Cder(b+−b−).\left|e_{\mathrm{out}}(b_{+})-e_{\mathrm{out}}(b_{-})\right|=\left|\int_{b_{-}}^{b_{+}}e'_{\mathrm{out}}(x)\,\mathrm{d}x\right|\leq\int_{b_{-}}^{b_{+}}C_{\mathrm{der}}\,\mathrm{d}x=C_{\mathrm{der}}(b_{+}-b_{-}).

Proof of Theorem 5.23. Parametrize the segment by ζ(υ)=x0+υd\zeta(\upsilon)=x_{0}+\upsilon d, where d=xood−x0d=x_{\mathrm{ood}}-x_{0} and υ∈[0,1]\upsilon\in[0,1]. For eout=π−πrefe_{\mathrm{out}}=\pi-\pi_{\mathrm{ref}}, the chain rule gives

∥ddυeout(ζ(υ))∥=∥Deout(ζ(υ))d∥≤Cder∥d∥.\left\|\frac{\mathrm{d}}{\mathrm{d}\upsilon}e_{\mathrm{out}}(\zeta(\upsilon))\right\|=\left\|De_{\mathrm{out}}(\zeta(\upsilon))d\right\|\leq C_{\mathrm{der}}\|d\|.

Integrating and adding ∥eout(x0)∥≤δ\|e_{\mathrm{out}}(x_{0})\|\leq\delta yields ∥eout(xood)∥≤δ+Cder∥d∥\|e_{\mathrm{out}}(x_{\mathrm{ood}})\|\leq\delta+C_{\mathrm{der}}\|d\|.

Scalar quadratic bound

Proof of Theorem 5.22. With eout=π−πrefe_{\mathrm{out}}=\pi-\pi_{\mathrm{ref}}, integrate the assumed envelope:

∣eout(b+)∣≤∣eout(b−)∣+∫b−b+∣eout′(x)∣ dx≤δ+∫b−b+[ε+Lerr(x−b−)] dx.|e_{\mathrm{out}}(b_{+})|\leq|e_{\mathrm{out}}(b_{-})|+\int_{b_{-}}^{b_{+}}|e'_{\mathrm{out}}(x)|\,\mathrm{d}x\leq\delta+\int_{b_{-}}^{b_{+}}[\varepsilon+L_{\mathrm{err}}(x-b_{-})]\,\mathrm{d}x.

The integral equals ε(b+−b−)+Lerr(b+−b−)2/2\varepsilon(b_{+}-b_{-})+L_{\mathrm{err}}(b_{+}-b_{-})^{2}/2.

Path-envelope integration

Proof of Theorem 5.24. The path error is continuously differentiable. Therefore

∥epath(1)∥≤∥epath(0)∥+∫01∥epath′(υ)∥ dυ≤δ+∫01[ε∥d∥+Lerr∥d∥2υ] dυ=δ+ε∥d∥+12Lerr∥d∥2.\begin{aligned} \|e_{\mathrm{path}}(1)\|&\leq\|e_{\mathrm{path}}(0)\|+\int_{0}^{1}\|e'_{\mathrm{path}}(\upsilon)\|\,\mathrm{d}\upsilon\\ &\leq\delta+\int_{0}^{1}[\varepsilon\|d\|+L_{\mathrm{err}}\|d\|^{2}\upsilon]\,\mathrm{d}\upsilon\\ &=\delta+\varepsilon\|d\|+\frac{1}{2}L_{\mathrm{err}}\|d\|^{2}. \end{aligned}

Derivative-error propagation

Expanded proof of Theorem 5.20. Insert the boundary derivatives and apply the triangle inequality:

∥Dπ(x)−Dπref(x)∥≤∥Dπ(x)−Dπ(x0)∥+∥Dπ(x0)−Dπref(x0)∥+∥Dπref(x0)−Dπref(x)∥≤Lπ∥x−x0∥+ε+M∥x−x0∥.\begin{aligned} \|D\pi(x)-D\pi_{\mathrm{ref}}(x)\|&\leq\|D\pi(x)-D\pi(x_{0})\|+\|D\pi(x_{0})-D\pi_{\mathrm{ref}}(x_{0})\|\\ &\quad+\|D\pi_{\mathrm{ref}}(x_{0})-D\pi_{\mathrm{ref}}(x)\|\\ &\leq L_{\pi}\|x-x_{0}\|+\varepsilon+M\|x-x_{0}\|. \end{aligned}

This is (11) with Lerr=Lπ+ML_{\mathrm{err}}=L_{\pi}+M.

Whole-policy quadratic bound

Proof of Theorem 5.25. By Theorem 5.20, at every point of the segment,

∥Dπ(ζ(υ))−Dπref(ζ(υ))∥≤ε+Lerrυ∥d∥.\|D\pi(\zeta(\upsilon))-D\pi_{\mathrm{ref}}(\zeta(\upsilon))\|\leq\varepsilon+L_{\mathrm{err}}\upsilon\|d\|.

Multiplication by dd through the chain rule bounds the path-error derivative by ε∥d∥+Lerrυ∥d∥2\varepsilon\|d\|+L_{\mathrm{err}}\upsilon\|d\|^{2}. The base error is at most δ\delta. Apply Theorem 5.24. For d=0d=0, the statement is simply the base-error assumption.

Bellman and symbolic-reference proofs

Frozen-operator contraction

Proof of Theorem 5.17. Let dQ=∥Q1−Q2∥∞d_Q = \lVert Q_1 - Q_2 \rVert_\infty. The actor and temperature are identical in the two soft values, so their entropy terms cancel:

∣VQ1(x′)−VQ2(x′)∣≤∫Apθ(a′∣x′)∣Q1(x′,a′)−Q2(x′,a′)∣ da′≤dQ.\left|V^{Q_1}(x') - V^{Q_2}(x')\right| \le\int_A p_\theta(a' \mid x')\left|Q_1(x',a') - Q_2(x',a')\right|\,\mathrm{d}a' \le d_Q.

Rewards and frozen penalties also cancel. Since each PℓP_\ell is a probability kernel,

∣(TCSQ1)(x,a)−(TCSQ2)(x,a)∣≤γ∫SdQPℓ(dx′∣x,a)=γdQ.\left|(\mathcal{T}^{\mathrm{CS}}Q_1)(x,a) - (\mathcal{T}^{\mathrm{CS}}Q_2)(x,a)\right| \le\gamma\int_S d_Q P_\ell(\mathrm{d}x' \mid x,a) = \gamma d_Q.

Averaging with the fixed nonnegative weights ρ(ℓ)\rho(\ell), whose sum is one, and taking the supremum preserves this inequality. Bounded rewards, entropy contributions, and penalties make the operator a self-map on the complete space of bounded measurable value functions. The contraction mapping theorem gives the unique fixed point.

Belief normalization

Proof of Theorem 5.18. Every ρ+(ℓ)\rho^+(\ell) is nonnegative and ∑ℓρ+(ℓ)=Zρ/Zρ=1\sum_\ell\rho^+(\ell) = Z_\rho/Z_\rho= 1. Appendix § 12.§ 1 therefore applies with ρ+\rho^+ fixed. The conclusion concerns this new operator, not convergence of a sequence of changing operators.

Value-dependent feedback

Proof of Theorem 5.19. In the one-state, one-action example the entropy is zero and the next-state value is QQ. Absorbing all fixed terms into a constant C0C_0, the backup is

TQ=C0+γ(1+λsymν)Q.\mathcal{T}Q = C_0 + \gamma(1 + \lambda_{\mathrm{sym}}\nu)Q.

For distinct scalar values its exact Lipschitz ratio is γ(1+λsymν)\gamma(1 + \lambda_{\mathrm{sym}}\nu). A sufficiently large CsymC_{\mathrm{sym}} makes Csym−νQ≥0C_{\mathrm{sym}} - \nu Q \ge0 on any chosen bounded comparison interval. The affine map contracts precisely when its ratio is below one.

Symbolic-reference pipeline

Proof of Theorems 5.11 and 5.12. At any point where the two hypotheses hold,

∥Dπ−Dπref∥≤∥Dπ−Dπsym∥+∥Dπsym−Dπref∥≤ε2+ε1.\lVert D_\pi- D_{\pi_{\mathrm{ref}}} \rVert\le\lVert D_\pi- D_{\pi_{\mathrm{sym}}} \rVert+ \lVert D_{\pi_{\mathrm{sym}}} - D_{\pi_{\mathrm{ref}}} \rVert \le\varepsilon_2 + \varepsilon_1.

If this holds throughout the segment, apply Theorem 5.23 with Cder=ε1+ε2C_{\mathrm{der}} = \varepsilon_1 + \varepsilon_2. If it holds only at x0x_0, it bounds the boundary mismatch; Theorems 5.20 and 5.25 then require and use the whole-segment regularity assumptions. Both derivatives in the argument are action-valued, after the stated control construction; a state-valued dynamics output is not interchangeable with that reference.

Conditional invariant filtering

Proof of Theorem 5.15. For the invariant model, decompose its test-environment derivative error as

Dπrefϵ∗−Dπsyminv=(Dπinv−Dπsyminv)+Dπvarϵ∗.D_{\pi_{\mathrm{ref}}}^{\epsilon^*} - D_{\pi_{\mathrm{sym}}}^{\mathrm{inv}} = (D_{\pi_{\mathrm{inv}}} - D_{\pi_{\mathrm{sym}}}^{\mathrm{inv}}) + D_{\pi_{\mathrm{var}}}^{\epsilon^*}.

Its norm is at most εinv+εvarϵ∗\varepsilon_{\mathrm{inv}} + \varepsilon_{\mathrm{var}}^{\epsilon^*}. For the single-environment model insert the training-environment reference:

Dπrefϵ∗−Dπsymsingle=[D(πinv+πvarϵ0)−Dπsymsingle]+Dπvarϵ∗−Dπvarϵ0.D_{\pi_{\mathrm{ref}}}^{\epsilon^*} - D_{\pi_{\mathrm{sym}}}^{\mathrm{single}} = [D(\pi_{\mathrm{inv}} + \pi_{\mathrm{var}}^{\epsilon_0}) - D_{\pi_{\mathrm{sym}}}^{\mathrm{single}}] + D_{\pi_{\mathrm{var}}}^{\epsilon^*} - D_{\pi_{\mathrm{var}}}^{\epsilon_0}.

The triangle inequality gives the stated second bound. These are upper bounds on two distinct errors. Their difference does not establish a lower bound on the difference of the actual errors.

Proof of Theorem 5.16. In environment e⋆e_{\star}, add the uniform derivative bounds εirm\varepsilon_{\mathrm{irm}} and ε2\varepsilon_2 by the same triangle inequality. Apply Theorem 5.23 with the stated base error.

Implemented update equations

For a replay transition (x,a,r,x′,dterm)(x,a,r,x',d_{\mathrm{term}}), dterm∈{0,1}d_{\mathrm{term}} \in\{0,1\} is the terminal indicator and r~\tilde{r} is the normalized reward when normalization is enabled. Sample a′∼pθ(⋅∣x′)a' \sim p_{\theta}(\cdot\mid x'). Let nϕˉk≥0n_{\bar{\phi}_k} \ge0 be the parameter norm returned by compute_reg_norm: the sum of absolute target-critic weights and hidden biases, excluding the output bias. The code adds this norm offset; it is not a directly measured aleatoric uncertainty. For the minimum-ensemble setting, the detached target for critic kk is

yk=r~+γ(1−dterm)[Qmin⁡(x′,a′)−αlog⁡pθ(a′∣x′)+λregnϕˉk−λsymL^JC],(13)y_k = \tilde{r} + \gamma(1-d_{\mathrm{term}})\left[Q_{\min}(x',a')-\alpha\log p_{\theta}(a' \mid x')+\lambda_{\mathrm{reg}}n_{\bar{\phi}_k}-\lambda_{\mathrm{sym}}\widehat{L}_{\mathrm{JC}}\right], \tag*{(13)}

where λreg\lambda_{\mathrm{reg}} is the norm-offset coefficient and L^JC\widehat{L}_{\mathrm{JC}} is the batch estimator of (5) in the revised implementation. The historical symbolic target instead used (6). For the per-critic-target setting, Qmin⁡Q_{\min} is replaced by QϕˉkQ_{\bar{\phi}_k}. The symbolic term is omitted when the symbolic model is unavailable or disabled.

Define the ensemble mean and sample standard deviation by

Q‾(x,a)=1Ncrit∑k=1NcritQϕk(x,a),σQ(x,a)=[∑k(Qϕk(x,a)−Q‾(x,a))2Ncrit−1]1/2.\overline{Q}(x,a)=\frac{1}{N_{\mathrm{crit}}}\sum_{k=1}^{N_{\mathrm{crit}}}Q_{\phi_k}(x,a),\qquad\sigma_Q(x,a)=\left[\frac{\sum_k\left(Q_{\phi_k}(x,a)-\overline{Q}(x,a)\right)^2}{N_{\mathrm{crit}}-1}\right]^{1/2}.

The shared-critic loss is

LQ=Ebatch[1Ncrit∑k(Qϕk(x,a)−yk)2+βoodσQ(x,a)],(14)L_Q=\mathbb{E}_{\mathrm{batch}}\left[\frac{1}{N_{\mathrm{crit}}}\sum_k\left(Q_{\phi_k}(x,a)-y_k\right)^2+\beta_{\mathrm{ood}}\sigma_Q(x,a)\right], \tag*{(14)}

where Ebatch\mathbb{E}_{\mathrm{batch}} denotes the replay-batch average and βood\beta_{\mathrm{ood}} is its spread coefficient. For a fresh action a^∼pθ(⋅∣x)\hat{a}\sim p_{\theta}(\cdot\mid x), the arithmetic-actor objective is

Lπ=Ebatch,a^[−Q‾(x,a^)−βeffσQ(x,a^)+αlog⁡pθ(a^∣x)+βbcda∥a^−a∥2]+λJCL^JC+λNAULNAU.(15)L_{\pi}=\mathbb{E}_{\mathrm{batch},\hat{a}}\left[-\overline{Q}(x,\hat{a})-\beta_{\mathrm{eff}}\sigma_Q(x,\hat{a})+\alpha\log p_{\theta}(\hat{a}\mid x)+\frac{\beta_{\mathrm{bc}}}{d_a}\lVert\hat{a}-a\rVert^2\right]+\lambda_{\mathrm{JC}}\widehat{L}_{\mathrm{JC}}+\lambda_{\mathrm{NAU}}L_{\mathrm{NAU}}. \tag*{(15)}

Here λJC\lambda_{\mathrm{JC}} and λNAU\lambda_{\mathrm{NAU}} weight the full action-space consistency term and the NAU weight regularizer. The revised actor uses the unclipped consistency loss; the historical version clipped the projected loss at 2. The implemented BC term is a mean squared error over the dad_a action coordinates. Other heads omit the NAU regularizer or use their own regularizer. The primary transit comparisons set λJC\lambda_{\mathrm{JC}} and λsym\lambda_{\mathrm{sym}} to zero. The six-setting comparison does not activate the optional Q-spread caps or extra curvature penalties.

For the implementation’s run-length hypotheses, ℓ\ell takes the values 0,…,Hmax⁡−10,\ldots,H_{\max}-1. At update jj, the code uses

λw=∑ℓ=0Hmax⁡−1ρj(ℓ)exp⁡(−0.1ℓ)\lambda_w=\sum_{\ell=0}^{H_{\max}-1}\rho_j(\ell)\exp(-0.1\ell)

after warmup; it is zero during warmup. Here ρj\rho_j is the belief at update jj, and Hmax⁡H_{\max} is the maximum run-length hypothesis count. The actor coefficient is βeff=−2−cpenλw\beta_{\mathrm{eff}}=-2-c_{\mathrm{pen}}\lambda_w. The norm offset, sampled next actions, target network, actor, and symbolic model are detached or held fixed for each critic target construction. The abstract contraction result concerns a fixed actor and fixed penalty fields; it does not establish convergence of these changing gradient updates.

Symbolic fitting details

The configured polynomial library is fit with STLSQ. Write XX for joint sampled state-action inputs and YY for regression targets. In discrete mode the implemented target is the state increment Δxt=xt+1−xt\Delta x_t = x_{t+1} - x_t, not the next state itself:

Y≈Φ(X)ΞT,Y \approx\Phi(X)\Xi^{\mathsf{T}},

where the superscript T\mathsf{T} denotes matrix transpose. In continuous mode finite differences approximate the state derivative using the sampling interval Δt\Delta t, changing the regression target and its units. The frozen Torch wrapper evaluates the polynomial terms and fitted coefficient matrix Ξ\Xi, giving fsymf_{\mathrm{sym}} under the paper’s discrete-mode convention. The revised fit aligns every ata_t with xtx_t and its increment before concatenating episodes. Its wrapper uses the fitted polynomial library’s exponent matrix, including state-action cross terms and configured degrees up to four. Both prediction paths require actions for control-aware models. For degree-one, zero-intercept fits, the state coefficients describe A^−I\hat{A} - I, and the action coefficients describe B^in\hat{B}_{\mathrm{in}}. In LQR the environment applies force 5a5a, so the fitted input matrix is in normalized-action units and the cost matrix is Rcost=25diag⁡(0.01,0.01)R_{\mathrm{cost}} = 25\operatorname{diag}(0.01, 0.01); Qcost=diag⁡(1,1,0.1,0.1)Q_{\mathrm{cost}} = \operatorname{diag}(1, 1, 0.1, 0.1). The frozen reference uses the identified matrices with these task costs. Prediction-quality diagnostics use the coefficient of determination R2R^2; they do not measure a uniform derivative error. A prediction-quality threshold in the configuration is not a certificate of Theorem 5.11’s action-reference hypotheses.

Arithmetic-head implementation

The historical feature extractor consists of two affine layers with LeakyReLU slope 0.01, denoted GG. A fixed linear projection UquadU_{\mathrm{quad}} feeds the elementwise quadratic correction. The pre-squash mean is

μθ(x)=ηmixWNAUG(x)+(1−ηmix)cquad⊙(UquadG(x))⊙2,\mu_\theta(x) = \eta_{\mathrm{mix}}W_{\mathrm{NAU}}G(x) + (1 - \eta_{\mathrm{mix}})c_{\mathrm{quad}} \odot(U_{\mathrm{quad}}G(x))^{\odot2},

where ⊙\odot denotes coordinatewise multiplication, cquadc_{\mathrm{quad}} is the vector of quadratic coefficients, and ηmix∈(0,1)\eta_{\mathrm{mix}} \in(0, 1) is a learned sigmoid-transformed mixing weight. Its unconstrained parameter is initialized at 0.8, giving ηmix=(1+exp⁡(−0.8))−1≈0.690\eta_{\mathrm{mix}} = (1 + \exp(-0.8))^{-1} \approx0.690. A separate head predicts the Gaussian log standard deviation. For normalized actions the deterministic policy is π=tanh⁡μθ\pi= \tanh\mu_\theta. An affine physical rescaling has offset bab_a and scale ca>0c_a > 0; in transit, hhold=ba+caπh_{\mathrm{hold}} = b_a + c_a\pi with ba=ca=30b_a = c_a = 30 s. Training clamps WNAUW_{\mathrm{NAU}} to [−1,1][-1, 1] and uses

LNAU=1NW∑u,vmin⁡(∣(WNAU)uv∣,1−∣(WNAU)uv∣),(16)\mathcal{L}_{\mathrm{NAU}} = \frac{1}{N_W}\sum_{u,v}\min\left(\lvert(W_{\mathrm{NAU}})_{uv}\rvert, 1-\lvert(W_{\mathrm{NAU}})_{uv}\rvert\right), \tag*{(16)}

where u,vu,v index matrix rows and columns and NWN_W is the number of entries. This loss encourages discrete values but does not require exact discreteness for the NAU derivative identity. The regularizer in (16) is the term used in (15). The quadratic correction remains active in csbapr, so this configuration is not a pure linear NAU actor.

Complete composition calculation

Let GG and HH be continuously differentiable on neighborhoods of the convex domains under consideration. Suppose ∥DG∥≤KG\lVert DG\rVert\le K_G, ∥DH∥≤KH\lVert DH\rVert\le K_H, and their derivatives have Lipschitz constants LG,LHL_G, L_H, respectively. The derivative chain rule gives

D(H∘G)(x)−D(H∘G)(y)=[DH(G(x))−DH(G(y))]DG(x)+DH(G(y))[DG(x)−DG(y)].\begin{aligned} D(H \circ G)(x) - D(H \circ G)(y) ={}& [DH(G(x)) - DH(G(y))]DG(x) \\ &+ DH(G(y))[DG(x) - DG(y)]. \end{aligned}

Since ∥G(x)−G(y)∥≤KG∥x−y∥\lVert G(x) - G(y)\rVert\le K_G\lVert x-y\rVert, its norm is at most (LHKG2+KHLG)∥x−y∥(L_HK_G^2 + K_HL_G)\lVert x-y\rVert, proving (4). For the mixed head, a valid feature-space derivative Lipschitz bound is

LHmix≤2(1−ηmix)∥cquad∥∞∥Uquad∥op2.L_{H_{\mathrm{mix}}} \le2(1-\eta_{\mathrm{mix}})\lVert c_{\mathrm{quad}}\rVert_\infty\lVert U_{\mathrm{quad}}\rVert_{\mathrm{op}}^2.

Here the infinity norm is the maximum absolute vector entry. Even when the head is linear, the KHLGK_H L_G term does not vanish unless the features have constant derivatives.

For componentwise action squashing, sup⁡∣tanh⁡′∣=1\sup|\tanh'|=1 and sup⁡∣tanh⁡′′∣=4/(33)\sup|\tanh''|=4/(3\sqrt{3}). One more application of the composition calculation yields

Lπ≤433(KHKG)2+LHKG2+KHLG.(17)L_\pi\le\frac{4}{3\sqrt{3}}(K_H K_G)^2 + L_H K_G^2 + K_H L_G. \tag*{(17)}

Equation (17) bounds the normalized deterministic action map, including both feature curvature and tanh curvature. An affine physical rescaling multiplies this derivative bound by cac_a. The historical logged curvature surrogate omitted these global terms. For example, π(x)=tanh⁡(LeakyReLU⁡0.01(x))\pi(x)=\tanh(\operatorname{LeakyReLU}_{0.01}(x)) has left and right derivatives 0.01 and 1 at zero. No finite global derivative Lipschitz constant exists across that activation boundary. Within a fixed activation region the feature map is affine, but such a local calculation does not certify a segment that crosses regions.

Smooth arithmetic variant. The revised smooth-nau actor replaces both feature activations by tanh, keeping the arithmetic and quadratic heads. Let W1,W2W_1,W_2 be the two feature-layer matrices; their common hidden width is the feature dimension dzd_z. Define ctanh⁡=4/(33)c_{\tanh}=4/(3\sqrt{3}). Since componentwise tanh has derivative norm at most one and derivative Lipschitz constant ctanh⁡c_{\tanh}, two applications of (4) give

KG≤∥W2∥op∥W1∥op,K_G \le\lVert W_2\rVert_{\mathrm{op}}\lVert W_1\rVert_{\mathrm{op}},
LG≤ctanh⁡[(∥W2∥op∥W1∥op)2+∥W2∥op∥W1∥op2].L_G \le c_{\tanh}\left[(\lVert W_2\rVert_{\mathrm{op}}\lVert W_1\rVert_{\mathrm{op}})^2+\lVert W_2\rVert_{\mathrm{op}}\lVert W_1\rVert_{\mathrm{op}}^2\right].

The features obey ∥G(x)∥≤RG=dz\lVert G(x)\rVert\le R_G=\sqrt{d_z}, where RGR_G is their global radius bound. Thus

KH≤ηmix∥WNAU∥op+LHRG.K_H \le\eta_{\mathrm{mix}}\lVert W_{\mathrm{NAU}}\rVert_{\mathrm{op}}+L_H R_G.

Substituting these constants and the quadratic-head bound into (17) yields the implemented global certificate. Feature biases do not affect the norm bounds because tanh remains bounded. For πsym(x)=tanh⁡(−K^fbx)\pi_{\mathrm{sym}}(x)=\tanh(-\widehat{K}_{\mathrm{fb}}x), the same calculation gives reference curvature at most ctanh⁡∥K^fb∥op2c_{\tanh}\lVert\widehat{K}_{\mathrm{fb}}\rVert_{\mathrm{op}}^2. The boundary errors are computed as Euclidean action error and operator-norm Jacobian error at x0x_0, then inserted into (12).

Cross-environment selection

For each fitted symbolic candidate Ξ\Xi, let E^e(Ξ)\widehat{E}_e(\Xi) be its mean Euclidean prediction error in training environment ee, evaluated on that environment’s collected states and targets. The implementation selects

Ξsel∈arg⁡min⁡Ξ∈C Var⁡e∈Etrain[E^e(Ξ)],(18)\Xi_{\mathrm{sel}} \in\underset{\Xi\in\mathcal{C}}{\arg\min}\ \operatorname{Var}_{e\in\mathcal{E}_{\mathrm{train}}}\left[\widehat{E}_e(\Xi)\right], \tag*{(18)}

where C\mathcal{C} is the finite set of fitted candidates and Ξsel\Xi_{\mathrm{sel}} is the selected coefficient matrix. The variance criterion (18) differs from the earlier coefficient-averaging implementation as well as IRMv1’s gradient penalty. It can favor a model with uniformly large prediction error. Neither derivative accuracy nor causal identification follows from low variance alone. The default uses three environments; their required number and diversity depend on the identification problem.

Defaults and experimental overrides

Table 8 lists shared implementation defaults. Here τ\tau is the target-network interpolation coefficient, ηopt\eta_{\mathrm{opt}} the optimizer step size, NbatchN_{\mathrm{batch}} the replay-batch size, and phazp_{\mathrm{haz}} the BOCD hazard probability. Script overrides take precedence. The transit entrypoint has hidden width 64, state dimension 15, and action dimension 1; critic, batch, BC, and symbolic-target overrides appear in the table. Stabilized actors use weight decay 10−410^{-4}: NAU regularization has weight 0.01, KAN spline and entropy regularization has weight 0.001, and MLPs have no head regularizer. The pristine baseline uses zero weight decay and warmup, sets cpen=5c_{\mathrm{pen}} = 5, and disables the minimum target, normalization, entropy floor, and rollout surprise. Transit experiments disable symbolic filtering. § 7.1 distinguishes the historical legacy row.

References

  1. [1]T. Haarnoja, A. Zhou, P. Abbeel, and S. Levine, “Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor,” *arXiv preprint*, arXiv:1801.01290v2, 2018. https://arxiv.org/abs/1801.01290v2.
  2. [2]Y. Zhang and L. Zheng, “BAPR: Bayesian Amnesic Piecewise-Robust Reinforcement Learning for Non-Stationary Continuous Control,” *arXiv preprint*, arXiv:2605.16170v2, 2026. https://arxiv.org/abs/2605.16170v2.
  3. [3]Y. Zhang and L. Zheng, “RE-SAC: Disentangling Aleatoric and Epistemic Risks in Bus Fleet Control: A Stable and Robust Ensemble DRL Approach,” *arXiv preprint*, arXiv:2603.18396v4, 2026. https://arxiv.org/abs/2603.18396v4.
  4. [4]A. Trask, F. Hill, S. Reed, J. Rae, C. Dyer, and P. Blunsom, “Neural Arithmetic Logic Units,” *arXiv preprint*, arXiv:1808.00508v1, 2018. https://arxiv.org/abs/1808.00508v1.
  5. [5]A. Madsen and A. R. Johansen, “Neural Arithmetic Units,” *arXiv preprint*, arXiv:2001.05016v1, 2020. https://arxiv.org/abs/2001.05016v1.
  6. [6]R. P. Adams and D. J. C. MacKay, “Bayesian Online Changepoint Detection,” *arXiv preprint*, arXiv:0710.3742v1, 2007. https://arxiv.org/abs/0710.3742v1.
  7. [7]J. Lee, J. Hwangbo, L. Wellhausen, V. Koltun, and M. Hutter, “Learning Quadrupedal Locomotion over Challenging Terrain,” *arXiv preprint*, arXiv:2010.11251v1, 2020. https://arxiv.org/abs/2010.11251v1.
  8. [8]W. Wiesemann, D. Kuhn, and B. Rustem, “Robust Markov Decision Processes,” *Mathematics of Operations Research*, vol. 38, no. 1, pp. 153–183, 2013. https://doi.org/10.1287/moor.1120.0566.
  9. [9]G. N. Iyengar, “Robust Dynamic Programming,” *Mathematics of Operations Research*, vol. 30, no. 2, pp. 257–280, 2005. https://doi.org/10.1287/moor.1040.0129.
  10. [10]R. Zhou, T. Liu, M. Cheng, D. Kalathil, P. R. Kumar, and C. Tian, “Natural Actor-Critic for Robust Reinforcement Learning with Function Approximation,” *arXiv preprint*, arXiv:2307.08875v1, 2023. https://arxiv.org/abs/2307.08875v1.
  11. [11]K. Panaganti, A. Wierman, and E. Mazumdar, “Model-Free Robust $\phi$-Divergence Reinforcement Learning Using Both Offline and Online Data,” *arXiv preprint*, arXiv:2405.05468v1, 2024. https://arxiv.org/abs/2405.05468v1.
  12. [12]D. Ghosh, J. Rahme, A. Kumar, A. Zhang, R. P. Adams, and S. Levine, “Why Generalization in RL is Difficult: Epistemic POMDPs and Implicit Partial Observability,” *arXiv preprint*, arXiv:2107.06277v1, 2021. https://arxiv.org/abs/2107.06277v1.
  13. [13]S. S. Sahoo, C. H. Lampert, and G. Martius, “Learning Equations for Extrapolation and Control,” *arXiv preprint*, arXiv:1806.07259v1, 2018. https://arxiv.org/abs/1806.07259v1.
  14. [14]Z. Liu, Y. Wang, S. Vaidya, F. Ruehle, J. Halverson, M. Soljačić, T. Y. Hou, and M. Tegmark, “KAN: Kolmogorov-Arnold Networks,” *arXiv preprint*, arXiv:2404.19756v5, 2025. https://arxiv.org/abs/2404.19756v5.
  15. [15]S. L. Brunton, J. L. Proctor, and J. N. Kutz, “Discovering governing equations from data: Sparse identification of nonlinear dynamical systems,” *arXiv preprint*, arXiv:1509.03580v1, 2015. https://arxiv.org/abs/1509.03580v1.
  16. [16]N. Zolman, C. Lagemann, U. Fasel, J. N. Kutz, and S. L. Brunton, “SINDy-RL: Interpretable and Efficient Model-Based Reinforcement Learning,” *arXiv preprint*, arXiv:2403.09110v2, 2025. https://arxiv.org/abs/2403.09110v2.
  17. [17]S.-M. Udrescu and M. Tegmark, “AI Feynman: a Physics-Inspired Method for Symbolic Regression,” arXiv preprint, arXiv:1905.11481v2, 2020. https://arxiv.org/abs/1905.11481v2.
  18. [18]M. Arjovsky, L. Bottou, I. Gulrajani, and D. Lopez-Paz, “Invariant Risk Minimization,” arXiv preprint, arXiv:1907.02893v3, 2020. https://arxiv.org/abs/1907.02893v3.
  19. [19]B. Schölkopf, F. Locatello, S. Bauer, N. R. Ke, N. Kalchbrenner, A. Goyal, and Y. Bengio, “Towards Causal Representation Learning,” arXiv preprint, arXiv:2102.11107v1, 2021. https://arxiv.org/abs/2102.11107v1.
  20. [20]Y. Zeng, R. Cai, F. Sun, L. Huang, and Z. Hao, “A Survey on Causal Reinforcement Learning,” arXiv preprint, arXiv:2302.05209v3, 2023. https://arxiv.org/abs/2302.05209v3.
  21. [21]Peters, J., Janzing, D., & Schölkopf, B. (2017). Elements of Causal Inference: Foundations and Learning Algorithms. https://mitpress.mit.edu/9780262344296/elements-of-causal-inference/mitpress.mit.edu/9780262344296/elements-of-causal-inference
  22. [22]C. Rowan, “On the failure of ReLU activation for physics-informed machine learning,” arXiv preprint, arXiv:2512.11184v2, 2025. https://arxiv.org/abs/2512.11184v2.
  23. [23]G. An, S. Moon, J.-H. Kim, and H. O. Song, “Uncertainty-Based Offline Reinforcement Learning with Diversified Q-Ensemble,” arXiv preprint, arXiv:2110.01548v1, 2021. https://arxiv.org/abs/2110.01548v1.
  24. [24]Y. Zhang, “Single Agent Robust Deep Reinforcement Learning for Bus Fleet Control,” arXiv preprint, arXiv:2508.20784v1, 2025. https://arxiv.org/abs/2508.20784v1.
  25. [25]C. F. Daganzo, “A headway-based approach to eliminate bus bunching: Systematic analysis and comparisons,” Transportation Research Part B: Methodological, vol. 43, no. 10, pp. 913–921, 2009. https://doi.org/10.1016/j.trb.2009.04.002.
  26. [26]Y. Xuan, J. Argote, and C. F. Daganzo, “Dynamic bus holding strategies for schedule reliability: Optimal linear control and performance analysis,” Transportation Research Part B: Methodological, vol. 45, no. 10, pp. 1831–1845, 2011. https://doi.org/10.1016/j.trb.2011.07.009.

Paper details

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

views · 0

downloads · 0

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

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents