Learning DFAs from Positive Examples Only via Word Counting

Authors

  • Benjamin Bordais TU Dortmund University, Dortmund, Germany Center for Trustworthy Data Science and Security, University Alliance Ruhr, Dortmund, Germany Université Libre de Bruxelles, Belgium
  • Daniel Neider TU Dortmund University, Dortmund, Germany Center for Trustworthy Data Science and Security, University Alliance Ruhr, Dortmund, Germany

DOI:

https://doi.org/10.1609/aaai.v40i17.38433

Abstract

Learning finite automata from positive examples has recently gained attention as a powerful approach for understanding, explaining, analyzing, and verifying black-box systems. The motivation for focusing solely on positive examples arises from the practical limitation that we can only observe what a system is capable of (positive examples) but not what it cannot do (negative examples). Unlike the classical problem of passive DFA learning with both positive and negative examples, which has been known to be NP-complete since the 1970s, the topic of learning DFAs exclusively from positive examples remains poorly understood. This paper introduces a novel perspective on this problem by leveraging the concept of counting the number of accepted words up to a carefully determined length. Our contributions are twofold. First, we prove that computing the minimal number of words up to this length accepted by DFAs of a given size that accept all positive examples is NP-complete, establishing that learning from positive examples alone is computationally demanding. Second, we propose a new learning algorithm with a better asymptotic runtime than the best-known bound for existing algorithms. While our experimental evaluation reveals that this algorithm under-performs state-of-the-art methods, it demonstrates significant potential as a preprocessing step to enhance existing approaches.

Published

2026-03-14

How to Cite

Bordais, B., & Neider, D. (2026). Learning DFAs from Positive Examples Only via Word Counting. Proceedings of the AAAI Conference on Artificial Intelligence, 40(17), 14201–14208. https://doi.org/10.1609/aaai.v40i17.38433

Issue

Section

AAAI Technical Track on Constraint Satisfaction and Optimization