Learning-Enabled Uncertainty-Aware Certification of Stochastic Dynamical Systems
E. Casablanca, O. Schön, P. Zuliani, S. Soudjani
How to learn a safety certificate for a system with unknown stochastic dynamics?
Loading diagram...
Loading diagram...
Loading diagram...
Loading diagram...
Unknown: we don't know the model
Unknown + Noisy: we don't know the model & there is random noise
We are interfacing with
From the current state xt∈X and control input ut∈U, the next state xt+1∈X is obtained as
xt+1=f(xt,ut,wt),wt∼PwThe goal is to find a lower bound on the probability that the system S satisfies some specification (safety) over a time horizon T∈N.
Barrier certificates leverage set invariance to provide safety guarantees.
Given an initial set X⊆Rdx and unsafe set Xu⊆X,
a barrier certificate is a function B:X→R
and constants γ>η≥0, c≥0 such that
For any valid barrier and time horizon T, the safety probability is lower bounded by
P(System safe)≥1−γη−cTLoading diagram...
Learning-Enabled Uncertainty-Aware Certification of Stochastic Dynamical Systems
pylucid)ghcr.io/tendto/lucid)| Tool | Guarantees | Data Driven | Stochastic Dyn. | Non-poly Dyn. | Stat. correct. |
|---|---|---|---|---|---|
| LUCID | ✓ | ✓ | ✓ | ✓ | ✓ |
| TRUST (2025) | ✓ | ✓ | ✗ | ✗ | ✓ |
| FOSSIL (2024) | ✓ | ✗ | ✗ | ✓ | NA |
| OMNISAFE (2024) | ✗ | ✓ | ✓ | ✓ | ✗ |
| NPINTERVAL (2023) | ✓ | ✗ | ✓/✗ | ✓ | NA |
Loading diagram...
Define the system and sample some points.
N = 1000
# Transition function f
f = lambda x: ...
# State space
X_bounds = RectSet((-3, -2), (2.5, 1))
# Initial set
X_i = MultiSet(
RectSet((1, -0.5), (2, 0.5)),
RectSet((-1.8, -0.1), (-1.2, 0.1)),
RectSet((-1.4, -0.5), (-1.2, 0.1)),
)
# Unsafe set
X_u = MultiSet(
RectSet((0.4, 0.1), (0.6, 0.5)),
RectSet((0.4, 0.1), (0.8, 0.3))
)
x_samples = X_bounds.sample(N)
# We simulate the next state samples by applying f
xp_samples = f(x_samples)
Loading diagram...
Train the estimator to predict the feature map.
# Create a truncated Fourier feature map
feature_map = LinearTruncatedFourierFeatureMap(
num_frequencies=7, # Include the 0th frequency
sigma_f=1.0,
sigma_l=[0.05, 0.15],
X_bounds=X_bounds,
)
# Apply the feature map to the samples
xp_features = feature_map(xp_samples)
# Train the estimator
estimator = KernelRidgeRegressor(
kernel=GaussianKernel(sigma_l=[0.320, 0.157],
sigma_f=1.0),
regularization_constant=1e-8,
)
estimator.fit(x_samples, xp_features)
Loading diagram...
Synthesize the barrier certificate.
# Synthesize the barrier certificate
b = FourierBarrierCertificate(T=5, gamma=1.0)
success = b.synthesize(
X_bounds=X_bounds,
X_init=X_init,
X_unsafe=X_unsafe,
estimator=estimator,
feature_map=feature_map,
lattice_resolution=330,
parameters=FourierBarrierCertificateParameters(
set_scaling=0.025,
),
)
# [info] Computing LP coefficients
# [info] Optimizing
# [info] Solution found
# [info] Safety probability is 68.08%
Loading diagram...