Epidemiologists describe how risk depends on a continuous exposure such as blood glucose with restricted cubic splines. These are smooth piecewise-cubic curves that are forced to be straight lines beyond the outermost knots, so they can show thresholds, plateaus and J-shapes without swinging wildly where data are sparse. Reinforcement learning has a matching tool for long-horizon behavior: successor features. A successor feature records how much of each state feature a policy is expected to visit in the future, with later visits discounted. If reward is a linear combination of those features, a policy's value is just a dot product with the successor features. This note proposes one specific connection between the two. We use the restricted cubic spline basis of a few interpretable state variables as the state features themselves. The resulting successor features are a smoothed, discounted "exposure profile" of each policy. The payoff is that any nonlinear risk curve that can be written as a restricted cubic spline, such as a J-shaped mortality curve over glucose or a threshold penalty on torso height, becomes a linear reward in these features. One set of successor features then evaluates every candidate policy under every such curve without retraining. In the reverse direction, regressing trajectory-level outcomes linearly on these features recovers a nonlinear, tail-stable state-level risk curve.
The idea matters for offline policy selection, the task of ranking candidate policies from logged data before deploying any of them. That setting needs both fast re-evaluation under changing objectives and predictions that stay controlled for policies whose behavior leaves the logged data. The linear tails of the spline are what supply the second property: outside the data, reward error grows linearly rather than cubically.
Core Claim
Let $x(s)$ be a scalar state variable, for example glucose or torso height. Let $\phi_1,\dots,\phi_k$ be the restricted cubic spline basis for $x$, with knots placed at quantiles of $x$ in the offline dataset. Define successor features on this basis:
$$\psi^\pi_j(s,a)=\mathbb{E}_\pi\Big[\textstyle\sum_{t\ge 0}\gamma^t\phi_j(x(s_t))\,\Big|\,s_0=s,a_0=a\Big].$$
Here $\gamma$ is the discount factor. For any reward $r(s)=\sum_j w_j\phi_j(x(s))$, meaning any curve in the restricted-spline family with weights $w$, the value is exactly $Q^\pi_w=\psi^{\pi\top}w$. We claim three things.
First, one fitted-Q-evaluation run per policy, learning $\psi^\pi$, matches the accuracy of a separate scalar evaluation for each spline-shaped reward. It does so at a fraction of the cost as the number of candidate rewards grows.
Second, the linear tails reduce evaluation error for policies that push $x$ beyond the dataset's range, compared with unrestricted cubic or B-spline bases. This follows because an unrestricted basis extrapolates as a cubic polynomial, while ours extrapolates linearly.
Third, fitting outcomes $y_\pi \approx \bar\psi^{\pi\top}w$ recovers the per-state risk curve implied by $w$, including the location of a nadir or threshold. Here $\bar\psi^\pi$ is $\psi^\pi$ averaged over canonical start states, as in π2vec, and $y_\pi$ is the observed outcome of policy $\pi$. This recovery happens even though only whole-trajectory outcomes are observed.
Relation to Prior Work
Two strands of prior work supply the setting. π2vec (companion version) embeds policies as averaged successor features of frozen vision-model features and ranks them with a linear regressor. Active Offline Policy Selection propagates a small number of online evaluations through a Gaussian process with a behavioral kernel.
Both treat the state features as a generic, opaque embedding. We instead make the features a statistically chosen basis. That turns the linear head into an interpretable nonlinear dose-response model, and it makes the reward family explicit.
ROPE motivates the extrapolation concern. It shows that plain fitted-Q evaluation diverges on Walker2D-medium-expert, while its learned state-action metric reaches a relative mean absolute error (RMAE) of 0.252. Our proposal is complementary, because it constrains how the reward and features behave off-support rather than learning an encoder.
Diversity methods that use successor features act as a constraint on our design rather than a source of method. Discovering Diverse Nearly Optimal Policies with Successor Features and Quality-Diversity Actor-Critic both report that results depend heavily on which base features are chosen. We treat feature choice as the central design decision and borrow the answer from biostatistics.
The spline side supplies the method. Clinical studies use restricted cubic splines to find a 25 g/day sugar threshold (Yu et al.), an index level near 9.0 beyond which cardiovascular risk accelerates (Tao et al.), an L-shaped saturation (Li et al.), and a J-shaped mortality curve over the stress hyperglycemia ratio (the ratio of admission glucose to estimated average glucose) with a nadir near 1.02–1.04 in MIMIC-IV (stress hyperglycemia ratio study). All of these are static, one-dimensional exposures measured at a single time point. Our features turn such curves into rewards over whole trajectories.
Neural Spline Flows is a precedent for linear tails as a stabilizer, but it applies them to density estimation, not evaluation. The spline work in reinforcement learning, such as BMP, parameterizes actions, not features.
Research Program
We will build a spline-occupancy successor feature learner. It chooses one to three interpretable state variables per domain and places four or five knots at dataset quantiles, following the standard restricted-spline rule. It then learns $\psi^\pi$ for each candidate policy with fitted-Q evaluation. Unobserved variables are handled with a small additive generalized additive model per variable, concatenating the bases for each variable rather than forming tensor products. That keeps dimensionality at a few times $k$.
The analysis has three parts. The first is an error decomposition: the evaluation error for reward $w$ is at most $\|w\|$ times the successor-feature estimation error, plus the reward misspecification error when the true curve lies outside the spline family. The second part checks empirically whether linear tails shrink the estimation error for shifted policies. The third tests how sensitive results are to the number and placement of knots, which is a known weakness of these splines.
Baselines
The naive reference point is π2vec with a linear head on generic features. This is π2vec's pipeline with frozen generic features and a linear regressor. It is run on the same candidate pools, datasets and fitted-Q budget. No reported result was found on Lacuna for π2vec on D4RL. Its reported figure elsewhere is a rank correlation of 0.618 on real-world gear insertion (π2vec). Beating it means higher rank correlation and lower regret@1 when the objective is a nonlinear function of $x$.
The strongest competitor on accuracy is per-reward scalar fitted-Q evaluation with the ROPE representation. It is the best reported stabilizer of offline evaluation in the file, with an RMAE of 0.252 on Walker2D-medium-expert (Pavse and Hanna). We rerun it separately for each target reward, with the same network sizes and a hyperparameter grid matched in total GPU hours. Our method beats it if it reaches RMAE within its confidence interval while using one training run per policy rather than one per policy-reward pair. It also beats it if it wins outright on policies that shift the state distribution.
The ablations isolate the key ingredient. We replace the restricted basis with, in turn, an unrestricted cubic B-spline basis, indicator features for quantile bins, and the raw variable alone, which admits only linear rewards. Each variant keeps the same knot count or number of degrees of freedom.
Why not just…?
Why not just put a spline or generalized additive model on π2vec's regression head? This is the obvious combination, and it mostly fails for ranking. If returns depend on a monotone function of one projected score, any monotone head gives the same ordering as a linear one. π2vec's own finding that linear regression suffices is consistent with this. Splines on a 64–1024-dimensional embedding fit to a few hundred policies would also overfit. We move the spline into the state features instead, where the nonlinearity acts on each state visit rather than on an already-averaged embedding. We will still include the head variant, using the pattern-gam code, as a baseline.
Why not just train an MLP to map successor features to return, or learn the features end to end? Unconstrained networks extrapolate without control off-support, which ROPE's divergence result illustrates for the evaluation setting. A learned feature also loses the property that a clinician's stated curve plugs in as $w$. The off-support experiment below measures this directly.
Why not just use quantile-bin indicators? Their successor features are a discounted occupancy histogram, and this is a real threat. Bins can represent any curve given enough of them. We expect restricted splines to win only at matched degrees of freedom, on smooth curves, and in the tails, where bins give constant rather than linear extrapolation. If bins tie, we will report that the benefit comes from occupancy features themselves and not from the spline.
Why not just run a separate scalar evaluation for each objective? This is accurate but scales with the number of objectives times the number of policies. The cost comparison at matched accuracy settles whether amortizing over rewards is worth it.
Proposed Experiments
The main testbed is D4RL, using the Hopper, Walker2D and HalfCheetah medium-expert datasets. Candidate pools come from checkpoints of offline agents, with ground truth from simulator rollouts. Target rewards are defined on torso height or forward velocity. They come in two kinds: shapes the spline family can represent, such as a J-curve, a threshold and a plateau, and shapes it cannot, such as an exponential tail and a hard step, which probe misspecification. Metrics are RMAE, rank correlation and regret@1.
The first decisive check fixes about 20 target rewards and compares our single successor-feature fit against per-reward ROPE on accuracy and compute.
The second targets off-support behavior. It evaluates policies whose occupancy of $x$ reaches past the last knot and compares restricted splines with unrestricted splines and bins. The prediction is that the restricted basis alone keeps error bounded.
The third is curve recovery. We hide a J-shaped state-level curve, generate trajectory outcomes from it, and regress those outcomes on $\bar\psi^\pi$. We then measure the error in the recovered nadir location against the number of policies.
A secondary, descriptive study uses MIMIC-IV, processed with the MIMIC-IV pipeline. We build glucose-based spline occupancy under the logged clinician policy and ask whether mortality regressed on the occupancy features shows a J-shape. We will compare it qualitatively with the static stress-hyperglycemia J-curve. That study reports a nadir near 1.02–1.04, but its exposure is a single admission measurement, not a time series. This study makes no causal or policy-ranking claim, because both unmeasured confounding and the lack of ground-truth returns rule that out.
References
- π2vec: Policy Representation with Successor Features
- Active Offline Policy Selection
- State-Action Similarity-Based Representations for Off-Policy Evaluation
- Discovering Diverse Nearly Optimal Policies with Successor Features
- Quality-Diversity Actor-Critic: Learning High-Performing and Diverse Behaviors via Value and Successor Features Critics
- Sugar Is the Key Cause of Overweight/Obesity in Sugar-Sweetened Beverages (SSB)
- Prognostic value of triglyceride-glucose index in patients with chronic coronary syndrome undergoing percutaneous coronary intervention
- An L-shaped link between the composite dietary antioxidant index and human papillomavirus infection in women: a US population-based study
- Impact of stress hyperglycemia ratio on mortality in patients with critical acute myocardial infarction: insight from american MIMIC-IV and the chinese CIN-II study
- Neural Spline Flows
- BMP: Bridging the Gap between B-Spline and Movement Primitives
- D4RL: Datasets for Deep Data-Driven Reinforcement Learning.
- An Extensive Data Processing Pipeline for MIMIC-IV