Learning DFA from corrections Leonor Becerra-Bonache, Cristina Bibire, Adrian Horia Dediu Research Group on Mathematical Linguistics, Rovira i Virgili.

Slides:



Advertisements
Similar presentations
Properties of Regular Sets
Advertisements

Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Theory of Computing Lecture 23 MAS 714 Hartmut Klauck.
Characterization of state merging strategies which ensure identification in the limit from complete data Cristina Bibire.
CSE 311 Foundations of Computing I
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
Lecture 24 MAS 714 Hartmut Klauck
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Summary Showing regular Showing non-regular construct DFA, NFA
The Power of Correction Queries Cristina Bibire Research Group on Mathematical Linguistics, Rovira i Virgili University Pl. Imperial Tarraco 1, 43005,
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Formal Language, chapter 9, slide 1Copyright © 2007 by Adam Webber Chapter Nine: Advanced Topics in Regular Languages.
1 Polynomial Time Probabilistic Learning of a Subclass of Linear Languages with Queries Yasuhiro TAJIMA, Yoshiyuki KOTANI Tokyo Univ. of Agri. & Tech.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Finite Automata Great Theoretical Ideas In Computer Science Anupam Gupta Danny Sleator CS Fall 2010 Lecture 20Oct 28, 2010Carnegie Mellon University.
1 Introduction to Computability Theory Lecture4: Regular Expressions Prof. Amos Israeli.
Introduction to Computability Theory
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
1 Introduction to Computability Theory Lecture4: Non Regular Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture13: Mapping Reductions Prof. Amos Israeli.
Intro to DFAs Readings: Sipser 1.1 (pages 31-44) With basic background from Sipser 0.
CS5371 Theory of Computation
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
Reducibility A reduction is a way of converting one problem into another problem in such a way that a solution to the second problem can be used to solve.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
CSE115/ENGR160 Discrete Mathematics 03/03/11 Ming-Hsuan Yang UC Merced 1.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
15-859(B) Machine Learning Learning finite state environments Avrim Blum 03/29/07.
1 Introduction to Computability Theory Lecture4: Non Regular Languages Prof. Amos Israeli.
Exact Learning of Boolean Functions with Queries Lisa Hellerstein Polytechnic University Brooklyn, NY AMS Short Course on Statistical Learning Theory,
CHAPTER 4 Decidability Contents Decidable Languages
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Nondeterminism.
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
1 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY For next time: Read 2.1 & 2.2.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong DFA minimization.
CSE 311: Foundations of Computing Fall 2014 Lecture 23: State Minimization, NFAs.
Incremental Inference of Black Box Components to support Integration Testing [PhD paper] Muzammil Shahbaz France Telecom R&D Grenoble Institute of Technology.
Complexity and Computability Theory I Lecture #13 Instructor: Rina Zviel-Girshin Lea Epstein Yael Moses.
1 Unit 1: Automata Theory and Formal Languages Readings 1, 2.2, 2.3.
Theory of Computation, Feodor F. Dragan, Kent State University 1 Regular expressions: definition An algebraic equivalent to finite automata. We can build.
Introduction to CS Theory Lecture 3 – Regular Languages Piotr Faliszewski
Learning Automata and Grammars Peter Černo.  The problem of learning or inferring automata and grammars has been studied for decades and has connections.
On Learning Regular Expressions and Patterns via Membership and Correction Queries Efim Kinber Sacred Heart University Fairfield, CT, USA.
Decidable Questions About Regular languages 1)Membership problem: “Given a specification of known type and a string w, is w in the language specified?”
Resource bounded dimension and learning Elvira Mayordomo, U. Zaragoza CIRM, 2009 Joint work with Ricard Gavaldà, María López-Valdés, and Vinodchandran.
CHAPTER 1 Regular Languages
Interactive proof systems Section 10.4 Giorgi Japaridze Theory of Computability.
Theory of Computation, Feodor F. Dragan, Kent State University 1 TheoryofComputation Spring, 2015 (Feodor F. Dragan) Department of Computer Science Kent.
Inferring Finite Automata from queries and counter-examples Eggert Jón Magnússon.
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
CS 203: Introduction to Formal Languages and Automata
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Learning regular tree languages from correction and equivalence queries Cătălin Ionuţ Tîrnăucă Research Group on Mathematical Linguistics, Rovira i Virgili.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
Finite Automata Great Theoretical Ideas In Computer Science Victor Adamchik Danny Sleator CS Spring 2010 Lecture 20Mar 30, 2010Carnegie Mellon.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Theory of Computation Automata Theory Dr. Ayman Srour.
Ch 2. The Probably Approximately Correct Model and the VC Theorem 2.3 The Computational Nature of Language Learning and Evolution, Partha Niyogi, 2004.
Copyright © Cengage Learning. All rights reserved.
Linear Bounded Automata LBAs
Hierarchy of languages
Nondeterministic Finite Automata
Chapter Nine: Advanced Topics in Regular Languages
Presentation transcript:

Learning DFA from corrections Leonor Becerra-Bonache, Cristina Bibire, Adrian Horia Dediu Research Group on Mathematical Linguistics, Rovira i Virgili University Pl. Imperial Tarraco 1, 43005, Tarragona, Spain Pl. Imperial Tarraco 1, 43005, Tarragona, Spain

Outline  Learning from queries  Learning from corrections  Comparative results  Concluding remarks  Further research  Bibliography

Learning from queries In the last four decades three important formal models have been developed within Computational Learning Theory: Gold's model of identification in the limit [4], the query learning model of Angluin [1,2] and the PAC learning model of Valiant [7]. Our paper is focused on learning DFA within the framework of query learning. Learning from queries was introduced by Dana Angluin in 1987 [1]. She gave an algorithm for learning DFA from membership and equivalence queries and she was the first who proved learnability of DFA via queries. Later, Rivest and Schapire in 1993 [6], Hellerstein et al. in 1995 [5] or Balcazar et al. in 1996 [3] developed more efficient versions of the same algorithm trying to increase the parallelism level, to reduce the number of equivalence queries, etc.

Learning from queries In query learning, there is a teacher that knows the language and has to answer correctly specific kind of queries asked by the learner. In Angluin’s algorithm, the learner asks two kinds of queries: membership query - consists of a string s; the answer is YES or NO depending on whether s is the member of the unknown language or not. equivalence query - is a conjecture, consisting of a description of a regular set U. The answer is YES if U is equal to the unknown language and is a string s in the symmetric difference of U and the unknown language otherwise.

Learning from corrections In Angluin's algorithm, when the learner asks about a word in the language, the teacher's answer is very simple, YES or NO.

Learning from corrections In Angluin's algorithm, when the learner asks about a word in the language, the teacher's answer is very simple, YES or NO. Our idea was to introduce a new type of query: correction query - it consists of a string s; the teacher has to return the smallest string s' such that s.s' belongs to the target language.

Learning from corrections In Angluin's algorithm, when the learner asks about a word in the language, the teacher's answer is very simple, YES or NO. Our idea was to introduce a new type of query: correction query - it consists of a string s; the teacher has to return the smallest string s' such that s.s' belongs to the target language. Formally, for a string, where is the left quotient of by : where is an automaton accepting.

Learning from corrections Observation table. An observation table consists of: a non-empty prefix-closed set S of strings, a non-empty suffix-closed set E of strings, and the restriction of the mapping C to the set.CES SΣ-S s e C(s.e)

For any, denotes the finite function from E to defined by Learning from corrections Closed, consistent observation tables An observation table is called closed if An observation table is called consistent if

Example: Learning from corrections λλa aλ aaλ aaaφ aaaaφ Is it closed? a aa a

Example: Learning from corrections λλa aλ aaλ aaaφ aaaaφ Is it closed? Yes a aa a

Example: Learning from corrections λλa aλ aaλ aaaφ aaaaφ Is it consistent? a aa a row(a)=row(aa)row(a.a)=row(aa.a)

Example: Learning from corrections λλa aλ aaλ aaaφ aaaaφ No Is it consistent? a aa a row(a)=row(aa)row(a.a)=row(aa.a)

Learning from corrections

Remark 1 C(α)=βγ implies C(αβ)=γ Remark 2 C(α)=φ implies C(αβ)=φ

Learning from corrections

Lemma Sketch of the proof: Remark 3:

Learning from corrections … To conclude we show that if t is the smallest string s.t. then.

Learning from corrections Lemma 4 Assume that (S,E,C) is a closed, consistent observation table. Suppose the automaton A(S,E,C) has n states. If is any automaton consistent with C that has n or fewer states then is isomorphic with A(S,E,C). Sketch of the proof: We define the function 1. is well defined 2. is bijective The proof of Theorem 1 follows, since Lemma 3 shows that A(S,E,C) is consistent with C, and Lemma 4 shows that any other automaton consistent with C is either isomorphic to A(S,E,C) or contains at least one more state. Thus, A(S,E,C) is the unique smallest automaton consistent with C.

Learning from corrections o Correctness If the teacher answers correctly then if LCA ever terminates it is clear that it outputs the target automaton o Termination Lemma 5. Let (S,E,C) be an observation table. Let n denote the number of different values of row(s) for s in S. Any automaton consistent with C must have at least n states. o Time analysis The total running time of LCA can be bounded by a polynomial in n and m.

Comparative results Language description L*L*L*L*LCAIdAlphabet Linear transition table Final states EQMQEQCQ L1L1L1L1{0,1}(1,2,1,2,3,4,3,3,1,3){1}34428 L2L2L2L2{0,1}(1,2,0,3,3,0,2,1){0}21916 L3L3L3L3{0,1}(1,2,3,4,4,4,1,4,4,4){2,3} L4L4L4L4{0,1,a,b} (1,2,2,2,2,3,2,2,2,2,2,2,0,0, 4,2,2,2,2,5,0,0,3,3) {3,5} L5L5L5L5{0,1} (1,2,3,4,5,6,7,8,9,10,11,12, 13,14,15,0) {1,2,4,8}32438 L6L6L6L6{0,1}(1,2,3,2,2,2,4,2,5,2,1,2){5}36517 Comparative results for different languages using L * and LCA

Comparative results Language description L*L*L*L*LCAIdAlphabet Linear transition table Final states EQMQEQCQ L1L1L1L1{0,1}(1,2,1,2,3,4,3,3,1,3){1}34428 L2L2L2L2{0,1}(1,2,0,3,3,0,2,1){0}21916 L3L3L3L3{0,1}(1,2,3,4,4,4,1,4,4,4){2,3} L4L4L4L4{0,1,a,b} (1,2,2,2,2,3,2,2,2,2,2,2,0,0, 4,2,2,2,2,5,0,0,3,3) {3,5} L5L5L5L5{0,1} (1,2,3,4,5,6,7,8,9,10,11,12, 13,14,15,0) {1,2,4,8}32438 L6L6L6L6{0,1}(1,2,3,2,2,2,4,2,5,2,1,2){5}36517 Comparative results for different languages using L * and LCA

o We have improved Angluin's query learning algorithm by replacing MQ with CQ. This approach allowed us to use a smaller number of queries and, in this way, the learning time is reduced. o One of the reasons of this reduction is that an answer to a CQ contains embedded much more information. o Another advantage of our approach is that we can differentiate better between states. o Among the improvements previously discussed, we would like to mention here the adequacy of CQ's in a real learning process. They reflect in a more accurate manner the process of children's language acquisition. We are aware that this kind of formalism is for an ideal teacher who knows everything and always gives the correct answers, which is an ideal situation. The learning of a natural language is an infinite process. Concluding remarks

o To prove that the number of CQs is always smaller than the number of MQs o To prove that the number of EQs is always less or equal o To prove the following conjectures: o To show that we have improved on the running time o CQs are more expensive than MQs. How much does this affect the total running time? Further research

[1] D. Angluin, Learning regular sets from queries and counterexamples. Information and Computation 75, 1987, [2] D. Angluin, Queries and concept learning. Machine Learning 2, 1988, [3] J. L. Balcázar, J. Díaz, R. Gavaldá, O. Watanabe, Algorithms for learning finite automata from queries: A unified view. Chapter in Advances in Algorithms, Languages and Complexity. Kluwer Academic Publishers, 1997, [4] E. M. Gold, Identification in the limit. Information and Control 10, 1967, [5] L. Hellerstein, K. Pillaipakkamnatt, V. Raghavan, D.Wilkins, How many queries are needed to learn? Proc. 27th Annual ACM Symposium on the Theory of Computing. ACM Press, 1995, [6] R. L. Rivest, R. E. Schapire, Inference of finite automata using homing sequences. Information and Computation 103(2), 1993, [7] L. G.Valiant, A theory of the learnable. Communication of the ACM 27, 1984, Bibliography