Table of Contents
Fetching ...

RLAF: Reinforcement Learning from Automaton Feedback

Mahyar Alinejad, Alvaro Velasquez, Yue Wang, George Atia

TL;DR

The paper introduces RLAF, an automaton-based framework that replaces explicit rewards with DFA-derived trajectory preferences to handle non-Markovian objectives. It decomposes the approach into DFA-based preference elicitation, learned reward functions via pairwise ranking, and static or dynamic policy optimization, with optional transfer of automaton knowledge through Q-value estimates. The authors provide a formal convergence guarantee showing $\\varepsilon$-optimality under standard assumptions and validate the method across discrete and continuous domains, where it outperforms reward-engineering baselines and LTL-guided methods, and demonstrates strong transferability through automaton transitions. This work offers a scalable, human-independent pathway to incorporate temporal logic into RL, enabling efficient learning in tasks with complex sequential constraints and long-horizon dependencies.

Abstract

Reinforcement Learning (RL) in environments with complex, history-dependent reward structures poses significant challenges for traditional methods. In this work, we introduce a novel approach that leverages automaton-based feedback to guide the learning process, replacing explicit reward functions with preferences derived from a deterministic finite automaton (DFA). Unlike conventional approaches that use automata for direct reward specification, our method employs the structure of the DFA to generate preferences over trajectories that are used to learn a reward function, eliminating the need for manual reward engineering. Our framework introduces a static approach that uses the learned reward function directly for policy optimization and a dynamic approach that involves continuous refining of the reward function and policy through iterative updates until convergence. Our experiments in both discrete and continuous environments demonstrate that our approach enables the RL agent to learn effective policies for tasks with temporal dependencies, outperforming traditional reward engineering and automaton-based baselines such as reward machines and LTL-guided methods. Our results highlight the advantages of automaton-based preferences in handling non-Markovian rewards, offering a scalable, efficient, and human-independent alternative to traditional reward modeling. We also provide a convergence guarantee showing that under standard assumptions our automaton-guided preference-based framework learns a policy that is near-optimal with respect to the true non-Markovian objective.

RLAF: Reinforcement Learning from Automaton Feedback

TL;DR

The paper introduces RLAF, an automaton-based framework that replaces explicit rewards with DFA-derived trajectory preferences to handle non-Markovian objectives. It decomposes the approach into DFA-based preference elicitation, learned reward functions via pairwise ranking, and static or dynamic policy optimization, with optional transfer of automaton knowledge through Q-value estimates. The authors provide a formal convergence guarantee showing -optimality under standard assumptions and validate the method across discrete and continuous domains, where it outperforms reward-engineering baselines and LTL-guided methods, and demonstrates strong transferability through automaton transitions. This work offers a scalable, human-independent pathway to incorporate temporal logic into RL, enabling efficient learning in tasks with complex sequential constraints and long-horizon dependencies.

Abstract

Reinforcement Learning (RL) in environments with complex, history-dependent reward structures poses significant challenges for traditional methods. In this work, we introduce a novel approach that leverages automaton-based feedback to guide the learning process, replacing explicit reward functions with preferences derived from a deterministic finite automaton (DFA). Unlike conventional approaches that use automata for direct reward specification, our method employs the structure of the DFA to generate preferences over trajectories that are used to learn a reward function, eliminating the need for manual reward engineering. Our framework introduces a static approach that uses the learned reward function directly for policy optimization and a dynamic approach that involves continuous refining of the reward function and policy through iterative updates until convergence. Our experiments in both discrete and continuous environments demonstrate that our approach enables the RL agent to learn effective policies for tasks with temporal dependencies, outperforming traditional reward engineering and automaton-based baselines such as reward machines and LTL-guided methods. Our results highlight the advantages of automaton-based preferences in handling non-Markovian rewards, offering a scalable, efficient, and human-independent alternative to traditional reward modeling. We also provide a convergence guarantee showing that under standard assumptions our automaton-guided preference-based framework learns a policy that is near-optimal with respect to the true non-Markovian objective.
Paper Structure (37 sections, 8 theorems, 37 equations, 17 figures, 4 algorithms)

This paper contains 37 sections, 8 theorems, 37 equations, 17 figures, 4 algorithms.

Key Result

Theorem 5.1

Consider a finite non-Markovian environment $\mathcal{M} = (S, s_0, A, T, R^*)$, where $S$ is a finite set of states, $A$ is a finite set of actions, $T : S \times A \to \Delta(S)$ is a transition function, and $R^*(\tau)$ is a trajectory-return encoding a non-Markovian objective. Let $\mathcal{A} = Let $\hat{\pi}$ be the greedy policy w.r.t. the Q-values learned from $\hat{r}_\theta$. Then, there

Figures (17)

  • Figure 1: Automaton-based RL framework: The agent generates trajectories, evaluated by the DFA to produce preferences for reward learning via pairwise ranking loss. The learned reward guides policy optimization. In the dynamic version (dashed arrow), this loop repeats until convergence; in the static version, the policy is optimized once after reward learning.
  • Figure 2: Visualization of the four environments: Minecraft Iron Sword Quest, Dungeon Quest, Blind Craftsman, and Minecraft Building Bridge (left to right).
  • Figure 3: DFA for Minecraft Iron Sword Quest. The automaton enforces the correct order of resource collection before crafting the sword.
  • Figure 4: DFA for Dungeon Quest. The sequence requires acquiring the Key, Shield, and Chest before facing the Dragon.
  • Figure 5: DFA for Blind Craftsman. The agent must alternate between collecting wood and visiting the Factory to craft tools before returning Home.
  • ...and 12 more figures

Theorems & Definitions (30)

  • Definition 3.1
  • Definition 3.2: Deterministic Finite Automaton (DFA)
  • Definition 3.3: Product MDP
  • Remark 4.1
  • Remark 4.2
  • Remark 4.3
  • Remark 4.4
  • Theorem 5.1: Convergence and $\varepsilon$-Optimality in Finite Product MDP
  • proof
  • Remark A.1
  • ...and 20 more