Specifying User Preferences Using Weighted Signal Temporal Logic

Noushin Mehdipour, Cristian-Ioan Vasile, Călin Belta · DOI

Abstract

We extend Signal Temporal Logic (STL) to enable the specification of importance and priorities. The extension, called Weighted STL (wSTL), has the same qualitative (Boolean) semantics as STL, but additionally defines weights associated with Boolean and temporal operators that modulate its quantitative semantics (robustness). We show that the robustness of wSTL can be defined as weighted generalizations of all known compatible robustness functionals that can take into account the weights in wSTL formulae. We utilize this weighted robustness to distinguish signals with respect to a desired wSTL formula that has sub-formulae with different importance or priorities and time preferences, and demonstrate its usefulness in problems with conflicting tasks where satisfaction of all tasks cannot be achieved. We also employ wSTL robustness in an optimization framework to synthesize controllers that maximize satisfaction of a specification with user specified preferences.

Introduction: The Challenge of Conflicting Requirements

In the design of autonomous systems like self-driving cars or warehouse robots, Signal Temporal Logic (STL) is frequently used to define complex requirements such as "stay in the lane," "avoid obstacles," and "reach the destination within a time limit." While standard STL is effective at determining if a requirement is met and providing a "robustness" score indicating the margin of satisfaction, it treats all sub-tasks and time points as equally important.

In real-world scenarios, tasks often conflict. For instance, a vehicle might have to choose between slightly veering out of its lane or colliding with an obstacle. Standard STL lacks an inherent mechanism to express that the "avoid obstacle" requirement is strictly more important than "stay in lane." Furthermore, it cannot easily express temporal preferences, such as the desire to complete a task as early as possible within a given window.

Figure 1: Conflicting requirements in lane navigation. Trajectory $c_1$ stays in lane but hits a block, while $c_2$ avoids the block by leaving the lane. wSTL allows prioritizing the latter.

Methodology: Weighted Signal Temporal Logic (wSTL)

To address these limitations, we propose Weighted Signal Temporal Logic (wSTL). This extension introduces numerical weights into the logic's syntax and quantitative semantics, allowing for a more nuanced evaluation of system behavior.

1. Weighted Syntax and Robustness

We extend standard STL operators to include weights. For example, a conjunction (AND) is modified to $\bigwedge_{i=1:N}^p \phi_i$, where $p$ represents the relative importance of each sub-formula $\phi_i$. Similarly, temporal operators like "Always" ($G$) and "Eventually" ($F$) are assigned weight functions $\varpi$ that vary over time.

The core contribution lies in redefining the robustness score to incorporate these weights. We adapt various existing robustness measures—such as the traditional min/max approach or the Arithmetic-Geometric Mean (AGM) approach—to be weight-aware. This allows for three primary types of preference specification:

  • Importance: Weights on "AND" operators prioritize specific constraints during conflicts.
  • Priorities: Weights on "OR" operators specify preferred alternative outcomes.
  • Temporal Preferences: Time-varying weight functions reward early satisfaction or emphasize critical time windows.
Figure 3: Overview of wSTL preferences: (a) Importance of obligatory tasks, (b) Priorities of alternatives, and (c, d) Preferences over time.

2. Control Synthesis

By integrating wSTL into a gradient-based optimization framework, we can synthesize controllers that maximize weighted robustness. The optimizer naturally finds trajectories that respect the user's specified priorities, effectively navigating the trade-offs between competing requirements.

Key Insights and Results

Resolving Infeasibility

The most powerful aspect of wSTL is its behavior when a specification is impossible to satisfy. In standard STL, any failing trajectory might appear equally "bad." In wSTL, the robustness score guides the optimizer toward the "least bad" violation based on user-defined priorities. This ensures that even in failure, the system behaves in the most desirable way possible.

Distinguishing "Equal" Satisfactions

Standard STL robustness often suffers from "masking," where improving satisfaction at one time step doesn't improve the overall score if another time step remains at a lower value. wSTL (particularly the weighted AGM version) allows the score to reflect that satisfying a goal at a preferred time is superior to satisfying it at a less preferred time.

Performance and Soundness

Our experiments demonstrate that wSTL remains "sound": if the weighted robustness score is positive, the original Boolean requirement is guaranteed to be satisfied. In a multi-goal navigation case study involving a nonlinear dynamical system, the optimization took approximately 1.2 seconds on a standard laptop. This indicates that the added expressivity of weights does not significantly increase the computational burden compared to standard smooth STL optimization techniques.

Conclusion and Future Work

wSTL provides a principled framework for encoding human preferences into autonomous system behavior. While current implementations require manual weight specification, future research will explore learning these weights from user demonstrations and scaling the approach to higher-dimensional systems with longer task horizons.

Summary updated

BibTeX
@article{mehdipour2020specifying,
  author = {Noushin Mehdipour and Cristian-Ioan Vasile and Călin Belta},
  title = {{Specifying User Preferences Using Weighted Signal Temporal Logic}},
  journal = {IEEE Control Systems Letters},
  year = {2020},
  doi = {10.1109/lcsys.2020.3047362},
}
Figure