Learning Deterministically Recognizable Tree Series — Revisited Andreas Maletti ✂ ✎✛✛☛✕ ♦ ✗ ✓ ✓✔✑ , 22 May 2007
00 Motivation Goal ✎ Given ✥ ✿ ❚ ✝ ✦ ❆ with ✭ ❆❀ ✰ ❀ ✁ ❀ ✵ ❀ ✶✮ semifield ✎ Learn finite representation (here: deterministic wta) of ✥ , if possible ✎ Access to ✥ is granted by a certain form of teacher (oracle) TU Dresden, 22 May 2007 Learning deterministic wta slide 2 of 26
00 Table of Contents Notation Weighted tree automaton Myhill-Nerode congruence Learning algorithm An example TU Dresden, 22 May 2007 Learning deterministic wta slide 3 of 26
01 Notation Trees ✎ ❚ ✝ : trees over ranked alphabet ✝ ✎ ❈ ✝ : contexts (trees with exactly one occurrence of ✄ ) over ✝ ✎ s✐③❡✭ t ✮ : number of nodes of a tree t Tree series ✎ tree series: mapping of type ❚ ✝ ✦ ❆ ✎ we write ✭ ✥❀ t ✮ for ✥ ✭ t ✮ with ✥ ✿ ❚ ✝ ✦ ❆ ✎ ❆ ❤ ❤ ❚ ✝ ✐ ✐ : set of all mappings of type ❚ ✝ ✦ ❆ TU Dresden, 22 May 2007 Learning deterministic wta slide 4 of 26
02 Table of Contents Notation Weighted tree automaton Myhill-Nerode congruence Learning algorithm An example TU Dresden, 22 May 2007 Learning deterministic wta slide 5 of 26
02 Syntax Definition (Borchardt and Vogler ’03) ✭ ◗❀ ✝ ❀ ❆ ❀ ✖❀ ❋ ✮ is a weighted tree automaton (wta) ✎ ◗ is a finite nonempty set (states) ✎ ✝ is a ranked alphabet (of input symbols) ✎ ❆ ❂ ✭ ❆❀ ✰ ❀ ✁ ❀ ✵ ❀ ✶✮ is a semifield (of weights) ✎ ✖ ❂ ✭ ✖ ❦ ✮ ❦ ✕ ✵ with ✖ ❦ ✿ ✝ ✭ ❦ ✮ ✦ ❆ ◗ ❦ ✂ ◗ (called tree representation) ✎ ❋ ✒ ◗ (final states) Definition wta ✭ ◗❀ ✝ ❀ ❆ ❀ ✖❀ ❋ ✮ is deterministic if for every ✛ ✷ ✝ ✭ ❦ ✮ and ✇ ✷ ◗ ❦ there exists at most one q ✷ ◗ such that ✖ ❦ ✭ ✛ ✮ ✇❀q ✻ ❂ ✵ . TU Dresden, 22 May 2007 Learning deterministic wta slide 6 of 26
02 Example wta ◗ ❂ ❢ S ❀ VP ❀ NP ❀ NN ❀ ADJ ❀ VB ❣ and ❋ ❂ ❢ S ❣ Alice ✵ ✿ ✺ Bob ✵ ✿ ✺ loves ✵ ✿ ✺ hates ✵ ✿ ✺ ✦ NN ✦ NN ✦ VB ✦ VB ugly ✵ ✿ ✷✺ nice ✵ ✿ ✷✺ mean ✵ ✿ ✷✺ tall ✵ ✿ ✷✺ ✦ ADJ ✦ ADJ ✦ ADJ ✦ ADJ ✛ ✛ ✛ ✵ ✿ ✺ ✵ ✿ ✺ ✵ ✿ ✺ ✦ S ✦ S ✦ VP NN VP NP VP VB NN ✛ ✛ ✛ ✵ ✿ ✺ ✵ ✿ ✺ ✵ ✿ ✺ ✦ VP ✦ NP ✦ NP VB NP ADJ NN ADJ NP TU Dresden, 22 May 2007 Learning deterministic wta slide 7 of 26
02 Computation using wta Example ✛ ✛ ✛ mean ✵ ✿ ✷✺ ✦ ADJ mean Bob hates ✛ ugly Alice TU Dresden, 22 May 2007 Learning deterministic wta slide 8 of 26
02 Computation using wta Example ✛ ✛ ✛ Bob ✵ ✿ ✺ ✦ NN ADJ ✵ ✿ ✷✺ Bob hates ✛ ugly Alice TU Dresden, 22 May 2007 Learning deterministic wta slide 8 of 26
02 Computation using wta Example ✛ ✛ ✛ ✛ ✵ ✿ ✺ ✦ NP ADJ ✵ ✿ ✷✺ NN ✵ ✿ ✺ hates ✛ ADJ NN ugly Alice TU Dresden, 22 May 2007 Learning deterministic wta slide 8 of 26
02 Computation using wta Example ✛ ◆P ✵ ✿ ✵✻✷✺ ✛ hates ✵ ✿ ✺ ✦ VB hates ✛ ugly Alice TU Dresden, 22 May 2007 Learning deterministic wta slide 8 of 26
02 Computation using wta Example ✛ ◆P ✵ ✿ ✵✻✷✺ ✛ ugly ✵ ✿ ✷✺ ✦ ADJ VB ✵ ✿ ✺ ✛ ugly Alice TU Dresden, 22 May 2007 Learning deterministic wta slide 8 of 26
02 Computation using wta Example ✛ ◆P ✵ ✿ ✵✻✷✺ ✛ Alice ✵ ✿ ✺ ✦ NN VB ✵ ✿ ✺ ✛ ADJ ✵ ✿ ✷✺ Alice TU Dresden, 22 May 2007 Learning deterministic wta slide 8 of 26
02 Computation using wta Example ✛ ◆P ✵ ✿ ✵✻✷✺ ✛ ✛ ✵ ✿ ✺ ✦ NP VB ✵ ✿ ✺ ADJ NN ✛ ADJ ✵ ✿ ✷✺ NN ✵ ✿ ✺ TU Dresden, 22 May 2007 Learning deterministic wta slide 8 of 26
02 Computation using wta Example ✛ ✛ ◆P ✵ ✿ ✵✻✷✺ ✵ ✿ ✺ ✛ ✦ VP VB NP VB ✵ ✿ ✺ ◆P ✵ ✿ ✵✻✷✺ TU Dresden, 22 May 2007 Learning deterministic wta slide 8 of 26
02 Computation using wta Example ✛ ✛ ✵ ✿ ✺ ✦ S ◆P ✵ ✿ ✵✻✷✺ ❱P ✵ ✿ ✵✵✼✽✶✷✺ NP VP TU Dresden, 22 May 2007 Learning deterministic wta slide 8 of 26
02 Computation using wta Example ❙ ✵ ✿ ✵✵✵✷✹✹✶✹✵✻✷✺ So the tree ✛ ✛ ✛ mean Bob hates ✛ ugly Alice is accepted with weight ✵ ✿ ✵✵✵✷✹✹✶✹✵✻✷✺ . TU Dresden, 22 May 2007 Learning deterministic wta slide 8 of 26
02 Computation using wta (cont’d) Example ✛ Bob Alice ✵ ✿ ✺ ✛ ✦ NN Alice loves TU Dresden, 22 May 2007 Learning deterministic wta slide 9 of 26
02 Computation using wta (cont’d) Example ✛ Bob loves ✵ ✿ ✺ ✛ ✦ VB NN ✵ ✿ ✺ loves TU Dresden, 22 May 2007 Learning deterministic wta slide 9 of 26
02 Computation using wta (cont’d) Example ✛ Bob Bob ✵ ✿ ✺ ✛ ✦ NN NN ✵ ✿ ✺ VB ✵ ✿ ✺ TU Dresden, 22 May 2007 Learning deterministic wta slide 9 of 26
02 Computation using wta (cont’d) Example ✛ NN ✵ ✿ ✺ ✛ ? NN ✵ ✿ ✺ VB ✵ ✿ ✺ TU Dresden, 22 May 2007 Learning deterministic wta slide 9 of 26
02 Computation using wta (cont’d) Example So the tree ✛ Bob ✛ Alice loves is rejected (accepted with weight ✵ ). TU Dresden, 22 May 2007 Learning deterministic wta slide 9 of 26
02 Deterministically recognizable Definition A tree series ✥ ✷ ❆ ❤ ❤ ❚ ✝ ✐ ✐ is deterministically recognizable if there exists a deterministic wta accepting ✥ . TU Dresden, 22 May 2007 Learning deterministic wta slide 10 of 26
03 Table of Contents Notation Weighted tree automaton Myhill-Nerode congruence Learning algorithm An example TU Dresden, 22 May 2007 Learning deterministic wta slide 11 of 26
✥ ❂ s✐③❡ ❆ ❂ ✭ ❩ ❬ ❢✶❣ ❀ ♠✐♥ ❀ ✰ ❀ ✶ ❀ ✵✮ t ✑ ✉ t❀ ✉ ✷ ❚ ✝ ❛ ❂ s✐③❡✭ ✉ ✮ � s✐③❡✭ t ✮ ❛ ✰ s✐③❡✭ ❝ ❬ t ❪✮ ❂ ❛ ✰ s✐③❡✭ ❝ ✮ � ✶ ✰ s✐③❡✭ t ✮ ❂ s✐③❡✭ ✉ ✮ ✰ s✐③❡✭ ❝ ✮ � ✶ ❂ s✐③❡✭ ❝ ❬ ✉ ❪✮ 03 Definition In the sequel, let ✥ ✷ ❆ ❤ ❤ ❚ ✝ ✐ ✐ with ❆ ❂ ✭ ❆❀ ✰ ❀ ✁ ❀ ✵ ❀ ✶✮ a semifield. Definition (Borchardt ’03) Two trees t❀ ✉ ✷ ❚ ✝ are equivalent if there exists ❛ ✷ ❆ ♥ ❢ ✵ ❣ such that for every context ❝ ✷ ❈ ✝ ❛ ✁ ✭ ✥❀ ❝ ❬ t ❪✮ ❂ ✭ ✥❀ ❝ ❬ ✉ ❪✮ ✿ This equivalence relation is denoted by ✑ . TU Dresden, 22 May 2007 Learning deterministic wta slide 12 of 26
03 Definition In the sequel, let ✥ ✷ ❆ ❤ ❤ ❚ ✝ ✐ ✐ with ❆ ❂ ✭ ❆❀ ✰ ❀ ✁ ❀ ✵ ❀ ✶✮ a semifield. Definition (Borchardt ’03) Two trees t❀ ✉ ✷ ❚ ✝ are equivalent if there exists ❛ ✷ ❆ ♥ ❢ ✵ ❣ such that for every context ❝ ✷ ❈ ✝ ❛ ✁ ✭ ✥❀ ❝ ❬ t ❪✮ ❂ ✭ ✥❀ ❝ ❬ ✉ ❪✮ ✿ This equivalence relation is denoted by ✑ . Example Let ✥ ❂ s✐③❡ and ❆ ❂ ✭ ❩ ❬ ❢✶❣ ❀ ♠✐♥ ❀ ✰ ❀ ✶ ❀ ✵✮ . Then t ✑ ✉ for every t❀ ✉ ✷ ❚ ✝ because with ❛ ❂ s✐③❡✭ ✉ ✮ � s✐③❡✭ t ✮ ❛ ✰ s✐③❡✭ ❝ ❬ t ❪✮ ❂ ❛ ✰ s✐③❡✭ ❝ ✮ � ✶ ✰ s✐③❡✭ t ✮ ❂ s✐③❡✭ ✉ ✮ ✰ s✐③❡✭ ❝ ✮ � ✶ ❂ s✐③❡✭ ❝ ❬ ✉ ❪✮ TU Dresden, 22 May 2007 Learning deterministic wta slide 12 of 26
✎ ✥ ✎ ✑ ✑ ✥ 03 Myhill-Nerode theorem Lemma (Borchardt ’03) ✑ is a congruence on ✭ ❚ ✝ ❀ ✝✮ . TU Dresden, 22 May 2007 Learning deterministic wta slide 13 of 26
03 Myhill-Nerode theorem Lemma (Borchardt ’03) ✑ is a congruence on ✭ ❚ ✝ ❀ ✝✮ . Theorem (Borchardt ’03) The following are equivalent: ✎ ✥ is deterministically recognizable. ✎ ✑ has finite index. Note: The implementation of ✑ yields a minimal deterministic wta accepting ✥ . TU Dresden, 22 May 2007 Learning deterministic wta slide 13 of 26
✎ ✑ ✑ ❈ ✝ ✑ ❈ ✒ ❈ ✝ ✑ ✑ ❈ ✎ 03 Approximating the Myhill-Nerode relation Definition Let ❈ ✒ ❈ ✝ . Two trees t❀ ✉ ✷ ❚ ✝ are ❈ -equivalent if there exists ❛ ✷ ❆ ♥ ❢ ✵ ❣ such that for every context ❝ ✷ ❈ ❛ ✁ ✭ ✥❀ ❝ ❬ t ❪✮ ❂ ✭ ✥❀ ❝ ❬ ✉ ❪✮ ✿ The ❈ -equivalence relation is denoted by ✑ ❈ . TU Dresden, 22 May 2007 Learning deterministic wta slide 14 of 26
03 Approximating the Myhill-Nerode relation Definition Let ❈ ✒ ❈ ✝ . Two trees t❀ ✉ ✷ ❚ ✝ are ❈ -equivalent if there exists ❛ ✷ ❆ ♥ ❢ ✵ ❣ such that for every context ❝ ✷ ❈ ❛ ✁ ✭ ✥❀ ❝ ❬ t ❪✮ ❂ ✭ ✥❀ ❝ ❬ ✉ ❪✮ ✿ The ❈ -equivalence relation is denoted by ✑ ❈ . Lemma ✎ ✑ and ✑ ❈ ✝ coincide. ✎ If ✑ has finite index, then there exists finite ❈ ✒ ❈ ✝ such that ✑ and ✑ ❈ coincide. TU Dresden, 22 May 2007 Learning deterministic wta slide 14 of 26
Recommend
More recommend