# STLCG++: A Masking Approach for Differentiable Signal Temporal Logic Specification

arXiv: https://arxiv.org/abs/2501.04194 · HTML: https://mlsanity.com/paper/2501.04194/

## Key facts

- Cited by 8 papers in the map (data through 14 Oct 2026).
- Builds on 14 of its 30 references that are in the map.
- First posted on arXiv 8 Jan 2025.

## Builds on (most cited first, 14 of 14)

- [Attention Is All You Need](https://mlsanity.com/paper/1706.03762/) (2017)
- [Denoising Diffusion Implicit Models](https://mlsanity.com/paper/2010.02502/) (2020)
- [Planning with Diffusion for Flexible Behavior Synthesis](https://mlsanity.com/paper/2205.09991/) (2022)
- [CVXPY: A Python-Embedded Modeling Language for Convex Optimization](https://mlsanity.com/paper/1603.00943/) (2016)
- [Guided Conditional Diffusion for Controllable Traffic Simulation](https://mlsanity.com/paper/2210.17366/) (2022)
- [Backpropagation through Signal Temporal Logic Specifications: Infusing Logical Structure into Gradient-Based Methods](https://mlsanity.com/paper/2008.00097/) (2020)
- [CoBL-Diffusion: Diffusion-Based Conditional Robot Planning in Dynamic Environments Using Control Barrier and Lyapunov Functions](https://mlsanity.com/paper/2406.05309/) (2024)
- [DeepSTL -- From English Requirements to Signal Temporal Logic](https://mlsanity.com/paper/2109.10294/) (2021)
- [Arithmetic-Geometric Mean Robustness for Control from Signal Temporal Logic Specifications](https://mlsanity.com/paper/1903.05186/) (2019)
- [Recurrent Neural Network Controllers for Signal Temporal Logic Specifications Subject to Safety Constraints](https://mlsanity.com/paper/2009.11468/) (2020)
- [Mixed-Integer Programming for Signal Temporal Logic with Fewer Binary Variables](https://mlsanity.com/paper/2204.06367/) (2022)
- [Semi-Supervised Trajectory-Feedback Controller Synthesis for Signal Temporal Logic Specifications](https://mlsanity.com/paper/2202.01997/) (2022)
- [Receding Horizon Planning with Rule Hierarchies for Autonomous Vehicles](https://mlsanity.com/paper/2212.03323/) (2022)
- [Safe Planning through Incremental Decomposition of Signal Temporal Logic Specifications](https://mlsanity.com/paper/2403.10554/) (2024)

## Built on by (most cited first, 8 of 8)

- [Constrained Decoding for Safe Robot Navigation Foundation Models](https://mlsanity.com/paper/2509.01728/) (2025)
- [Pretrained Embeddings as a Behavior Specification Mechanism](https://mlsanity.com/paper/2503.02012/) (2025)
- [STeP: Signal Temporal Logic for Precise Specifications for Action Generation with Vision Language Models](https://mlsanity.com/paper/2607.18580/) (2026)
- [Runtime Monitoring of Perception-Based Autonomous Systems via Embedding Temporal Logic](https://mlsanity.com/paper/2605.12651/) (2026)
- [On the Stability and Realizability of Recurrent Polynomial Surrogate Ternary Logic Gate Networks](https://mlsanity.com/paper/2605.24649/) (2026)
- [Generalizable Multi-Agent Planning from Signal Temporal Logic Specifications via Diffusion](https://mlsanity.com/paper/2608.29490/) (2026)
- [Learning Robot Policies from Sparse Success Signals via STL-Guided Stein Variational Policy Gradient](https://mlsanity.com/paper/2609.31606/) (2026)
- [SafeDiSTL: Decomposing Joint Constraints for Safe Multi-Agent Reinforcement Learning](https://mlsanity.com/paper/2610.13737/) (2026)

## Abstract (arXiv)

Signal Temporal Logic (STL) offers a concise yet expressive framework for specifying and reasoning about spatio-temporal behaviors of robotic systems. Attractively, STL admits the notion of robustness, the degree to which an input signal satisfies or violates an STL specification, thus providing a nuanced evaluation of system performance. In particular, the differentiability of STL robustness enables direct integration to robotic workflows that rely on gradient-based optimization, such as trajectory optimization and deep learning. However, existing approaches to evaluating and differentiating STL robustness rely on recurrent computations, which become inefficient with longer sequences, limiting their use in time-sensitive applications. In this paper, we present STLCG++, a masking-based approach that parallelizes STL robustness evaluation and backpropagation across timesteps, revisedachieving more than 1000× faster computation time than the recurrent approach (STLCG++).achieving significant speed-ups compared to a recurrent approach. We also introduce a smoothing technique to enable the differentiation of time interval bounds, thereby expanding STL's applicability in gradient-based optimization tasks involving spatial and temporal variables. Finally, we demonstrate STLCG++'s benefits through three robotics use cases and provide JAX and PyTorch libraries for seamless integration into modern robotics workflows. Project website with demo and code: https://uw-ctrl.github.io/stlcg/.
