SafeCF-SSM: Cognitive-Flexible Control with Explicit Physical Safety Guarantees for Latent-Space MPCIEEE L-CSS, 2026 Latent Belief \((z_t,\Sigma_t)\) → Surprise \(\mathcal{S}_t\) → Adaptive Margin \(\beta_{i,t}\) → BMPC \(u_t\) → Physical Safety \(\mathbb{P}(\cdot)\geq1-\delta-f(\varepsilon_{\mathrm{dec}})\) A single surprise signal \(\mathcal{S}_t\) simultaneously tightens safety constraints and regulates encoder reorganization — closing the physical-latent gap.
Beamer presentation of SafeCF--SSM:
Beamer-SafeCF-SSM-LCSS-1.pdf
All Julia source code is publicly available:
SafeCF-SSM is a cognitive-flexible control framework for latent-space MPC under distributional shift. It addresses two open problems: unregulated representation adaptation and the physical-latent safety gap — through surprise-driven bounded latent adaptation, adaptive constraint tightening, and an explicit decoder-aware physical safety certificate. What Is the Problem?Latent-space MPC approaches adapt to distributional shift but provide safety guarantees in latent space only. When the decoder has approximation error \(\varepsilon_{\mathrm{dec}}\geq 0\), a plan safe in \(z_t\) may be unsafe in \(x_t\) — the physical-latent gap. Matters worsen under distributional shift: as the encoder \(\phi_{\theta_t}\) adapts online, this gap can grow without bound if representation reorganization is left unregulated. Existing approaches implicitly assume \(\varepsilon_{\mathrm{dec}}=0\) and provide no bound on the rate of encoder change during adaptation. Three Coupled MechanismsSafeCF-SSM addresses the problem through three dedicated components, each satisfying one requirement of the problem statement:
The Dual Role of \(\mathcal{S}_t\)The predictive surprise \(\mathcal{S}_t:=-\log p_{\theta_t}(o_{t+1}|z_t,u_t)\) is large when the model is mismatched and small when consistent with observations. The same signal \(\mathcal{S}_t\) that tightens \(\beta_{i,t}\) in the BMPC layer also moderates \(\eta_t=\eta_{\max}/(1+\sqrt{\mathcal{S}_t})\), bounding \(\|\phi_{\theta_{t+1}}-\phi_{\theta_t}\|\) and reducing the physical-latent gap. Main Theoretical Guarantees
Core InsightUnlike prior latent-MPC works that establish (G1)–(G2) in latent space only, SafeCF-SSM provides an explicit physical safety certificate that accounts for decoder approximation error and bounds encoder reorganization simultaneously — closing the physical-latent gap identified as the central open problem. Nonlinear-Benchmark Motivation: Van der Pol Phase PlaneThe Van der Pol oscillator exhibits significantly different limit cycles under different damping parameters \(\mu\), motivating the need for online adaptation. The safety bound \(|x_1|\leq X_{1,\max}=A(\mu_2)\approx2.66\) is physically motivated: the uncontrolled limit cycle amplitude \(A(\mu_1)\approx2.13\) lies within the bound, while \(A(\mu_2)\approx X_{1,\max}\) makes enforcement non-trivial without active adaptation. Adjust \(\mu\) below to observe how the phase portrait changes — this distributional shift is precisely what SafeCF-SSM detects via \(\mathcal{S}_t\) and compensates for online (Fig. 2). Simulation Studies: Van der Pol (VdP) BenchmarkValidated on the VdP oscillator (\(M=25\) Monte Carlo, \(T=345\,\text{s}\), \(\mu_1=0.5\), \(\mu_2=2.66\)) across four consecutive distributional-shift regimes in a single continuous experiment without re-initialization:
All four regimes confirm \(\mathbb{E}[\mathrm{CFI}_t]\leq1\) (Theorem 1) and \(\geq99.8\%\) safety (Corollary 1) with \(\varepsilon_{\mathrm{dec}}\leq0.10\). Both baselines violate safety during observational drift; SafeCF-SSM maintains \(|x_1|\leq X_{1,\max}\) throughout. ReproducibilityAll Julia source code is publicly available:
Extended Validation: 3D Quadrotor under Motor FailureCan SafeCF-SSM maintain safety and tracking when a rotor partially fails mid-flight? A 3D quadrotor (\(n=12,\,m=4\)) undergoes rotor-1 efficiency loss \(\rho_t: 1.0\to0.6\) at \(t_s=40\,\text{s}\), inducing yaw-torque asymmetry and lateral drift. The dynamics are: \[ \dot{v} = \tfrac{1}{M}R(\phi,\theta,\psi) \begin{bmatrix}0\\0\\T_t\end{bmatrix}\!-ge_3, \qquad \dot{\omega} = J^{-1}(\tau - \omega\times J\omega), \] where \(T_t=\rho_t T_1+T_2+T_3+T_4\) and \(\tau=[\ell(T_2-T_4),\,\ell(T_3-\rho_t T_1),\, \kappa(\rho_t T_1-T_2+T_3-T_4)]^\top\). SafeCF-SSM adapts \(\hat\rho_t\) online via: \[ \hat\rho_{t+1} = \hat\rho_t + \eta_t\,\nabla_{\hat\rho} \log p_{\theta_t}(o_{t+1}\mid z_t,u_t), \quad \eta_t = \frac{\eta_{\max}}{1+\sqrt{\mathcal{S}_t}}, \] with safety enforced via adaptive margin \(\beta_{i,t} = \max(c_i\mathcal{S}_t,\,L_{g,i}L_d\,r_{\delta_i,t})\).
\(M=25\) Monte Carlo runs confirm: SafeCF-SSM maintains \(|p_y|\leq0.1\,\text{m}\) throughout the failure, while both baselines accumulate drift exceeding \(0.5\,\text{m}\). \(\mathbb{E}[\mathrm{CFI}_t]\leq1\) (Theorem 1) and \(\geq99.8\%\) safety (Corollary 1) hold across all runs — consistent with the VdP validation above. |