STL Robustness
Also known as Signal Temporal Logic robustness, STL shield
other evolutionary-planning
Signal temporal logic (STL) states properties of a trace, a sequence of time steps of real-valued signals, for example "speed stays at most 2 for the next 3 steps". Its quantitative semantics gives a robustness value ρ: positive when the trace satisfies the formula, negative when it violates it, and its size says by how much. Robustness is computed bottom-up: a predicate x_i ≥ c gives x_i(t) − c, negation flips the sign, conjunction and disjunction take the minimum and the maximum, and the bounded operators G[a,b] (always), F[a,b] (eventually) and U[a,b] (until) take minima and maxima over a time window that is clipped to the end of the trace. The crate uses −ρ as a cost to minimise, as a graded constraint violation max(0, −ρ), as a shield that picks the candidate action whose rollout is most robust, and in fit to tune the thresholds of a template formula to demonstrations with CMA-ES. The evaluation is exact and takes O(nodes · length · window) steps.
Pseudocode
algorithm Robustness(φ, w, t)input: STL formula φ, trace w with ℓ steps, step toutput: the robustness ρ(φ, w, t), positive if w satisfies φ at tif φ = (x_i ≥ c) thenreturn x_i(w, t) − c ▷ −∞ past the end of the traceelse if φ = (x_i ≤ c) thenreturn c − x_i(w, t)else if φ = ¬ψ thenreturn −Robustness(ψ, w, t)else if φ = ψ₁ ∧ … ∧ ψ_k thenreturn min over j of Robustness(ψ_j, w, t)else if φ = ψ₁ ∨ … ∨ ψ_k thenreturn max over j of Robustness(ψ_j, w, t)else if φ = G[a,b] ψ thenreturn min over t′ ∈ window(t, a, b) of Robustness(ψ, w, t′) ▷ +∞ on an empty windowelse if φ = F[a,b] ψ thenreturn max over t′ ∈ window(t, a, b) of Robustness(ψ, w, t′) ▷ −∞ on an empty windowelse if φ = ψ₁ U[a,b] ψ₂ thenreturn max over t′ ∈ window(t, a, b) of min(Robustness(ψ₂, w, t′), min over t″ ∈ [t, t′) of Robustness(ψ₁, w, t″))function window(t, a, b)return [t + a, min(t + b, ℓ − 1)] ▷ clipped to the trace; empty if t + a ≥ ℓfunction shield(CANDIDATES, rollout, φ)return the candidate u ∈ CANDIDATES with the largest Robustness(φ, rollout(u), 0)In the crates
evolutionary-planningFinite-trace STL quantitative robustness used as objective, constraint and shield, plus threshold fitting from demonstrations.
Papers
- Robust Satisfaction of Temporal Logic over Real-Valued Signals Alexandre Donzé, Oded Maler · 2010· Formal Modeling and Analysis of Timed Systems (FORMATS 2010), LNCS
- EvoPlan: Evolutionary Neuro-Symbolic Robot Planning with Spatio-Temporal Guarantees Bhavya Sai Nukapotula, Samin Moosavi, Haoze Wang, Luke Duncan, Diya Shakkottai, Varun Murali, Srinivas Shakkottai · 2026· Conference on Robot Learning (CoRL 2026)