Docsity

Quantum Mechanics and Data Mining, Lecture notes of Quantum Mechanics

Toggle sidebar
bg1
1
SLAC-PUB-13759
Strange Bedfellows: Quantum Mechanics and Data Mining
Marvin Weinsteinaāˆ—
aSLAC National Accelerator Laboratory,
Stanford, CA, USA
Last year, in 2008, I gave a talk titled Quantum Calisthenics. This year I am going to tell you about how the
work I described then has spun off into a most unlikely direction. What I am going to talk about is how one
maps the problem of finding clusters in a given data set into a problem in quantum mechanics. I will then use
the tricks I described to let quantum evolution lets the clusters come together on their own.
1. What Is This About ?
Since I am talking to you at Light Cone 2009, it
is fun for me to point out that a good deal of the
material I will present is a direct spin-off of ma-
terial I presented last year in my talk, Quantum
Calisthenics. What is new (and surprising to me)
is that the ideas for solving problems in quantum
mechanics would prove extremely useful in deal-
ing with data-mining, a problem in computer sci-
ence that, at first glance, does not appear to have
anything to do with quantum physics, or for that
matter, with any kind of physics. In the next few
minutes hope to convince you that despite ap-
pearances data-mining and quantum physics are
a match made in heaven.
1.1. What Is The Problem And How Does
It Affect You ?
As one wag said, the problem of data-mining
can be summarized by, ā€If a supermarket cus-
tomer buys formula and diapers, how likely are
they to buy beer?ā€. Clearly, if it is possible to
give a good answer to this question, a supermar-
ket manager can decide if it is better to put the
beer next to the diapers, or to put it at the other
end of the store to encourage impulse buying.
āˆ—This work was supported by the U. S. DOE, Contract
No. DE-AC02-76SF00515.
As amusing as this simple summary may be,
there is a bit more to the story. For example,
other businesses that engage in data-mining are
Amazon and NETFLIX. Both companies have
large data bases containing the information about
each customer’s previous purchases. Their goal in
mining this data is to suggest what the next book
a given customer might like to purchase, or movie
she might like to rent. They base their suggestion
on what they believe customers like her have pur-
chased or rented. The key question is how do
they determine who is a customer like her ? In
general the examination of unstructured data to
find clusters that are similar in some way is a
key element of data-mining. The search for these
structures in a data-set is imaginatively referred
to as clustering.
While the use of clustering by Amazon and
NETFLIX may improve the shopping experience,
data-mining affects all of us in ways that impact
out existence at a much more important level.
This happens when banks and insurance compa-
nies apply it to the problem of scoring. Basically,
the idea is to take all of the data they have about
people and identify clusters of similar people so
as to predict how likely it is that an applicant will
default on a mortgage, or loan, or how likely they
are to be robbed, die, etc.. To do this they take
their and try, in various ways, to find clusters of
SLAC-PUB-13832
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Quantum Mechanics and Data Mining and more Lecture notes Quantum Mechanics in PDF only on Docsity!

SLAC-PUB-

Strange Bedfellows: Quantum Mechanics and Data Mining

Marvin Weinsteinaāˆ—

aSLAC National Accelerator Laboratory,

Stanford, CA, USA

Last year, in 2008, I gave a talk titled Quantum Calisthenics. This year I am going to tell you about how the work I described then has spun off into a most unlikely direction. What I am going to talk about is how one maps the problem of finding clusters in a given data set into a problem in quantum mechanics. I will then use the tricks I described to let quantum evolution lets the clusters come together on their own.

  1. What Is This About?

Since I am talking to you at Light Cone 2009, it is fun for me to point out that a good deal of the material I will present is a direct spin-off of ma- terial I presented last year in my talk, Quantum Calisthenics. What is new (and surprising to me) is that the ideas for solving problems in quantum mechanics would prove extremely useful in deal- ing with data-mining, a problem in computer sci- ence that, at first glance, does not appear to have anything to do with quantum physics, or for that matter, with any kind of physics. In the next few minutes hope to convince you that despite ap- pearances data-mining and quantum physics are a match made in heaven.

1.1. What Is The Problem And How Does It Affect You? As one wag said, the problem of data-mining can be summarized by, ā€If a supermarket cus- tomer buys formula and diapers, how likely are they to buy beer?ā€. Clearly, if it is possible to give a good answer to this question, a supermar- ket manager can decide if it is better to put the beer next to the diapers, or to put it at the other end of the store to encourage impulse buying.

āˆ—This work was supported by the U. S. DOE, Contract No. DE-AC02-76SF00515.

As amusing as this simple summary may be, there is a bit more to the story. For example, other businesses that engage in data-mining are Amazon and NETFLIX. Both companies have large data bases containing the information about each customer’s previous purchases. Their goal in mining this data is to suggest what the next book a given customer might like to purchase, or movie she might like to rent. They base their suggestion on what they believe customers like her have pur- chased or rented. The key question is how do they determine who is a customer like her? In general the examination of unstructured data to find clusters that are similar in some way is a key element of data-mining. The search for these structures in a data-set is imaginatively referred to as clustering. While the use of clustering by Amazon and NETFLIX may improve the shopping experience, data-mining affects all of us in ways that impact out existence at a much more important level. This happens when banks and insurance compa- nies apply it to the problem of scoring. Basically, the idea is to take all of the data they have about people and identify clusters of similar people so as to predict how likely it is that an applicant will default on a mortgage, or loan, or how likely they are to be robbed, die, etc.. To do this they take their and try, in various ways, to find clusters of

SLAC-PUB-

people that they can define as similar. For better or worse we are all affected by these practices. Finally, to give one of a myriad of examples that have nothing to do with questions of busi- ness, let us consider the case of gene chips as a tool for medical diagnosis and treatment plan- ning. Gene chips are a technology for measuring which genes are being under or over-expressed by a cell. The idea is that understanding the dif- ferent patterns of gene expression and how they relate to specific diseases and drug resistance will allow a doctor to both diagnose a disease and pre- scribe the correct drug for treating it. Later I will talk about a specific example of this sort of study for the case of patients with Type A or Type B Leukemia. Summarizing we can say that many fields - physics, biology, medicine intelligence and home- land security, finance, insurance, and diplomacy

  • all collect large databases of information. Sort- ing through such data and searching for previ- ously unknown interesting and relevant structures is referred to as data-mining. Clearly from the breadth of topics one might guess that no pre- cise definition of data-mining exists. However, although we can’t make the definition of what we wish to do totally specific, it is intuitively clear that it is a useful notion. In what follows I will be describing a clustering technique that my colleague David Horn and I call DQC (Dynamic Quantum Clustering). I hope that the specific examples that I discuss will give you a flavor for the general problem. A more complete exposition of this material is given in Ref.[1].
  1. The Data Miner’s Lament: The Curse of High Dimension

The general problem is we are given a database with a large number of entries. Associated with each entry is a record that contains all of the information that has been collected about that entry, each such item of information is called a feature. Clearly the number of features and the type of information stored in each feature varies from database to database. As an example, let’s talk about NETFLIX. Assume that they have a library of 10,000 films that can be rented. Then

each entry in the database might correspond to a customer and associated to each customer would be 10,000 features (in numerical format) that in- dicate which films the customer has rented and, if available, his/her rating of each of those films. The number of features is called the dimension of the problem. Thus, we see that finding clusters of people with similar tastes in the NETFLIX prob- lem involves searching for clusters in a space of very high dimension. It should not surprise you that this is computationally difficult. Because it is so difficult to search for clusters in spaces of high dimension, people try to find a way to reduce the dimension of the problem without, too badly, compromising the information. The tool most commonly used to accomplish this is SVD or Singular Value Decomposition. Clearly, given the time available to me I can’t go into the use of SVD too deeply, but I would like to take a few moments to give you a feeling for what it does and doesn’t do.

2.1. Singular Value Decomposition: The Swiss Army Knife of Data Mining SVD, or Singular Value Decomposition, is the statement that any n Ɨ m-matrix can be brought to an almost diagonal form. The first time I was introduced to this theorem many years ago I couldn’t believe it was really good for anything. That just goes to show what I knew. In fact, nowadays, SVD has crept into all sorts of areas of physics and data-mining. It is extensively used in solid state physics computations based on the DMRG (or density matrix renormalization group) method, in image compression, in data-mining to do - among other things - dimensional reduction, and a host of other places. There is much I could say to try and expose you to its many applica- tions, but time being what it is I will limit myself to giving a brief introduction to the SVD decom- position and an example of how we will use it. Basically SVD is useful to us because all of the data we will mine will be presented in the form of an nƗm-matrix of numerical values. Each row of this matrix will correspond to the entries in the data base (i.e., customers, events in a physics ex- periment, the specific cell culture corresponding to a given gene-chip map, etc.). The columns of

step is useful and dimensionally reducing the data by keeping only the coordinates corresponding to the first few directions can lead to plots that in some loose sense maximally separate data belong- ing to different clusters, in general this is only a first step. In the generic situation, especially for data that cannot usefully be reduced to two or three dimen- sions, clusters cannot be easily identified. The sit- uation is even more complicated if the data does not group into separated globular clusters, but instead is concentrated on some other geometri- cal structure, say for example, a ring. In this case SVD followed by strong dimensional reduc- tion can incorrectly lead one to conclude there are clusters where none exist. This is where DQC comes into play. DQC allows one to explore more dimensions of the original data and it can clearly indicate the presence of higher dimensional ge- ometries when they exist.

  1. DQC: What Is Dynamic Quantum Clus- tering?

In Dynamic Quantum Clustering, DQC, we map the problem of finding clusters into a prob- lem in quantum mechanics and then use the tech- niques of quantum mechanics to allow the clus- ters, or over dense regions in the data, to reveal themselves.

3.1. The Parzen Window Estimator An old approach in clustering was the so-called Parzen Window Estimator. The crux of this idea was that given n-dimensional data, denoted by points x~i, one could construct a function on the n-dimensional Euclidean space as follows:

ψ(~x) =

i

eāˆ’^

1 2 σ^2 (~xāˆ’^ x~i)Ā·(~xāˆ’~xi)^ (8)

In other words, the Parzen estimator is simply a sum of n-dimensional Gaussians with a com- mon width determined by the parameter σ. The notion was that in regions where the data was denser, the Parzen estimator would have a rela- tive maximum. The hope was that clusters could be identified by finding these maxima and select- ing a region about each one, so that the points in

that region would be said to belong to a cluster. There were several problems with the Parzen es- timator approach. First, finding the maxima of a complicated function in an n-dimensional space is computationally time consuming. Second, the structure of the function proved to depend sensi- tively on the choice of σ. For a value of σ that is too small, one obtains a function with many local maxima and very small clusters. If σ is to large the maxima all coalesce and no distinct clusters can be found.

3.2. Quantum Clustering Quantum clustering, (QC), begins with the construction of a Parzen estimator8, but instead of using the Parzen estimator to find clusters di- rectly, we use it to construct a potential function whose minima are related to the clusters. The construction of this function was first introduced in the paper of Horn and Gottlieb[2] where it was defined by the condition that it is the func- tion V (~x) for which the Parzen estimator satisfies the n-dimensional time-independent SchrĀØodinger equation

Hψ =

σ^2 2 āˆ‡~^2 + V (~x)

ψ = 0. (9)

That such a V (~x) always exists is clear, all one has to do is to solve equation 9 for V (~x); i.e.,

V (~x) = āˆ’

σ^2 2 ψ(~x) āˆ‡~^2 ψ(~x). (10)

The intuition behind this prescription is based upon the fact that in the quantum problem local maxima in the ground state wave-function cor- respond to local minima in the potential; more- over, such minima are likely to be a good deal sharper and deeper than the corresponding max- ima of the wave-function, due to the fact that the kinetic term, āˆ’āˆ‡~^2 , causes the wave-function to be more spread out than the features of the poten- tial would suggest. A sample of such a potential function will be shown in the next section when I discuss the example of Ripley’s Crab Data. In the orginal quantum clustering approach[2] points lying in the basin of attraction of particular minimum were identified as a single cluster. One

way of determining which minimum was closest to a given point was to classically roll the points downhill using the gradient descent method. The disadvantages to this method are: first, it can be computationally very expensive to carry out when there a large number of points and a large number of features involved; second, there can be many instances where a slightly too small value for σ can lead to a potential with several nearby shal- low minima contained in a single larger minimum. When this happens the classical prescription will lead to several small clusters and not show the existence of the larger cluster. As we will see, by appropriately choosing one of the two parameters that control the DQC evolution, this sensitivity upon the choice of σ can be greatly reduced and the structure of such nearby minima can be ex- plored even in problems with a large number of features.

3.3. Ripley’s Crab Data

As a simple example of the construction of the potential associated with a data set let us con- sider the data on the morphology of rock crabs that was used in the book on Pattern Recogni- tion and Neural Networks by R.D.Ripley[3]. The problem in this exercise is to see how well one can classify the members of a collection of 200 crabs; the collection contains 100 crabs of two different species and each set of 100 is further subdivided into 50 crabs of each sex. The only information one has consists of five measurements of carapace size and claw size. In the picture I have shown I have plotted a potential in two-dimensions. The colored dots correspond to real classes. To con- struct this potential we did an SVD decomposi- tion of the data-matrix and then used the second and third principal component to construct the potential. As you can see from the picture the potential has four local minima and, except for a few outliers, the different species and sexes are identified by the valley in which they lie.

3.4. DQC: Dynamic Quantum Clustering DQC begins by constructing the same poten- tial function used in quantum clustering, it differs in how one handles the problem of how to iden- tify data points with local minima of the func-

Figure 1. This is a plot of the quantum potential function for the two-dimensional problem of the Ripley’s Crab Data where the coordinates of the data points are chosen to be given by the second and third principal components. The four known classes of data points are shown in different colors and are placed upon the potential surface at their original locations.

tion in N -dimensions. We simply exploit the fact that from the outset we are dealing with a quan- tum problem and a well defined Hamiltonian. To roll the different data points down hill we sim- ply evolve each Gaussian wave-function using the time development operator

U (t) = eāˆ’i H t, (11)

so that the evolution of any state ψi(~x) is defined to be

ψ(~x, t) = eāˆ’i H t^ ψ(~x). (12)

This time evolved state is the solution to the time-dependent SchrĀØodinger equation

i

āˆ‚Ļˆi(~x, t) āˆ‚t = Hψi(~x, t)

āˆ‡^2

2 m

  • V (~x)

ψi(~x, t), (13)

Applying these ideas to Ripley’s crab data, re- duced to the first three principle components, is very instructive. (The evolution of the full five- dimensional data-set shows exactly the same be- havior but is more complicated to plot.) In the following pictures I show two steps in the time evolution of the initial distribution. The first picture is a snapshot of the original data before evolution has begun. In the next picture we see what happens after a short time. As expected the points begin to approach one another. The last picture shows what happens if we stop the points where they are and restart DQC using the new points. The clustering is quite easy to see and it is easy to understand why the data is clustering as it is.

  1. Exploiting DQC

Obviously, in this brief overview of DQC, I have not given you all the details of how to implement the algorithm, but I have given you all of the es- sentials. Now I want to point out that although colors in Fig.2 were there so that you could see the clusters form and tell how well DQC was work- ing, the fact that colors can be used in the vi- sualization step can play an additional role in data mining. The crab problem was an exam- ple of a blind search for clusters. What I want to concentrate on now is a different sort of prob- lem; namely, a situation where we start with a classification of the data into clusters, but we do not know how the measured features in the data- set relate to the classification. As an example, consider Affymetrix gene chip data for a set of Leukemia patients. The Affymetrix gene chip is a silicon device to which strands of RNA are at- tached in a regular matrix. The setup is made so that, if a protein binds to a strand of RNA that codes for that protein the the spot to which the strand is bound flouresces when light shines on the chip. Such a gene chip can measure the expression of over 7000 genes (by seeing the pro- teins that are coded for by that gene). Now, in the case of ALL and AML leukemia cells we start with a clinical classification based upon a patho- logical examination of the cells. So we know how to color spots in the DQC picture according to

Figure 2. The left hand plot shows three- dimensional distribution of the original data points before quantum evolution. The middle plot shows the same distribution after quantum evolution. The right hand plot shows the re- sults of an additional iteration of DQC. The val- ues of parameters used to construct the Hamil- tonian and evolution operator are: σ = 0.07 and m = 0.2. Colors indicate the expert classification of data into four classes, unknown to the cluster- ing algorithm. Note, small modifications of the parameters lead to the same results.

type. What we don’t know is how to use the gene chip information to identify these cells; that is what we want to do using DQC (or any other clustering method). Two problems that one has, in addition to the clustering problem, is that the binding of a protein to a strand of RNA is not all that specific, and most of the genes being mea- sured have nothing to do with cancer. That is where the coloring comes in. If one applies DQC

to such a data set and sees clusters of the correct color form, then one knows that the gene chip data contains the information we need. The next step is to eliminate features (i.e., measurements of particular genes) without hurting the cluster- ing. (There are various schemes for doing this, including the brute force approach.) Clearly, if we pursue this process and weed out genes that have nothing to do with the clustering, then one goes a long way to both developing a diagnostic tool, and obtaining an insight into which genes are related to the specific cancer. I will show you some results for a data set by Golub et.al.[4]. This set contains gene chip mea- surements on cells from 72 leukemia patients with two different types of Leukemia, ALL and AML. The expert identification of the classes in this data set is based upon dividing the ALL set into two subsets corresponding to T-cell and B-cell Leukemia. The AML set is divided into patients who underwent treatment and those who did not. In total the Affymetrix GeneChip used in this ex- periment measured the expression of 7129 genes. The specific feature filtering method we employed in this analysis was based on SVD-entropy, and is a simple modification of a method introduced by Varshavsky et al.[5] and applied to the same data. For our purposes it doesn’t matter what the fea- ture filtering method was, I want you to see the difference removing features makes in clustering. I also want you to recognize how the DQC visual- ization makes it easy to quickly identify the effect of removing features from the data. Figure 3 displays the raw data in the 3- dimensional space defined by the second to fourth principal components, and the effect that DQC has on these data. In Figure 4 we see the result of applying feature filtering to the original data, represented in the same 3-dimensions, followed by DQC evolution. Applying a single stage of filter- ing has a dramatic effect upon clustering, even before DQC evolution. The latter helps sharp- ening the cluster separation. Figure 5 shows the results of removing many features (using the SVD entropy method) before and after DQC evolution. These plots, especially the after DQC pictures, show dramatic clustering, especially for the blue

Figure 3. The left hand picture is the raw data from the Affymetrix Chip plotted for principal components 2,3,4. Clearly, without the coloring it would be hard to identify clusters. The right hand picture is the same data after DQC evo- lution using σ = 0.2 and a mass m = 0.01. The different classes are shown as blue, red, green and orange.

Figure 4. The left hand plot is the Golub data after one stage of SVD-entropy based filtering, but before DQC evolution. The right hand plot is the same data after DQC evolution.

points. With each stage of filtering we see that the blue points cluster better and better, in that the single red outlier separates from the cluster and the cluster separates more and more from the other points. The blue points are what I refer to as an obviously robust cluster identified in early stages of feature filtering. If one continues remov- ing features, however, the clear separation of the

Figure 7. The left hand plot is what the starting data looks like if one first removes the blue points and does five stages of SVD-entropy based filter- ing. The right hand plot is what happens after one stage of DQC evolution. The bottom plot is the final result after iterating the DQC evolution step two more times. At this point the clusters are trivially extracted.

doesn’t have trouble with large dimensions. In general it allows one to use SVD decomposi- tion with much less severe dimensional reductions than other methods. However, dealing with large number of points requires some thought. Since the method for evolving point requires di- agonalizing the truncated Hamiltonian, and since diagonalizing such a matrix on a PC becomes dif- ficult for matrices that are larger than 2000 Ɨ 2000, it is obvious that using brute force meth- ods to evolve sets of data having tens or hundreds of thousands of points simply won’t work. The solution to this problem lies in the fact that the SVD decomposition maps the data into an N - dimensional unit cube, and the fact that the data points are represented by states in Hilbert space rather than N -tuples of real numbers. The key observation is that, since Gaussian wavefunctions whose centers lie within a given cube have non-vanishing overlaps, as one chooses more and more Gaussians one eventually arrives at a situation where the states become what we will refer to as essentially linearly dependent. In other words, we arrive at a stage at which any new wave-function added to the set can, to some predetermined accuracy, be expressed as a lin- ear combination of the wave-functions we already have. Of course, since quantum mechanical time evolution is a linear process, this means that these additional states can be evolved by expressing them as linear combinations of the previously selected states and using the evolution of those states to evolve the extra states. Since comput- ing the overlap of two Gaussians is done ana- lytically determining which points determine the set of maximally essentially linearly independent states for the problem is easy. Typically, even for data sets with 100, 000 points, this is of the order of 1600 points. The small number works because, as we have already noted, we don’t need high accuracy for DQC evolution. The quality of the clustering degrades very slowly with loss in accuracy. Thus, it is possible to compute the time evolution operator in terms of a well chosen subset of the data and then apply it to the whole set of points.

  1. Afterward

Well this is about all I can cover in my al- lotted time. I hope I have convinced you that, strange as it may seem, quantum mechanics and data mining are related to one another. In fact, there is enough interest in this stuff in the real world that Stanford(SLAC) and Tel-Aviv Univer- sity are patenting this technology and some com- panies have already expressed an interest in using it.

REFERENCES

  1. Marvin Weinstein and David Horn. Dynamic quantum clustering: a method for visual ex- ploration of structures in data. SLAC-PUB- 13759, arXiv-.0908.2644v1 [physics.data-an] 18 Aug 2009 (submitted to Phys. Rev. E)
  2. D. Horn and A. Gottlieb. Algorithm for Data Clustering in Pattern Recognition Problems Based on Quantum Mechanics. Phys. Rev. Lett. 88 018702 (2001).
  3. B. D. Ripley Pattern Recognition and Neural Networks. Cambridge University Press, Cam- bridge UK, 1996.
  4. T.R. Golub, D.K. Slonim, P. Tamayo, C. Huard, M. Gaasenbeek et al: Molecular Clas- sification of Cancer: Class Discovery and Class Prediction by Gene Expression Moni- toring. Science 286 531 (1999).
  5. R. Varshavsky, A. Gottlieb, M. Linial and D. Horn. Novel Unsupervised Feature Filter- ing of Biological Data. Bioinformatics 22 no. 14 (2006), e507-e513.