TL;DR
This paper introduces a semi-supervised framework for training robot controllers to satisfy complex spatio-temporal rules defined by Signal Temporal Logic (STL). By combining offline adversarial training regularized by a small number of human demonstrations with a lightweight online gradient adaptation scheme, the proposed method synthesizes natural, human-like trajectories that safely satisfy specifications in real-time, outperforming traditional optimization-based shooting methods.
What Problem Does This Paper Address?
When deploying autonomous systems like self-driving cars or robotic manipulators in the real world, they must obey complex, time-dependent rules (e.g., "slow down inside the construction zone for at least 5 seconds before proceeding to the destination, and always avoid obstacles"). These rules can be mathematically framed using Signal Temporal Logic (STL), which evaluates continuous-valued signals and provides a "robustness metric"—a numerical score indicating how well a rule was satisfied or violated.
However, two major challenges arise when trying to use STL for real-time control:
- Computational Intractability: Traditional methods solve these problems online using Mixed-Integer Linear Programming (MILP) or Sequential Quadratic Programming (SQP). These are either NP-hard or too slow for real-time adjustments, often getting stuck in local minima.
- Unintuitive Behaviors: If you train a neural network to only maximize STL robustness, it often finds bizarre, non-human-like shortcuts (e.g., taking massive, unnatural detours just to satisfy a strict boundary constraint).
Furthermore, neural networks lack strict safety guarantees when faced with unexpected real-time disturbances. This paper addresses these gaps by creating a controller that is computationally efficient, robust to disturbances, and attuned to human intuition.
Methods
The authors propose a two-phased pipeline consisting of offline training and online adaptation:
1. Offline Trajectory-Feedback Architecture
Because STL specifications are history-dependent (whether you satisfy a rule now might depend on what you did 5 seconds ago), a standard state-feedback controller isn't enough. The authors design a trajectory-feedback controller using a Long Short-Term Memory (LSTM) network to summarize past spatio-temporal behaviors. To ensure the controller can generalize to new environments (e.g., moving obstacles), a Convolutional Neural Network (CNN) encodes an image of the environment layout to initialize the LSTM's hidden state.
2. Semi-Supervised & Adversarial Training
The offline training objective minimizes a loss function with two main components:
- An STL robustness loss (leveraging
stlcg, a PyTorch-based STL robustness tool) that penalizes rule violations. - An imitation regularization loss that penalizes deviations from a small set of expert human demonstrations.
This training follows an adversarial loop: the network trains on existing environments, an adversarial search finds initial states/layouts where the controller fails, and those hard examples are fed back into the training set.
3. Online Adaptation
To protect against unmodeled disturbances or neural network limitations, the controller monitors its own expected robustness online. If it predicts an upcoming specification violation, it performs a few quick, real-time gradient descent steps specifically on the final Multi-Layer Perceptron (MLP) layer weights to maximize robustness and steer the robot back to safety.
Datasets
Because this is a novel formulation, the authors collected their own data in a ROS/RViz simulation environment:
- Case Study (Car-like Robot): The authors collected 32 expert demonstrations generated by a human operator using an Xbox controller.
- Autonomous Driving Example: A secondary scenario mimicking a car approaching a road construction site used 8 human demonstrations for regularization.
Key Insights and Ideas
- The Danger of Pure Optimization: The biggest "aha moment" is shown in the offline training results. When the imitation regularization weight is zero ($\gamma = 0$), meaning the network optimizes only for STL robustness, it fails to generalize. It converges to a local optimum where it only knows how to pass an obstacle on one side, failing completely if the environment forces it to go the other way.
- A Little Human Guidance Goes a Long Way: Adding just a few human demonstrations ($\gamma > 0$) acts as a powerful regularizer. It guides the network's exploration toward natural, symmetric strategies (passing left or right), drastically improving both the success rate and the intuitiveness of the paths.
Key Results
The proposed Trajectory-Feedback method with online adaptation ($TF^*$-3) was compared against an open-loop execution and a state-of-the-art SQP-like shooting method (Baseline):
- Success Rate: In 100 random trials under noisy conditions, the proposed adaptive controller ($TF^*$-3) achieved a 100% success rate in satisfying the complex STL specification, whereas the Baseline shooting method achieved only 93%.
- Computation Time: The Baseline method frequently experienced massive computational spikes, taking upwards of 1000ms to calculate a control input—rendering it useless for real-time control. In contrast, the proposed method averaged around 100–200ms even when online gradient steps were required, and ran in just a few milliseconds when adaptation wasn't needed.
Limitations and Future Work
While the online adaptation scheme is highly effective, evaluating the STL robustness over the entire future time horizon still takes roughly 100ms in Python. To achieve true real-time applicability on low-power hardware, the authors note that more tailored software optimization is required.
For future work, they propose learning a value function to predict future robustness without needing to roll out the entire trajectory horizon explicitly. They also plan to extend the framework to handle more complex, learned neural network dynamics and multi-agent environments.
Summary updated