400 likes | 513 Views
Global Inference via Linear Programming Formulation. Presenter: Natalia Prytkova Tutor: Maximilian Dylla 14.07.2011. Outline. Motivation Naïve Algorithm LP Formulation Constraints Objective Function Applications of LP Experiments Discussion. Inference with Classifiers. Recognize
E N D
Global Inference via Linear Programming Formulation Presenter: Natalia Prytkova Tutor: Maximilian Dylla 14.07.2011
Outline • Motivation • Naïve Algorithm • LP Formulation • Constraints • Objective Function • Applications of LP • Experiments • Discussion
Inference with Classifiers Recognize entities Recognize relations Inference
Example Book Author
Example Book Author
Properties of Extracted Items Composer Author BookWrittenBy (Book, Author) BalletWrittenBy (Ballet, Composer) Ballet Book
Properties of Extracted Items MemberOfUnion (Author, WritersUnion) GraduatedFrom (Composer, Conservatory) WritersUnion Conservatory Composer Author BookWrittenBy (Book, Author) BalletWrittenBy (Ballet, Composer) Ballet Book ShownInTheater (Ballet,Theater) BookPublishedBy (Book, Publisher) Publisher Theater
Example BalletWrittenBy Ballet Composer
Example BalletWrittenBy Ballet Composer
Properties of Extracted Items • a lot of relations types • a lot of entities types • mutually dependent
Outline • Motivation • Naïve Algorithm • ILP Formulation • Constraints • Objective Function • Applications of ILP • Experiments • Discussion
Outline • Motivation • Naïve Algorithm • LP Formulation • Constraints • Objective Function • Applications of LP • Experiments • Discussion
Key Idea Recognize relations Inference Recognize entities
Naïve Algorithm P(Book BalletWrittenBy Composer) = 0.07 P(Book BalletWrittenBy Author) = 0.07 P(Book BookWrittenBy Composer) = 0.12 P(Book BookWrittenBy Author) = 0.03 P(Ballet BalletWrittenBy Composer) = 0.28 P(Ballet BalletWrittenBy Author) = 0.28 P(Ballet BookWrittenBy Composer) = 0.12 P(Ballet BookWrittenBy Author) = 0.12 …
Naïve Algorithm P(Book BalletWrittenBy Composer) = 0.07 P(Book BalletWrittenBy Author) = 0.07 n entities – O(n2) binary relations P(Book BookWrittenBy Composer) = 0.12 llabels – ln2 assignments P(Book BookWrittenBy Author) = 0.03 P(Ballet BalletWrittenBy Composer) = 0.28 P(Ballet BalletWrittenBy Author) = 0.28 P(Ballet BookWrittenBy Composer) = 0.12 P(Ballet BookWrittenBy Author) = 0.12 …
Naïve Algorithm P(Book BalletWrittenBy Composer) = 0.07 P(Book BalletWrittenBy Author) = 0.07 n entities – O(n2) binary relations P(Book BookWrittenBy Composer) = 0.12 llabels – ln2 assignments P(Book BookWrittenBy Author) = 0.03 P(Ballet BalletWrittenBy Composer) = 0.28 P(Ballet BalletWrittenBy Author) = 0.28 P(Ballet BookWrittenBy Composer) = 0.12 P(Ballet BookWrittenBy Author) = 0.12 …
Some Useful Properties • Relations impose restrictions on entities • Each entity or relation can be labeled only with one label • Relations can be directed (BookWrittenBy) or undirected (SpouseOf)
Outline • Motivation • Naïve Algorithm • ILP Formulation • Constraints • Objective Function • Applications of ILP • Experiments • Discussion
Key Idea • Obtain a set of possible labels for entities/relations • Optimize the global decision given a set of constraints
Definitions • Sentence S • Linked list of words and entities. Boundaries of entities are given Piotr Ilyich Tchaikovsky is one entity. • Entity ε • Observed variables • Relation • Binary relations between entities • Class • Predefined sets of entities and relations labels .
Constraints Indicator variables
Constraints • Each entity or relation can be labeled only with one label • Assignment to each entity or relation variable is consistent with the assignments to its neighboring variables
Objective Function • Assignment cost • e.g. • Cost of deviating from the assignments given by classifiers • Constraint cost • e.g. • Cost of breaking constraints between two neighboring entities
Naïve Algorithm P(Book BalletWrittenBy Composer) = 0.07 P(Book BalletWrittenBy Author) = 0.07 n entities – O(n2) binary relations P(Book BookWrittenBy Composer) = 0.12 llabels – ln2 assignments P(Book BookWrittenBy Author) = 0.03 P(Ballet BalletWrittenBy Composer) = 0.28 P(Ballet BalletWrittenBy Author) = 0.28 P(Ballet BookWrittenBy Composer) = 0.12 P(Ballet BookWrittenBy Author) = 0.12 …
Useful Property ILP is NP hard in general, but sometimes can be solved in polynomial time.
Outline • Motivation • Naïve Algorithm • ILP Formulation • Constraints • Objective Function • Applications of ILP • Experiments • Discussion
Viterbi Shortest path
Outline • Motivation • Naïve Algorithm • ILP Formulation • Constraints • Objective Function • Applications of ILP • Experiments • Discussion
Experiments E -> R E <-> R Separate R -> E Omniscient E E I I R R E I R E E I I R R
Experiments • 5 336 entities • 19 048 pairs of entities • 1 437 sentences • running time < 30 sec on Pentium III 800 MHz
Outline • Motivation • Naïve Algorithm • ILP Formulation • Constraints • Objective Function • Applications of ILP • Experiments • Discussion
Discussion • Guarantees optimality • Supports correct decisions by imposing limitations • LP solvers are available • Not scalable • cplex accepts at most 231 variables and constraints • ~ 46 000 entities • student edition accepts only 500 =) • ~ 20 entities • No feedback to extractors
References • Dan Roth and Wen-tau Yih:A Linear Programming Formulation for Global Inference in Natural Language Tasks, CoNLL'04 • Dan Roth and Wen-tau Yih:Global Inference for Entity and Relation Identification via a Linear Programming Formulation, Introduction to Statistical Relational Learning, 2007