TL;DR
This paper introduces a reinforcement learning (RL) framework that simultaneously infers a task's underlying structure (represented as a Reward Machine) and learns an optimal policy, even when the agent's sensors provide noisy, uncertain semantic information about the environment. By maintaining a probabilistic belief over environmental properties and updating its task hypothesis via a divergence test, the algorithm guarantees asymptotic convergence to the optimal behavior without requiring a priori knowledge of the reward function or perfect perception.
What Problem Does This Paper Address?
In reinforcement learning, complex, multi-step tasks (e.g., "fetch coffee, then deliver it to the office while avoiding obstacles") are often modeled using Reward Machines (RMs). RMs are finite-state automata that break down non-Markovian rewards into structured subtasks based on high-level environmental properties called atomic propositions (like "has coffee" or "is office").
However, existing methods for learning or utilizing RMs rely on a major, unrealistic assumption: that the agent has perfect, noise-free access to these atomic propositions. In real-world robotics, semantic labels come from imperfect sensors (cameras, lidar, neural network classifiers) prone to misclassifications. If an agent misidentifies an obstacle or a target destination, its understanding of the task structure breaks down, causing standard RL algorithms to fail. This paper tackles the challenge of jointly inferring the unknown Reward Machine and learning the optimal policy under severe perception uncertainty.
Methods
The authors propose the Joint Perception and Learning (JPL) algorithm, which extends the Joint Inference of Reward Machines and Policies (JIRP) framework to handle semantic uncertainty. The architecture operates in a tightly coupled loop:
- Probabilistic Perception Updates: Instead of assuming deterministic labels, the agent maintains a time-varying probabilistic belief ($\hat{L}_j$) over the truth values of all atomic propositions. As the agent explores, it applies Bayesian updates to refine this belief using an observation likelihood model.
- Divergence-Based Resetting: To prevent minor sensor fluctuations from corrupting the learned task structure, the algorithm evaluates changes in its semantic belief using the Jensen-Shannon Divergence (JSD). If the belief shifts significantly beyond a threshold ($\gamma_d$), the algorithm triggers a reset of its hypothesis RM and policy functions to rebuild them on the newly corrected environmental model.
- Reward Machine Inference: The agent tracks traces of executed trajectories (labels and received rewards). When a trace contradicts the current hypothesis RM, it is flagged as a counterexample. A highly optimized SAT solver (RC2) is then used to compute a minimal, consistent hypothesis RM that satisfies all collected traces.
- Policy Learning: With the hypothesis RM fixed between significant belief shifts, the agent uses a modified Q-learning procedure (QRM) to learn optimal subtask policies across the cross-product of the environment and RM states.
Datasets
The framework was evaluated across three distinct simulated environments:
- HouseExpo Floor Plans: Grid-world environments derived from the large-scale HouseExpo dataset (containing 35,126 houses and 252,550 rooms). The agent used a Bayesian Neural Network (BNN) trained on HouseExpo data to predict room categories (kitchen, bedroom, office, etc.) based on noisy coordinates and room features.
- Office-World: A classic $12 \times 9$ grid-world benchmark where the agent must navigate to fetch coffee and mail before reaching an office, avoiding obstacles along the way.
- Craft-World: A complex $12 \times 9$ grid-world requiring a strict 5-step sequential crafting chain (getting wood from a toolshed, using a workbench, getting iron from a factory, etc.).
Key Insights and Ideas
- Decoupling Perception and Task Logic via JSD: The core "aha" moment is using a divergence threshold to gate when the Reward Machine should be re-inferred. This prevents the agent from constantly destroying and rebuilding its task hypothesis over minor, expected sensor noise, while ensuring it adapts when its overall semantic understanding of the environment fundamentally improves.
- Asymmetry in Convergence Speeds: The experiments reveal that the agent's semantic belief about the environment converges significantly faster (often within ~500 steps) than the optimal policy itself (which takes thousands to millions of steps). This implies that perception uncertainty does not severely bottleneck long-term policy optimization, provided the observation model is unambiguous.
- Failure of Naive State Augmentation: Standard RL baselines (like Deep Q-Networks) that simply append noisy sensor labels directly to the state space fail completely on these tasks. Explicitly separating the semantic mapping from the temporal task logic (via the RM) is mathematically vital for solving non-Markovian problems under noise.
Key Results
- Successful Task Completion: JPL successfully inferred the correct RM and achieved a 100% success rate in finding the optimal policy across all test environments, even when initialized with completely random or highly inaccurate observation models.
- Baseline Comparison: In the Office-World and Craft-World benchmarks, nominal Q-learning and Double Deep Q-Networks (DDQN) failed to learn the tasks entirely, whereas JPL converged reliably.
- Robustness to Noise: Even under a "Random Observation Model" (where sensor probabilities were uniformly sampled between 0.1 and 0.9), the divergence test successfully guided the agent to correct its environmental mapping and complete the tasks.
Limitations and Future Work
- Computational Bottleneck of SAT Solvers: The approach relies on an exact SAT solver to infer the minimal Reward Machine. The authors note that trying to infer RMs with more than 7 states results in unreasonably high, exponentially scaling computation times.
- Static Environment Assumption: The theoretical guarantees assume that the ground-truth properties of the environment are static over time.
- Future Directions: The authors plan to explore polynomial-time heuristics to replace the SAT solver for larger RMs, and extend the framework to dynamic environments where the truth values of atomic propositions can change over time.
Summary updated