Introduction
In Cyber-Physical Systems (CPS) such as autonomous vehicles, drones, or smart grids, recovering from failures or external attacks is a time-critical necessity. Engineers typically employ Signal Temporal Logic (STL) to specify desired system behaviors (e.g., "reach the target state while avoiding obstacles"). However, standard STL formulations often struggle to prioritize the speed of fulfillment—the "As Soon As Possible" (ASAP) requirement.
While existing ASAP control solutions exist, they generally rely on precise mathematical models of system dynamics. In practice, many real-world systems are "black boxes" with dynamics too complex or unknown for traditional modeling. This paper introduces ASAP-Phi, a model-free reinforcement learning (RL) framework designed to fulfill STL specifications with minimal delay in unknown environments.
Methodology: The ASAP-Phi Framework
ASAP-Phi bridges formal logic and model-free RL by restructuring the reward signal to incentivize speed. The core of the framework is a novel piece-wise reward function, $r_{asap}$, and a strategic use of the RL discount factor.
Piece-wise Reward Function
The reward function is divided into two distinct phases:
- Pre-satisfaction: While the specification is not yet met, the agent receives a reward based on the "robustness degree" ($\rho$) of the STL formula. This provides a gradient for the agent to move toward the goal.
- Post-satisfaction: Once the goal is achieved, the agent receives a significantly larger constant reward ($r_{sat}$).
The Discounting Trick
Standard RL algorithms utilize a discount factor ($\gamma < 1$), which reduces the present value of future rewards. By setting $r_{sat}$ to be much larger than any intermediate robustness score, the agent is mathematically driven to reach the "big payout" as early as possible. This effectively uses the discount factor as a temporal pressure mechanism, ensuring the agent finds the shortest path to satisfaction.
The framework is algorithm-agnostic and can be integrated with various actor-critic methods, such as Soft Actor-Critic (SAC) or Deep Deterministic Policy Gradient (DDPG).
Experimental Evaluation
The authors evaluated ASAP-Phi on four diverse control benchmarks, treating each as a black box:
- DC Motor Position: Linear control of a motor's angular position.
- Bicycle: Non-linear steering and acceleration control.
- Attitude Control: 3D rigid-body rotation (from the ARCH-COMP suite).
- Mujoco Swimmer: A multi-joint robotic system navigating a fluid environment.
Key Results
ASAP-Phi demonstrated superior performance compared to standard robustness-based rewards ($\rho$-reward) and heuristic distance-based rewards ($d$-reward).
Key findings include:
- High Success Rates: ASAP-Phi achieved success rates as high as 97% within tight deadlines.
- Robustness to Time Constraints: As the maximum time tolerance was reduced (from 30 to 15 steps), ASAP-Phi maintained significantly higher success rates than baselines, which often failed to reach the target entirely under increased urgency.
- Stability: The framework proved more stable across different benchmarks, effectively learning the "urgency" of the task without sacrificing the safety constraints (avoidance).
Limitations and Future Directions
Despite its strengths, ASAP-Phi faces typical RL challenges, such as high sample complexity (data hunger). Additionally, the current mathematical proof for the ASAP policy assumes that a target state can be maintained once reached—an assumption that may not hold for highly unstable systems. Future research could explore extending this framework to non-stationary environments or improving sample efficiency for real-world hardware deployment.
Summary updated