Towards Quantum-Assisted Artificial...
Transcript of Towards Quantum-Assisted Artificial...
Towards Quantum-Assisted Artificial Intelligence
Peter Wittek
Research Fellow, Quantum Information Theory GroupICFO-The Institute of Photonic Sciences
Barcelona Institute of Science and Technology&
Academic Director, Quantum Machine Learning InitiativeCreative Destruction LabUniversity of Toronto
November 2017
Max Tegmark (2017). Life 3.0.
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
The Virtuous Cycle!
Quantum information processingand
quantum computing
Machine learningand
artificial intelligence
•Reinforcement learning in control problems•Deep learning and neural networks as representation
•Quantum algorithms in machine learning•Improved sample and computational complexity
Towards Quantum-Assisted AI November 2017 5 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Diversity is key
Towards Quantum-Assisted AI November 2017 6 / 35
Statistical learning theoryMarco LoogGael Sent́ıs
Quantum dataJonathan OlsonAntonio GentileNana LiuJohn Calsamiglia
Deep architectures & Many-body physicsWilliam HugginsShi-Ju RanAlexandre Dauphin
AgencyVedran Dunjko
(Discrete) OptimizationDavide VenturelliWilliam Santos
SamplingAlejandro Perdomo-Ortiz
Causal networks, kangaroos,and cockroachesChristina GiarmatziAndreas Winter
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
So let’s add one more component. . .
Good Old-Fashioned AI
Formalize causal relations in higher order logic.
Classical data in, classical data out.
Complexity of entailment is in NP.
Fragile and largely dead since the 1980s.
Add uncertainty
Bump complexity to #P.
Sampling helps.
Took off in 2006, still a niche.
Towards Quantum-Assisted AI November 2017 7 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
First-order logic
Basic components (abbreviated):
Constant: representing objects in the domain. E.g., Alice, Bob.
Variable: taking values in a domain, e.g., people.
Predicate: representing relations among objects, e.g., Flies(x), Physicist(y),Coauthors(x,y).
Formulas:
Atom: predicate applied to a tuple of objects. E.g., Coauthors(x, Bob).
Ground atom: atom with no variable. E.g., Coauthors(Alice, Bob).
Formula: atoms with logical connectives and quantifiers. E.g., ∀x(Flies(x)⇒Flies(MotherOf(x))).
Towards Quantum-Assisted AI November 2017 8 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Knowledge base
Knowledge base (KB): conjunctive set of formulas.
Every referee is competent:∀x,y (Referees(x,y)⇒Competent(x))
Referees of physicists are physicists:∀x,y (Referees(x,y)∧Physicist(y)⇒Physicist(x))
Towards Quantum-Assisted AI November 2017 9 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Grounding out and Herbrand interpretation
Finite domain: {Alice, Bob}Functions are not relevant, they serve as substitutions.Grounding out the atoms grow exponentially:
Referees(Alice,Bob), Referees(Bob,Alice), Referees(Alice,Alice),Referees(Bob,Bob).
Competent(Alice), Competent(Bob).
Physicist(Alice), Physicist(Bob).
Grounding out the knowledge base:
Referees(Alice,Bob)⇒Competent(Alice)
Referees(Bob,Alice)⇒Competent(Bob)
Referees(Alice,Alice)⇒Competent(Alice)
. . .
Herbrand interpretation (possible world): assign a truth value to each ground atom.Towards Quantum-Assisted AI November 2017 10 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Deduction
Let us have a formula from outside the KB:
F: Bob referees Alice. Bob is not competent.Referees(Bob, Alice)∧¬Competent(Bob)Problem of entailment: KB�F.
What about contradictions?
Towards Quantum-Assisted AI November 2017 11 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Restricted Boltzmann machines
E (v , h) = −∑
i
aivi −∑
j
bjhj −∑
i
∑j
viwi ,jhj
Obtain a probability distribution:
P(v , h) =1
Ze−E(v ,h)
Trace out over the hidden nodes to approximate a target probability distribution.This is a generative probabilistic model.
Towards Quantum-Assisted AI November 2017 12 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Probabilistic Graphical Models
Uncertainty (probabilities) and logical structure (independence constraints).
Goal: compact representation of a joint probability distribution.
For {X1, . . . ,XN} binary random variables, there are 2N assignments.
Complexity is dealt through graph theory.
Factorization: compactness.
Inference: reassembling factors.
Conditional independence (X ⊥ Y |Z ):
P(X = x ,Y = y |Z = z) = P(X = x |Z = z)P(Y = y |Z = z)
∀x ∈ X , y ∈ Y , z ∈ Z
Towards Quantum-Assisted AI November 2017 13 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Markov random fields
Ising model generalized to hypergraphs.
A distribution factorizes over G if:
P(X1, . . . ,XN ) = 1Z P
′(X1, . . . ,XN ),, whereP ′(X1, . . . ,XN ) = exp(−
∑i ε[Ck ]) and
Ci is a clique in G .
Connection to Boltzmann machines
Towards Quantum-Assisted AI November 2017 14 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Probabilistic inference and learning in Markov networks
How to apply the learned model?
Complexity is in #P.
Two types of queries:
Conditional probability: P(Y |E = e) = P(Y ,e)P(e) .
Maximum a posteriori: argmaxyP(y |e) = argmaxy
∑Z P(y ,Z |e).
Generic case for approximation: Markov chain Monte Carlo Gibbs sampling.
What prevents from accelerating this with quantum-enhanced sampling?
Towards Quantum-Assisted AI November 2017 15 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Statistical relational learning
Uncertainty + relational structure.
Combine (first-order) logic and probabilistic graphical models.
Non-IID data.
Markov logic networks are a type of statistical relational learning.
Towards Quantum-Assisted AI November 2017 16 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Markov logic networks
Real world can never match a KB.
Weight each formula in a KB: high weight indicates high probability.
Markov Logic Network
Apply a KB {Fi} with matching weights {wi} to a finite set of constants C to define a Markovnetwork:
Add a binary node for each possible grounding for each atom.
Add a binary feature for each possible grounding of each formula Fi .
It is like a template to generate Markov networks.
Towards Quantum-Assisted AI November 2017 17 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
An example
∀x,y (Referees(x,y)⇒Competent(x))
∀x,y (Referees(x,y)∧Physicist(y)⇒Physicist(x))
C={Alice, Bob}
Physicist(Alice)
Physicist(Bob)
Referees(Alice,Bob)Competent(Alice) Referees(Bob,Alice) Competent(Bob)
Referees(Alice,Alice)
Referees(Bob,Bob)
Towards Quantum-Assisted AI November 2017 18 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
What do we gain?
First-order logic is recovered in the limit of uniform weights.
Unlikely statements will be assigned a low probability.
Cross-over between formal reasoning and probabilistic inference.
Towards Quantum-Assisted AI November 2017 19 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Include evidence
Physicist(Alice)
Physicist(Bob)
Referees(Alice,Bob)Competent(Alice) Referees(Bob,Alice) Competent(Bob)
Referees(Alice,Alice)
Referees(Bob,Bob)
We have true evidence for these:Physicist(Bob)
Referees(Alice,Bob)
Towards Quantum-Assisted AI November 2017 20 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Assignment 1
Physicist(Alice)
Physicist(Bob)
Referees(Alice,Bob)Competent(Alice) Referees(Bob,Alice) Competent(Bob)
Referees(Alice,Alice)
Referees(Bob,Bob)
With this assignment, we actually violate two formulas:
Referees(Alice,Bob)⇒Competent(Alice)
Referees(Alice,Bob)∧Physicist(Bob)⇒Physicist(Alice)
Towards Quantum-Assisted AI November 2017 21 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Assignment 2
Physicist(Alice)
Physicist(Bob)
Referees(Alice,Bob)Competent(Alice) Referees(Bob,Alice) Competent(Bob)
Referees(Alice,Alice)
Referees(Bob,Bob)
Towards Quantum-Assisted AI November 2017 22 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Assignment 3
Physicist(Alice)
Physicist(Bob)
Referees(Alice,Bob)Competent(Alice) Referees(Bob,Alice) Competent(Bob)
Referees(Alice,Alice)
Referees(Bob,Bob)
Towards Quantum-Assisted AI November 2017 23 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Clique size
Markov logic networks are essentially templates to generate Markov networks.
Size of the largest clique: longest formula in KB.
Restricted formula length: controlled clique structure.
Towards Quantum-Assisted AI November 2017 24 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Lifted inference
Do not operate on a propositional level: exploit symmetries.
Variable elimination (2001-2003).
Belief propagation (2008).
Domain lifting (2011).
Weighted first-order model counting (2011).
Massive reduction in maximum degree of nodes.
Source: Kersting (2012): Lifted Probabilistic Inference. Proceedings of ECAITowards Quantum-Assisted AI November 2017 25 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Example: domain-lifted inference
A domain is like a type.
E.g., a variable x ranges over people, {Alice, Bob,. . . }.Coarse-grain the part of the network that we are not grounding out by the observation.
Towards Quantum-Assisted AI November 2017 26 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Quantum annealing and Gibbs sampling
Real-world quantum annealing is noisy. So what can we do?
A B
thermal annealing
thermal state
quantumannealing
Sampling is the most useful quantum-enhanced routine for ML today.Towards Quantum-Assisted AI November 2017 27 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Probabilistic inference with quantum Gibbs sampling
Restricted Boltzmann machine: P(v , h) = 1Z e−E(v ,h).
Idea: representative Boltzmann statistics with fewer samples than MCMC Gibbs sampling.
N >> 1 proposals for quantum BMs:1 Quantum annealing to do sampling.2 Prepare a Gibbs state starting from a mean-field approximation.3 Prepare a Gibbs state starting from an arbitrary state.4 . . .
The actual topology of the nodes is secondary.
Instead of training a BM, we can use the same ideas for inference in an MLN.
Towards Quantum-Assisted AI November 2017 28 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Sampling by annealing
Quantum sampling: use quantum annealing to draw representative samples from aBoltzmann distribution.
Why does it work?
Actual implementation of quantum annealing has > 0 probability of ending in excited state.Distribution of excited states follows a Boltzmann distribution: P(x) = 1
Z exp (−βeff Hf (x)).Use the Hamiltonian describing a Markov network as Hf .
Problems? Many:Connectivity: hardware qubit connectivity may have nothing to do with the structure of theMarkov network.
But with Markov logic networks:
Locality is guaranteed.Max. degree is reduced by lifting.
Towards Quantum-Assisted AI November 2017 29 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Gate-based model
Prepare a thermal state and sample it.‘Asymptotic’ is not good enough if you want a thermal state.From Riera et al., 2012:
This is not the optimal protocol.
Towards Quantum-Assisted AI November 2017 30 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Overview of matching concepts
Probability distribution of an MLN: PM(ω) := 1Z(M) exp
(∑j wj N(fj , ω)
)Formula Weight
Friends(A,B)
Friends(A,A) Friends(B,B)
Friends(B,A)
Smokes(B)Smokes(A)
Cancer(A) Cancer(B)
Local spaceLocal dimension d=2
Total number of nodesState vector
Max degree frequency of atom in formulas
Max. clique size: c. For everyclique, there is a term inthe Hamiltonian.
Domain: {A,B}Domain size: D = |{A,B}| =2Inverse temperature: x,y Friends(x,y) (Smokes(x) Smokes(y))
x Smokes(x) Cancer(x)
Towards Quantum-Assisted AI November 2017 31 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Prepare a thermal state
Best known state preparation protocol (arXiv:1603.02940):
Almost linear in√dNβ/Z
Polynomial in log(1/ε)
Where: N is number of subsystems andd local Hilbert space dimension.
The good: Huge improvement over ∼ dN/ε run time of classical simulated annealing.
The bad: Still exponential in N.
The ugly: Requires essentially a universal quantum computer.
Towards Quantum-Assisted AI November 2017 32 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Can we hope for something better?
Not really. . .
Finding and sampling from thermal states of (quantum) many-body problems is usuallyhard even though they have much more structure:
Very small cliquesSites on a simple latticeCliques geometrically local
For ground states we even have rigorous hardness results:
Classical 3-SAT is NP-complete.Estimating quantum ground state energy is QMA-hard.
Towards Quantum-Assisted AI November 2017 33 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
How real is all this?
We started the first incubator program in the world for QML startups.
Close to 30 ventures as of today.
Includes:One month of intensive technical training in September.Business guidance and investor access.Pre-seed investment up to $80k from three Silicon Valley venture capital firms.
Creative Destruction Lab at the University of Toronto.
Also host of the largest ML accelerator in the world.
Sick of academia? Apply in the next intake: https://creativedestructionlab.com/quantum
Towards Quantum-Assisted AI November 2017 34 / 35
Introduction GOFAI Probabilistic Graphical Models Statistical Relational Learning Quantum Gibbs Sampling Summary
Summary
Deep architectures are good at artificial intuition.
Probabilistic graphical models are better at capturing causation.
Quantum-enhanced sampling can enable these models the same way GPUs enabled deeplearning.
arXiv:1611.08104. If you want some entertainment, read the acknowledgement of thepublished version.
Towards Quantum-Assisted AI November 2017 35 / 35