arXiv:2611.01063cs.AIOct 2026

Manuscript Offprint

arXiv:2611.01063

Robust Reward Machine Learning and Execution in Noisy Environments

Roko Parac, Lorenzo Nodari, Daniel Furelos-Blanco, Leo Ardon, Federico Cerutti, Alessandra Russo

ROKO PARAC, Imperial College London, United Kingdom

LORENZO NODARI, University of Brescia, Italy

DANIEL FURELOS-BLANCO, Imperial College London, United Kingdom

LEO ARDON, Imperial College London, United Kingdom

FEDERICO CERUTTI, University of Brescia, Italy

ALESSANDRA RUSSO, Imperial College London, United Kingdom

Background: Reward machines (RMs) represent non-Markovian reward functions as finite-state machines over high-level propositional events. Traditionally, these events are generated by a deterministic labelling function that maps environment states to proposition sets. However, real-world labelling functions are inherently noisy.

Objectives: Design and implement a method that learns RMs in the presence of noisy labelling functions and exploits them for policy learning in both discrete and continuous environments.

Methods: We propose PROB-IRM, a method that learns RMs from noisy proposition histories using inductive logic programming (ILP) and exploits them for policy learning. Noisy proposition histories are represented as training examples for ILP, which learns an RM that maximises coverage of low-uncertainty histories. RM learning is interleaved with policy optimisation. PROB-IRM uses a belief over RM states to determine when to relearn the RM and to provide additional guiding rewards.

Results: PROB-IRM is evaluated on environments with discrete and continuous state spaces under varying levels of labelling noise. PROB-IRM performs comparably to baselines using handcrafted RMs and outperforms approaches that use recurrent neural networks to encode history, despite operating with noisy labels.

Conclusions: PROB-IRM represents a step towards deploying reward machines in noisy, real-world environments.

JAIR Associate Editor: Marek Petrik

JAIR Reference Format:

Roko Parac, Lorenzo Nodari, Daniel Furelos-Blanco, Leo Ardon, Federico Cerutti, and Alessandra Russo. 2026. Robust Reward Machine Learning and Execution in Noisy Environments. Journal of Artificial Intelligence Research 87, Article 18 (October 2026), 44 pages. DOI: 10.1613/jair.1.22539

1 Introduction

Reinforcement learning (RL; Sutton and Barto 2018) is a machine learning paradigm that models how agents learn to make decisions by interacting with an environment, improving their behaviour through experience. The objective of RL is to learn a policy that maximises cumulative reward over time. RL has played a central role in several landmark AI advances, including AlphaGo (Silver et al. 2016) and the training of large language models (Ouyang et al. 2022). However, despite these successes, challenges remain in extending RL to a broader

Authors' Contact Information: Roko Parac, ORCID: 0009-0009-2916-2410, roko.parac18@ic.ac.uk, Imperial College London, London, United Kingdom; Lorenzo Nodari, ORCID: 0009-0008-7997-8170, lorenzo.nodari@unibs.it, University of Brescia, Brescia, Italy; Daniel Furelos-Blanco, ORCID: 0000-0001-7461-1910, daniel.furelos.blanco@gmail.com, Imperial College London, London, United Kingdom; Leo Ardon, ORCID: 0000-0003-4400-7127, leo.ardon19@ic.ac.uk, Imperial College London, London, United Kingdom; Federico Cerutti, ORCID: 0000-0003-0755-0358, federico.cerutti@unibs.it, University of Brescia, Brescia, Italy; Alessandra Russo, ORCID: 0000-0002-3318-8711, a.russo@ic.ac.uk, Imperial College London, London, United Kingdom.

Figure

This work is licensed under a Creative Commons Attribution International 4.0 License.

© 2026 Copyright held by the owner/author(s). DOI: 10.1613/jair.1.22539

18:2 • Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo

range of real-world applications (Dulac-Arnold et al. 2021). Key challenges include operating robustly under partial observability and noisy observations, generalising across tasks, and improving policy interpretability.

Reward machines (RMs; Toro Icarte, Klassen, R. A. Valenzano, et al. 2018) constitute an effective method for addressing some of these challenges. They are finite-state machines that represent non-Markovian reward functions in terms of propositional high-level events abstracting environment states. An RM serves as memory for the agent, decomposing a complex task into a structured sequence of intermediate sub-tasks. By augmenting the environment state space with RM states, the reward function becomes Markovian, enabling the application of standard RL algorithms. The structure of an RM is interpretable and, when combined with appropriate techniques such as reward shaping or hierarchical RL, can mitigate sparse reward challenges and facilitate policy transfer across related tasks.

Recent studies (Furelos-Blanco, Law, Jonsson, et al. 2021; M. Hasanbeig, Jeppu, et al. 2021; Toro Icarte, Waldie, et al. 2019; Xu et al. 2020) have introduced methods for learning RMs, reducing manual engineering effort and enhancing their applicability across tasks. However, most assume an oracle that perfectly detects high-level events; that is, a perfect labelling function mapping environment states to propositions. This assumption is a key limitation, as real-world event detection through sensors or AI models is rarely perfect due to technological and environmental constraints. Crucially, any errors in detecting high-level events lead to learning incorrect RMs.

Our goal is to devise a method that handles noisy sensor detections when learning and exploiting RMs for non-Markovian reward tasks. We introduce PROB-IRM (Probabilistic Induction of Reward Machines), the first method that directly learns and exploits RMs when the labelling function is noisy. The agent's belief about event occurrences is modelled using a Bayesian posterior conditioned on sensor outputs. To learn RMs from noisy traces, PROB-IRM uses ILASP (Law et al. 2015), a state-of-the-art inductive logic programming system capable of learning from noisy examples. Pivotal to PROB-IRM is the interleaving of RM and policy learning: a new RM is learned whenever the RL agent generates a trace not believed to be accepted by the current RM. To accelerate policy learning, PROB-IRM employs a probabilistic reward shaping formulation based on posterior beliefs derived from the traces. This paper extends our prior work (Parac et al. 2024) with the following novel contributions:

  • Complete ILASP encoding for learning RMs from noisy traces. We present the ILASP encoding for the RM learning task, clearly identifying the changes needed compared to learning from noise-free traces (Furelos-Blanco, Law, Jonsson, et al. 2021).
  • Enhanced generality and scalability. Our prior work used tabular action-value functions, requiring the discretisation of RM state beliefs and limiting the applicability to discrete state spaces. We address this by approximating policies with neural networks trained using Proximal Policy Optimisation (PPO; Schulman et al. 2017), enabling seamless integration with continuous domains and improved robustness (Yu et al. 2022). We also modified the architecture to enable parallel trace collection, significantly improving scalability.
  • Extensive evaluation and ablation study. We evaluate PROB-IRM on tasks with discrete and continuous state spaces and sparse non-Markovian rewards, providing in-depth ablation analysis of design choices. We compare against baselines using handcrafted RMs and a fully neural baseline (RECURRENT PPO; Raffin et al. 2021; Schulman et al. 2017). Results demonstrate that across diverse noise configurations, PROB-IRM performs comparably to the handcrafted-RM baselines and outperforms RECURRENT PPO.

The paper is organised as follows. Section 2 provides background on RL, RMs, and ILASP. Section 3 formalises the noisy event detection setting used throughout. Section 4 describes our method for learning RMs from noisy traces. Section 5 discusses RM exploitation, including probabilistic reward shaping. Section 6 explains how we interleave RM and policy learning. Section 7 presents experimental results and ablation studies. Section 8 discusses related work, Section 9 highlights limitations, and Section 10 concludes the paper and proposes suggestions for future work.

Robust Reward Machine Learning and Execution in Noisy Environments •

18:3

References (44)