Basic Notions A Quantum representation of NMC Quantum Pattern Recognition on a Classical Computer Using the rescaling Some practical implementation Quantum-inspired Classification Process Giuseppe Sergioli & Alophis group (Applied Logics, Philosophy and History of Science) University of Cagliari [ giuseppe.sergioli@gmail.com ] November 3th-4th, Cagliari Giuseppe Sergioli & Alophis group Quantum-inspired Classification Process
Basic Notions A Quantum representation of NMC Quantum Pattern Recognition on a Classical Computer Using the rescaling Some practical implementation Univeristy of Cagliari Department of Philosophy Department of Electronic Engineering Project: " Modelling the Uncertainty: Quantum Theory at the service of Pattern Recognition " Giuseppe Sergioli & Alophis group Quantum-inspired Classification Process
Basic Notions A Quantum representation of NMC Quantum Pattern Recognition on a Classical Computer Using the rescaling Some practical implementation List of contents ◮ Basic notions ◮ A Quantum representation of NMC ◮ Inspired Quantum Pattern Recognition on a Classical Computer ◮ Non-invariance under rescaling: from an Embarrassment to an Asset ◮ Some practical implementation Giuseppe Sergioli & Alophis group Quantum-inspired Classification Process
Basic Notions A Quantum representation of NMC Training set, Class, Pattern, Feature Quantum Pattern Recognition on a Classical Computer Nearest Mean Classifier (NMC) Using the rescaling Some practical implementation Training set, Class, Pattern, Feature Let us consider (as a simple example) two disjoint sets A and B of different objects (say cats and dogs). During the training set , we take n objects from the set A and m objects from the set B . Let C a ⊂ A and C b ⊂ B . We can measure two (or more) features of each object a i ∈ C a and b i ∈ C b (for istance the weight and the lenght of the tail). We say that C a and C b are classes and the objects a i and b i are patterns that are characterized by their features. We write, for example, a i = { x 1 , x 2 } , where x 1 and x 2 are the weight and the lenght of the tail of the cat a i , respectively. Giuseppe Sergioli & Alophis group Quantum-inspired Classification Process
Basic Notions A Quantum representation of NMC Training set, Class, Pattern, Feature Quantum Pattern Recognition on a Classical Computer Nearest Mean Classifier (NMC) Using the rescaling Some practical implementation Nearest Mean Classifier (NMC) Let us consider the classes C a = { a 1 , ..., a n } and C b = { b 1 , ..., b m } , with a i and b i belonging to the training set and an arbitrary pattern c i = { x 1 , x 2 } belonging to the test set . The goal is to establish whether is more probably that c i ∈ A or c i ∈ B . We - only - consider the centroids a ∗ and b ∗ of C a and C b and the euclidean distances Ed ( c i , a ∗ ) and Ed ( c i , b ∗ ) . Hence, if Ed ( c i , a ∗ ) ≥ Ed ( c i , b ∗ ) then (is more probabily that) c i ∈ B ; otherwise c i ∈ A . Giuseppe Sergioli & Alophis group Quantum-inspired Classification Process
Basic Notions A Quantum representation of NMC Training set, Class, Pattern, Feature Quantum Pattern Recognition on a Classical Computer Nearest Mean Classifier (NMC) Using the rescaling Some practical implementation The notions of "Pattern" and "Classification" are very general and are naturally connected to our common processes of acquiring knowledge. Giuseppe Sergioli & Alophis group Quantum-inspired Classification Process
Basic Notions A Quantum representation of NMC How to encode a Pattern as a Density operator Quantum Pattern Recognition on a Classical Computer Normalized Trace Distance Using the rescaling Some practical implementation All we need in order to provide a Quantum representation of NMC are: ◮ a sutable encoding from patterns to quantum objects ◮ a quantum counterpart of the centroid ◮ a quantum counterpart of the Euclidean distance Giuseppe Sergioli & Alophis group Quantum-inspired Classification Process
Basic Notions A Quantum representation of NMC How to encode a Pattern as a Density operator Quantum Pattern Recognition on a Classical Computer Normalized Trace Distance Using the rescaling Some practical implementation An Example: Stereographic encoding It is possible to map the pattern a = ( x , y ) onto the surface of a radius one sphere by the stereographic projection : x 2 + y 2 + 1 , x 2 + y 2 − 1 2 x 2 y ( x , y ) → ( x 2 + y 2 + 1 ) . x 2 + y 2 + 1 , By placing the Bloch components: x 2 + y 2 + 1 ; r 3 = x 2 + y 2 − 1 2 y 2 x r 1 = x 2 + y 2 + 1 ; r 2 = x 2 + y 2 + 1 we obtain: x 2 + y 2 � � � � ρ a = 1 1 1 + r 3 r 1 − ir 2 x − iy = . x 2 + y 2 + 1 r 1 + ir 2 1 − r 3 x + iy 1 2 Giuseppe Sergioli & Alophis group Quantum-inspired Classification Process
Basic Notions A Quantum representation of NMC How to encode a Pattern as a Density operator Quantum Pattern Recognition on a Classical Computer Normalized Trace Distance Using the rescaling Some practical implementation Example Let us consider the pattern a = { 1 , 3 } . Its corresponding Density pattern ρ a , is: � � ρ a = 1 10 1 − 3 i 11 1 + 3 i 1 We call ρ a Density Pattern . Giuseppe Sergioli & Alophis group Quantum-inspired Classification Process
Basic Notions A Quantum representation of NMC How to encode a Pattern as a Density operator Quantum Pattern Recognition on a Classical Computer Normalized Trace Distance Using the rescaling Some practical implementation Moon Dataset 1.0 1.5 0.5 0.0 1.0 � 0.5 � 1.0 0.5 1.0 � 1.0 0.0 � 0.5 0.5 0.0 0.5 0.0 1.0 � 0.5 � 0.5 � 1.0 � 1.0 � 1.5 � 1.0 � 0.5 0.0 0.5 1.0 1.5 2.0 Figure : Classical Patterns Figure : Density Patterns Giuseppe Sergioli & Alophis group Quantum-inspired Classification Process
Basic Notions A Quantum representation of NMC How to encode a Pattern as a Density operator Quantum Pattern Recognition on a Classical Computer Normalized Trace Distance Using the rescaling Some practical implementation Another Example: Projective encoding v ≡ ( x , y ) → ( x y || v || ) ≡ (¯ x , ¯ || v || , y ) | ψ v � = ¯ x | 0 � + ¯ y | 1 � ρ v = | ψ v �� ψ v | ...and many others. Giuseppe Sergioli & Alophis group Quantum-inspired Classification Process
Basic Notions A Quantum representation of NMC How to encode a Pattern as a Density operator Quantum Pattern Recognition on a Classical Computer Normalized Trace Distance Using the rescaling Some practical implementation Preservation of the Order Let a = { x a , y a } b = { x b , y b } and c = { x c , y c } be three arbitrary patterns and let ρ i be the density pattern associated to the pattern i . If Ed ( a , b ) ≤ Ed ( b , c ) (where Ed is the Euclidian distance), is it possible to define a Quantum distance such that Qd ( ρ a , ρ b ) ≤ Qd ( ρ b , ρ c ) ? Giuseppe Sergioli & Alophis group Quantum-inspired Classification Process
Basic Notions A Quantum representation of NMC How to encode a Pattern as a Density operator Quantum Pattern Recognition on a Classical Computer Normalized Trace Distance Using the rescaling Some practical implementation Normalized Trace Distance Let us consider two patterns a = { x a , y a } and b = { x b , y b } . � � 1 + r a 3 r a 1 − ir a 2 Let ρ a = 1 the density pattern 2 r a 1 + ir a 2 1 − r a 3 associated to a ; similarly for b . √ 2 Let place K = ( 1 − r a 3 )( 1 − r b 3 ) and let we define the normalized trace distance as: K Td ( ρ a , ρ b ) , where Td is the usual Trace distance . It is straightforward to show that Ed ( a , b ) = K Td ( ρ a , ρ b ) . Giuseppe Sergioli & Alophis group Quantum-inspired Classification Process
Basic Notions A Quantum representation of NMC How to encode a Pattern as a Density operator Quantum Pattern Recognition on a Classical Computer Normalized Trace Distance Using the rescaling Some practical implementation Classification Hence, given a and b as the centroids of C a and C b respectively, if K Td ( ρ x , ρ a ) ≥ K Td ( ρ x , ρ b ) then x ∈ B ; otherwise x ∈ A . Similarly to the classical case. Giuseppe Sergioli & Alophis group Quantum-inspired Classification Process
Basic Notions A Quantum representation of NMC How to encode a Pattern as a Density operator Quantum Pattern Recognition on a Classical Computer Normalized Trace Distance Using the rescaling Some practical implementation Convenience on a Quantum Computer Quoting S. Lloyd, M. Mohseni and P . Rebentrost (Quantum algorithms for supervised and unsupervised machine learning - arXiv:1307.0411; 2013) " Estimating distances between vectors in N-dimensional vector spaces then takes time O ( logN ) on a quantum computer. By contrast, sampling and estimating distances between vectors on a classical computer is apparently exponentially hard. Quantum machine learning provides an exponential speed-ups over all known classical algorithms for problems involving evaluating distances between large vectors. " But it turns out to be convenient mostly on a Classical Computer... Giuseppe Sergioli & Alophis group Quantum-inspired Classification Process
Recommend
More recommend