Robots, vehicles and power systems often run an optimizer inside a hard time budget. If the optimizer is stopped early, whatever answer it holds gets applied to the physical system. "Anytime-feasible" solvers are built so that every intermediate answer already satisfies the constraints, which makes early stopping safe. These solvers assume the constraints are known equations. In practice the safe region is often learned from data with a Gaussian process (GP), a Bayesian regression model that returns a prediction and an uncertainty. The usual safety constraint is then "prediction plus a multiple of uncertainty must stay below zero."
A GP's cost grows with the cube of the number of data points, so long-running systems switch to sparse GPs. A sparse GP summarizes the data through a small set of $m$ representative "inducing points." That compression introduces its own error. An anytime-feasible solver that trusts the compressed model can step outside the true safe region while believing it is inside.
This note proposes a constraint that is cheap to evaluate, is built from a sparse GP, and accounts for its own compression error. The proposal also derives curvature bounds from the kernel, so that a first-order anytime-feasible solver can guarantee that each iterate stays inside this constraint. The core claim is simple. If the safety margin is enlarged locally by a computable measure of what the inducing points fail to capture at each point, plus a certified step size, then early-terminated solves stay safe at constant per-iteration cost. They also do so with less conservatism than inflating the margin uniformly. The inflation term then tells the system where to move its inducing points: onto the parts of the constraint boundary the solver is actually pressing against.
Core Claim
Let $\tilde\mu_m(x)$ and $\tilde\sigma_m(x)$ be the mean and standard deviation of a sparse GP with $m$ inducing points that models a constraint function $g$. The safe set is defined by $g(x)\le 0$, and $\beta$ is the usual confidence multiplier. We propose to enforce, at every solver iterate,
$$\tilde g_m(x) \;=\; \tilde\mu_m(x) + \beta\,\tilde\sigma_m(x) + \eta_m(x) \;\le\; 0,$$
where $\eta_m(x)$ is a compression penalty. It is computed from two quantities. The first is the pointwise residual $r_m(x)=k(x,x)-k_{xm}K_{mm}^{-1}k_{mx}$, which measures how much of the prior variance at $x$ the inducing points miss. The second is the global residual $\mathrm{tr}(K_{nn}-Q_{nn})$, where $Q_{nn}=K_{nm}K_{mm}^{-1}K_{mn}$ is the low-rank approximation of the full kernel matrix. Both residuals cost the same $O(m^2)$ per query as $\tilde\sigma_m$ itself, and the trace can be maintained incrementally as data streams in.
The target theorem has the following form. Suppose the exact GP's confidence constraint is a valid high-probability bound on $g$. Then $\tilde g_m(x)\le 0$ implies the exact constraint holds, so the guarantee transfers to the true safe set.
The second part of the claim concerns step sizes. We would bound the smoothness constant $L$ of $\tilde g_m$ using the norm of the sparse posterior mean in the kernel's function space and the kernel's second derivatives. That bound licenses the quadratic correction $w\|u\|^2$ with $w=L/2$ in the safe sequential QCQP of Anytime-Feasible First-Order Optimization via Safe Sequential QCQP. By the descent lemma, the local subproblem's constraint then upper-bounds $\tilde g_m$ along the step, so every accepted step is feasible by construction. Line search remains only as a fallback where the bound on $\tilde\sigma_m$ is loose, which is near points of very low variance.
This differs from the closest work in three specific ways.
The GP safety controllers Pointwise Feasibility of Gaussian Process-based Safety-Critical Control under Model Uncertainty and Control Barriers in Bayesian Learning of System Dynamics turn GP uncertainty into a cone program, a constraint solved by an interior-point method. They guarantee that a safe action exists at each time step, but give no guarantee for intermediate solver iterates. They also use uncompressed GPs whose cost grows cubically with data.
SS-QCQP has the iterate-wise guarantee but assumes analytic, known constraints.
The anytime sparse GP of A Unifying Framework of Anytime Sparse Gaussian Process Regression Models with Stochastic Variational Inference for Big Data is "anytime" only in prediction accuracy. It has no notion of a downstream constraint.
Research Program
The work has four pieces.
The penalty $\eta_m$. We will derive it for the variational sparse GP and for the corrected sparse models (FITC, PIC) covered by the unifying framework above. We start from the representational-error view that Approximation-Aware Bayesian Optimization uses to argue that inducing points are a scarce budget. That paper is motivation only: it shows the budget matters for decisions, but it says nothing about bounding the error. If a clean worst-case bound proves too loose, we will report it honestly. We will then fall back to a bound that holds with high probability under the GP prior, calibrated on held-out exact-GP comparisons at moderate $n$.
The solver. We will build GP-SS-QCQP: SS-QCQP with $\tilde g_m$ as its constraint, curvature weights derived from the kernel, and the active-set variant restricted to nearly active GP constraints. The method is borrowed from SS-QCQP. Its reported 73% runtime cut from the active set suggests that the GP constraints near the boundary are the only ones that need refreshing each iteration.
The model-swap rule. This handles the case where the GP and the optimizer share a clock. The solver always works against a frozen GP snapshot. A newly trained snapshot is adopted only if the currently deployed iterate is still certified feasible under it. Otherwise the old snapshot is kept for that control cycle, and the inducing set is repaired first.
This rule addresses the nested-anytime gap without requiring a fresh feasible starting point every time the model changes. It does not solve the general "safe start" problem, the need for a feasible initial point. We assume a known safe backup point, such as a stopped vehicle or a hover state, as the anytime-feasible literature also does.
Inducing-point repair. Under a fixed budget $m$, we swap the inducing point that contributes least to $\eta_m$ over the solver's recent active set for a new point where $\eta_m$ is largest along that set. This plays the same role as the expected-utility allocation in approximation-aware Bayesian optimization, which concentrates inducing points near the optimum. Here the target is the safety boundary instead, and the criterion is the same quantity that enters the guarantee, so no separate objective is needed.
Kernel hyperparameters are held fixed after an offline warm-up, as in all the scalable online GPs in the file. We state this as a limitation, not a contribution.
Baselines
Naive reference: offline model with an anytime-feasible solver. FSQP or SS-QCQP is run on a nominal model identified offline, with no online learning. Inherently robust suboptimal MPC for autonomous racing with anytime feasible SQP reports 96–98% full convergence within a 33 ms window and feasible trajectories even when stopped early, but only for a known model. Under the 50% mass and friction mismatch of the adaptive cruise control (ACC) benchmark, the analogous model-based CBF-CLF-QP controller violated safety within 7 seconds (Pointwise Feasibility of Gaussian Process-based Safety-Critical Control under Model Uncertainty). Beating this baseline means zero violations under the same mismatch.
Strongest learning-based competitor. This is GP-CBF-CLF-SOCP with an exact GP, solved by an interior-point method. That paper reports a 7.4 ms average solve on ACC at the starting data size. We run it on identical data streams and hardware, with the same $\beta$, under two settings: solved to convergence, and truncated at the same deadline as our method.
Beating it requires two things. As $n$ grows, its latency must cross the deadline while ours stays flat. And our violation rate under truncation must be zero while its truncated iterates violate the constraint.
On safe-control-gym we also run the suite's own GP-MPC (safe-control-gym), which is solved with CasADi/Ipopt. That paper reports GP-MPC reaching performance with roughly one tenth the data of PPO or SAC. It gives no reported per-iterate violation numbers for truncated GP-MPC solves, so no reported result found on Lacuna for that comparison; we will measure it.
Two ablations on the same sparse GP. The first ablation drops the compression penalty: it uses $\tilde\mu_m+\beta\tilde\sigma_m$ in GP-SS-QCQP with line search. The second replaces $\eta_m$ with a uniform increase of $\beta$, tuned to the smallest value giving zero observed violations on calibration runs.
Both ablations receive the same $m$, the same tuning budget and the same deadlines. The proposal wins only if it matches the uniform-$\beta$ variant on safety while achieving lower closed-loop cost, measured as tracking error or lap time. The first ablation isolates whether compression error causes violations at all.
Why not just…?
Why not just use an exact GP on a sliding window of recent data? A Cholesky factorization of a few hundred points fits in a millisecond-scale budget, so this is cheap. However, Recurrent Memory for Online Interdomain Gaussian Processes shows that recency-based online GPs forget earlier regions, with sharp spikes in predictive error. For safety, forgetting a region means its variance returns to the prior value, which makes the controller over-conservative when the system revisits it.
This failure mode only matters when trajectories revisit regions after long gaps. Our closed-loop experiments therefore use repeated laps and return-to-region tasks, and they include a window baseline with matched latency. If the window baseline matches our cost and safety on those tasks, the scalability half of the proposal is unnecessary for these benchmarks, and we will say so.
Why not just plug a standard sparse GP into SS-QCQP and rely on its line search? This is the most serious threat. If compression error is small relative to $\beta\tilde\sigma_m$, then $\eta_m$ adds cost without adding safety. The first ablation tests this directly. We will sweep $m$ downward and record the value at which uncorrected iterates first violate the exact-GP constraint and the true constraint. If no violations appear at any practical $m$, the contribution reduces to the curvature bound and the model-swap rule, and the claim will be scaled back accordingly.
Why not just inflate $\beta$ until it is safe? Uniform inflation is simple and probably safe. Its cost is that it penalizes regions densely covered by inducing points as heavily as sparse ones, and this is the buffer conservatism that Constrained Online Convex Optimization with Polyak Feasibility Steps documents for tightened baselines, which pay higher regret for comparable safety. The second ablation settles the question by matching safety and comparing cost. If local inflation does not beat uniform inflation by a meaningful margin in lap time or tracking error, the local penalty is not worth its complexity.
Why not just truncate IPOPT or real-time-iteration SQP and add a safety filter? Truncated SQP showed violations as large as $10^{-1}$ in Anytime-Feasible First-Order Optimization via Safe Sequential QCQP. Real-time iteration showed "dangerous constraint violations" on the racing testbed. A post-hoc filter onto a GP confidence set that is not convex is itself an iterative solve with the same truncation problem. The one exception is a one-step filter for systems whose dynamics are linear in the control input. For that case we include the GP-CBF filter as a baseline on ACC.
Proposed Experiments
Long-horizon ACC. The first testbed is the ACC benchmark with 50% mass and friction mismatch, run far longer than the original episodes so that $n$ reaches $10^4$–$10^5$. We sweep the solver deadline downward. The metrics are per-iterate and closed-loop violation counts, solve-time distribution, and gap to the oracle controller.
Cart-Pole and 2D Quadrotor. The second testbed uses these safe-control-gym tasks, with parametric perturbations and step disturbances, and with the GP learning the dynamics discrepancy inside an MPC solved by GP-SS-QCQP. The metrics are tracking error, constraint-violation rate, and samples needed to reach safe stabilization.
Multi-agent obstacle avoidance. The third testbed is the 4-vehicle, 320-variable obstacle-avoidance problem from SS-QCQP, with obstacles replaced by GP-learned keep-out functions fitted from noisy range samples. Here we compare runtime against the reported 186.53 s (full SS-QCQP) and 49.47 s (active set), and violation counts against SQP's reported $10^{-1}$.
Bayesian_CBF codebase. For the inverted pendulum and Ackermann car we reuse wecacuee/Bayesian_CBF, swapping its exact matrix-variate GP for our sparse constraint.
Decisive checks. Three outcomes decide the proposal.
The first is whether the uncorrected sparse ablation produces true-constraint violations at budgets of $m$ where ours produces none. This shows whether compression error is a real hazard.
The second is whether, at equal zero-violation safety, local inflation yields lower closed-loop cost than uniform $\beta$ inflation. This shows whether the penalty earns its place.
The third is whether per-iteration time stays flat as $n$ grows by two orders of magnitude while the exact-GP cone-program controller's time crosses its deadline. This shows whether scalability and anytime feasibility hold together.
Before any closed-loop run, we also report how tight the bound $\eta_m$ is, measured as the ratio of $\eta_m$ to the observed gap between exact and sparse confidence bounds on held-out points.
References
- Anytime-Feasible First-Order Optimization via Safe Sequential QCQP
- Pointwise Feasibility of Gaussian Process-based Safety-Critical Control under Model Uncertainty
- Control Barriers in Bayesian Learning of System Dynamics
- A Unifying Framework of Anytime Sparse Gaussian Process Regression Models with Stochastic Variational Inference for Big Data
- Approximation-Aware Bayesian Optimization
- Inherently Robust Suboptimal MPC for Autonomous Racing With Anytime Feasible SQP
- Safe-Control-Gym: A Unified Benchmark Suite for Safe Learning-Based Control and Reinforcement Learning in Robotics
- Recurrent Memory for Online Interdomain Gaussian Processes
- Constrained Online Convex Optimization with Polyak Feasibility Steps