pushing for weighted tree automata
play

Pushing for weighted tree automata Thomas Hanneforth Andreas - PowerPoint PPT Presentation

Pushing for weighted tree automata Thomas Hanneforth Andreas Maletti Daniel Quernheim Institute for Natural Language Processing University of Stuttgart, Germany maletti@ims.uni-stuttgart.de Dresden, 2013 Hanneforth, Maletti, Quernheim


  1. Pushing for weighted tree automata Thomas Hanneforth Andreas Maletti Daniel Quernheim Institute for Natural Language Processing University of Stuttgart, Germany maletti@ims.uni-stuttgart.de Dresden, 2013 Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  2. Outline Motivation Minimization Equivalence testing Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  3. Motivation Toolkit ◮ for unweighted and weighted tree automata ◮ support for all standard operations ◮ here: minimization and equivalence testing Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  4. Motivation Toolkit ◮ for unweighted and weighted tree automata ◮ support for all standard operations ◮ here: minimization and equivalence testing Notes ◮ mainly developed by T HOMAS H ANNEFORTH (U Potsdam) ◮ project name: TALib (tree automata library) Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  5. Motivation Toolkit ◮ for unweighted and weighted tree automata ◮ support for all standard operations ◮ here: minimization and equivalence testing Notes ◮ mainly developed by T HOMAS H ANNEFORTH (U Potsdam) ◮ project name: TALib (tree automata library) ◮ fitting talib (Arabic, “student”), but plural is taliban Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  6. Motivation Toolkit ◮ for unweighted and weighted tree automata ◮ support for all standard operations ◮ here: minimization and equivalence testing Why those? ◮ difference between unweighted and weighted ◮ minimization essential for large automata ◮ equivalence testing important for sanity checks Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  7. Motivation — Minimization Typical automata ◮ English B ERKELEY parser grammar 153 MB (1,133 states and 4,267,277 transitions) ◮ English EG RET parser grammar 107 MB ◮ Chinese EG RET parser grammar 98 MB Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  8. Semirings Definition (commutative semiring ( S , + , · , 0 , 1 ) ) ◮ commutative monoids ( S , + , 0 ) and ( S , · , 1 ) ◮ absorption s · 0 = 0 s ∈ S ◮ distributivity s 1 · ( s 2 + s 3 ) = ( s 1 · s 2 ) + ( s 1 · s 3 ) s 1 , s 2 , s 3 ∈ S Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  9. Semirings Definition (commutative semiring ( S , + , · , 0 , 1 ) ) ◮ commutative monoids ( S , + , 0 ) and ( S , · , 1 ) ◮ absorption s · 0 = 0 s ∈ S ◮ distributivity s 1 · ( s 2 + s 3 ) = ( s 1 · s 2 ) + ( s 1 · s 3 ) s 1 , s 2 , s 3 ∈ S Definition (commutative semifield ( S , + , · , 0 , 1 ) ) ◮ commutative semiring ( S , + , · , 0 , 1 ) ◮ for every s ∈ S \ { 0 } there exists s − 1 ∈ S such that s · s − 1 = 1 Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  10. Semirings Definition (commutative semiring ( S , + , · , 0 , 1 ) ) ◮ commutative monoids ( S , + , 0 ) and ( S , · , 1 ) ◮ absorption s · 0 = 0 s ∈ S ◮ distributivity s 1 · ( s 2 + s 3 ) = ( s 1 · s 2 ) + ( s 1 · s 3 ) s 1 , s 2 , s 3 ∈ S Definition (commutative semifield ( S , + , · , 0 , 1 ) ) ◮ commutative semiring ( S , + , · , 0 , 1 ) ◮ for every s ∈ S \ { 0 } there exists s − 1 ∈ S such that s · s − 1 = 1 Definition (commutative field ( S , + , · , 0 , 1 ) ) ◮ commutative semifield ( S , + , · , 0 , 1 ) ◮ for every s ∈ S there exists ( − s ) ∈ S such that s + ( − s ) = 0 Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  11. Weighted tree automaton Definition (wta) Weighted tree automaton ( Q , Σ , µ, F ) ◮ Q finite set of states ◮ Σ ranked alphabet of input symbols ◮ µ = ( µ k ) k ∈ N with µ k : Σ k → S Q k × Q transition weight assignment ◮ F ⊆ Q final states Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  12. Weighted tree automaton Definition (wta) Weighted tree automaton ( Q , Σ , µ, F ) ◮ Q finite set of states ◮ Σ ranked alphabet of input symbols ◮ µ = ( µ k ) k ∈ N with µ k : Σ k → S Q k × Q transition weight assignment ◮ F ⊆ Q final states Definition (dwta) A wta ( Q , Σ , µ, F ) is deterministic if for all σ ∈ Σ k , q , q ′ , q 1 , . . . , q k ∈ Q µ k ( σ ) q 1 ··· q k , q � = 0 � = µ k ( σ ) q 1 ··· q k , q ′ implies q = q ′ Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  13. Deterministic weighted tree automaton γ : 8 γ : 4 q f σ : 4 σ : 1 γ : 2 γ : 2 σ : 1 q b q 2 q 1 σ : 4 β : 1 α : 1 Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  14. Weighted tree automaton Definition The semantics of a wta M = ( Q , Σ , µ, F ) is M : T Σ → S M ( t ) = � q ∈ F h µ ( t ) q t ∈ T Σ q , q ′ ∈ Q , σ ∈ Σ k , t 1 , . . . , t k ∈ T Σ ( Q ) with h µ : T Σ ( Q ) → S Q � if q = q ′ 1 � q ′ � q = h µ otherwise 0 k � � � � σ ( t 1 , . . . , t k ) q = µ k ( σ ) q 1 ··· q k , q · h µ ( t i ) q i h µ q 1 ,..., q k ∈ Q i = 1 Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  15. Outline Motivation Minimization Equivalence testing Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  16. Minimization State-of-the-art (tree / string) unweighted weighted (field) dwta O ( m log n ) O ( mn ) / O ( m log n ) P / O ( mn 2 ) wta PS PACE -complete Notes ◮ unweighted = weighted over ( { 0 , 1 } , max , min , 0 , 1 ) ◮ m = size of the transition table ◮ n = number of states Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  17. Minimization State-of-the-art (tree / string) unweighted weighted (field) dwta O ( m log n ) O ( mn ) / O ( m log n ) P / O ( mn 2 ) wta PS PACE -complete Notes ◮ unweighted = weighted over ( { 0 , 1 } , max , min , 0 , 1 ) ◮ m = size of the transition table ◮ n = number of states Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  18. Minimization Let ( S , + , · , 0 , 1 ) be a semifield Definition (B ORCHARDT 2003) States q 1 , q 2 ∈ Q in dwta ( Q , Σ , µ, F ) are equivalent ( q 1 ≡ q 2 ) if there exists s ∈ S \ { 0 } such that � � h µ ( c [ q 1 ]) q = s · h µ ( c [ q 2 ]) q c ∈ C Σ ( Q ) q ∈ F q ∈ F Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  19. Minimization Let ( S , + , · , 0 , 1 ) be a semifield Definition (B ORCHARDT 2003) States q 1 , q 2 ∈ Q in dwta ( Q , Σ , µ, F ) are equivalent ( q 1 ≡ q 2 ) if there exists s ∈ S \ { 0 } such that � � h µ ( c [ q 1 ]) q = s · h µ ( c [ q 2 ]) q c ∈ C Σ ( Q ) q ∈ F q ∈ F Notes ◮ q 1 ≡ q 2 if they behave equally in all contexts (up to a constant invertable scaling factor) ◮ ≡ is a congruence ◮ finer than the classical (unweighted) state equivalence Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  20. Minimization Theorem (M. 2009) Dwta over semifields can be minimized in time O ( mn ) Approach 1. Compute sign of life for each state 2. Compute equivalence pairwise with scaling factor 3. Merge equivalent states Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  21. Minimization Theorem (M. 2009) Dwta over semifields can be minimized in time O ( mn ) Approach 1. Compute sign of life for each state 2. Compute equivalence pairwise with scaling factor 3. Merge equivalent states Definition ◮ c ∈ C Σ ( Q ) is sign of life for q ∈ Q if � q ′ ∈ F h µ ( c [ q ]) q ′ � = 0 Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  22. Minimization Theorem (M. 2009) Dwta over semifields can be minimized in time O ( mn ) Approach 1. Compute sign of life for each state 2. Compute equivalence pairwise with scaling factor 3. Merge equivalent states Definition ◮ c ∈ C Σ ( Q ) is sign of life for q ∈ Q if � q ′ ∈ F h µ ( c [ q ]) q ′ � = 0 ◮ state that has a sign of life is live ◮ state without a sign of life is dead Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  23. Sign of life γ : 8 γ : 4 q f σ : 4 σ : 1 γ : 2 γ : 2 σ : 1 q b q 2 q 1 σ : 4 β : 1 α : 1 γ γ � � h µ σ q 1 β α Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  24. Sign of life γ : 8 γ : 4 q f σ : 4 σ : 1 γ : 2 γ : 2 σ : 1 q b q 2 q 1 σ : 4 β : 1 α : 1 γ γ γ γ � � � � = h µ h µ σ σ q 1 q 1 β α α q b Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  25. Sign of life γ : 8 γ : 4 q f σ : 4 σ : 1 γ : 2 γ : 2 σ : 1 q b q 2 q 1 σ : 4 β : 1 α : 1 γ γ γ γ γ γ � � � � � � = h µ = h µ h µ σ σ σ q 1 q 1 q 1 β α α q b q b q 1 Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

  26. Sign of life γ : 8 γ : 4 q f σ : 4 σ : 1 γ : 2 γ : 2 σ : 1 q b q 2 q 1 σ : 4 β : 1 α : 1 γ γ γ γ γ γ γ � � � � � � � � γ = h µ = h µ = 4 · h µ h µ σ σ σ q 1 q 1 q 1 q 1 q 2 β α α q b q b q 1 Hanneforth, Maletti, Quernheim Pushing for weighted tree automata April 9, 2013

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend