Learning Formal Specifications from Membership and Preference Queries
Ameesh Shah, Marcell Vazquez-Chanlatte, Sebastian Junges, Sanjit A. Seshia
TL;DR
This work advances the learning of formal task specifications by allowing a hybrid supervision signal that combines membership labels and pairwise preferences, formalized through Membership-respecting Preferences (MemReP). It introduces a concept-class-agnostic abstract algorithm and a cost-aware, contextual-bandit-based query strategy to efficiently identify the target specification, with a SAT-based DFA encoding to realize DFA learning from labeled examples and preferences. The framework is validated in two domains—DFA learning and monotone predicate families—demonstrating that preferences can substantially reduce labeling burden while maintaining robustness to noisy feedback. The results highlight a practical pathway for human-in-the-loop specification learning with provable termination guarantees under reasonable assumptions and scalable empirical performance.
Abstract
Active learning is a well-studied approach to learning formal specifications, such as automata. In this work, we extend active specification learning by proposing a novel framework that strategically requests a combination of membership labels and pair-wise preferences, a popular alternative to membership labels. The combination of pair-wise preferences and membership labels allows for a more flexible approach to active specification learning, which previously relied on membership labels only. We instantiate our framework in two different domains, demonstrating the generality of our approach. Our results suggest that learning from both modalities allows us to robustly and conveniently identify specifications via membership and preferences.
