Unifying Logical and Statistical AI Pedro Domingos Dept
- Slides: 82
Unifying Logical and Statistical AI Pedro Domingos Dept. of Computer Science & Eng. University of Washington Joint work with Stanley Kok, Daniel Lowd, Hoifung Poon, Matt Richardson, Parag Singla, Marc Sumner, and Jue Wang
Overview l l l l Motivation Background Markov logic Inference Learning Software Applications Discussion
AI: The First 100 Years IQ Human Intelligence Artificial Intelligence 1956 2006 2056
AI: The First 100 Years IQ Human Intelligence Artificial Intelligence 1956 2006 2056
AI: The First 100 Years IQ 1956 2006 Artificial Intelligence Human Intelligence 2056
Logical and Statistical AI Field Logical approach Statistical approach Knowledge representation First-order logic Graphical models Automated reasoning Satisfiability testing Markov chain Monte Carlo Machine learning Inductive logic programming Neural networks Planning Markov decision processes Classical planning Natural language Definite clause grammars processing Prob. context-free grammars
We Need to Unify the Two l l l The real world is complex and uncertain Logic handles complexity Probability handles uncertainty
Progress to Date l l l Probabilistic logic [Nilsson, 1986] Statistics and beliefs [Halpern, 1990] Knowledge-based model construction [Wellman et al. , 1992] l Stochastic logic programs [Muggleton, 1996] Probabilistic relational models [Friedman et al. , 1999] Relational Markov networks [Taskar et al. , 2002] l Etc. l This talk: Markov logic [Richardson & Domingos, 2004] l l
Markov Logic l l l Syntax: Weighted first-order formulas Semantics: Templates for Markov nets Inference: Walk. SAT, MCMC, KBMC Learning: Voted perceptron, pseudolikelihood, inductive logic programming Software: Alchemy Applications: Information extraction, link prediction, etc.
Overview l l l l Motivation Background Markov logic Inference Learning Software Applications Discussion
Markov Networks l Undirected graphical models Smoking Cancer Asthma l Cough Potential functions defined over cliques Smoking Cancer Ф(S, C) False 4. 5 False True 4. 5 True False 2. 7 True 4. 5
Markov Networks l Undirected graphical models Smoking Cancer Asthma l Cough Log-linear model: Weight of Feature i
First-Order Logic l l l Constants, variables, functions, predicates E. g. : Anna, x, Mother. Of(x), Friends(x, y) Grounding: Replace all variables by constants E. g. : Friends (Anna, Bob) World (model, interpretation): Assignment of truth values to all ground predicates
Overview l l l l Motivation Background Markov logic Inference Learning Software Applications Discussion
Markov Logic l l l A logical KB is a set of hard constraints on the set of possible worlds Let’s make them soft constraints: When a world violates a formula, It becomes less probable, not impossible Give each formula a weight (Higher weight Stronger constraint)
Definition l A Markov Logic Network (MLN) is a set of pairs (F, w) where l l l F is a formula in first-order logic w is a real number Together with a set of constants, it defines a Markov network with l l One node for each grounding of each predicate in the MLN One feature for each grounding of each formula F in the MLN, with the corresponding weight w
Example: Friends & Smokers
Example: Friends & Smokers
Example: Friends & Smokers
Example: Friends & Smokers Two constants: Anna (A) and Bob (B)
Example: Friends & Smokers Two constants: Anna (A) and Bob (B) Smokes(A) Cancer(A) Smokes(B) Cancer(B)
Example: Friends & Smokers Two constants: Anna (A) and Bob (B) Friends(A, A) Smokes(B) Cancer(A) Friends(B, B) Cancer(B) Friends(B, A)
Example: Friends & Smokers Two constants: Anna (A) and Bob (B) Friends(A, A) Smokes(B) Cancer(A) Friends(B, B) Cancer(B) Friends(B, A)
Example: Friends & Smokers Two constants: Anna (A) and Bob (B) Friends(A, A) Smokes(B) Cancer(A) Friends(B, B) Cancer(B) Friends(B, A)
Markov Logic Networks l MLN is template for ground Markov nets l Probability of a world x: Weight of formula i l l l No. of true groundings of formula i in x Typed variables and constants greatly reduce size of ground Markov net Functions, existential quantifiers, etc. Infinite and continuous domains
Relation to Statistical Models l Special cases: l l l Markov networks Markov random fields Bayesian networks Log-linear models Exponential models Max. entropy models Gibbs distributions Boltzmann machines Logistic regression Hidden Markov models Conditional random fields l Obtained by making all predicates zero-arity l Markov logic allows objects to be interdependent (non-i. i. d. )
Relation to First-Order Logic l l l Infinite weights First-order logic Satisfiable KB, positive weights Satisfying assignments = Modes of distribution Markov logic allows contradictions between formulas
Overview l l l l Motivation Background Markov logic Inference Learning Software Applications Discussion
MAP/MPE Inference l Problem: Find most likely state of world given evidence Query Evidence
MAP/MPE Inference l Problem: Find most likely state of world given evidence
MAP/MPE Inference l Problem: Find most likely state of world given evidence
MAP/MPE Inference l Problem: Find most likely state of world given evidence l This is just the weighted Max. SAT problem Use weighted SAT solver (e. g. , Max. Walk. SAT [Kautz et al. , 1997] ) Potentially faster than logical inference (!) l l
The Walk. SAT Algorithm for i ← 1 to max-tries do solution = random truth assignment for j ← 1 to max-flips do if all clauses satisfied then return solution c ← random unsatisfied clause with probability p flip a random variable in c else flip variable in c that maximizes number of satisfied clauses return failure
The Max. Walk. SAT Algorithm for i ← 1 to max-tries do solution = random truth assignment for j ← 1 to max-flips do if ∑ weights(sat. clauses) > threshold then return solution c ← random unsatisfied clause with probability p flip a random variable in c else flip variable in c that maximizes ∑ weights(sat. clauses) return failure, best solution found
But … Memory Explosion l Problem: If there are n constants and the highest clause arity is c, c the ground network requires O(n ) memory l Solution: Exploit sparseness; ground clauses lazily → Lazy. SAT algorithm [Singla & Domingos, 2006]
Computing Probabilities l l P(Formula|MLN, C) = ? MCMC: Sample worlds, check formula holds P(Formula 1|Formula 2, MLN, C) = ? If Formula 2 = Conjunction of ground atoms l l l First construct min subset of network necessary to answer query (generalization of KBMC) Then apply MCMC (or other) Can also do lifted inference [Braz et al, 2005]
Ground Network Construction network ← Ø queue ← query nodes repeat node ← front(queue) remove node from queue add node to network if node not in evidence then add neighbors(node) to queue until queue = Ø
MCMC: Gibbs Sampling state ← random truth assignment for i ← 1 to num-samples do for each variable x sample x according to P(x|neighbors(x)) state ← state with new value of x P(F) ← fraction of states in which F is true
But … Insufficient for Logic l Problem: Deterministic dependencies break MCMC Near-deterministic ones make it very slow l Solution: Combine MCMC and Walk. SAT → MC-SAT algorithm [Poon & Domingos, 2006]
Overview l l l l Motivation Background Markov logic Inference Learning Software Applications Discussion
Learning l l l Data is a relational database Closed world assumption (if not: EM) Learning parameters (weights) l l l Generatively Discriminatively Learning structure (formulas)
Generative Weight Learning l l l Maximize likelihood Use gradient ascent or L-BFGS No local maxima No. of true groundings of clause i in data Expected no. true groundings according to model l Requires inference at each step (slow!)
Pseudo-Likelihood l l l Likelihood of each variable given its neighbors in the data [Besag, 1975] Does not require inference at each step Consistent estimator Widely used in vision, spatial statistics, etc. But PL parameters may not work well for long inference chains
Discriminative Weight Learning l Maximize conditional likelihood of query (y) given evidence (x) No. of true groundings of clause i in data Expected no. true groundings according to model l Approximate expected counts by counts in MAP state of y given x
Voted Perceptron l l Originally proposed for training HMMs discriminatively [Collins, 2002] Assumes network is linear chain wi ← 0 for t ← 1 to T do y. MAP ← Viterbi(x) wi ← wi + η [counti(y. Data) – counti(y. MAP)] return ∑t wi / T
Voted Perceptron for MLNs l l l HMMs are special case of MLNs Replace Viterbi by Max. Walk. SAT Network can now be arbitrary graph wi ← 0 for t ← 1 to T do y. MAP ← Max. Walk. SAT(x) wi ← wi + η [counti(y. Data) – counti(y. MAP)] return ∑t wi / T
Structure Learning l l l l Generalizes feature induction in Markov nets Any inductive logic programming approach can be used, but. . . Goal is to induce any clauses, not just Horn Evaluation function should be likelihood Requires learning weights for each candidate Turns out not to be bottleneck Bottleneck is counting clause groundings Solution: Subsampling
Structure Learning l l Initial state: Unit clauses or hand-coded KB Operators: Add/remove literal, flip sign Evaluation function: Pseudo-likelihood + Structure prior Search: l l l Beam [Kok & Domingos, 2005] Shortest-first [Kok & Domingos, 2005] Bottom-up [Mihalkova & Mooney, 2007]
Overview l l l l Motivation Background Markov logic Inference Learning Software Applications Discussion
Alchemy Open-source software including: l Full first-order logic syntax l Generative & discriminative weight learning l Structure learning l Weighted satisfiability and MCMC l Programming language features alchemy. cs. washington. edu
Alchemy Prolog BUGS Representation F. O. Logic + Markov nets Horn clauses Bayes nets Inference Model check- Theorem Gibbs ing, MC-SAT proving sampling Learning Parameters & structure No Params. Uncertainty Yes No Yes Relational Yes No Yes
Overview l l l l Motivation Background Markov logic Inference Learning Software Applications Discussion
Applications l l l Information extraction* Entity resolution Link prediction Collective classification Web mining Natural language processing l l l l Computational biology Social network analysis Robot mapping Activity recognition Probabilistic Cyc CALO Etc. * Markov logic approach won LLL-2005 information extraction competition [Riedel & Klein, 2005]
Information Extraction Parag Singla and Pedro Domingos, “Memory-Efficient Inference in Relational Domains” (AAAI-06). Singla, P. , & Domingos, P. (2006). Memory-efficent inference in relatonal domains. In Proceedings of the Twenty-First National Conference on Artificial Intelligence (pp. 500 -505). Boston, MA: AAAI Press. H. Poon & P. Domingos, Sound and Efficient Inference with Probabilistic and Deterministic Dependencies”, in Proc. AAAI-06, Boston, MA, 2006. P. Hoifung (2006). Efficent inference. In Proceedings of the Twenty-First National Conference on Artificial Intelligence.
Segmentation Author Title Venue Parag Singla and Pedro Domingos, “Memory-Efficient Inference in Relational Domains” (AAAI-06). Singla, P. , & Domingos, P. (2006). Memory-efficent inference in relatonal domains. In Proceedings of the Twenty-First National Conference on Artificial Intelligence (pp. 500 -505). Boston, MA: AAAI Press. H. Poon & P. Domingos, Sound and Efficient Inference with Probabilistic and Deterministic Dependencies”, in Proc. AAAI-06, Boston, MA, 2006. P. Hoifung (2006). Efficent inference. In Proceedings of the Twenty-First National Conference on Artificial Intelligence.
Entity Resolution Parag Singla and Pedro Domingos, “Memory-Efficient Inference in Relational Domains” (AAAI-06). Singla, P. , & Domingos, P. (2006). Memory-efficent inference in relatonal domains. In Proceedings of the Twenty-First National Conference on Artificial Intelligence (pp. 500 -505). Boston, MA: AAAI Press. H. Poon & P. Domingos, Sound and Efficient Inference with Probabilistic and Deterministic Dependencies”, in Proc. AAAI-06, Boston, MA, 2006. P. Hoifung (2006). Efficent inference. In Proceedings of the Twenty-First National Conference on Artificial Intelligence.
Entity Resolution Parag Singla and Pedro Domingos, “Memory-Efficient Inference in Relational Domains” (AAAI-06). Singla, P. , & Domingos, P. (2006). Memory-efficent inference in relatonal domains. In Proceedings of the Twenty-First National Conference on Artificial Intelligence (pp. 500 -505). Boston, MA: AAAI Press. H. Poon & P. Domingos, Sound and Efficient Inference with Probabilistic and Deterministic Dependencies”, in Proc. AAAI-06, Boston, MA, 2006. P. Hoifung (2006). Efficent inference. In Proceedings of the Twenty-First National Conference on Artificial Intelligence.
State of the Art l Segmentation l l Entity resolution l l l HMM (or CRF) to assign each token to a field Logistic regression to predict same field/citation Transitive closure Alchemy implementation: Seven formulas
Types and Predicates token = {Parag, Singla, and, Pedro, . . . } field = {Author, Title, Venue} citation = {C 1, C 2, . . . } position = {0, 1, 2, . . . } Token(token, position, citation) In. Field(position, field, citation) Same. Field(field, citation) Same. Cit(citation, citation)
Types and Predicates token = {Parag, Singla, and, Pedro, . . . } field = {Author, Title, Venue, . . . } citation = {C 1, C 2, . . . } position = {0, 1, 2, . . . } Token(token, position, citation) In. Field(position, field, citation) Same. Field(field, citation) Same. Cit(citation, citation) Optional
Types and Predicates token = {Parag, Singla, and, Pedro, . . . } field = {Author, Title, Venue} citation = {C 1, C 2, . . . } position = {0, 1, 2, . . . } Token(token, position, citation) In. Field(position, field, citation) Same. Field(field, citation) Same. Cit(citation, citation) Evidence
Types and Predicates token = {Parag, Singla, and, Pedro, . . . } field = {Author, Title, Venue} citation = {C 1, C 2, . . . } position = {0, 1, 2, . . . } Token(token, position, citation) In. Field(position, field, citation) Same. Field(field, citation) Same. Cit(citation, citation) Query
Formulas Token(+t, i, c) => In. Field(i, +f, c) <=> In. Field(i+1, +f, c) f != f’ => (!In. Field(i, +f, c) v !In. Field(i, +f’, c)) Token(+t, i, c) ^ In. Field(i, +f, c) ^ Token(+t, i’, c’) ^ In. Field(i’, +f, c’) => Same. Field(+f, c, c’) <=> Same. Cit(c, c’) Same. Field(f, c, c’) ^ Same. Field(f, c’, c”) => Same. Field(f, c, c”) Same. Cit(c, c’) ^ Same. Cit(c’, c”) => Same. Cit(c, c”)
Formulas Token(+t, i, c) => In. Field(i, +f, c) <=> In. Field(i+1, +f, c) f != f’ => (!In. Field(i, +f, c) v !In. Field(i, +f’, c)) Token(+t, i, c) ^ In. Field(i, +f, c) ^ Token(+t, i’, c’) ^ In. Field(i’, +f, c’) => Same. Field(+f, c, c’) <=> Same. Cit(c, c’) Same. Field(f, c, c’) ^ Same. Field(f, c’, c”) => Same. Field(f, c, c”) Same. Cit(c, c’) ^ Same. Cit(c’, c”) => Same. Cit(c, c”)
Formulas Token(+t, i, c) => In. Field(i, +f, c) <=> In. Field(i+1, +f, c) f != f’ => (!In. Field(i, +f, c) v !In. Field(i, +f’, c)) Token(+t, i, c) ^ In. Field(i, +f, c) ^ Token(+t, i’, c’) ^ In. Field(i’, +f, c’) => Same. Field(+f, c, c’) <=> Same. Cit(c, c’) Same. Field(f, c, c’) ^ Same. Field(f, c’, c”) => Same. Field(f, c, c”) Same. Cit(c, c’) ^ Same. Cit(c’, c”) => Same. Cit(c, c”)
Formulas Token(+t, i, c) => In. Field(i, +f, c) <=> In. Field(i+1, +f, c) f != f’ => (!In. Field(i, +f, c) v !In. Field(i, +f’, c)) Token(+t, i, c) ^ In. Field(i, +f, c) ^ Token(+t, i’, c’) ^ In. Field(i’, +f, c’) => Same. Field(+f, c, c’) <=> Same. Cit(c, c’) Same. Field(f, c, c’) ^ Same. Field(f, c’, c”) => Same. Field(f, c, c”) Same. Cit(c, c’) ^ Same. Cit(c’, c”) => Same. Cit(c, c”)
Formulas Token(+t, i, c) => In. Field(i, +f, c) <=> In. Field(i+1, +f, c) f != f’ => (!In. Field(i, +f, c) v !In. Field(i, +f’, c)) Token(+t, i, c) ^ In. Field(i, +f, c) ^ Token(+t, i’, c’) ^ In. Field(i’, +f, c’) => Same. Field(+f, c, c’) <=> Same. Cit(c, c’) Same. Field(f, c, c’) ^ Same. Field(f, c’, c”) => Same. Field(f, c, c”) Same. Cit(c, c’) ^ Same. Cit(c’, c”) => Same. Cit(c, c”)
Formulas Token(+t, i, c) => In. Field(i, +f, c) <=> In. Field(i+1, +f, c) f != f’ => (!In. Field(i, +f, c) v !In. Field(i, +f’, c)) Token(+t, i, c) ^ In. Field(i, +f, c) ^ Token(+t, i’, c’) ^ In. Field(i’, +f, c’) => Same. Field(+f, c, c’) <=> Same. Cit(c, c’) Same. Field(f, c, c’) ^ Same. Field(f, c’, c”) => Same. Field(f, c, c”) Same. Cit(c, c’) ^ Same. Cit(c’, c”) => Same. Cit(c, c”)
Formulas Token(+t, i, c) => In. Field(i, +f, c) <=> In. Field(i+1, +f, c) f != f’ => (!In. Field(i, +f, c) v !In. Field(i, +f’, c)) Token(+t, i, c) ^ In. Field(i, +f, c) ^ Token(+t, i’, c’) ^ In. Field(i’, +f, c’) => Same. Field(+f, c, c’) <=> Same. Cit(c, c’) Same. Field(f, c, c’) ^ Same. Field(f, c’, c”) => Same. Field(f, c, c”) Same. Cit(c, c’) ^ Same. Cit(c’, c”) => Same. Cit(c, c”)
Formulas Token(+t, i, c) => In. Field(i, +f, c) ^ !Token(“. ”, i, c) <=> In. Field(i+1, +f, c) f != f’ => (!In. Field(i, +f, c) v !In. Field(i, +f’, c)) Token(+t, i, c) ^ In. Field(i, +f, c) ^ Token(+t, i’, c’) ^ In. Field(i’, +f, c’) => Same. Field(+f, c, c’) <=> Same. Cit(c, c’) Same. Field(f, c, c’) ^ Same. Field(f, c’, c”) => Same. Field(f, c, c”) Same. Cit(c, c’) ^ Same. Cit(c’, c”) => Same. Cit(c, c”)
Results: Segmentation on Cora
Results: Matching Venues on Cora
Overview l l l l Motivation Background Markov logic Inference Learning Software Applications Discussion
The Interface Layer Applications Interface Layer Infrastructure
Networking Applications Interface Layer Infrastructure WWW Email Internet Protocols Routers
Databases ERP CRM Applications OLTP Interface Layer Infrastructure Relational Model Transaction Management Query Optimization
Programming Systems Applications Interface Layer Programming High-Level Languages Compilers Infrastructure Code Optimizers
Artificial Intelligence Planning Robotics Applications NLP Vision Multi-Agent Systems Interface Layer Representation Inference Infrastructure Learning
Artificial Intelligence Planning Robotics Applications NLP Vision Interface Layer Multi-Agent Systems First-Order Logic? Representation Inference Infrastructure Learning
Artificial Intelligence Planning Robotics Applications NLP Vision Interface Layer Multi-Agent Systems Graphical Models? Representation Inference Infrastructure Learning
Artificial Intelligence Planning Robotics Applications NLP Multi-Agent Systems Vision Interface Layer Markov Logic Representation Inference Infrastructure Learning
Artificial Intelligence Planning Robotics Applications NLP Vision Multi-Agent Systems Alchemy: alchemy. cs. washington. edu Representation Inference Infrastructure Learning
- Logical operators equivalence
- Kesetaraan logis adalah
- Unifying concepts of animal structure and function
- Unifying features of archegoniates
- Five unifying themes of biology
- Unifying themes concept map
- A unifying review of linear gaussian models
- Types of plate boundaries
- 4 unifying themes of biology
- Unifying themes of biology
- Unifying theme definition
- Oracle healthcare data model
- 5 unifying themes of biology
- Zhiting hu
- Ms department of finance and administration
- Florida dept of agriculture and consumer services
- Florida dept of agriculture and consumer services
- Department of agriculture consumer services
- Take out your homework
- Guardar domingo e festas
- Nombres de los domingos de cuaresma
- Agrupamento de escolas domingos sequeira
- Os domingos precisam de feriados
- Os domingos precisam de feriados
- Domingos ich lieb dich immer noch
- Dr domingos guilherme napoli
- Los cuatro domingos de adviento
- Domingos abreu
- Agrupamento de escolas domingos sequeira
- Dept nmr spectroscopy
- Finance departments
- Worcester inspectional services
- Dept. name of organization (of affiliation)
- Mn dept of education
- Dept. name of organization (of affiliation)
- Ohio employment first
- Hjdkdkd
- Vaginal dept
- Gome dept
- Gome dept
- Horizontal
- Gome dept
- Hoe dept
- Lafd interview questions
- Maine dept of agriculture
- Dept of education
- Dept a
- Central islip fire dept
- Rowan county dss child protective services
- Dept of education
- Dept c13 nmr
- Pt dept logistik
- Nys dept of homeland security
- La dept of revenue
- Geaux biz login
- Continuing education library oxford
- Nebraska dept of agriculture
- Ee dept iitb
- Dept ind onegov
- Albany county dept of social services
- Statistical symbols and meanings
- Chebyshev inequality proof
- Probability and statistical inference 9th solution pdf
- Statistical notation
- Multilevel multiplexing
- Hypothetical evidence examples
- Statistical product and service solutions
- Strengths of statistical infrequency
- A visual aid used to show statistical trends and patterns
- A visual aid used to show statistical trends and patterns.
- Statistical institute for asia and the pacific
- Statistical product and service solutions
- Statistical concepts and market returns
- Dulong petit law
- Thermodynamics and statistical mechanics
- Advanced and multivariate statistical methods
- Statistical product and service solutions
- Macrostate and microstate in statistical mechanics
- Difference between logical file and physical file
- Physical and logical structure of oracle database
- Cap 221
- Lower level diagram
- Difference between arithmetic shift and logical shift