English

Learning Verified Monitors for Hidden Markov Models

Formal Languages and Automata Theory 2025-09-22 v3 Logic in Computer Science

Abstract

Runtime monitors assess whether a system is in an unsafe state based on a stream of observations. We study the problem where the system is subject to probabilistic uncertainty and described by a hidden Markov model. A stream of observations is then unsafe if the probability of being in an unsafe state is above a threshold. A correct monitor recognizes the set of unsafe observations. The key contribution of this paper is the first correct-by-construction synthesis method for such monitors, represented as finite automata. The contribution combines four ingredients: First, we establish the coNP-hardness of checking whether an automaton is a correct monitor, i.e., a monitor without misclassifications. Second, we provide a reduction that reformulates the search for misclassifications into a standard probabilistic system synthesis problem. Third, we integrate the verification routine into an active automata learning routine to synthesize correct monitors. Fourth, we provide a prototypical implementation that shows the feasibility and limitations of the approach on a series of benchmarks.

Keywords

Cite

@article{arxiv.2504.05963,
  title  = {Learning Verified Monitors for Hidden Markov Models},
  author = {Luko van der Maas and Sebastian Junges},
  journal= {arXiv preprint arXiv:2504.05963},
  year   = {2025}
}
R2 v1 2026-06-28T22:50:45.785Z