LLMs as Probabilistic Minimally Adequate Teachers for DFA Learning
Preprint
Abstract
The emergence of intelligence in large language models (LLMs) has inspired investigations into their integration into automata learning. This paper introduces the probabilistic Minimally Adequate Teacher (pMAT) formulation, which leverages a probabilistic oracle that could give persistent errors randomly during answering the membership queries for deterministic finite automata (DFA) learning. Given the tendency of LLMs to produce hallucinatory content, we have developed techniques to improve answer accuracy and ensure the correctness of the learned automata. We propose the $\mathtt{Discrimination}$ prompt as well as the $\mathtt{Verification}$ prompt and explore their advantages over common prompts. Additionally, we compare DFA learning performance between the TTT algorithm and common active learning algorithms. To address the exponential number of persistent errors, we implement a dynamic query cache refinement algorithm that identifies and corrects conflicting queries by combining the active and passive learning algorithms. The empirical results demonstrate the robustness and efficiency of our approach, providing a theoretical foundation for automata learning with LLMs in the loop.
Keywords
All Related Versions
This publication has 10 references indexed in Scilit:
- Using Large Language Models to Automate and Expedite Reinforcement Learning with Reward Machine2025
- The rise and potential of large language model based agents: a surveyScience China Information Sciences, 2025
- Mathematical discoveries from program search with large language modelsNature, 2023
- MathPrompter: Mathematical Reasoning using Large Language Models2023
- Reward Machines: Exploiting Reward Function Structure in Reinforcement LearningJournal of Artificial Intelligence Research, 2022
- Sequential Neural Networks as Automata2019
- The Open-Source LearnLib2015
- Learning regular languages using RFSAsTheoretical Computer Science, 2003
- Malicious Omissions and Errors in Answers to Membership QueriesMachine Learning, 1997
- IDENTIFYING REGULAR LANGUAGES IN POLYNOMIAL TIME1993