Manuscript Offprint
arXiv:2611.01063Robust Reward Machine Learning and Execution in Noisy Environments
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.

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
2.1 Reinforcement Learning
We formalise RL tasks as labelled Markov decision processes (Fu and Topcu 2014; Furelos-Blanco, Law, Jonsson, et al. 2023).
Definition 2.1 (Labelled Markov decision process). A labelled Markov decision process (MDP) is a tuple where:
-
is a set of states,
-
is an initial state,
-
is a set of actions,
-
is a probability transition function,
-
is a reward function,
-
is a termination function,
-
is a discount factor,
-
is a finite set of propositions representing high-level events, and
-
is a (perfect) labelling function mapping state-action-state triplets to sets of propositions in . We refer to these sets as labels.
The transition function is Markovian, whereas the reward function and termination function are not (i.e., they are history-dependent). The termination function returns a pair , where indicates whether the current history is terminal, and indicates whether the goal is achieved.
Given a state-action history , a trace assigns a label to each transition in , where represents the initial state label. The goal is to find a policy that maps trace-state pairs to a probability distribution over actions that maximises the expected cumulative discounted reward (or return) , where is the episode's last step. The labelling function must preserve sufficient information from histories such that reward and termination can be determined from the corresponding traces. If so, the reward and termination functions can be written in terms of traces instead of history as and , respectively.
The agent-environment interaction is as follows. At time , the (label) trace is and the agent observes a tuple , where is the state, and is the termination information with and indicating termination and goal status, respectively. The agent also observes a label . If the history is non-terminal, the agent takes an action , and the environment transitions to state . The agent then observes a new tuple and label , extends the trace as , and receives reward .
Traces can be classified based on the terminal and goal indicators at time : a trace is a goal trace if , a dead-end trace if , and an incomplete trace if .
EXAMPLE 1. The OFFICEWORLD (Toro Icarte, Klassen, R. A. Valenzano, et al. 2018) domain, illustrated in Figure 1 (left), is a grid labelled with designated special locations. At each step, the agent observes its current position in the grid and moves in one of the four cardinal directions; that is, and
18:4
Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo

Fig. 1. An OFFICEWORLD instance (left) and a reward machine for the COFFEE task (right), where o.w. stands for otherwise.
. The agent always moves in the intended direction and remains in place when attempting to move into a wall. The set of propositions consists of the special locations. The labelling function maps a triplet to the set of propositions observed in , e.g., . Let us consider the COFFEE task, which consists of going to the coffee machine () and then to the office (o). A reward of 1 is obtained for completing the task; otherwise, the reward is 0. Rewards are non-Markovian since the current state (i.e., position on the grid) alone cannot determine the reward. The history yields a reward of 1 and is mapped to the goal trace .
2.2 Reward Machines
Reward machines provide a structured representation of reward functions by encoding task structure as a finite-state machine over propositional events.
Definition 2.2 (Reward machine). A reward machine (RM; Toro Icarte, Klassen, R. A. Valenzano, et al. 2022, 2018) is a tuple , where:
• U is a set of states.
• is a set of propositions forming the RM's alphabet,
is a state-transition function,
is a reward-transition function,
• are the initial, accepting, and rejecting states, respectively.
The accepting state indicates successful task completion, while the rejecting state indicates unrecoverable failure.
EXAMPLE 2. Figure 1 (right) shows the RM for the COFFEE task in OFFICEWORLD introduced in Example 1. Edges are labelled with propositional formulas over and associated transition rewards. To verify whether a formula is satisfied by a label , L is used as a truth assignment: propositions contained in the label are true, and all others are false. For example, the label satisfies the formula .
During the agent-environment interaction, the agent tracks its current state in the RM alongside its environment state. Starting from the RM's initial state , the agent transitions through RM states according to the state-transition function based on observed labels, receiving rewards via the reward-transition function .
Given an RM and a trace , a traversal is the unique sequence of RM states such that , and for . Traversals of goal traces terminate in , traversals of dead-end traces terminate in , and traversals of incomplete traces terminate in neither.
Robust Reward Machine Learning and Execution in Noisy Environments • 18:5
EXAMPLE 3. Given the RM in Figure 1 (right) and the goal trace , the traversal is . As expected for a goal trace, the traversal terminates in the accepting state.
To verify that an RM correctly encodes task structure, we check whether its traversals align with trace categories. An RM is valid with respect to trace if
-
and the trace is a goal trace,
-
and the trace is a dead-end trace, or
-
and the trace is an incomplete trace,
where is the last RM state in the traversal .
Reward machines are compact trace representations: each RM state encodes how far the agent has advanced toward the goal. Consequently, the reward function becomes Markovian over the joint space of MDP and RM states . This enables the application of standard RL algorithms such as Q-learning (Watkins and Dayan 1992), DDPG (Lillicrap et al. 2016), and PPO (Schulman et al. 2017). These algorithms have been successfully applied to RM-based learning in prior work (e.g., Ardon, Furelos-Blanco, Paraç, et al. 2025; Li, Z. Chen, Klassen, et al. 2024; Toro Icarte, Klassen, R. A. Valenzano, et al. 2022, 2018).
2.3 Learning ASP Programs from (Noisy) Examples
Our work follows the methodology proposed by Furelos-Blanco, Law, Jonsson, et al. (2021) for learning RMs using inductive logic programming (ILP; Muggleton 1991). Specifically, we encode RMs using answer set programming (ASP; Lifschitz 2019) and learn them using ILASP (Law et al. 2015), a state-of-the-art ILP system. We briefly introduce ASP and ILASP's learning framework below.
2.3.1 Answer Set Programming (ASP).
ASP is a declarative programming paradigm for knowledge representation and reasoning. In ASP, a problem is encoded as a logic program, and the solutions correspond to the models of that program, called answer sets.
Our ASP programs consist of normal rules, constraints, and facts. Normal rules have the form , where the head is an atom and the body consists of literals. A literal is either an atom or its negation not . Constraints are rules of the form . Facts are rules with an empty body, written as .
Given a set of ground atoms (or interpretation) , a ground normal rule is satisfied if the head is satisfied by whenever all body literals are satisfied by . A ground constraint is satisfied if its body is not satisfied by . Facts are always satisfied.
An answer set is defined via the reduct. The reduct of a ground program with respect to an interpretation is constructed by removing from all rules containing not where , and removing all not literals where . Then, is an answer set of if and only if satisfies the rules in and no proper subset of does.
EXAMPLE 4. Consider the following ASP program:
For the interpretation , the reduct is:
Since satisfies all rules in and no proper subset of (e.g., , and ) does, is the unique answer set of .
18:6
Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo
2.3.2 Learning from Noisy Answer Sets. Learning from answer sets (LAS; Law et al. 2020) is a paradigm for learning ASP programs from examples. We focus on learning from noisy examples, where each example is weighted with a penalty. The goal is to find an ASP program (called a hypothesis) that minimises a score that accounts for program complexity (e.g., number of literals) and the penalties incurred by uncovered examples.
Examples are weighted context-dependent partial interpretations (WCDPIs; Law et al. 2018), each a tuple , where is a unique identifier; is a penalty; is a pair of atom sets known as a partial interpretation; and is an ASP program known as the context, providing example-specific information. An ASP program covers a WCDPI if and only if there is an answer set of such that and .
These WCDPI examples are used within a LAS task that also specifies background knowledge and the space of learnable rules. We formalise LAS tasks (Law et al. 2018) as follows.
Definition 2.3 (LAS task). A LAS task is a tuple of the form , where is an ASP program known as background knowledge, is a hypothesis space defining the set of learnable ASP rules, and is a set of WCDPI examples. Given a hypothesis ,
(1) is the set of all examples such that does not cover ;
(2) the penalty of , denoted as , is the sum ;
(3) the length of , denoted as , is the sum , where ;
(4) the score of , denoted as , is the sum ;
(5) H is an inductive solution of T iff is finite; and
(6) is an optimal inductive solution of iff is finite and such that .
Examples with infinite penalty are non-noisy and must be covered; finite penalties allow trading off coverage for simpler hypotheses. We use ILASP (Law et al. 2015), a state-of-the-art system for learning ASP programs from noisy examples.
EXAMPLE 5. Consider the LAS tasks and , where:
\begin{array}{r}{B=\left\{\mathbf{b}:\mathbf{-c.}\right\},\quad S_{M}=\left\{\begin{array}{l l}{\mathbf{a}.}&{}\\ {\mathbf{-b}.}&{}\\ {\mathbf{-n o t~b.}}&{}\\ {\mathbf{a}:\mathbf{-b.}}&{}\\ {\mathbf{a}:\mathbf{-n o t~b.}}&{}\end{array}\right\},\quad\begin{array}{r}{E_{1}=\left\{\begin{array}{l}{\langle e x1,\infty,\langle\{\mathbf{a}\},\emptyset\rangle,\{\mathbf{c.}\}\rangle,}\\ {\langle e x2,\infty,\langle\emptyset,\{\mathbf{a}\}\rangle,\emptyset\rangle}\end{array}\right\},}\\ {E_{2}=\left\{\begin{array}{l}{\langle e x1,1,\langle\{\mathbf{a}\},\emptyset\rangle,\{\mathbf{c.}\}\rangle,}\\ {\langle e x2,1,\langle\emptyset,\{\mathbf{a}\}\rangle,\emptyset\rangle}\end{array}\right\}.}\end{array}The optimal inductive solution for is , with score since (all examples are covered) and .
For , the examples are identical but have finite penalties. The empty hypothesis achieves a better score: since (ex1 is uncovered) and . While this example yields a trivial solution, it illustrates the key principle: when examples have finite penalties, the learner can sacrifice coverage of low-confidence examples to find simpler and more general hypotheses.
3 Noisy Labelled Markov Decision Processes
The labelled MDP defined in Section 2 assumes a perfect labelling function . In practice, however, event detection through sensors or learned models is inherently noisy. We formalise this setting through a noisy labelled MDP, where the key change is replacing the perfect labelling function with a probabilistic one.
Definition 3.1 (Noisy labelled Markov decision process). A noisy labelled Markov decision process is a tuple where are as in Definition 2.1, and is a noisy labelling function.
Robust Reward Machine Learning and Execution in Noisy Environments • 18:7
The noisy labelling function maps each transition to a probability distribution over propositions, capturing sensor uncertainty. We use and to denote the actual presence and absence of proposition , and and to denote sensor detection and non-detection, respectively.
Definition 3.2 (Noisy labelling function). The noisy labelling function maps each transition to the probability of each proposition:
where is the probability of observing on transition .
For compactness, we write pairs as rather than , omitting propositions with probability zero. For instance, if and , with all other propositions having probability zero, we write .
A noisy trace is the probabilistic analogue of a trace, where each label is replaced by its probability distribution.
Definition 3.3 (Noisy trace). Given a state-action history , the noisy trace is:
We make the following assumptions about this setting:
ASSUMPTION 1 (CONDITIONAL INDEPENDENCE). Given a transition , let denote the set of propositions detected by the sensors at this transition. We assume that propositions are conditionally independent given their respective sensor detections. Thus, the probability of each proposition depends only on its own sensor output:
ASSUMPTION 2 (DETERMINISTIC TERMINATION). The termination function remains deterministic, so trace termination is determined with certainty.
ASSUMPTION 3 (REWARD STRUCTURE). The reward function assigns a reward of 1 to goal traces, -1 to dead-end traces, and 0 to incomplete traces.
Assumption 1 is common in noisy labelling models (Ding et al. 2011; Li, Z. Chen, Klassen, et al. 2024; Verginis et al. 2024). Assumption 2 ensures that, despite noisy labels, the agent knows with certainty when an episode terminates. This is reasonable when termination is determined by a supervising agent (e.g., a human) who can accurately assess task completion. Assumption 3, adopted from prior work on RM learning (e.g., Ardon, Furelos-Blanco, and Russo 2024; Furelos-Blanco, Law, Jonsson, et al. 2023), allows us to focus on learning RM structure rather than rewards.
We now describe one concrete way to obtain the noisy labelling function using a binary sensor model. The agent is equipped with a binary sensor for each proposition , characterised by its sensitivity and specificity of detection. The sensitivity of the sensor is the probability of detection given actual presence: . The specificity is the probability of non-detection given actual absence: . Since the sensor output may not always match the true environment state, the agent computes a posterior belief over proposition occurrence using Bayes' rule:
18:8
Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo
where is the sensor outcome, is the prior probability of proposition being present, and the probabilities , and follow from sensitivity, specificity and the prior. We experimentally determine priors using the relative occurrence of the propositions in the environment.
REMARK. The choice of sensor model is orthogonal to the rest of the method. Any model that provides for every is a suitable candidate. The binary sensor model with fixed sensitivity and specificity presented here is closely related to that of Ghasemi et al. (2020), with the key distinction that we do not update the sensor model as new information becomes available.
EXAMPLE 6. Consider the COFFEE task from Example 1 with and the history . The priors are and (two and one o in a grid). Both sensors have sensitivity and specificity 0.99. We compute the posteriors for each step using Equation (1):
• Step . Suppose no propositions are detected :
Thus .
• Step . Suppose the coffee sensor fires :
Thus .
The resulting noisy trace is therefore .
4 Learning Reward Machines from Noisy Traces
In this section, we present our approach for learning RMs from noisy traces using ILASP. We assume a fixed dataset of noisy traces is given and later describe the interleaved collection and learning process in Section 6.
Figure 2 provides an overview of the pipeline: noisy traces are sampled to produce grounded traces, which are supplemented with traces generated from an existing RM (when available). These traces are converted into ILASP examples with associated penalties, which, together with background knowledge and a hypothesis space, are used by ILASP to learn an RM.
We organise this section as follows. Section 4.1 describes how we generate training examples from noisy traces and existing RMs. Section 4.2 presents the ASP encoding of RMs and traces. Finally, Section 4.3 defines the complete ILASP learning task, including background knowledge, hypothesis space, example construction, and complexity control mechanisms.
4.1 Generating Example Traces
We generate training examples from two sources: grounded traces sampled from noisy traces, and traces derived from an existing RM structure. These are described in the following subsections.
Robust Reward Machine Learning and Execution in Noisy Environments • 18:9

Fig. 2. Overview of the RM learning pipeline. Traces are sampled from noisy traces and from an existing RM, converted into ILASP examples, and used together with background knowledge and a hypothesis space to learn a new RM.
4.1.1 From Noisy Traces. A key challenge in learning RMs from noisy traces lies in mapping these traces to WCDPIs. We use a sampling-based method: at each step in the trace, for each proposition we sample from a Bernoulli distribution parameterised by its probability. This generates multiple grounded traces, each representing a plausible realisation of the noisy trace.
Formally, let be a noisy trace, and let denote the probability of observing proposition at step . We generate a grounded trace from by treating each proposition occurrence as a Bernoulli trial: for all , where . The process is performed times for each noisy trace, resulting in grounded traces. Following prior work on learning RMs (Furelos-Blanco, Law, Jonsson, et al. 2021; Toro Icarte, Waldie, et al. 2019), we compress the traces by removing the empty labels and, thereafter, removing contiguous identical labels.
EXAMPLE 7. Consider the proposition set and the noisy goal trace . Sampling could yield the most likely trace: . After compression (removing empty labels and consecutive duplicates), .
Additionally, we generate incomplete examples from prefixes of the compressed goal and dead-end traces, similar to Ardon, Furelos-Blanco, and Russo (2024). This provides the learner with information about valid intermediate traces and helps prevent overgeneralisation.
4.1.2 From an Existing Reward Machine. The examples derived from noisy traces may be insufficient or biased for learning a good RM. This is particularly problematic when traces are collected by a policy that exploits a given RM: such traces concentrate on near-optimal paths and lack diversity. For instance, the agent may only collect goal traces along one path, missing incomplete and dead-end traces that are essential for learning intermediate states and alternative paths. This issue is present when interleaving RM learning with policy optimisation, described in Section 6.
To address this, we generate additional examples from the exploited RM's structure. These examples represent paths the RM considers valid, supplementing the collected traces and ensuring that the RM's knowledge is retained even when corresponding traces become rare. Given an RM, we generate traces as follows:
(1) Enumerate all paths (i.e., sequences of edge formulas) from to and .
(2) For each path, generate all subsequences of formulas.
(3) Convert each subsequence to a trace by taking the minimal label satisfying each formula. The trace is a goal trace if the traversal ends with , a dead-end trace if it ends with , and an incomplete trace otherwise.
Prior work on learning RMs without noise (e.g., Furelos-Blanco, Law, Jonsson, et al. 2021; M. Hasanbeig, Jeppu, et al. 2021; Toro Icarte, Waldie, et al. 2019; Xu et al. 2020) does not require this technique, as those methods satisfy
18:10
• Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo

Fig. 3. Reward machine for the VisitABCD task used in Example 8. The agent must go to locations A, B, C and D in order. This RM accounts for co-location: A may appear with B, and C may appear with D.
all examples exactly; hence, infrequent but valid traces are never ignored. In our setting, however, infrequent examples may correspond to noise and receive low penalties, risking the loss of valid but rare behaviours.
EXAMPLE 8. Consider the RM in Figure 3 for the VisitABCD task in OFFICEWORLD:
(1) There are four paths from to :
(2) For the path , the subsequences are:
(3) Each subsequence becomes a trace using minimal labels. For example, yields the incomplete trace .
4.2 ASP Representation of Reward Machines and Traces
To learn RMs using ILASP, we encode them as ASP programs. The RMs we learn have the same structure as those defined in Section 2, and we learn them from grounded (deterministic) traces rather than noisy traces. Consequently, we build upon the encoding of Furelos-Blanco, Law, Jonsson, et al. (2021), which was designed for learning from perfect traces. We first introduce notation for expressing RM transitions as propositional logic formulas, then present the ASP encoding.
The state-transition function of an RM can be expressed using a logical transition function (Furelos-Blanco, Law, Jonsson, et al. 2021) that maps state pairs to disjunctive normal form (DNF) formulas over , where each disjunct corresponds to an edge. The number of disjuncts in the formula between a pair of states is denoted .
EXAMPLE 9. For the RM in Figure 1, we have with .
Definition 4.1 (ASP representation of reward machines). Given an RM , we encode it as , where:
encodes the RM states with used_state(u) indicating u is an RM state, and
18:11
encodes transitions with denoting the -th disjunct of , representing the -th edge from to , indicating proposition holds at time , and denoting that is a timestep.
The encoding uses (negation of ) rather than directly, as this reduces the search space and speeds up learning (Furelos-Blanco, Law, Jonsson, et al. 2021, p. 1046).
EXAMPLE 10. For the RM in Figure 1, the transition is encoded as
We now define the ASP encoding for traces, also following Furelos-Blanco, Law, Jonsson, et al. (2021).
Definition 4.2 (ASP representation of a label trace). Given a label trace , denotes the set of ASP facts
where denotes that n is the final timestep.
Given the RM and trace encodings (Definitions 4.1 and 4.2), we define rules for RM traversal:
where denotes that the state at timestep T is X; indicates that the transition from X to Y is satisfied at timestep T; and accept and reject respectively indicate whether the trace is accepted or rejected. The rules encode that: traversals start from the initial state; the next state is determined based on the currently satisfied transition; and that the trace is accepted (resp. rejected) if the last state is (resp. ). The atoms are defined via:
which encode (i) as the negation of ; (ii) whether an outgoing transition from state is satisfied at timestep ; (iii) holds when the formula on an edge from to is satisfied at timestep ; and (iv) holds (self-loop) when no outgoing transition from is satisfied at timestep . Note that the rules (Definition 4.1) are evaluated using the trace encoding (Definition 4.2).
4.3 Learning from Answer Sets Task
We learn RMs using ILASP (Law et al. 2015), a state-of-the-art LAS system. A LAS task consists of background knowledge , a hypothesis space , and a set of WCDPI examples (Section 2.3). To apply LAS to noisy traces, we sample grounded traces from each noisy trace, creating training examples that represent the underlying trace while accounting for uncertainty. This allows us to extend the learning approach of Furelos-Blanco, Law, Jonsson, et al. (2021) to the noisy setting.
18:12 • Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo
4.3.1 Background Knowledge. The background knowledge consists of the traversal rules from the previous subsection ( and , Section 4.2), which determine whether an RM accepts or rejects a trace, together with rules defining the state space:
Here is the maximum set of states available to ILASP; hence, the learned RM may use a subset. When is large, the search space contains many equivalent RMs differing only in state identifiers. To reduce this redundancy, we extend the symmetry-breaking constraints from Furelos-Blanco, Law, Jonsson, et al. (2021) by requiring that used states have the lowest possible identifiers. The set of used states is determined via used_state(U) atoms indicating that state U has incoming or outgoing edges.
4.3.2 Hypothesis Space. The hypothesis space defines the set of all possible RMs that can be learned. Based on the RM encoding from Section 4.2, we define:
where is the maximum number of edges between any two states.
4.3.3 Example Set. The example set consists of WCDPIs generated from grounded traces (Sections 4.1.1 and 4.1.2). Since trace termination is deterministic (Assumption 2), we know with certainty whether each trace is a goal, dead-end, or incomplete trace. Below we describe the components of the WCDPI resulting from each unique sampled grounded trace .
Identifier. The identifier is unique for each WCDPI.
Penalty. The penalty balances class frequency, trace likelihood, and trace source through three components:
(1) Class-based weight. To address class imbalance, we assign a base weight inversely proportional to the trace class frequency (Huang et al. 2016): , where is the number of examples of class .
(2) Deduplication count. If identical grounded traces exist, we retain one WCDPI with penalty multiplied by . This reflects that frequently sampled grounded traces are more likely under the noisy labelling function and should be prioritised. We track counts separately for traces from noisy labels and from the existing RM .
(3) Trace origin weight. We introduce a hyperparameter that controls the importance of RM-derived examples. Setting discards RM-derived examples entirely, while weights both sources equally.
Thus, the final penalty is for a WCDPI of class .
Inclusions and Exclusions. The inclusion-exclusion pair depends on the trace type:
-
for goal traces,
-
for dead-end traces, and
-
for incomplete traces.
These pairs encode that goal traces must be accepted and not rejected, dead-end traces must be rejected and not accepted, and incomplete traces must be neither accepted nor rejected, consistent with the RM validity definition in Section 2.2.
Robust Reward Machine Learning and Execution in Noisy Environments • 18:13
Context. The context consists of the ASP representation of the grounded trace. Additionally, to speed up learning, we include a constraint ensuring the terminal state is reached after the final label:
4.3.4 Scoring and Complexity Control. ILASP scores hypotheses by balancing rule length and unsatisfied example penalties (see Section 2.3.2). We control this trade-off through two mechanisms:
(1) Penalty budget. Adjusting the total penalty sum controls example coverage. A higher budget requires the learned RM to satisfy more examples, potentially increasing complexity.
(2) Length function. Customising the rule length function penalises complex RMs. We adjust the weight given to hypothesis length relative to the unsatisfied penalty.
This allows us to find RMs that balance simplicity (fewer states, simpler formulas) with example coverage. To simplify the learning task, we additionally discard any WCDPIs whose penalty falls below a threshold .
5 Exploiting Reward Machines from Noisy Traces
In this section, we describe how PROB-IRM exploits the structure of an RM when labels are noisy. Akin to Li, Z. Chen, Klassen, et al. (2024), PROB-IRM learns policies with PPO (Schulman et al. 2017) using a neural network that takes as input the current environment state and the RM state belief, and outputs both the action distribution and value function.
The key challenge is handling uncertainty in the RM state: since labels are noisy, the agent maintains a belief distribution over RM states rather than a single deterministic state. We introduce the RM state belief in Section 5.1, extend the reward function to beliefs in Section 5.2, and describe probabilistic reward shaping in Section 5.3.
5.1 Reward Machine State Belief
Due to the noisy labelling function, the current RM state cannot be known with certainty; therefore, we determine the RM state belief (Li, Z. Chen, Klassen, et al. 2024; Li, Z. Chen, Vaezipoor, et al. 2022).
To compute the belief, we need the probability of observing a specific label at a transition. Under Assumption 1, let denote the probability assigned by the noisy labelling function to proposition at transition . The label probability is:
where
Definition 5.1 (RM state belief). The RM state belief is a probability distribution over RM states at timestep . The initial belief is:
Belief updates are performed as follows:
where is the RM state-transition function and 1 is the indicator function.
18:14
Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo
EXAMPLE 11. Consider the RM from Figure 1 and the noisy trace resulting from the history in Example 6. We compute the belief evolution using Definition 5.1, simplifying summations to include only non-zero terms:
- Step . The agent starts in environment state . We compute the initial belief using the noisy label :
- Step . After the transition , where , , , and :
18:15
In summary, the resulting beliefs are:
The belief evolution shows the agent's increasing certainty about having observed : starting with near certainty of being in at , the belief shifts primarily to by , reflecting the strong detection upon moving left. However, substantial probability mass remains on , reflecting uncertainty due to the noisy labels.
18:16 • Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo
5.2 Reward over Reward Machine State Beliefs
In the deterministic case, the agent receives reward when transitioning between RM states. However, with noisy labels, the agent maintains a belief distribution over RM states rather than knowing the current state with certainty. We extend the reward-transition function to beliefs by computing the expected reward over all possible state transitions weighted by their probabilities.
Definition 5.2 (Reward over RM state beliefs). Given a reward machine , a pair of state beliefs , and a transition , the reward-transition over beliefs is
While Equation (4) holds for any reward-transition function, under Assumption 3, it simplifies to a closed form that depends only on changes in belief at the terminal states:
PROPOSITION 5.3. Under Assumption 3, the reward-transition over beliefs is:
PROOF. See Appendix B.
5.3 Probabilistic Reward Shaping
Reward shaping provides intermediate rewards to guide agent learning. Potential-based reward shaping (Ng et al. 1999) defines these rewards by evaluating a potential function at consecutive states and taking their difference. Formally, the shaped reward is
where is the MDP's discount factor. Crucially, this approach preserves the set of optimal policies.
In the context of reward machines, several works (Camacho, O. Chen, et al. 2017; Camacho, Toro Icarte, et al. 2019; Furelos-Blanco, Law, Jonsson, et al. 2021) leverage the RM structure for reward shaping by defining the potential function over RM states, , yielding the shaped reward
In our setting with noisy labels, the agent cannot directly observe the true RM state and instead maintains a belief distribution over RM states. We therefore extend the potential function to operate over beliefs: . We define as the expected potential under the belief distribution:
The shaped reward then follows the same potential-based form:
This approach is analogous to potential-based shaping over state beliefs in partially observable MDPs (Eck et al. 2013).
To reward progress toward the accepting state, we define the potential function following Camacho, O. Chen, et al. (2017) and Furelos-Blanco, Law, Jonsson, et al. (2021):
18:17
where is the shortest path length from u to . This assigns higher potential to states closer to , thereby rewarding transitions that reduce the distance to the goal. If is unreachable from u, we set (in practice, a sufficiently large number).
Following standard practice in reward shaping, we augment the reward over RM state beliefs (see Section 5.2) with the shaped reward:
EXAMPLE 12. Consider the reward machine in Figure 1 with consecutive RM state beliefs and (ordered as ), representing a transition from certainty in to equal uncertainty between and . First, we compute the potential function :
With discount factor , the shaped reward is:
The positive shaped reward reflects the increased probability of being in .
6 Interleaving Exploitation and Learning of Reward Machines from Noisy Traces
In the noiseless setting, prior work (Furelos-Blanco, Law, Jonsson, et al. 2021; M. Hasanbeig, Jeppu, et al. 2021; Toro Icarte, Waldie, et al. 2019; Xu et al. 2020) triggers RM relearning when the current candidate RM fails to explain an observed trace. For instance, if the agent successfully completes the task but the corresponding trace does not reach the accepting state, this counterexample indicates the RM must be revised. With noisy labels, however, such a counterexample-based approach becomes unreliable: we cannot determine with certainty whether a trace genuinely contradicts the RM. Moreover, attempting to explain every observed noisy trace would cause the learned RM to overfit to sensor errors.
Figure 4 provides an overview of PROB-IRM, our approach for learning RMs from noisy labels. To address the challenges introduced by noisy observations, we propose a criterion for determining when to relearn the RM. We describe this criterion in Section 6.1 and present the complete algorithm in Section 6.2.
6.1 Reward Machine Relearning Criterion
In the noiseless setting, prior work triggers relearning when the RM is not valid with respect to a trace; namely, given a noiseless trace and the traversal , a new RM is learned if (i) is a goal trace and ; (ii) is a dead-end trace and ; or (iii) is an incomplete trace and . However, with noisy labels, we cannot accurately determine the last RM state of a traversal and thus cannot directly compare it to the trace category to detect errors.
We propose a criterion for RM relearning that builds upon RM state beliefs (Section 5.1) and deterministic termination information (Assumption 2). The criterion is defined using an error metric that measures how well the RM state belief at termination aligns with the ground-truth termination information using cross-entropy.
18:18
Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo

Fig. 4. Overview of the ProB-IRM algorithm that interleaves RM learning and exploitation from noisy traces. At each timestep, the agent takes action and observes the next state and termination information . The agent computes the noisy label from the transition . The noisy label and current RM are used to determine the RM state belief (Section 5.1) and RM reward (Section 5.2). The episode trace is updated with the noisy label. At episode termination, the trace is stored and we determine whether to relearn the RM using the final RM state belief (Section 6.1). If relearning is triggered, grounded traces are sampled from the noisy traces (Section 4.1.1) and from the current RM (Section 4.1.2). These traces are provided to ILASP to learn a new RM.
Definition 6.1 (RM error). Given a noisy trace , the resulting RM state belief , and termination information at the final step , the RM error is
where is the ground-truth one-hot vector encoding the trace category (goal, dead-end, and incomplete) based on termination information, and encodes the RM state belief over terminal and and non-terminal states. Formally,
EXAMPLE 13. Consider the RM state belief from Example 11 and the termination information (incomplete trace). The vectors are:
The RM error is , indicating that the RM state belief accurately estimates that a terminal state has not been reached.
We trigger RM relearning based on the cumulative RM error since the last update. After each episode termination, we compute the RM error for that episode and add it to a running sum. When the average error across episodes
Robust Reward Machine Learning and Execution in Noisy Environments • 18:19
(total error divided by the number of episodes since the last relearning) exceeds a threshold , we trigger relearning and reset the cumulative error to zero.
To reduce sensitivity to the choice of , we introduce two techniques:
(1) Warm-up period. After each relearning, we require a minimum number of episodes before the RM can be updated again, preventing premature relearning.
(2) Score-based gating. We only update the RM if the newly learned hypothesis achieves a better ILASP score (Definition 2.3) than the current RM, preventing updates that do not improve example fit.
Together, these techniques substantially reduce sensitivity to , as demonstrated in Section 7.4.6. The warm-up period ensures training progress even with a conservatively low threshold, while score-based gating prevents unnecessary updates when an error spike is due to temporary exploration rather than RM inadequacy.
6.2 Interleaved Learning Algorithm
We now describe PROB-IRM, our method for interleaving RM learning from noisy traces with RL. Algorithm 1 presents the main interleaving loop, and Algorithm 2 describes the RMLEARNER class that manages RM updates.
Algorithm 1 initialises the RM, policy, and RM learner (lines 1–3). The initial RM simply loops on the initial state and thus does not accept or reject any traces. The algorithm then runs for a fixed number of iterations. In each iteration, multiple episode trajectories are sampled using the SAMPLETRAJECTORY function (lines 5–7) and used to update the policy (line 8). If the relearning criterion is met, a new RM is learned and the policy is reinitialised (lines 9–11).
Unlike prior work (Furelos-Blanco, Law, Jonsson, et al. 2021; Xu et al. 2020) that uses iterative deepening to find a minimal RM by incrementally increasing the state count until all examples are covered, we use a fixed maximum state set for all RM learning iterations. Each learned RM may use only a subset of , but the maximum remains constant. This is necessary because examples carry noise penalties: iterative deepening would terminate prematurely by ignoring noisy examples rather than increasing the state count. This strategy is also used in other RM learning work with non-noisy traces (M. Hasanbeig, Jeppu, et al. 2021; Toro Icarte, Waldie, et al. 2019).
The SAMPLETRAJECTORY function (lines 12–30) runs an episode, collecting a trajectory for policy learning and a noisy trace with its RM error for RM learning. During an episode, the agent selects an action based on the current environment state and RM state belief, executes it in the environment (lines 20–21), and updates the RM state belief, noisy trace, and trajectory (lines 22–24). The episode terminates when: (i) the environment signals termination; (ii) the RM state belief is concentrated on terminal states; or (iii) the maximum episode length is reached. At the end of the episode, the agent updates the RM learning examples using the noisy trace and current RM (line 28) and increments the accumulated RM error used to determine whether to learn a new RM (line 29).
The RMLEARNER class (Algorithm 2) implements the relearning criterion (Section 6.1) and ILASP-based RM learning (Section 4). The constructor (lines 1–4) initialises an empty example set, along with an episode count and RM error accumulator that track state since the last RM update. The SHOULDRELEARN method (lines 5–8) implements the relearning criterion by checking whether the average RM error exceeds the threshold. The RELEARNRM method (lines 9–12) resets the episode count and RM error accumulator, then calls ILASP to learn a new RM using the current example set. The UPDATEEXAMPLES method (lines 13–16) updates the example set from both noisy traces and the previous RM (Section 4.1). Finally, UPDATERMERROR (lines 17–22) computes the RM error (Section 6.1) and updates the episode count and error accumulator.
7 Experimental Results
To evaluate PROB-IRM, we design experiments across discrete and continuous domains under varying noise conditions. Our experiments address the following research questions:
18:20 • Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo
Algorithm 1 PROB-IRM algorithm
Require: (propositions), (RM states), (max. edges between states), (relearning threshold), warmup_episodes (episodes before relearning), max_ep_len (max. episode length), num_iters (iterations), num_episodes_per_iter (episodes per iteration)
1:
2:
3: rm_learner
4: for do
5: trajectories
6: for do
7: trajectories
8: UPDATEPOLICY(, trajectories) See Section 5
9: if rm_learner.SHOULDRELEARN(, warmup_episodes) then
10:
11:
12: function SAMPLETRAJECTORY()
13:
14: Using Equation (2)
15: Initialise episode step counter
16: Initialise noisy trace
17: Initialise raw trajectory
18: done Initialise episode termination indicator
19: while done = do
20:
21:
22: Using Equation (3)
23:
24:
25:
26: is_terminal_rm_state
27: done or is_terminal_rm_state or
28: rm_learner.UPDATEEXAMPLES()
29: rm_learner.UPDATERMERROR()
30: return
RQ1 Does PROB-IRM enable agents to solve non-Markovian reward tasks under noisy labels?
RQ2 Is learning an RM preferable to using recurrent policies?
RQ3 Does noise-aware RM learning outperform noise-unaware alternatives?
RQ4 How does PROB-IRM compare to using handcrafted RMs?
RQ5 How sensitive is PROB-IRM to different sensor noise levels?
RQ6 Does PROB-IRM scale to continuous domains?
Robust Reward Machine Learning and Execution in Noisy Environments • 18:21
Algorithm 2 The RMLEARNER class
1: function RMLEARNER() 2: self.E ← {} 3: self.num_episodes ← 0 4: self.rm_error_sum ← 0 5: function SHOULDRELEARN(β, warmup_episodes) 6: if self.num_episodes < warmup_episodes then 7: return ⊥ 8: return self.rm_error_sum/self.num_episodes > β 9: function RELEARNRM(ℛ, U_max, κ) 10: self.num_episodes ← 0 11: self.rm_error_sum ← 0 12: return ILASP.LEARNRM(self.E, ℛ, U_max, κ) 13: function UPDATEEXAMPLES(λ, ℛM, τ) 14: E_λ ← GENERATEEXAMPLES(λ, τ) 15: E_RM ← GENERATERMEXAMPLES(ℛM) 16: self.E ← self.E ∪ E_λ ∪ E_RM 17: function UPDATERMERROR(τ, ū) 18: v ← [1[τ^T = T ∧ τ_h^G = T] 1[τ^T = T ∧ τ_n^G = ⊥] 1[τ^T = ⊥]]^T 19: ū ← [ū(u_A) ū(u_R) 1 - ū(u_A) - ū(u_R)]^T 20: rm_error ← CROSSENTROPY(v, ū) 21: self.num_episodes ← self.num_episodes + 1 22: self.rm_error_sum ← self.rm_error_sum + rm_error
We structure this section as follows. Section 7.1 describes our experimental setup, including domains, baselines, sensor configurations, and hyperparameters. Sections 7.2 and 7.3 present results addressing the research questions above. Section 7.4 analyses key design choices through ablation studies, covering reward shaping, belief updating, relearning criteria, example generation, and class rebalancing. Finally, Section 7.5 examines computational overhead.
Source code is available at https://github.com/rparac/Prob-IRM, building on the RLlib framework (Liang et al. 2018). The raw, unaggregated data of all experiments (per-run learning curves, learned RMs, and ILASP logs) is available at https://github.com/rparac/Prob-IRM/releases/tag/jair-data-v1.
7.1 Experimental Setup
We describe our experimental setup, covering policy learning, domains, sensor configurations, hyperparameters, and performance metrics. Experiments run on a CPU cluster with nodes containing Intel Xeon Platinum 8358 processors (32 cores, 2.60 GHz) and 256 GB RAM.
7.1.1 Policy Learning and Baselines. We use PPO (Schulman et al. 2017) to train agent policies. Unlike the tabular QRM algorithm from our prior work (Parac et al. 2024), PPO handles continuous state spaces and avoids discretising RM state beliefs. While the choice of RL algorithm is orthogonal to our method, we select PPO for its strong empirical performance and recent use in RM literature (Ardon, Furelos-Blanco, Paraç, et al. 2025; Li, Klassen, et al. 2025; Li, Z. Chen, Klassen, et al. 2024).
We compare four approaches:
18:22 • Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo

Fig. 5. Visualisation of the WATERWORLD domain (Toro Icarte, Klassen, R. A. Valenzano, et al. 2018). The agent is depicted by the white ball.
- PROB-IRM (ours): The network receives the environment observation and RM state belief vector (Section 5.1) as input. Learns RMs from noisy traces.
- ISA (Furelos-Blanco, Law, Jonsson, et al. 2021): A noise-unaware RM learning method. The network receives the environment observation and a one-hot vector indicating the current RM state (computed directly from noisy sensor output).
- Perfect RM: The network receives an environment observation and an RM state belief vector. Unlike PROB-IRM and ISA, it uses a perfect handcrafted RM rather than learning one. Serves as an upper bound for PROB-IRM.
- RECURRENT PPO: Uses an LSTM to capture history instead of an RM. Like RM-learning approaches, has no prior task structure knowledge. Receives the noisy labelling function output concatenated with an environment observation.
Network architecture details are in Section 7.1.4.
7.1.2 Domains. We evaluate PROB-IRM in the OFFICEWORLD (Toro Icarte, Klassen, R. A. Valenzano, et al. 2018) and WATERWORLD (Karpathy 2015; Toro Icarte, Klassen, R. A. Valenzano, et al. 2018) domains.
OFFICEWORLD. This grid-based navigation domain (introduced in Section 2) features deterministic movement in four directions (up, down, left, right) unless blocked by walls. The agent observes its position in the grid. We evaluate three tasks:
- COFFEE: collect coffee (🍎) and deliver it to the office (o);
- COFFEEMAIL: collect coffee and mail (✉) in any order, then reach the office (o);
- VISITABCD: visit cells A, B, C, D in sequence.
Task difficulty varies with map layout. We run each experiment on five sets of ten randomly generated maps with randomised initial agent and object locations, reporting average performance.
WATERWORLD. This continuous state-space domain (Figure 5) features a ball-like agent floating among twelve moving coloured balls (two of each of six colours). All balls travel at constant speed. The agent applies force increments in four directions (up, down, left, right) or no force (noop). Observations comprise the agent's absolute position and velocity, plus relative positions and velocities of all other balls. The agent observes a ball's colour upon contact; the proposition set consists of the six colours: red, green, blue, magenta, cyan, and yellow. We run each experiment with five random seeds for initial ball positions and velocities. We evaluate three tasks:
Robust Reward Machine Learning and Execution in Noisy Environments • 18:23
- RGB: touch red, green, and blue balls in sequence;
- RGBC: touch red, green, blue, then cyan balls in sequence;
- RG-B: touch red, green, and blue balls in any order, with green always after red. The blue ball can be observed before, between, or after the red and green balls.
7.1.3 Sensor Configurations. We experiment with multiple sensor configurations defined by:
-
Noise targets. Determines which sensors are noisy: noise-first applies noise only to the sensor for the first required proposition, while noise-all applies noise to all sensors. For COFFEEMAIL, which has no single first proposition, we apply noise to both 🚫 and ✉ sensors in the noise-first configuration.
-
Noise level. Characterised by sensor accuracy (the probability of correct detection). We test three levels: 1.0 (perfect), 0.9, and 0.8 (20% error rate). We set sensor sensitivity and specificity to the same value to achieve these posterior probabilities, which we refer to as sensor confidence.
While noiseless configurations (i.e., with sensor confidence set to 1.0) are solvable by methods assuming perfect labels, our implementation always uses the noisy framework, treating the noiseless setting as a special case.
7.1.4 Hyperparameters. We report hyperparameters in Table 1. We obtained these values through uniform random search on COFFEE and keep them constant across all experiments. Probabilistic reward shaping is enabled by default for RM-based methods, supported by the ablation study in Section 7.4.1.
7.1.5 Performance Metrics. To assess agent performance, we record the undiscounted return collected throughout each episode, excluding reward shaping when used. We aggregate returns over all training runs within each experiment to compute mean and standard deviation.
7.2 OFFICEWORLD Main Results
We evaluate PROB-IRM and the baselines for the COFFEE, COFFEEMAIL, and VISITABCD tasks under the noise-first configuration.
7.2.1 Coffee Delivery. Figure 6 shows results for COFFEE, the simplest task. PROB-IRM consistently completes the task, matching the Perfect RM baseline performance (RQ1, RQ4). The primary difference is convergence time: PROB-IRM takes longer as it must first learn an accurate RM (RQ4). Higher noise levels further increase convergence time, as RM learning becomes more challenging (RQ5).
Both RECURRENT PPO and ISA fail to match this performance. The former never achieves the goal consistently (RQ2), while the latter performs well in the noiseless case but degrades substantially under noise (RQ3).

(a) Perfect RM
(b) PROB-IRM
(c) ISA
(d) RECURRENT PPO
Fig. 6. Learning curves for COFFEE across different sensor confidence levels.
18:24 • Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo
Table 1. Hyperparameter values. Search ranges show values tested during random search; N/A indicates fixed values.
| Hyperparameter | Value | Search Range |
|---|---|---|
| Environment | ||
| Max. episode length | ||
| OFFICEWORLD (COFFEE, COFFEEMAIL) | 500 | N/A |
| OFFICEWORLD (VISITABCD) | 1,000 | N/A |
| WATERWORLD (all) | 150 | N/A |
| PPO | ||
| Total batch size | 32,768 | N/A |
| Learning rate | 0.000153 | log-uniform [10⁻⁸, 10⁻³] |
| Minibatch size | 8,192 | {1,024, 2,048, 4,096, 8,192} |
| GAE lambda | 0.95 | uniform [0.9, 1] |
| PPO clip range | 0.2 | {0.1, 0.2, 0.3} |
| Num. epochs | 13 | {5, ..., 15} |
| Value loss coeff. | 0.5 | uniform [0.5, 1] |
| Entropy loss coeff. | 0.1 | {0.1, 1} |
| Discount (γ) | 0.99 | N/A |
| Value clip | 10.0 | N/A |
| Gradient clip | 0.5 | log-uniform [10⁻¹, 10¹] |
| Gradient clipping | Global norm | N/A |
| Network | ||
| Num. hidden layers | 4 | {1, 2, 4} |
| Units per hidden layer | 64 | {8, 16, 32, 64, 128} |
| Activation | ReLU | {ReLU, Tanh, ELU} |
| Share actor-critic layers | True | {True, False} |
| Weight initialiser | Orthogonal | N/A |
| LSTM size (RECURRENT PPO) | 32 | {8, 16, 32} |
| Prob-IRM | ||
| Max. number of RM states (|U_max|) | 10 | N/A |
| Max. edges per state pair (κ) | 1 | N/A |
| Optimiser | Adam | N/A |
| Cross-entropy threshold (β) | 0.6 | {0, 0.5, 0.6, 0.8, 1, 1.5, 2} |
| Example penalty budget | 3,200 | log-uniform [10², 10⁴] |
| Min. example penalty threshold (t_epen) | 2 | N/A |
| Num. grounded traces per noisy trace (n_λ') | 10 | N/A |
| Trace origin mult. (w_t_o) | 0.25 | {0.25, 0.5, 1, 1.5} |
| Reward shaping | True | {True, False} |
18:25
7.2.2 Coffee and Mail Delivery. Figure 7 shows results for COFFEOMAIL. PROB-IRM again achieves performance comparable to the Perfect RM baseline across all noise levels (RQ1, RQ4).
As in COFFEE, RECURRENT PPO fails to achieve the task goal (RQ2), while ISA follows the same pattern, performing well in the noiseless case but obtaining even lower performance under noise (RQ3).

(a) Perfect RM
(b) PROB-IRM
(c) ISA
(d) RECURRENT PPO
Fig. 7. Learning curves for COFFEOMAIL across different sensor confidence levels.
7.2.3 Sequential Visitation. Figure 8 shows results for VISITABCD, the most challenging task. PROB-IRM consistently achieves the task's goal for sensor confidences of 1.0 and 0.9, but degrades at 0.8 due to one particularly difficult seed (RQ1, RQ4, RQ5).
RECURRENT PPO again fails to solve the task at any noise level (RQ2). More notably, ISA fails to converge under noise despite performing well in the noiseless case (RQ3). This degradation is more pronounced than in simpler tasks, highlighting the growing importance of noise-aware RM learning as task complexity increases.

(a) Perfect RM
(b) PROB-IRM
(c) ISA
(d) RECURRENT PPO
Fig. 8. Learning curves for VISITABCD across different sensor confidence levels.
7.2.4 Summary. PROB-IRM consistently solves all three OFFICEWORLD tasks (RQ1), substantially outperforming RECURRENT PPO and ISA (RQ2, RQ3). The former fails to solve the tasks across all noise levels, while the latter, despite performing well in noiseless settings, degrades under noise as task complexity grows.
PROB-IRM is comparable to Perfect RM at lower noise levels (0.9, 1.0), with performance degrading at higher noise (0.8) on harder tasks (RQ4, RQ5). The primary trade-off is increased convergence time, as the agent must first learn an accurate RM.
18:26
Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo

(a) Perfect RM
(b) PROB-IRM
(c) ISA
(d) RECURRENT PPO
Fig. 9. Learning curves for RGB across different sensor confidence levels.

(a) Perfect RM
(b) PROB-IRM
(c) ISA
(d) RECURRENT PPO
Fig. 10. Learning curves for RG-B across different sensor confidence levels.
Unlike our previous work (Parac et al. 2024), we observe stable RM relearning frequencies across noise levels. We attribute this to collecting more traces between relearning checks, yielding more accurate estimates of the underlying distribution and consequently more stable RM learning.
7.3 WATERWORLD Main Results
We evaluate PROB-IRM and baselines on the three tasks of the WATERWORLD domain under the noise-first configuration, addressing RQ6 on scalability to continuous state spaces.
7.3.1 RGB. Figure 9 shows results for RGB. PROB-IRM solves the task across all noise levels, converging close to the Perfect RM baseline (RQ1, RQ4, RQ5). RECURRENT PPO converges significantly more slowly (RQ2), while ISA follows the pattern observed in OFFICEWORLD: good performance in the noiseless case but substantial degradation under noise (RQ3).
7.3.2 RG-B. Figure 10 shows results for RG-B. PROB-IRM matches the Perfect RM baseline in both final return and convergence speed (RQ4). RECURRENT PPO converges more slowly but eventually solves the task (RQ2), while ISA again degrades under noise (RQ3).
7.3.3 RGBC. Figure 11 shows results for RGBC, the most challenging task. PROB-IRM solves it across all noise levels (RQ1, RQ4), while RECURRENT PPO fails to make progress regardless of noise level (RQ2).
18:27
Notably, ISA fails even in the noiseless setting (RQ3), contrasting with results in Furelos-Blanco, Law, Jonsson, et al. (2021). We attribute this to our distributed training architecture: rather than checking for RM relearning after each trace, we check at iteration end, adding all conflicting examples simultaneously. The resulting large learning task causes ISA to time out.

(a) Perfect RM
(b) PROB-IRM
(c) ISA
(d) RECURRENT PPO
Fig. 11. Learning curves for RGBC across different sensor confidence levels.
7.4 Ablations
We conduct ablation studies to assess the impact of key design choices in PROB-IRM.
7.4.1 Probabilistic Reward Shaping. Figure 12 compares PROB-IRM with and without probabilistic reward shaping (see Section 5.3) on COFFEE. Both variants reach similar final performance, but reward shaping accelerates convergence and achieves slightly higher returns. This speed-up occurs because shaped rewards provide intermediate signals upon partial task completion.
Unlike our previous work (Parac et al. 2024), we observe little difference in this benefit across noise levels, and in all cases, a single RM learning iteration suffices to find a robust RM. We attribute this to collecting more traces before learning the first RM, reducing reliance on reward shaping to generate informative counterexamples.
7.4.2 Multiple Noise Sources. We assess PROB-IRM's robustness to multiple independent noise sources using the noise-all configuration on COFFEE, where , *, and o sensors are all noisy, tripling noise exposure compared to noise-first (RQ4).
Figure 13 shows the results. Surprisingly, PROB-IRM outperforms the Perfect RM baseline. This occurs because the learned RM is more robust to noise accumulation: with both and o sensors noisy, there is a non-zero probability at each step of erroneously transitioning to from . As this probability accumulates over the episode, it may cause premature termination. The learned RM mitigates this by slowing probability mass accumulation towards , reducing spurious terminations and simplifying policy learning.
7.4.3 Pre-trained Noise Model. To evaluate PROB-IRM under a different noise model, we replace the probabilistic sensors with pre-trained linear classifiers on COFFEE. We collect observation-label pairs from 1,000 random episodes as training data, with the resulting sensor F1 scores in Table 2.
This noise model differs substantially from our main experiments: sensor confidence varies across events, noise includes both false positives and false negatives, and any event may be detected regardless of task relevance.
Figure 14 compares learning curves for Perfect RM and PROB-IRM. Both converge to suboptimal performance, confirming this noise model is challenging. Despite this, PROB-IRM is only slightly worse than the Perfect RM baseline, demonstrating effectiveness under more complex noise models.
18:28 • Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo

(a) Without reward shaping
(b) With reward shaping
Fig. 12. PROB-IRM learning curves for COFFEE with and without probabilistic reward shaping.
Table 2. F1 scores for each sensor in the pre-trained sensor model ablation (10 runs).
| Sensor | A | B | C | D | ⚠ | ✉ | o | * |
|---|---|---|---|---|---|---|---|---|
| Min. | 0.60 | 0.70 | 0.80 | 0.70 | 0.87 | 0.80 | 0.60 | 0.40 |
| Max. | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 0.90 | 0.80 |
| Avg. | 0.84 | 0.90 | 0.89 | 0.92 | 0.94 | 0.95 | 0.72 | 0.59 |
| Std. Dev. | 0.14 | 0.10 | 0.07 | 0.10 | 0.05 | 0.07 | 0.10 | 0.14 |
7.4.4 Task Length. To evaluate PROB-IRM's scalability to longer tasks, we generalise VisITABCD to require visiting increasingly long sequences of locations. All agents use sensors at 80% confidence (our lowest tested level).
Figure 15 shows learning curves. Agents converge to high performance for sequences up to length 3. Performance begins degrading at length 4 and drops drastically at length 5. This is expected: the probability of observing an error-free goal trace decreases exponentially with task length. Without sufficient clean goal traces, learning a correct RM becomes increasingly difficult.
7.4.5 Belief Updating vs Thresholding. We provide empirical justification for our belief updating approach (Section 5.1) over thresholding. Thresholding treats any proposition with probability above a fixed threshold as true, avoiding belief maintenance but introducing a critical drawback: under our sensor model, it either works perfectly or fails to learn any RM.
We train PROB-IRM agents on COFFEE under noise-all with 80% sensor confidence, using thresholds of 0.7 (below) and 0.9 (above). Figure 16 shows the results. The 0.7 threshold achieves good performance by correctly identifying propositions. However, the 0.9 threshold fails: it incorrectly rejects every proposition, making RM learning impossible.
This highlights thresholding's brittleness: success requires either precise knowledge of the noise posterior or careful threshold tuning, which are both restrictive in practice. In contrast, belief updating requires no such
Robust Reward Machine Learning and Execution in Noisy Environments • 18:29


(a) Perfect RM


(b) PROB-IRM
Fig. 13. Learning curves and exploited RMs for COFFEE in the noise-all setting.
knowledge, introduces no additional hyperparameters, and achieves strong performance in the same setting (Figure 6).
7.4.6 Cross-Entropy Threshold. We evaluate the impact of the cross-entropy relearning threshold on COFFEEMAIL, where RM relearning is triggered multiple times. We test values from 0 (relearn every iteration) to 2 (relearn when the model assigns less than 13.5% probability to the correct class).
Figure 17 shows the results. Performance is generally insensitive to this parameter, benefiting from ILASP's scoring function as a verification step after RM learning (Section 6.1). This verification prevents updates that do not improve example coverage, making the threshold less critical.
7.4.7 Balancing Example Coverage and RM Simplicity. The ILASP scoring function (Definition 2.3) balances hypothesis length against uncovered example penalties. By adjusting the total penalty budget, we control the trade-off between example coverage and RM simplicity.
18:30 • Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo

Fig. 14. Learning curves for COFFEE with a pre-trained noise model.

Fig. 15. Learning curves for VISITABCD tasks with varying sequence lengths (80% sensor confidence).
To evaluate this trade-off, we adjust the length function and the example penalty budget (Section 4.3.4). For the former, the lengths of ed and rules are set to 2 and 1, respectively. For the latter, low budgets cause low-penalty examples to be ignored since their penalty rounds to 0. To ensure a fair comparison, we scale the WCDPI example inclusion threshold proportionally to the budget, preventing higher budgets from disproportionately including more examples.
18:31

Fig. 16. Learning curves for COFFEE (noise-all, 80% confidence) comparing thresholding at 0.7 and 0.9 with belief updating (dashed line).

(a)
(b)
(c)
(d)
(e)
Fig. 17. PROB-IRM learning curves for different values of the cross-entropy threshold .
Figure 18 shows results for COFFEEMAIL. Low budgets (100, 200) over-emphasise compactness, yielding RMs that fail to solve the task reliably. Higher budgets achieve better performance but with increased variance. Our default is 3,200, the smallest value for which ILASP consistently finds solutions within the 60-minute timeout.
7.4.8 Class-Based Weight Rebalancing. We evaluate the impact of class-based weight rebalancing on COFFEE. We compare the rebalancing procedure from Section 4.3.3, which sets where is the number of examples of class , against a baseline where for all examples.
Figure 19 shows that rebalancing improves both convergence speed and stability. Without rebalancing, the learned RM initially captures only negative transitions (avoiding *), since dead-end examples are more likely than goal ones under a random policy. As the agent learns to avoid *, the example distribution becomes more informative, but rebalancing accelerates this by ensuring goal examples are adequately weighted.
7.4.9 Example Generation from Previous RMs. We evaluate the impact of generating examples from previously learned RMs (Section 4.1.2). Figure 20 compares PROB-IRM with and without this technique
18:32
• Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo

(a) 100
(b) 200
(c) 500
(d) 1,000
(e) 10,000
Fig. 18. PROB-IRM learning curves for different example penalty budgets in COFFEEMAIL.

(a) With class-based weight rebalancing

(b) Without class-based weight rebalancing
Fig. 19. PROB-IRM learning curves for COFFEE when class-based weight rebalancing is enabled and disabled.
on RGBC under 80% sensor confidence. Including examples from previous RMs substantially improves convergence speed, confirming the effectiveness of this approach.
7.5 RM Learning Computational Overhead
We evaluate ILASP runtime as a percentage of total execution time across all PROB-IRM experiments. Table 3 summarises the results.
For COFFEE and COFFEEMAIL, ILASP cost is negligible across all noise levels, remaining below 1% and typically below 0.01%. For VISITABCD, cost is similarly low at 90% and 100% sensor confidence, but increases substantially at 80%, where ILASP accounts for roughly 25% of total runtime on average, reaching 75% in the most challenging instances. WATERWORLD tasks show the same trend.
In general, ILASP cost correlates positively with both task complexity and noise level. Two factors drive this: first, as training progresses, the growing number of examples makes each ILASP task harder to solve. Second, ILASP's optimality guarantee (Definition 2.3) requires progressively increasing a score threshold until a solution is found, meaning harder tasks require more iterations.
Robust Reward Machine Learning and Execution in Noisy Environments • 18:33

Fig. 20. PROB-IRM learning curves for RGBC under 80% sensor confidence with () and without () example generation from previous RMs.
8 Related Work
In this section, we discuss work related to PROB-IRM, organised into four areas: learning RMs without noise (Section 8.1), uncertainty-aware RM exploitation (Section 8.2), learning RMs under uncertainty (Section 8.3), and inductive logic programming with noisy examples (Section 8.4).
8.1 Learning Reward Machines without Noise
Since Toro Icarte, Klassen, R. A. Valenzano, et al. (2018) introduced reward machines, numerous methods have been proposed for learning them from traces, including active learning (Gaon and Brafman 2020), discrete optimisation (Christoffersen et al. 2020; Toro Icarte, Klassen, R. Valenzano, et al. 2023; Toro Icarte, Waldie, et al. 2019), inductive logic programming (Ardon, Furelos-Blanco, Parać, et al. 2025; Ardon, Furelos-Blanco, and Russo 2024; Furelos-Blanco, Law, Jonsson, et al. 2023, 2021; Furelos-Blanco, Law, Russo, et al. 2020), program synthesis (H. Hasanbeig et al. 2024; M. Hasanbeig, Jeppu, et al. 2021), SAT solving (Corazza et al. 2022; Xu et al. 2020), and state-merging (Gaon and Brafman 2020). However, these methods assume deterministic labelling functions and cannot handle label noise.
We build upon Furelos-Blanco, Law, Jonsson, et al. (2021), which uses ILASP (Law et al. 2015), an inductive logic programming system whose weighted example mechanism makes it well suited for extension to noisy settings. However, this approach learns minimal RMs through iterative deepening, a property we cannot maintain under noise as discussed in Section 6.2. Additionally, the method can suffer from overgeneralisation, which we describe in Section 9.
8.2 Uncertainty-Aware Exploitation of Reward Machines
Traditional RM exploitation methods assume perfect labelling functions. These include QRM (Toro Icarte, Klassen, R. A. Valenzano, et al. 2018), CRM (Toro Icarte, Klassen, R. A. Valenzano, et al. 2022), and hierarchical RL approaches (Furelos-Blanco, Law, Jonsson, et al. 2023, 2021; Toro Icarte, Klassen, R. A. Valenzano, et al. 2022, 2018).
18:34 • Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo
Table 3. ILASP runtime as a percentage of total training time across tasks and sensor confidence levels.
| Domain | Noise | Min. | Median | Max. | Average | Std. Dev. |
|---|---|---|---|---|---|---|
| COFFEE | 80% | <0.01% | <0.01% | <0.01% | <0.01% | <0.01% |
| 90% | <0.01% | <0.01% | <0.01% | <0.01% | <0.01% | |
| 100% | <0.01% | <0.01% | <0.01% | <0.01% | <0.01% | |
| COFFEEMAIL | 80% | 0.05% | 0.10% | 0.96% | 0.31% | 0.31% |
| 90% | 0.01% | 0.05% | 0.96% | 0.21% | 0.34% | |
| 100% | <0.01% | 0.01% | 0.05% | 0.02% | 0.01% | |
| VISITABCD | 80% | 0.04% | 20.32% | 75.42% | 27.14% | 21.69% |
| 90% | 0.02% | 0.08% | 8.54% | 1.75% | 3.11% | |
| 100% | 0.05% | 0.20% | 0.26% | 0.18% | 0.07% | |
| RGB | 80% | <0.01% | 2.36% | 7.10% | 2.40% | 2.31% |
| 90% | <0.01% | 0.02% | 1.09% | 0.23% | 0.43% | |
| 100% | 0.02% | 0.04% | 0.08% | 0.05% | 0.02% | |
| RG-B | 80% | <0.01% | 0.29% | 2.23% | 0.56% | 0.83% |
| 90% | <0.01% | 0.42% | 1.31% | 0.53% | 0.52% | |
| 100% | 0.42% | 1.28% | 2.40% | 1.38% | 0.70% | |
| RGBC | 80% | 0.07% | 0.48% | 30.66% | 5.83% | 11.27% |
| 90% | 0.28% | 0.41% | 15.24% | 2.99% | 5.32% | |
| 100% | 0.20% | 0.78% | 13.53% | 3.90% | 4.85% |
Recent work uses deep RL algorithms such as PPO, encoding the current RM state via one-hot vectors (Ardon, Furelos-Blanco, Paraç, et al. 2025) or graph embeddings (Furelos-Blanco, Pert, et al. 2026; Yalcinkaya et al. 2023, 2024). However, these algorithms suffer significant performance degradation under sensor noise due to erroneous labels causing agents to skip necessary subtasks or pursue incorrect objectives (Nodari 2023).
Li, Z. Chen, Klassen, et al. (2024) and Li, Z. Chen, Vaezipoor, et al. (2022) evaluate several exploitation strategies under the noisy setting formalised in Definition 3.2, including thresholding (converting probabilistic labels to deterministic ones by treating any proposition with probability above 0.5 as occurring), independent belief updating (maintaining a distribution over RM states), recurrent policies (bypassing labels entirely), and RNN-based belief estimation (which requires access to perfect labels during training). Li, Z. Chen, Vaezipoor, et al. (2022) combine these with QRM, while Li, Z. Chen, Klassen, et al. (2024) use PPO. We adopt the independent belief updating approach, conditioning PPO on the current RM state belief vector (Section 5.1), and compare against thresholding (Section 7.4.5) and recurrent policies (Sections 7.2 and 7.3) in our experiments.
M. Hasanbeig, Kantaros, et al. (2019) also consider label uncertainty within a broader framework for uncertain transition dynamics. While their formulation permits probabilistic labelling, it does not explicitly include labelling or termination functions.
8.3 Learning Reward Machines under Uncertainty
Several approaches have addressed uncertainty in different components of the RM learning problem. Dohmen et al. (2022) address uncertainty in RM transitions, learning RMs with probabilistic transition functions by adapting the L* active learning algorithm (Angluin 1987). Corazza et al. (2022) address uncertainty in rewards, learning
Robust Reward Machine Learning and Execution in Noisy Environments • 18:35
RMs with stochastic reward emissions. In contrast, we address uncertainty in labels, learning deterministic RMs from noisy labels.
The work most similar to ours is due to Verginis et al. (2024), who also tackle noisy labels. They adapt JIRP (Xu et al. 2020), a SAT-based approach that learns RMs by iteratively covering counterexamples, similarly to the work we build upon (Furelos-Blanco, Law, Jonsson, et al. 2021). Since JIRP does not handle uncertainty, they use thresholding to convert noisy labels to deterministic ones while simultaneously learning an improved labelling function estimate. To handle inconsistencies between candidate RMs and newly observed traces, they maintain two labelling function estimates: one for generating learning examples and one representing the best estimate so far. When these diverge significantly, they restart the learning process. Their approach thus focuses on learning an improved labelling function to approximate the true one, whereas we directly integrate noise into the RM learning procedure through weighted examples.
While their labelling function learning could potentially be combined with our approach, their Bayesian update mechanism requires tracking repeated state visits, which complicates application to continuous state spaces without discretisation.
8.4 Inductive Logic Programming with Noisy Examples
Several works (Cunnington, Cipcigan, et al. 2023; Cunningham, Law, et al. 2023, 2024; Dreossi et al. 2024) use ILASP to learn logical rules from noisy examples in domains beyond RM learning. Like our approach, Cunningham, Law, et al. (2023) aggregate multiple sources of noise for a single example. However, they use t-norm operators (Klement et al. 2000) to combine probabilistic predictions, whereas we use a sampling-based approach with uniform penalty weights.
9 Discussion
In this section, we discuss the limitations of PROB-IRM.
9.1 Belief Overestimation from Temporally Correlated Noisy Labels
Our RM state belief update (Section 5.1) treats each noisy label as providing new independent evidence for RM state transitions. However, as noted by Li, Z. Chen, Klassen, et al. (2024), when agents revisit the same state, this causes belief overestimation: noisy labels from the same state reflect the same underlying reality, yet the update rule treats them as independent samples, causing belief to spuriously accumulate.
EXAMPLE 14. Consider extending the history and trace from Example 11 with three additional visits to the same state:
Computing the RM state belief evolution using Definition 5.1, we have:
- Step . The agent starts in environment state . We compute the initial belief using the noisy label . From Example 11:
- Step . The label is , where , , . From Example 11:
18:36 • Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo
- Step . The agent remains at and observes the same noisy label. As such, the resulting belief is:
- Step . The agent remains at again. The same noisy label yields:
Despite receiving no new information (the agent remained in the same state), belief in increased from 0.6513 to 0.9573 due to treating temporally correlated labels as independent.
Li, Z. Chen, Klassen, et al. (2024) address this by training a recurrent neural network to model temporal dependencies in noisy labels. However, their approach requires access to perfect labels during training, limiting applicability to fully noisy settings. Despite not explicitly addressing this limitation, our experiments show minimal practical impact.
9.2 Overgeneralisation from Temporally Dependent Propositions
A second limitation arises when propositions exhibit temporal dependencies. In these cases, the learned RM may be valid with respect to all observed traces (Section 2.2) yet fail to capture causally necessary propositions, causing overgeneralisation.
EXAMPLE 15. Consider a modified COFFEE (Example 1) where the office (o) can only be reached after having been in the coffee location (🍎) first. PROB-IRM, like methods learning minimal RMs (e.g., Furelos-Blanco, Law, Jonsson, et al. 2021; Xu et al. 2020), would learn an RM containing only the office transition, omitting coffee entirely despite it being necessary. The learned RM accepts all observed traces but overgeneralises to traces the environment cannot produce.
Interestingly, noisy detections may inadvertently help by breaking strict temporal dependencies between propositions. However, a more principled solution requires generating negative examples: traces that would be accepted by the candidate RM but cannot occur in the environment. H. Hasanbeig et al. (2024) generate such examples up to a tunable length , repeating learning until no negative examples remain. A similar strategy could extend our approach, though selecting an appropriate is task-dependent and non-trivial. A more general solution may require explicit causal modelling of proposition dependencies, which we leave for future work.
9.3 Convergence and Cyclic Relearning
Our approach builds upon ISA (Furelos-Blanco, Law, Jonsson, et al. 2021), which provably converges to a target RM in a finite number of steps (Theorem 7.1). However, a key difference distinguishes our method: while ISA uses unweighted examples that must all be satisfied, PROB-IRM uses weighted examples with finite penalties. This allows the learner to trade off example coverage against RM complexity, but introduces a potential failure mode: previously covered examples can become uncovered by subsequent RMs. We demonstrate that this can cause infinite cyclic relearning, even in the noiseless setting.
Figure 21 illustrates a simplified OFFICEWORLD task where the agent must visit either A or B, moving only left or right. We set the ILASP example penalty sum (Section 7.4.7) to 10 and the cost of a rule representing an edge to 6. For simplicity, we assume the agent alternates between the actions left and right across episodes. We show that PROB-IRM cycles indefinitely between (Figure 21c) and (Figure 21d):
(1) Initially, the agent goes left, reaches A, and terminates. The following WCDPI is formed:
Robust Reward Machine Learning and Execution in Noisy Environments • 18:37

(a) Domain

(b) Perfect RM

(c) Learned

(d) Learned
Fig. 21. Simplified OFFICEWORLD task (Visit A or B) demonstrating cyclic relearning. The perfect RM accepts both propositions, but PROB-IRM alternates between (accepts only A) and (accepts only B) when the edge cost exceeds the example penalty.
The example has penalty 10. Recall that penalties are proportional to the relative frequency of the example. ILASP learns from this example.
(2) The agent goes right, reaches , and terminates. The learning task now contains two examples, each with penalty 5:
and
The perfect RM (accepting both) would require adding an edge (cost 6), while ignoring ex2 costs only 5. Since already satisfies this constraint, it is retained. Note that would be equally optimal, but RMs are only updated when the new candidate achieves a strictly better score.
(3) The agent goes left, reaches , and terminates. The current RM () captures the trace, so no relearning occurs.
(4) The agent goes right, reaches , and terminates. Another trace for ex2 is produced and its penalty (7) grows large enough that ignoring it becomes costlier than adding an edge. ILASP then learns .
(5) Subsequently, the agent alternates between producing ex1 and ex2, with class rebalancing causing penalties to oscillate and triggering cyclic relearning as shown in Table 4.
This cycling behaviour is a direct consequence of using finite penalty budgets. With an infinite penalty budget, all examples would carry infinite weight, requiring complete coverage and reducing PROB-IRM to ISA, which provably converges (Furelos-Blanco, Law, Jonsson, et al. 2021). The finite penalty budget enables trading off RM complexity against example coverage, but introduces the possibility of cyclic relearning.
Although infinite cycling is theoretically possible, it is unlikely in practice for several reasons. Even under a policy and hyperparameter configuration specifically designed to produce traces contradicting the current RM, an exponentially increasing number of traces is required to induce a meaningful shift in WCDPI penalties. Moreover, trained RL policies tend to exploit narrow trajectory distributions in later training stages, further reducing trace diversity and stabilising example distributions.
18:38 • Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo
Table 4. Example penalties and examples required for RM learning iterations in the cycling scenario. Column “Additional traces needed to trigger relearning” captures the number of new traces collected between iterations and ; is a variable representing the number of ex2-generating traces at iteration .
| # | RM learned | Penalty of ex1 | Penalty of ex2 | Number of traces generating ex1 | Number of traces generating ex2 | Additional traces needed to trigger relearning |
|---|---|---|---|---|---|---|
| 1 | — | 1 | 0 | 1 | ||
| 2 | 1 | 2 | 2 | |||
| 3 | 3 | 2 | 2 | |||
| 4 | 3 | 4 | 2 | |||
| 5 | 5 | 4 | 2 | |||
| 6 | 5 | 7 | 3 | |||
| ⋮ | ||||||
| 10 | 15 | 19 | 7 | |||
| ⋮ | ||||||
| 100 | 4 | 6 | ||||
| ⋮ | ||||||
| 1000 | 4 | 6 | ||||
| ⋮ | ||||||
| 6 | 4 | |||||
| 4 | 6 |
a Depends on the value at the previous row.
10 Conclusions and Future Work
We present PROB-IRM, a method for learning and exploiting reward machines from noisy labels. Our core contributions are: (1) a mechanism for learning RMs from noisy traces using weighted examples; (2) an algorithm interleaving RM and policy learning; and (3) a comprehensive evaluation on discrete and continuous domains.
PROB-IRM outperforms recurrent baselines and achieves performance comparable to handcrafted RMs. Key challenges addressed include: specifying the learning task (balancing RM complexity against trace coverage via weighted examples), generating training examples (sampling from noisy traces and previous RMs), and determining when to trigger relearning (via RM error thresholding). Compared to our previous work (Parac et al. 2024), we introduce the complete ILASP encoding, integrate with PPO, add example generation from previous RMs, extend to continuous domains, and significantly expand the evaluation.
This work opens several promising research directions:
-
Hierarchical and First-Order RMs. Extending to RM hierarchies (Furelos-Blanco, Law, Jonsson, et al. 2023) and first-order RMs (Ardon, Furelos-Blanco, Paraç, et al. 2025) could improve scalability and expressiveness.
-
Human-AI Collaboration. Learned RMs could facilitate understanding human strategies and interpreting AI intentions. Collecting sufficient human interaction traces for RM learning is challenging, making methods that can learn from limited human data particularly valuable for enabling practical human-AI collaboration systems.
Robust Reward Machine Learning and Execution in Noisy Environments • 18:39
- Instruction Following. Recent work trains policies to generalise across instructions given as finite-state machines (Furelos-Blanco, Pert, et al. 2026; Yalcinkaya et al. 2023, 2024) or linear temporal logic (Jackermeier and Abate 2025; León et al. 2022; Qiu et al. 2023; Vaezipoor et al. 2021). Our mechanisms (RM state beliefs, probabilistic reward shaping, and noise-aware learning) could enable instruction following under noisy labels, allowing deployment on complex benchmarks such as CALVIN (Mees et al. 2022) with realistic sensor noise.
- Labelling Function Learning. Our work assumes the labelling function is given or pre-trained with a known proposition alphabet. Recent work learns the labelling function itself through environment interaction (Umili et al. 2024). Interleaving RM learning with labelling function learning is a key direction for future work.
Acknowledgments
Research was sponsored by the Army Research Laboratory and was accomplished under Cooperative Agreement Number W911NF-222-0243. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the Army Research Laboratory or the U.S. Government. The U.S. Government is authorised to reproduce and distribute reprints for Government purposes notwithstanding any copyright notation herein.
Roko Parac is supported by the UKRI Centre for Doctoral Training in Safe and Trusted AI (EPSRC Project EP/S023356/1). We thank Julian de Gortari Briseno for his help with the noisy sensor model and Andrew Li for helpful advice about his work.
References
D. Angluin. 1987. "Learning regular sets from queries and counterexamples." Information and Computation, 75, 2, 87–106. L. Ardon, D. Furelos-Blanco, R. Parać, and A. Russo. 2025. "FORM: Learning Expressive and Transferable First-Order Logic Reward Machines." In: International Conference on Autonomous Agents and Multiagent Systems (AAMAS). L. Ardon, D. Furelos-Blanco, and A. Russo. 2024. "Learning Reward Machines in Cooperative Multi-Agent Tasks." In: Autonomous Agents and Multiagent Systems. Best and Visionary Papers: AAMAS 2023 Workshops, Revised Selected Papers, 43–59. A. Camacho, O. Chen, S. Sanner, and S. A. McIlraith. 2017. "Non-Markovian Rewards Expressed in LTL: Guiding Search Via Reward Shaping." In: International Symposium on Combinatorial Search (SOCS). A. Camacho, R. Toro Icarte, T. Q. Klassen, R. A. Valenzano, and S. A. McIlraith. 2019. "LTL and Beyond: Formal Languages for Reward Function Specification in Reinforcement Learning." In: International Joint Conference on Artificial Intelligence (IJCAI). P. J. K. Christoffersen, A. C. Li, R. Toro Icarte, and S. A. McIlraith. 2020. "Learning Symbolic Representations for Reinforcement Learning of Non-Markovian Behavior." In: Knowledge Representation and Reasoning Meets Machine Learning Workshop (KR2ML) at the Annual Conference on Neural Information Processing Systems (NeurIPS). J. Corazza, I. Gavran, and D. Neider. 2022. "Reinforcement Learning with Stochastic Reward Machines." In: AAAI Conference on Artificial Intelligence (AAAI). D. Cunningham, F. Cipcigan, R. N. B. Ferreira, and J. Booth. 2023. "Symbolic Learning for Material Discovery." In: AI for Accelerated Materials Discovery Workshop (AI4Mat) at the Annual Conference on Neural Information Processing Systems (NeurIPS). D. Cunningham, M. Law, J. Lobo, and A. Russo. 2023. "FFNSL: Feed-Forward Neural-Symbolic Learner." Machine Learning, 112, 2, 515–569. D. Cunningham, M. Law, J. Lobo, and A. Russo. 2024. "The Role of Foundation Models in Neuro-Symbolic Learning and Reasoning." In: International Conference on Neurosymbolic Learning and Reasoning (NeSy). X. Ding, S. L. Smith, C. Belta, and D. Rus. 2011. "LTL Control in Uncertain Environments with Probabilistic Satisfaction Guarantees." IFAC Proceedings Volumes, 44, 1, 3515–3520. T. Dohmen, N. Topper, G. K. Atia, A. Beckus, A. Trivedi, and A. Velasquez. 2022. "Inferring Probabilistic Reward Machines from Non-Markovian Reward Signals for Reinforcement Learning." In: International Conference on Automated Planning and Scheduling (ICAPS). T. Dreossi, A. Dovier, A. Formisano, M. Law, A. Manzato, A. Russo, and M. Tait. 2024. "Towards Explainable Weather Forecasting through FastLAS." In: International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR). G. Dulac-Arnold, N. Levine, D. J. Mankowitz, J. Li, C. Paduraru, S. Gowal, and T. Hester. 2021. "Challenges of real-world reinforcement learning: definitions, benchmarks and analysis." Machine Learning, 110, 9, 2419–2468.
18:40 • Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo
A. Eck, L. Soh, S. Devlin, and D. Kudenko. 2013. "Potential-Based Reward Shaping for POMDPs." In: International Conference on Autonomous Agents and Multi-Agent Systems (AAMAS).
J. Fu and U. Topcu. 2014. "Probably Approximately Correct MDP Learning and Control With Temporal Logic Constraints." In: Robotics: Science and Systems Conference (RSS).
D. Furelos-Blanco, M. Law, A. Jonsson, K. Broda, and A. Russo. 2023. "Hierarchies of Reward Machines." In: International Conference on Machine Learning (ICML).
D. Furelos-Blanco, M. Law, A. Jonsson, K. Broda, and A. Russo. 2021. "Induction and Exploitation of Subgoal Automata for Reinforcement Learning." Journal of Artificial Intelligence Research, 70, 1031–1116.
D. Furelos-Blanco, M. Law, A. Russo, K. Broda, and A. Jonsson. 2020. "Induction of Subgoal Automata for Reinforcement Learning." In: AAAI Conference on Artificial Intelligence (AAAI).
D. Furelos-Blanco, C. Pert, F. Kelbel, A. F. Spies, A. Russo, and M. Dennis. 2026. "Beyond Fixed Tasks: Unsupervised Environment Design for Task-Level Pairs." In: AAAI Conference on Artificial Intelligence (AAAI).
M. Gaon and R. I. Brafman. 2020. "Reinforcement Learning with Non-Markovian Rewards." In: AAAI Conference on Artificial Intelligence (AAAI).
M. Ghasemi, E. Bulgur, and U. Topcu. 2020. "Task-Oriented Active Perception and Planning in Environments with Partially Known Semantics." In: International Conference on Machine Learning (ICML).
H. Hasanbeig, N. Y. Jeppu, A. Abate, T. Melham, and D. Kroening. 2024. "Symbolic task inference in deep reinforcement learning." Journal of Artificial Intelligence Research, 80, 1099–1137.
M. Hasanbeig, N. Y. Jeppu, A. Abate, T. Melham, and D. Kroening. 2021. "DeepSynth: Automata Synthesis for Automatic Task Segmentation in Deep Reinforcement Learning." In: AAAI Conference on Artificial Intelligence (AAAI).
M. Hasanbeig, Y. Kantaros, A. Abate, D. Kroening, G. J. Pappas, and I. Lee. 2019. "Reinforcement Learning for Temporal Logic Control Synthesis with Probabilistic Satisfaction Guarantees." In: Conference on Decision and Control (CDC).
C. Huang, Y. Li, C. C. Loy, and X. Tang. 2016. "Learning Deep Representation for Imbalanced Classification." In: IEEE Conference on Computer Vision and Pattern Recognition (CVPR).
M. Jackermeier and A. Abate. 2025. "DeepLTL: Learning to Efficiently Satisfy Complex LTL Specifications for Multi-Task RL." In: International Conference on Learning Representations (ICLR).
A. Karpathy. 2015. REINFORCEjs: WaterWorld demo. (2015). http://cs.stanford.edu/people/karpathy/reinforcejs/waterworld.html.
E. Klement, R. Mesiar, and E. Pap. 2000. Triangular Norms. Trends in Logic. Vol. 8. Springer.
M. Law, A. Russo, and K. Broda. 2018. "Inductive Learning of Answer Set Programs from Noisy Examples." Advances in Cognitive Systems, 7, 57–76.
M. Law, A. Russo, and K. Broda. 2020. "The ILASP system for Inductive Learning of Answer Set Programs." arXiv preprint, arXiv:2005.00904.
M. Law, A. Russo, and K. Broda. 2015. The ILASP System for Learning Answer Set Programs. (2015). https://www.ilasp.com.
B. G. León, M. Shanahan, and F. Belardinelli. 2022. "In a Nutshell, the Human Asked for This: Latent Goals for Following Temporal Specifications." In: International Conference on Learning Representations (ICLR).
A. C. Li, T. Q. Klassen, A. Wang, P. A. Alamdari, and S. A. McIlraith. 2025. "Ground-Compose-Reinforce: Tasking Reinforcement Learning Agents through Formal Language." In: Annual Conference on Neural Information Processing Systems (NeurIPS).
A. C. Li, Z. Chen, T. Q. Klassen, P. Vaezipoor, R. Toro Icarte, and S. A. McIlraith. 2024. "Reward Machines for Deep RL in Noisy and Uncertain Environments." In: Annual Conference on Neural Information Processing Systems (NeurIPS).
A. C. Li, Z. Chen, P. Vaezipoor, T. Q. Klassen, R. Toro Icarte, and S. A. McIlraith. 2022. "Noisy Symbolic Abstractions for Deep RL: A Case Study with Reward Machines." In: Deep Reinforcement Learning Workshop at the Annual Conference on Neural Information Processing Systems (NeurIPS).
E. Liang, R. Liaw, R. Nishihara, P. Moritz, R. Fox, K. Goldberg, J. Gonzalez, M. Jordan, and I. Stoica. 2018. "RLlib: Abstractions for Distributed Reinforcement Learning." In: International Conference on Machine Learning (ICML).
V. Lifschitz. 2019. Answer Set Programming. Vol. 3. Springer.
T. P. Lillicrap, J. J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra. 2016. "Continuous Control with Deep Reinforcement Learning." In: International Conference on Learning Representations (ICLR).
O. Mees, L. Hermann, E. Rosete-Beas, and W. Burgard. 2022. "Calvin: A benchmark for language-conditioned policy learning for long-horizon robot manipulation tasks." IEEE Robotics and Automation Letters, 7, 3, 7327–7334.
S. Muggleton. 1991. "Inductive logic programming." New Generation Computing, 8, 295–318.
A. Y. Ng, D. Harada, and S. Russell. 1999. "Policy Invariance Under Reward Transformations: Theory and Application to Reward Shaping." In: International Conference on Machine Learning (ICML).
L. Nodari. 2023. "Adversarial Attacks to Reward Machine-based Reinforcement Learning." Master's thesis. Università degli Studi di Brescia.
L. Ouyang et al.. 2022. "Training language models to follow instructions with human feedback." In: Annual Conference on Neural Information Processing Systems (NeurIPS).
18:41
R. Parac, L. Nodari, L. Ardon, D. Furelos-Blanco, F. Cerutti, and A. Russo. 2024. "Learning Robust Reward Machines from Noisy Labels." In: International Conference on Principles of Knowledge Representation and Reasoning (KR).
W. Qiu, W. Mao, and H. Zhu. 2023. "Instructing Goal-Conditioned Reinforcement Learning Agents with Temporal Logic Objectives." In: Annual Conference on Neural Information Processing Systems (NeurIPS).
A. Raffin, A. Hill, A. Gleave, A. Kanervisto, M. Ernestus, and N. Dormann. 2021. "Stable-Baselines3: Reliable Reinforcement Learning Implementations." Journal of Machine Learning Research, 22, 268, 1–8.
J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov. 2017. "Proximal Policy Optimization Algorithms." arXiv preprint, arXiv:1707.06347.
D. Silver et al. 2016. "Mastering the game of Go with deep neural networks and tree search." Nature, 529, 7587, 484–489.
R. S. Sutton and A. G. Barto. 2018. Reinforcement Learning: An Introduction. MIT Press.
R. Toro Icarte, T. Q. Klassen, R. Valenzano, M. P. Castro, E. Waldie, and S. A. McIlraith. 2023. "Learning reward machines: A study in partially observable reinforcement learning." Artificial Intelligence, 323, 103989.
R. Toro Icarte, T. Q. Klassen, R. A. Valenzano, and S. A. McIlraith. 2022. "Reward Machines: Exploiting Reward Function Structure in Reinforcement Learning." Journal of Artificial Intelligence Research, 73, 173–208.
R. Toro Icarte, T. Q. Klassen, R. A. Valenzano, and S. A. McIlraith. 2018. "Using Reward Machines for High-Level Task Specification and Decomposition in Reinforcement Learning." In: International Conference on Machine Learning (ICML).
R. Toro Icarte, E. Waldie, T. Q. Klassen, R. A. Valenzano, M. P. Castro, and S. A. McIlraith. 2019. "Learning Reward Machines for Partially Observable Reinforcement Learning." In: Annual Conference on Neural Information Processing Systems (NeurIPS).
E. Umili, F. Argenziano, and R. Capobianco. 2024. "Neural Reward Machines." In: European Conference on Artificial Intelligence (ECAI).
P. Vaezipoor, A. C. Li, R. Toro Icarte, and S. A. McIlraith. 2021. "LTL2Action: Generalizing LTL Instructions for Multi-Task RL." In: International Conference on Machine Learning (ICML).
C. K. Verginis, C. Köprülü, S. Chinchali, and U. Topcu. 2024. "Joint Learning of Reward Machines and Policies in Environments with Partially Known Semantics." Artificial Intelligence, 333, 104146.
C. J. C. H. Watkins and P. Dayan. 1992. "Q-learning." Machine Learning, 8, 3, 279–292.
Z. Xu, I. Gavran, Y. Ahmad, R. Majumdar, D. Neider, U. Topcu, and B. Wu. 2020. "Joint Inference of Reward Machines and Policies for Reinforcement Learning." In: International Conference on Automated Planning and Scheduling (ICAPS).
B. Yalcinkaya, N. Lauffer, M. Vazquez-Chanlatte, and S. Seshia. 2023. "Automata Conditioned Reinforcement Learning with Experience Replay." In: Goal-Conditioned Reinforcement Learning Workshop (GCRL) at the Annual Conference on Neural Information Processing Systems (NeurIPS).
B. Yalcinkaya, N. Lauffer, M. Vazquez-Chanlatte, and S. Seshia. 2024. "Compositional Automata Embeddings for Goal-Conditioned Reinforcement Learning." In: Annual Conference on Neural Information Processing Systems (NeurIPS).
C. Yu, A. Velu, E. Vinitsky, J. Gao, Y. Wang, A. M. Bayen, and Y. Wu. 2022. "The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games." In: Annual Conference on Neural Information Processing Systems (NeurIPS).
A Notation
Table 5 contains the notation used throughout the paper.
Table 5. Summary of mathematical notation.
| Symbol | Description |
|---|---|
| Reinforcement Learning and (Noisy) Labelled MDPs (Sections 2.1 and 3) | |
| Set of MDP states | |
| Initial MDP state | |
| Set of actions | |
| State-action history | |
| Probability transition function | |
| Reward function | |
| Termination function | |
| Terminal history indicator | |
| Goal history indicator | |
| Discount factor | |
| Policy | |
| Set of propositions | |
Continued on next page...
18:42
Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo
Table 5 – continued
| Symbol | Description |
|---|---|
| A single proposition | |
| Noisy detection for proposition | |
| Label (a subset of propositions) | |
| Perfect labelling function | |
| Noisy labelling function | |
| Set of propositions detected by a noisy labelling function | |
| Label trace | |
| Noisy label trace | |
| Probability of observing proposition on transition | |
| Reward Machines (Section 2.2) | |
| Reward machine | |
| Set of RM states | |
| Initial RM state | |
| Accepting RM state | |
| Rejecting RM state | |
| RM state-transition function | |
| RM reward-transition function | |
| Inductive Learning of Answer Set Programs (Section 2.3) | |
| Background knowledge of LAS task | |
| Hypothesis space of a LAS task | |
| Set of WCDPI examples of a LAS task | |
| Identifier of a WCDPI example | |
| Penalty of a WCDPI example | |
| Partial interpretation of a WCDPI example | |
| Context of a WCDPI example | |
| Hypothesis (i.e., inductive solution of a LAS task) | |
| Prob-IRM (Sections 4 to 6) | |
| Grounded trace (obtained by sampling from the noisy trace) | |
| Number of grounded traces sampled from a noisy trace | |
| Logical transition function | |
| Negation of the logical transition function | |
| Maximum set of states available to learn an RM | |
| Maximum number of edges from one state to another | |
| Class-based weight multiplier for WCDPIs, inversely proportional to class frequency | |
| Trace origin multiplier | |
| Minimum WCDPI penalty | |
| RM state belief | |
| Reward over RM state beliefs | |
| RM relearning threshold | |
B Proof of Proposition 5.3
Recall from Definition 5.2 that the reward over RM state beliefs is:
18:43
where, under Assumption 3, the deterministic reward-transition function is:
The proof proceeds in three steps: first we expand the reward function using the deterministic reward structure, then we analyse how beliefs update for the accepting and rejecting states, and finally we combine these results to express the reward as a difference of belief updates.
Step 1: Expanding the Reward Function. We substitute into . Since the reward is non-zero only when and , we can restrict the summation:
Substituting the specific values and into their respective indicator functions:
(7)
Step 2: Belief Updates for Terminal States. We now analyse how the belief in the accepting state evolves. From the belief update equation in Definition 5.1:
For the accepting state , we partition the summation over into three disjoint cases: non-terminal states, the accepting state itself, and the rejecting state:
18:44
Parac, Nodari, Furelos-Blanco, Ardon, Cerutti & Russo
The second term simplifies as follows:
where the second-to-last step uses the fact that for all , and the last step uses .
Substituting this back into Equation (8) and rearranging:
By analogous reasoning for the rejecting state :
Step 3: Final Substitution. Comparing Equation (7) with Equations (9) and (10), we see that the two summations in the expression are exactly the belief differences. Therefore:
which completes the proof.
Received 15 April 2026; accepted 01 June 2026