new approaches to dfa learning

23
New Approaches to DFA New Approaches to DFA learning learning Cristina Bibire Cristina Bibire Research Group on Mathematical Linguistics, Research Group on Mathematical Linguistics, Rovira i Virgili University Rovira i Virgili University Pl. Imperial Tarraco 1, 43005, Tarragona, Pl. Imperial Tarraco 1, 43005, Tarragona, Spain Spain E-mail: [email protected] E-mail: [email protected]

Upload: howe

Post on 11-Jan-2016

45 views

Category:

Documents


2 download

DESCRIPTION

New Approaches to DFA learning. Cristina Bibire Research Group on Mathematical Linguistics, Rovira i Virgili University Pl. Imperial Tarraco 1, 43005, Tarragona, Spain E-mail: [email protected]. Introduction Learning from queries Learning from corrections - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: New Approaches to DFA learning

New Approaches to DFA New Approaches to DFA learninglearning

Cristina BibireCristina BibireResearch Group on Mathematical Linguistics, Rovira i Research Group on Mathematical Linguistics, Rovira i

Virgili UniversityVirgili University Pl. Imperial Tarraco 1, 43005, Tarragona, SpainPl. Imperial Tarraco 1, 43005, Tarragona, Spain

E-mail: [email protected]: [email protected]

Page 2: New Approaches to DFA learning

Introduction

Learning from queries

Learning from corrections

Learning from examples

Incremental algorithm

Further Research

Page 3: New Approaches to DFA learning

IntroductionIntroductionThis research is focused on learning DFA within two important frameworks: learning from queries and learning from examples:

• Angluin's query learning algorithm• learning from corrections algorithm - correction queries are replacing membership queries (it is possible to learn DFA from corrections and that the number of queries are reduced considerably).

• a comprehensive study of the most important state merging strategies developed so far • new incremental learning algorithm which allow us to learn new information from additional data that may later become available. (incremental learning is possible in the presence of a characteristic sample.)

Page 4: New Approaches to DFA learning

Learning from Learning from queriesqueriesLearning from queries was introduced by Dana Angluin in 1987.

She was the first who proved learnability of DFA via 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.

Page 5: New Approaches to DFA learning

Learning from corrections 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.

Page 6: New Approaches to DFA learning

Learning from corrections 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.

Page 7: New Approaches to DFA learning

Learning from corrections 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 .

*

the minimum string of the set , if

, otherwise.

L LC

L L

0 , , , ,L L q q q F

0, , , ,A Q q F L

Page 8: New Approaches to DFA learning

Learning from corrections Learning from corrections Closed, consistent observation tables

An observation table is called closed if

An observation table is called consistent if

* \ s.t.t S S s S row t row s

1 2 1 2 1 2, s.t. . . ,s s S row s row s row s a row s a a

Page 9: New Approaches to DFA learning

For any , denotes the finite function from E to defined by

For any , denotes the finite function from E to {0,1} defined by

Learning from corrections Learning from corrections Closed, consistent observation tables

An observation table is called closed if

An observation table is called consistent if

* \ s.t.t S S s S row t row s

1 2 1 2 1 2, s.t. . . ,s s S row s row s row s a row s a a

s S S row s

*

: .row s e C s e

s S S row s

: .row s e T s e

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

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

Page 10: New Approaches to DFA learning

Learning from corrections Learning from corrections

Page 11: New Approaches to DFA learning

Learning from corrections Learning from corrections

Page 12: New Approaches to DFA learning

Learning from corrections Learning from corrections

Language descriptionLanguage description LL** LCALCAIIdd

AlphabAlphabetet

Linear transition Linear transition tabletable

Final Final statesstates

EQEQ MMQQ

EQEQ CQCQ

LL

11

{0,1}{0,1} (1,2,1,2,3,4,3,3,1,3)(1,2,1,2,3,4,3,3,1,3) {1}{1} 33 4444 22 88

LL

22

{0,1}{0,1} (1,2,0,3,3,0,2,1)(1,2,0,3,3,0,2,1) {0}{0} 22 1919 11 66

LL

33

{0,1}{0,1} (1,2,3,4,4,4,1,4,4,4)(1,2,3,4,4,4,1,4,4,4) {2,3}{2,3} 22 2323 22 1010

LL

44

{0,1,a,{0,1,a,b}b}

(1,2,2,2,2,3,2,2,2,2,(1,2,2,2,2,3,2,2,2,2,2,2,0,0,4,2,2,2,2,5,02,2,0,0,4,2,2,2,2,5,0,0,3,3),0,3,3)

{3,5}{3,5} 44 101088

22 4848

LL

55

{0,1}{0,1} (1,2,3,4,5,6,7,8,9,1(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0)0,11,12,13,14,15,0)

{1,2,4,{1,2,4,8}8}

33 2424 33 88

LL

66

{0,1}{0,1} (1,2,3,2,2,2,4,2,5,2,(1,2,3,2,2,2,4,2,5,2,1,2)1,2)

{5}{5} 33 6565 11 77

Comparative results for different languages using L* and LCA

Page 13: New Approaches to DFA learning

Learning from corrections Learning from corrections

Language descriptionLanguage description LL** LCALCAIIdd

AlphabAlphabetet

Linear transition Linear transition tabletable

Final Final statesstates

EQEQ MMQQ

EQEQ CQCQ

LL

11

{0,1}{0,1} (1,2,1,2,3,4,3,3,1,3)(1,2,1,2,3,4,3,3,1,3) {1}{1} 33 4444 22 88

LL

22

{0,1}{0,1} (1,2,0,3,3,0,2,1)(1,2,0,3,3,0,2,1) {0}{0} 22 1919 11 66

LL

33

{0,1}{0,1} (1,2,3,4,4,4,1,4,4,4)(1,2,3,4,4,4,1,4,4,4) {2,3}{2,3} 22 2323 22 1010

LL

44

{0,1,a,{0,1,a,b}b}

(1,2,2,2,2,3,2,2,2,2,(1,2,2,2,2,3,2,2,2,2,2,2,0,0,4,2,2,2,2,5,02,2,0,0,4,2,2,2,2,5,0,0,3,3),0,3,3)

{3,5}{3,5} 44 101088

22 4848

LL

55

{0,1}{0,1} (1,2,3,4,5,6,7,8,9,1(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0)0,11,12,13,14,15,0)

{1,2,4,{1,2,4,8}8}

33 2424 33 88

LL

66

{0,1}{0,1} (1,2,3,2,2,2,4,2,5,2,(1,2,3,2,2,2,4,2,5,2,1,2)1,2)

{5}{5} 33 6565 11 77

Comparative results for different languages using L* and LCA

Page 14: New Approaches to DFA learning

Learning from Learning from examplesexamples TB algorithm

Gold’s algorithm

RPNI

Traxbar

EDSM

W-EDSM

Blue-fringe

SAGE

Page 15: New Approaches to DFA learning

Incremental learning Incremental learning algorithmalgorithmAn incremental learning algorithm is introduced for learning new

information from additional data that may later become available.

The proposed algorithm is capable of incrementally learn new information without forgetting previously acquired knowledge and without requiring access to the original database.

Page 16: New Approaches to DFA learning

Incremental learning Incremental learning algorithmalgorithm

',0,1,100,110,10000 1001

1000,10010

S S

S

q0

1

q1

0

1

0

q3

q2

0

0

0

1

0

1

A

q0

1

q1

0

1

0

q3

q2

0

0

1

IA

Page 17: New Approaches to DFA learning

Incremental learning Incremental learning algorithmalgorithmThere are a lot of questions to be answered:

does it produce the target DFA? does it improve on the running time? is it useful on real life applications? what are the conditions to fulfil in order to work properly? etc.

Page 18: New Approaches to DFA learning

Incremental learning Incremental learning algorithmalgorithmThere are a lot of questions to be answered:

does it produce the target DFA? does it improve on the running time? is it useful on real life applications? what are the conditions to fulfil in order to work properly? etc.

We denote by:

= the set of all automata having the alphabetA

* *Alg : A

*IA : A A

Page 19: New Approaches to DFA learning

Incremental learning Incremental learning algorithmalgorithmThere are a lot of questions to be answered:

does it produce the target DFA? does it improve on the running time? is it useful on real life applications? what are the conditions to fulfil in order to work properly? etc.

We denote by:

= the set of all automata having the alphabetA

* *Alg : A

*IA : A A

' 'Alg S S ,S IA Alg S ,S ,S

Page 20: New Approaches to DFA learning

Incremental learning Incremental learning algorithmalgorithm

' 'Alg S S ,S IA Alg S ,S ,S

Lemma 1 It is not always true that:

Lemma 2 It is not always true that:

L Alg S ,S L Alg S S ,S

Lemma 3 It is not always true that:

'L Alg S ,S L Alg S ,S S

Page 21: New Approaches to DFA learning

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 on Further Research on LCALCA

consistentAng consistentLCA

closedAng closedLCA

Page 22: New Approaches to DFA learning

Further Research Further Research on IAon IAo To determine the complexity of the algorithm and to test it on

large/sparse data

o To determine how much time and resources we save using this algorithm instead of the classical ones

o To design an algorithm to deal with new introduced negative samples

o To find the answer to the question: when is the automaton created with this method weakly equivalent with the one obtained with the entire sample?

o To improve the software in order to be able to deal with new samples

Page 23: New Approaches to DFA learning