arXiv:2609.07461cs.LGSep 2026

Manuscript Offprint

arXiv:2609.07461

Temporal-Causal Inference for Reinforcement Learning via Automata Learning

Jan Corazza, Daniil Kaminskyi, Simon Lutz, Patrick Nossol, Hadi Partovi Aria, Zhe Xu, Daniel Neider

Jan Corazza¹, Daniil Kaminskyi¹, Simon Lutz¹, Patrick Nossol¹, Hadi Partovi Aria², Zhe Xu², Daniel Neider¹

Abstract— We consider reinforcement learning in environments with dynamics that undergo an irreversible phase transition governed by a hidden temporal pattern. The agent observes the base state but cannot observe the phase directly. We formalize this problem as a two-phase non-Markovian decision process and introduce Temporal-Causal Inference for Reinforcement Learning (TCIRL), a framework that jointly learns a control policy and infers the hidden temporal cause of the phase transition. TCIRL maintains a hypothesis deterministic finite automaton (DFA) to track what phase is active and refines it via counterexample-driven SAT-based synthesis. We prove that the hypothesis converges almost surely to a DFA recognizing the true cause language on all attainable label sequences, yielding an optimal policy for the original non-Markovian decision process. Experiments on a genetic therapy gridworld and a traffic signal environment show that TCIRL recovers the correct cause DFA and matches the full-information baseline in both domains.

I. INTRODUCTION

Reinforcement learning (RL) methods for control typically assume Markovian, fully observable dynamics [1]. In many systems, however, the transition dynamics depend on hidden temporal structure that the agent cannot observe directly. Such history-dependent dynamics give rise to non-Markovian decision processes (NMDPs), where the effect of an action depends on more than the current state [2], [3]. Two visits to the same state may therefore require different decisions because the governing dynamics depend on the trajectory that led there. Standard Markovian RL aliases these situations together, so a memoryless policy over the observed state need not be optimal in general [4]. The goal is to recover a compact finite memory of the past that restores Markovian dynamics in an augmented state space. Our running example is a medical treatment scenario in which a patient's symptoms respond stochastically to treatment, but the treatment efficacy depends on whether a specific sequence of genetic

modifications has been performed, a condition that is not directly observable from symptoms alone.

We study environments in which a hidden temporal cause governs the transition dynamics (Assumption 1). A hidden temporal logic formula φc\varphi_c specifies this cause: once the execution so far satisfies φc\varphi_c, the dynamics permanently switch from Phase 1 to Phase 2. The agent does not observe the phase directly. Instead, it receives stochastic signals correlated with the active phase, which provide only indirect evidence that the transition has occurred.

We illustrate this with a genetic therapy gridworld (Figure 1). The agent navigates a 5×55 \times 5 grid with four gene sites (G1G_1 to G4G_4) and a medicine cell (MM). The state includes a symptom level D∈{0,…,9}D \in \{0, \dots, 9\} and a harm level H∈{0,…,9}H \in \{0, \dots, 9\}. In Phase 1, the symptom level increases by 1 with probability 0.75, whereas in Phase 2, it decreases by 1 with probability 0.75. Otherwise, it remains unchanged.

Figure

Fig. 1: Genetic therapy gridworld. The agent navigates a 5×55 \times 5 grid with four gene sites G1G_1 to G4G_4 and a medicine cell MM. Site G3G_3 is a distractor and does not affect the cause. The state includes position, symptom level DD, and harm level HH.

Figure

Fig. 2: Symptom level during the final evaluation episode (after training). The TCIRL agent triggers the phase transition around step 20, after which the symptoms decline. Standard Q-learning remains in Phase 1. (IQM with 95% CI, 50 seeds.)

¹Research Center Trustworthy Data Science and Security, TU Dortmund University, Dortmund, 44227, Germany. {jan.corazza, daniil.kaminskyi, simon.lutz, patrick.nossol, daniel.neider} @tu-dortmund.de

²School for Engineering of Matter, Transport, and Energy at Arizona State University, Tempe, Az 85281, USA. {hpartovi, xzhel} @asu.edu

Accepted for publication in the Proceedings of the 65th IEEE Conference on Decision and Control (CDC), Honolulu, Hawaii, USA, December 2026.

© 2026 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.

Administering the medicine reduces the symptom level by 5, but it also resets harm to its maximum (this way, no continuous administering of medicine is possible due to harmful side effects). On every non-medicine step, harm decreases by 1 until it reaches 0. Applying medicine while the current harm level is positive terminates the episode, so treatment timing matters. The phase transition is triggered by visiting gene sites in the order G1,G2,G1,G4G_{1}, G_{2}, G_{1}, G_{4}.

Figure 2 shows that our method, Temporal-Causal Inference for Reinforcement Learning (TCIRL), learns the correct gene-site sequence to trigger Phase 2, after which the symptoms decline steadily. Standard Q-learning [5], which lacks memory for the required temporal pattern, remains in Phase 1.

Our approach maintains a hypothesis DFA H\mathcal{H} that models the temporal cause. Starting from a trivial one-state hypothesis which rejects every label sequence, the agent refines H\mathcal{H} over training by exploiting the stochastic evidence available in each episode. The method requires domain knowledge that specifies exclusive characteristics of each phase. We call these markers: in the genetic therapy example, a symptom increase can only occur in Phase 1, and a spontaneous recovery can only occur in Phase 2. After each episode, the agent checks whether the episode label sequence is inconsistent with its current hypothesis. If so, a Boolean satisfiability (SAT) solver synthesizes a new minimal DFA consistent with all prior observations.

The markers are stochastic: they need not fire on every episode, and individual observations may be ambiguous. However, we assume that they are phase-exclusive and that, for every wrong hypothesis, there exists some reachable episode whose markers expose the error (Assumption 2). Under this assumption, we prove that the hypothesis converges almost surely to the correct cause DFA (Theorem 1), and the agent converges to an optimal policy (Theorem 2).

We validate TCIRL on two domains with opposite causal effects, and compare its performance to a baseline with full access to the causal structure from the start. In genetic therapy, triggering the cause is beneficial (symptoms decline). In a traffic signal environment, triggering it is harmful (congestion increases). In both cases, TCIRL recovers the correct cause DFA and matches the full-information baseline.

To summarize, our work makes the following contributions:

  1. A two-phase NMDP formalization for environments with hidden temporal causes, and TCIRL, an algorithm that jointly learns a policy and infers a cause DFA via counterexample-driven SAT-based synthesis.

  2. Almost-sure convergence guarantees: the inferred hypothesis recovers the true cause language on all attainable label sequences (Theorem 1), and the policy converges to the optimal value of the NMDP (Theorem 2).

  3. Experimental validation on two control domains, a genetic therapy gridworld where triggering the cause is beneficial and a traffic signal environment where it is harmful, showing that TCIRL recovers the correct

cause DFA and matches the full-information baseline in both settings.

References (25)