Value Functions for Temporal Logic: Optimal Policies and Safety Filters

Oswin So, William Sharpless, Sylvia Herbert, Chuchu FanarXiv 2026

TL;DR

In infinite-horizon control problems, greedily maximizing a temporal logic value function can cause a system to indefinitely procrastinate on its goals. This paper resolves this issue by introducing history-dependent (non-Markovian) policies and safety filters that guarantee the satisfaction of complex temporal logic specifications without infinite deferral. The approach is validated both in a multi-agent simulation and via real-world hardware rollouts on a quadcopter drone.

What Problem Does This Paper Address?

When training robots or autonomous systems using reinforcement learning (RL), designing reward functions that capture complex, multi-step tasks (e.g., "open the door, but only after you pick up the key, and never hit a wall") is notoriously difficult. Linear Temporal Logic (LTL) and Signal Temporal Logic (STL) provide a mathematically rigorous alternative, allowing developers to specify tasks using logical operators like Eventually ($\mathcal{F}$), Globally ($\mathcal{G}$), and Until ($\mathcal{U}$).

While recent work has shown how to decompose these complex logic formulas into a graph of simpler value functions, a subtle pathology arises in infinite-horizon settings: infinite deferral. If a robot knows it can reach a goal in exactly one step from anywhere in the room, its optimal value remains high no matter what it does. Consequently, a standard greedy policy might choose to sit still forever, continuously deferring task completion because its immediate Q-value never drops. This paper tackles the challenge of synthesizing optimal policies and safety filters that guarantee tasks actually get completed rather than delayed indefinitely.

Methods

To eliminate the infinite deferral problem, the authors depart from standard state-based (Markovian) policies and introduce a history-dependent framework:

  1. History-Augmented Q-Functions: Because temporal logic satisfaction depends on the path taken, the authors generalize optimal value and Q-functions to operate over finite state histories ($x_{0:t}$).
  2. Time-Augmented Systems: To handle the tricky Until ($\mathcal{U}$) operator, the authors introduce a virtual countdown timer into the system dynamics. This effectively transforms an infinite-horizon problem into a time-optimal, finite-horizon problem, forcing the system to find the quickest path to task completion.
  3. Compositional Policy Synthesis: They prove that an optimal policy can be constructed for a broad, recursive fragment of temporal logic formulas (the "solvable fragment" $\mathcal{S}$) by tracking an "optimal witness time"—the exact moment the system has satisfied a prerequisite and must switch to a suffix policy.
  4. Temporal Logic Safety Filtering: They construct a least-restrictive safety filter. Unlike traditional safety filters (like Control Barrier Functions) that only prevent immediate crashes, this filter monitors the Q-function of the entire specification, intervening only when the user's nominal policy is about to make the overall task impossible to satisfy.

Datasets

Not discussed in the paper. The authors evaluate their approach using custom simulated environments and real-world robotic hardware rather than standard datasets.

Key Insights and Ideas

  • The Greedy Pathology: The core "aha moment" is that an optimal value function does not guarantee an optimal greedy policy in undiscounted, infinite-horizon temporal logic settings. Procrastination is mathematically optimal under standard greedy maximization if time isn't explicitly penalized.
  • Liveness as Safety: Traditional safety filters only look at "avoid" conditions. By filtering based on the full temporal logic formula, this work treats liveness (ensuring something good eventually happens) with the same protective rigor as safety, preventing systems from getting safely stuck in deadlocks.
  • Timer Simulation: Instead of physically tracking an infinite history, the optimal policy can be executed simply by tracking a single boolean flag or monitoring when a specific history-based threshold is crossed, making it computationally practical.

Key Results

The authors demonstrated their framework in two distinct environments:

  • Single-Agent Drone Safety Filter: They deployed the safety filter on a real Crazyflie quadcopter drone tasked with navigating around obstacles to a worksite, picking up a key, and opening a door. As shown in Figure 1, an unfiltered policy crashes, and a standard safety-only filter gets safely stuck at the door forever. Only the proposed temporal logic filter successfully guides the drone to complete the entire multi-step specification.
Fig. 1: Hardware rollouts from a Crazyflie drone using an unsafe task policy, the task policy filtered for safety, and the task policy filtered for the specification. Filtering for safety maintains safety but violates the specification. Our proposed safety filter for TL specifications guarantees the specification is satisfied.
  • Two-Agent GridWorld: In a 4D simulation, two robots were given conflicting nominal tasks ("get coffee" vs. "get tea") while subject to a joint safety and collaboration specification. The proposed filter successfully allowed them to achieve their individual goals while overriding them precisely when needed to collaborate and avoid deadlocks.
Fig. 3: Demonstration of optimal policy ˆπ, independently and as a filter: Here, we demonstrate the optimal policy for the value for a given specification (top) in a two-agent GridWorld system. The trajectory for the policy alone is given in the left plot, while the two center plots demonstrate its usage as a filter for two nominal policies to get coffee and tea respectively. The plot on the far right demonstrates the problem with a "safety-only" filter here, which although safe is unable to yield a satisfactory trajectory.

Limitations and Future Work

While powerful, the proposed method has a few limitations:

  • Formula Restrictions: The solvable fragment $\mathcal{S}$ cannot handle arbitrary conjunctions of multiple complex temporal formulas (e.g., combining two independent infinite-horizon tasks) without manual, formula-specific rewriting.
  • Limited Nesting: Nesting complex temporal operators inside a Globally ($\mathcal{G}$) operator is currently restricted.
  • Finite State Assumptions: Some parts of the policy construction assume that atomic propositions take values in a finite set.

Future work will focus on expanding the grammar of the solvable fragment to support more general nested expressions and extending the framework to competitive, game-theoretic multi-agent environments.

Summary updated

BibTeX
@misc{so2026value,
  author = {Oswin So and William Sharpless and Sylvia Herbert and Chuchu Fan},
  title = {{Value Functions for Temporal Logic: Optimal Policies and Safety Filters}},
  year = {2026},
  eprint = {2605.01051},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.01051},
}
Figure