58
Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1 CNRS, Universit´ e Paris Diderot, Paris, France. 2 Nanyang Technological University, Singapore. January 17, 2017 Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Quantum Recommendation Systems.

Iordanis Kerenidis 1 Anupam Prakash 2

1CNRS, Universite Paris Diderot, Paris, France.

2Nanyang Technological University, Singapore.

January 17, 2017

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 2: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

The HHL algorithm

Utilize intrinsic linear algebra capabilities of quantumcomputers for exponential speedups.

Vector state |x〉 =∑

i xi |i〉 where x ∈ Rn is a unit vector.

Given sparse matrix A ∈ Rn×n and |b〉 there is a quantumalgorithm to prepare |A−1b〉 in time polylog(n). [Harrow,Hassidim, Lloyd]

Assumptions: |b〉 can be prepared polylog(n) time and A ispolylog(n) sparse.

Incomparable to classical linear system solver which returnsvector x ∈ Rn as opposed to |x〉.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 3: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

The HHL algorithm

Utilize intrinsic linear algebra capabilities of quantumcomputers for exponential speedups.

Vector state |x〉 =∑

i xi |i〉 where x ∈ Rn is a unit vector.

Given sparse matrix A ∈ Rn×n and |b〉 there is a quantumalgorithm to prepare |A−1b〉 in time polylog(n). [Harrow,Hassidim, Lloyd]

Assumptions: |b〉 can be prepared polylog(n) time and A ispolylog(n) sparse.

Incomparable to classical linear system solver which returnsvector x ∈ Rn as opposed to |x〉.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 4: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

The HHL algorithm

Utilize intrinsic linear algebra capabilities of quantumcomputers for exponential speedups.

Vector state |x〉 =∑

i xi |i〉 where x ∈ Rn is a unit vector.

Given sparse matrix A ∈ Rn×n and |b〉 there is a quantumalgorithm to prepare |A−1b〉 in time polylog(n). [Harrow,Hassidim, Lloyd]

Assumptions: |b〉 can be prepared polylog(n) time and A ispolylog(n) sparse.

Incomparable to classical linear system solver which returnsvector x ∈ Rn as opposed to |x〉.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 5: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

The HHL algorithm

Utilize intrinsic linear algebra capabilities of quantumcomputers for exponential speedups.

Vector state |x〉 =∑

i xi |i〉 where x ∈ Rn is a unit vector.

Given sparse matrix A ∈ Rn×n and |b〉 there is a quantumalgorithm to prepare |A−1b〉 in time polylog(n). [Harrow,Hassidim, Lloyd]

Assumptions: |b〉 can be prepared polylog(n) time and A ispolylog(n) sparse.

Incomparable to classical linear system solver which returnsvector x ∈ Rn as opposed to |x〉.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 6: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

The HHL algorithm

Utilize intrinsic linear algebra capabilities of quantumcomputers for exponential speedups.

Vector state |x〉 =∑

i xi |i〉 where x ∈ Rn is a unit vector.

Given sparse matrix A ∈ Rn×n and |b〉 there is a quantumalgorithm to prepare |A−1b〉 in time polylog(n). [Harrow,Hassidim, Lloyd]

Assumptions: |b〉 can be prepared polylog(n) time and A ispolylog(n) sparse.

Incomparable to classical linear system solver which returnsvector x ∈ Rn as opposed to |x〉.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 7: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Quantum Machine Learning

HHL led to several proposals for quantum machine learningalgorithms.

Principal components analysis, classification with `2-SVMs,k-means clustering, perceptron, nearest neighbors... [Lloyd,Mohseni, Rebentrost, Wiebe, Kapoor, Svore]

Algorithms achieve exponential speedups only forsparse/well-conditioned data.

Sometimes a variant of the classical problem is solved: `1 vs`2-SVM.

Incomparable with classical.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 8: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Quantum Machine Learning

HHL led to several proposals for quantum machine learningalgorithms.

Principal components analysis, classification with `2-SVMs,k-means clustering, perceptron, nearest neighbors... [Lloyd,Mohseni, Rebentrost, Wiebe, Kapoor, Svore]

Algorithms achieve exponential speedups only forsparse/well-conditioned data.

Sometimes a variant of the classical problem is solved: `1 vs`2-SVM.

Incomparable with classical.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 9: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Quantum Machine Learning

HHL led to several proposals for quantum machine learningalgorithms.

Principal components analysis, classification with `2-SVMs,k-means clustering, perceptron, nearest neighbors... [Lloyd,Mohseni, Rebentrost, Wiebe, Kapoor, Svore]

Algorithms achieve exponential speedups only forsparse/well-conditioned data.

Sometimes a variant of the classical problem is solved: `1 vs`2-SVM.

Incomparable with classical.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 10: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Quantum Machine Learning

HHL led to several proposals for quantum machine learningalgorithms.

Principal components analysis, classification with `2-SVMs,k-means clustering, perceptron, nearest neighbors... [Lloyd,Mohseni, Rebentrost, Wiebe, Kapoor, Svore]

Algorithms achieve exponential speedups only forsparse/well-conditioned data.

Sometimes a variant of the classical problem is solved: `1 vs`2-SVM.

Incomparable with classical.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 11: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Quantum Machine Learning

HHL led to several proposals for quantum machine learningalgorithms.

Principal components analysis, classification with `2-SVMs,k-means clustering, perceptron, nearest neighbors... [Lloyd,Mohseni, Rebentrost, Wiebe, Kapoor, Svore]

Algorithms achieve exponential speedups only forsparse/well-conditioned data.

Sometimes a variant of the classical problem is solved: `1 vs`2-SVM.

Incomparable with classical.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 12: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Quantum Recommendation Systems

Open problem: A quantum machine learning algorithm withexponential worst case speedup for classical problem.

Quantum recommendation systems.

An exponential speedup over classical with similarassumptions and guarantees.

An end to end application with no assumptions on the dataset.

Solves the ’same’ problem as a classical recommendationsystem.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 13: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Quantum Recommendation Systems

Open problem: A quantum machine learning algorithm withexponential worst case speedup for classical problem.

Quantum recommendation systems.

An exponential speedup over classical with similarassumptions and guarantees.

An end to end application with no assumptions on the dataset.

Solves the ’same’ problem as a classical recommendationsystem.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 14: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Quantum Recommendation Systems

Open problem: A quantum machine learning algorithm withexponential worst case speedup for classical problem.

Quantum recommendation systems.

An exponential speedup over classical with similarassumptions and guarantees.

An end to end application with no assumptions on the dataset.

Solves the ’same’ problem as a classical recommendationsystem.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 15: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Quantum Recommendation Systems

Open problem: A quantum machine learning algorithm withexponential worst case speedup for classical problem.

Quantum recommendation systems.

An exponential speedup over classical with similarassumptions and guarantees.

An end to end application with no assumptions on the dataset.

Solves the ’same’ problem as a classical recommendationsystem.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 16: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Quantum Recommendation Systems

Open problem: A quantum machine learning algorithm withexponential worst case speedup for classical problem.

Quantum recommendation systems.

An exponential speedup over classical with similarassumptions and guarantees.

An end to end application with no assumptions on the dataset.

Solves the ’same’ problem as a classical recommendationsystem.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 17: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

The Recommendation Problem

The preference matrix P.

P1 P2 P3 P4 · · · · · · Pn−1 Pn

U3

U2

U1

...

Um

.8 .9 · · · .2

.2 .6 · · · .85

.75 .2

.1 .4 · · · .9

? ? ?

? ??

? ??

? ? ??

· · · · · · · · · · · · · · · · · · · · · · · ·

· · · · · ·

· · · · · ·

· · · · · ·

· · · · · ·

· · · · · ·

Pij is the value of item j for user i . Samples from P arrive inan online manner.

The assumption that P has a good rank-k approximation forsmall k is widely used.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 18: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

The Recommendation Problem

The preference matrix P.

P1 P2 P3 P4 · · · · · · Pn−1 Pn

U3

U2

U1

...

Um

.8 .9 · · · .2

.2 .6 · · · .85

.75 .2

.1 .4 · · · .9

? ? ?

? ??

? ??

? ? ??

· · · · · · · · · · · · · · · · · · · · · · · ·

· · · · · ·

· · · · · ·

· · · · · ·

· · · · · ·

· · · · · ·

Pij is the value of item j for user i . Samples from P arrive inan online manner.

The assumption that P has a good rank-k approximation forsmall k is widely used.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 19: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

The Recommendation Problem

The preference matrix P.

P1 P2 P3 P4 · · · · · · Pn−1 Pn

U3

U2

U1

...

Um

.8 .9 · · · .2

.2 .6 · · · .85

.75 .2

.1 .4 · · · .9

? ? ?

? ??

? ??

? ? ??

· · · · · · · · · · · · · · · · · · · · · · · ·

· · · · · ·

· · · · · ·

· · · · · ·

· · · · · ·

· · · · · ·

Pij is the value of item j for user i . Samples from P arrive inan online manner.

The assumption that P has a good rank-k approximation forsmall k is widely used.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 20: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

The Netflix problem

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 21: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Reconstruction vs sampling

Matrix reconstruction algorithms reconstruct P ≈ P using thelow rank assumption and require time poly(mn).

A reconstruction based recommendation system requires timepoly(n), even with pre-computation.

Matrix sampling suffices to obtain good recommendations.

Quantum algorithms can perform matrix sampling.

Theorem

There is a quantum recommendation algorithm with running timeO(poly(k)polylog(mn)).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 22: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Reconstruction vs sampling

Matrix reconstruction algorithms reconstruct P ≈ P using thelow rank assumption and require time poly(mn).

A reconstruction based recommendation system requires timepoly(n), even with pre-computation.

Matrix sampling suffices to obtain good recommendations.

Quantum algorithms can perform matrix sampling.

Theorem

There is a quantum recommendation algorithm with running timeO(poly(k)polylog(mn)).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 23: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Reconstruction vs sampling

Matrix reconstruction algorithms reconstruct P ≈ P using thelow rank assumption and require time poly(mn).

A reconstruction based recommendation system requires timepoly(n), even with pre-computation.

Matrix sampling suffices to obtain good recommendations.

Quantum algorithms can perform matrix sampling.

Theorem

There is a quantum recommendation algorithm with running timeO(poly(k)polylog(mn)).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 24: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Reconstruction vs sampling

Matrix reconstruction algorithms reconstruct P ≈ P using thelow rank assumption and require time poly(mn).

A reconstruction based recommendation system requires timepoly(n), even with pre-computation.

Matrix sampling suffices to obtain good recommendations.

Quantum algorithms can perform matrix sampling.

Theorem

There is a quantum recommendation algorithm with running timeO(poly(k)polylog(mn)).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 25: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Reconstruction vs sampling

Matrix reconstruction algorithms reconstruct P ≈ P using thelow rank assumption and require time poly(mn).

A reconstruction based recommendation system requires timepoly(n), even with pre-computation.

Matrix sampling suffices to obtain good recommendations.

Quantum algorithms can perform matrix sampling.

Theorem

There is a quantum recommendation algorithm with running timeO(poly(k)polylog(mn)).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 26: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Computational Model

Samples from P arrive in an online manner and are stored indata structure with update time O(log2 mn).

The quantum algorithm has oracle access to binary tree datastructure storing additional metadata.

1

0.3

0.2 0.1

0.7

0.6 0.1

We use the standard memory model used for algorithms likeGrover search.

Users arrive into system in an online manner and systemprovides recommendations in time poly(k)polylog(mn).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 27: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Computational Model

Samples from P arrive in an online manner and are stored indata structure with update time O(log2 mn).

The quantum algorithm has oracle access to binary tree datastructure storing additional metadata.

1

0.3

0.2 0.1

0.7

0.6 0.1

We use the standard memory model used for algorithms likeGrover search.

Users arrive into system in an online manner and systemprovides recommendations in time poly(k)polylog(mn).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 28: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Computational Model

Samples from P arrive in an online manner and are stored indata structure with update time O(log2 mn).

The quantum algorithm has oracle access to binary tree datastructure storing additional metadata.

1

0.3

0.2 0.1

0.7

0.6 0.1

We use the standard memory model used for algorithms likeGrover search.

Users arrive into system in an online manner and systemprovides recommendations in time poly(k)polylog(mn).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 29: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Computational Model

Samples from P arrive in an online manner and are stored indata structure with update time O(log2 mn).

The quantum algorithm has oracle access to binary tree datastructure storing additional metadata.

1

0.3

0.2 0.1

0.7

0.6 0.1

We use the standard memory model used for algorithms likeGrover search.

Users arrive into system in an online manner and systemprovides recommendations in time poly(k)polylog(mn).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 30: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Singular value estimation

The singular value decomposition for matrix A is written asA =

∑i σiuiv

ti .

The rank-k approximation Ak =∑

i∈[k] σiuivti minimizes

‖A− Ak‖F .

Quantum singular value estimation:

Theorem

There is an algorithm with running time O(polylog(mn)/ε) thattransforms

∑i αi |vi 〉 →

∑i αi |vi 〉 |σi 〉 where σi ∈ σi ± ε ‖A‖F

with probability at least 1− 1/poly(n).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 31: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Singular value estimation

The singular value decomposition for matrix A is written asA =

∑i σiuiv

ti .

The rank-k approximation Ak =∑

i∈[k] σiuivti minimizes

‖A− Ak‖F .

Quantum singular value estimation:

Theorem

There is an algorithm with running time O(polylog(mn)/ε) thattransforms

∑i αi |vi 〉 →

∑i αi |vi 〉 |σi 〉 where σi ∈ σi ± ε ‖A‖F

with probability at least 1− 1/poly(n).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 32: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Singular value estimation

The singular value decomposition for matrix A is written asA =

∑i σiuiv

ti .

The rank-k approximation Ak =∑

i∈[k] σiuivti minimizes

‖A− Ak‖F .

Quantum singular value estimation:

Theorem

There is an algorithm with running time O(polylog(mn)/ε) thattransforms

∑i αi |vi 〉 →

∑i αi |vi 〉 |σi 〉 where σi ∈ σi ± ε ‖A‖F

with probability at least 1− 1/poly(n).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 33: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Singular value estimation

The singular value decomposition for matrix A is written asA =

∑i σiuiv

ti .

The rank-k approximation Ak =∑

i∈[k] σiuivti minimizes

‖A− Ak‖F .

Quantum singular value estimation:

Theorem

There is an algorithm with running time O(polylog(mn)/ε) thattransforms

∑i αi |vi 〉 →

∑i αi |vi 〉 |σi 〉 where σi ∈ σi ± ε ‖A‖F

with probability at least 1− 1/poly(n).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 34: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Matrix Sampling

Let T be a 0/1 matrix such that Tij = 1 if item j is ’good’recommendation for user i .

P1 P2 P3 P4 · · · · · · Pn−1 Pn

U3

U2

U1

...

Um

1 1 · · · 0

0 0 · · · 1

1 0

0 0 · · · 1

? ? ?

? ??

? ??

? ? ??

· · · · · · · · · · · · · · · · · · · · · · · ·

· · · · · ·

· · · · · ·

· · · · · ·

· · · · · ·

· · · · · ·

Set the ?s to 0 and rescale to obtain a subsample matrix T .

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 35: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Matrix Sampling

Let T be a 0/1 matrix such that Tij = 1 if item j is ’good’recommendation for user i .

P1 P2 P3 P4 · · · · · · Pn−1 Pn

U3

U2

U1

...

Um

1 1 · · · 0

0 0 · · · 1

1 0

0 0 · · · 1

? ? ?

? ??

? ??

? ? ??

· · · · · · · · · · · · · · · · · · · · · · · ·

· · · · · ·

· · · · · ·

· · · · · ·

· · · · · ·

· · · · · ·

Set the ?s to 0 and rescale to obtain a subsample matrix T .

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 36: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Matrix Sampling

Tk

TPRounding

Low rankassumption

[Achlioptas, McSherry]extended

Uniform subsample

Tk

T

SVD,QSVE

Figure: Matrix sampling based recommendation system.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 37: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Matrix Sampling

T is the binary recommendation matrix obtained by roundingP.

T is a uniform subsample of T :

Aij =

{Aij/p [with probability p]

0 [otherwise]

Tk and Tk are rank-k approximations for T and T .

The low rank assumption implies that ‖T − Tk‖ ≤ ε ‖T‖F forsmall k .

Analysis: Sampling from matrix ’close to’ Tk yields goodrecommendations.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 38: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Matrix Sampling

T is the binary recommendation matrix obtained by roundingP.

T is a uniform subsample of T :

Aij =

{Aij/p [with probability p]

0 [otherwise]

Tk and Tk are rank-k approximations for T and T .

The low rank assumption implies that ‖T − Tk‖ ≤ ε ‖T‖F forsmall k .

Analysis: Sampling from matrix ’close to’ Tk yields goodrecommendations.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 39: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Matrix Sampling

T is the binary recommendation matrix obtained by roundingP.

T is a uniform subsample of T :

Aij =

{Aij/p [with probability p]

0 [otherwise]

Tk and Tk are rank-k approximations for T and T .

The low rank assumption implies that ‖T − Tk‖ ≤ ε ‖T‖F forsmall k .

Analysis: Sampling from matrix ’close to’ Tk yields goodrecommendations.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 40: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Matrix Sampling

T is the binary recommendation matrix obtained by roundingP.

T is a uniform subsample of T :

Aij =

{Aij/p [with probability p]

0 [otherwise]

Tk and Tk are rank-k approximations for T and T .

The low rank assumption implies that ‖T − Tk‖ ≤ ε ‖T‖F forsmall k .

Analysis: Sampling from matrix ’close to’ Tk yields goodrecommendations.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 41: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Matrix Sampling

T is the binary recommendation matrix obtained by roundingP.

T is a uniform subsample of T :

Aij =

{Aij/p [with probability p]

0 [otherwise]

Tk and Tk are rank-k approximations for T and T .

The low rank assumption implies that ‖T − Tk‖ ≤ ε ‖T‖F forsmall k .

Analysis: Sampling from matrix ’close to’ Tk yields goodrecommendations.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 42: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Analysis

Samples from Tk are good recommendations, for largefraction of ’typical’ users.

Sampling from Tk suffices.

Theorem (AM02)

If A is obtained from a 0/1 matrix A by subsampling withprobability p = 16n/η ‖A‖2

F then with probability at least1− exp(−19(log n)4), for all k,

||A− Ak ||F ≤ ||A− Ak ||F + 3√ηk1/4||A||F

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 43: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Analysis

Samples from Tk are good recommendations, for largefraction of ’typical’ users.

Sampling from Tk suffices.

Theorem (AM02)

If A is obtained from a 0/1 matrix A by subsampling withprobability p = 16n/η ‖A‖2

F then with probability at least1− exp(−19(log n)4), for all k ,

||A− Ak ||F ≤ ||A− Ak ||F + 3√ηk1/4||A||F

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 44: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Analysis

Samples from Tk are good recommendations, for largefraction of ’typical’ users.

Sampling from Tk suffices.

Theorem (AM02)

If A is obtained from a 0/1 matrix A by subsampling withprobability p = 16n/η ‖A‖2

F then with probability at least1− exp(−19(log n)4), for all k ,

||A− Ak ||F ≤ ||A− Ak ||F + 3√ηk1/4||A||F

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 45: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Analysis

The quantum algorithm samples from T≥σ,κ, a projection ontoall singular values ≥ σ and some in the range [(1− κ)σ, σ).

We extend AM02 to this setting showing that:

||T − Tσ,κ||F ≤ 9ε ‖T‖F

For most typical users, samples from (Tσ,κ)i are goodrecommendations with high probability.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 46: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Analysis

The quantum algorithm samples from T≥σ,κ, a projection ontoall singular values ≥ σ and some in the range [(1− κ)σ, σ).

We extend AM02 to this setting showing that:

||T − Tσ,κ||F ≤ 9ε ‖T‖F

For most typical users, samples from (Tσ,κ)i are goodrecommendations with high probability.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 47: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Analysis

The quantum algorithm samples from T≥σ,κ, a projection ontoall singular values ≥ σ and some in the range [(1− κ)σ, σ).

We extend AM02 to this setting showing that:

||T − Tσ,κ||F ≤ 9ε ‖T‖F

For most typical users, samples from (Tσ,κ)i are goodrecommendations with high probability.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 48: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Quantum Recommendation Algorithm

Prepare state |Ti 〉 corresponding to row for user i .

Apply quantum projection algorithm to |Ti 〉 to obtain|(T≥σ,κ)i 〉.Measure projected state in computational basis to getrecommendation.

The threshold σ =ε√p‖A‖F√

2kand κ = 1

3 .

Running time depends on the threshold and not the conditionnumber.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 49: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Quantum Recommendation Algorithm

Prepare state |Ti 〉 corresponding to row for user i .

Apply quantum projection algorithm to |Ti 〉 to obtain|(T≥σ,κ)i 〉.

Measure projected state in computational basis to getrecommendation.

The threshold σ =ε√p‖A‖F√

2kand κ = 1

3 .

Running time depends on the threshold and not the conditionnumber.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 50: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Quantum Recommendation Algorithm

Prepare state |Ti 〉 corresponding to row for user i .

Apply quantum projection algorithm to |Ti 〉 to obtain|(T≥σ,κ)i 〉.Measure projected state in computational basis to getrecommendation.

The threshold σ =ε√p‖A‖F√

2kand κ = 1

3 .

Running time depends on the threshold and not the conditionnumber.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 51: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Quantum Recommendation Algorithm

Prepare state |Ti 〉 corresponding to row for user i .

Apply quantum projection algorithm to |Ti 〉 to obtain|(T≥σ,κ)i 〉.Measure projected state in computational basis to getrecommendation.

The threshold σ =ε√p‖A‖F√

2kand κ = 1

3 .

Running time depends on the threshold and not the conditionnumber.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 52: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Quantum Recommendation Algorithm

Prepare state |Ti 〉 corresponding to row for user i .

Apply quantum projection algorithm to |Ti 〉 to obtain|(T≥σ,κ)i 〉.Measure projected state in computational basis to getrecommendation.

The threshold σ =ε√p‖A‖F√

2kand κ = 1

3 .

Running time depends on the threshold and not the conditionnumber.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 53: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

The projection algorithm

Let A =∑

i σiuivti be the singular value decomposition, write

input |x〉 =∑

i αi |vi 〉.

Estimate singular values∑

i αi |vi 〉 |σi 〉 to additive error κσ/2.

Map to∑

i αi |vi 〉 |σi 〉 |t〉 where t = 1 if σi ≥ (1− κ/2)σ anderase σi .

Post-select on t = 1.

The output |A≥σ,κx〉 a projection the space of singular vectorswith singular values ≥ σ and some in the range [(1− κ)σ, σ).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 54: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

The projection algorithm

Let A =∑

i σiuivti be the singular value decomposition, write

input |x〉 =∑

i αi |vi 〉.Estimate singular values

∑i αi |vi 〉 |σi 〉 to additive error κσ/2.

Map to∑

i αi |vi 〉 |σi 〉 |t〉 where t = 1 if σi ≥ (1− κ/2)σ anderase σi .

Post-select on t = 1.

The output |A≥σ,κx〉 a projection the space of singular vectorswith singular values ≥ σ and some in the range [(1− κ)σ, σ).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 55: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

The projection algorithm

Let A =∑

i σiuivti be the singular value decomposition, write

input |x〉 =∑

i αi |vi 〉.Estimate singular values

∑i αi |vi 〉 |σi 〉 to additive error κσ/2.

Map to∑

i αi |vi 〉 |σi 〉 |t〉 where t = 1 if σi ≥ (1− κ/2)σ anderase σi .

Post-select on t = 1.

The output |A≥σ,κx〉 a projection the space of singular vectorswith singular values ≥ σ and some in the range [(1− κ)σ, σ).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 56: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

The projection algorithm

Let A =∑

i σiuivti be the singular value decomposition, write

input |x〉 =∑

i αi |vi 〉.Estimate singular values

∑i αi |vi 〉 |σi 〉 to additive error κσ/2.

Map to∑

i αi |vi 〉 |σi 〉 |t〉 where t = 1 if σi ≥ (1− κ/2)σ anderase σi .

Post-select on t = 1.

The output |A≥σ,κx〉 a projection the space of singular vectorswith singular values ≥ σ and some in the range [(1− κ)σ, σ).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 57: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

The projection algorithm

Let A =∑

i σiuivti be the singular value decomposition, write

input |x〉 =∑

i αi |vi 〉.Estimate singular values

∑i αi |vi 〉 |σi 〉 to additive error κσ/2.

Map to∑

i αi |vi 〉 |σi 〉 |t〉 where t = 1 if σi ≥ (1− κ/2)σ anderase σi .

Post-select on t = 1.

The output |A≥σ,κx〉 a projection the space of singular vectorswith singular values ≥ σ and some in the range [(1− κ)σ, σ).

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle

Page 58: Quantum Recommendation Systems....2017/01/17  · Quantum Recommendation Systems. Iordanis Kerenidis 1 Anupam Prakash 2 1CNRS, Universit e Paris Diderot, Paris, France. 2Nanyang Technological

Open Questions

Find a classical algorithm matrix sampling basedrecommendation algorithm that runs in timeO(poly(k)polylog(mn)).

OR

Prove a lower bound to rule out such an algorithm.

Find more quantum machine learning algorithms.

Iordanis Kerenidis , Anupam Prakash QIP-2017, Seattle