On behalf of the Department of Computer Science and Automation at IISc
I would like to wish you all a very warm welcome to this first public lecture
on Foundations of Data Science by Professor Ravi Kannan
as all of you know, big data or data science
represent the latest wave in the computing revolution
now the volume, the complexity, and the variety of the data
that is now becoming available day after day
is now at an unprecedented scale
so if you are able to extract useful and actionable knowledge out of this data
that's going to be of a huge benefit
so this initiative, which is called the big data initiative
has just been launched in order to realize
the potential of this very exciting, and very fascinating, and very challenging area
now the primary objective of the big data initiative
is to build a very strong academic and research ecosystem
that would enable India's excellence in this fast emerging area
and take India to a leadership position in this area
now the faculty of the Department of Computer Science and Automation
and also the Indian Institute of Science have come together to launch this initiative
and they have lined up a series of ambitious programs as a part of this initiative
so the first of these initiatives is going to be the public lectures program
and the primary objective of the public lectures program
is to give an introduction, an exposure, to all the fascinating research works that are going on in this emerging area
and also to tell you more about the current state of the art in this area
now to give you the first public lecture we have today with us Professor Ravi Kannan
who is a legendary researcher in the area of algorithms and theoretical computer science for a long time
Professor Ravi Kannan is currently an adjunct faculty member of the Department of Computer Science and Automation
and as a principal researcher of the Microsoft Research India
he is leading a very successful group on algorithms at MSR India
and as all of you might know, he delivered the 2012 Professor I G Sarma memorial lecture
in the same faculty hall
and then in 2011 he was the recipient of the very prestigious
Donald Knuth Prize for his outstanding contributions in designing
creative algorithms for many computationally challenging problems
and lets give Professor Ravi Kannan a wide applause for the Donald Knuth Prize
[audience applause]
and 20 years before that, way back in 1991
he was the recipient of the prestigious Fulkerson Prize
for his minor work on estimating the volume of convex sets
so here is a researcher who has made ground breaking contributions
on a variety of topics and algorithms
now he has designed approximation algorithms for India programming
and he has designed randomized algorithms for linereal algebra
and modus [sounds like "unclear" but that's not right] learning algorithms for convex sets
so he's truly, in my view, he is the {not english: sunil munaher gwaskil?} of the big data team
and with a wide applause, let's welcome Professor Ravi Kannan
[audience applause]
and invite him to deliver this first public lecture, Professor Ravi Kannan
[audience applause]
so thanks Professor Narahari for that gracious introduction
we await [Sulah Kandalkar?] but I'll start with [Rick Elsore?]
I want to thank also CSA, this is a very nice initiative
CSA has always been very dynamic
and sort of looking to latest advances in various fields
in addition to adding all the new exciting faculty
I think it's a very good initiative to start on big data
I should also recognize and thank Professor Shevade from CSA
for having this idea and getting us all together, thank you Shevade
[applause]
so since this is the first lecture I should give you actually
a sort of bird's eye view of the whole field in some sense
I'm not very good at bird's eye view
so I will give you a couple of slides which are very general
and then zoom in on a piece of the action
once slice of the field if you will, and sort of focus on that
so the title of the talk is not big data, it's Foundations of Data Science
which is sort of related because it is actually the title of a book
I'm writing with John Hopcroft
in the process we had to think about first the following
what are really, what would you call the foundations of data science?
see the word "big data" connotes something very jazzy
and so that can have two interpretations
one is something cool or hot or whatever you call it
with perhaps not so much substance
one is something with a lot of substance
I will hope to convince you that it's both
it's hot but also has a lot of substance
and so the word "foundations of data science" this phrase
connotes perhaps the substance part of it
but the question is what are, what should you consider
to be part of the foundations of data science
or what should you teach if you're going to teach a course on data science
or foundations of data science, what should you teach
so here's something that if you haven't been to a talk with this sort of title
you won't have seen this but if you've been to a talk
almost certainly you've seen a curve like this which I then draw
this is exponential cx for some constant
so various forms of this curve
this is the rate of growth of data if you will
or the rate of growth of storage and speed and so on
there are different constants
now there is really a point, I'm not making sort of caricature out of this
but it is really a point in that it's not as if human knowledge has grown exponentially
but it is true that our ability to gather data, to store it
to annotate it has grown perhaps exponentially
and in fact so we do have exponential rate of growth of data
but I'm not going to draw you this curve
perhaps my suggestion is, what I'm going to put in the list here
the first few things, maybe the answer is no
they are not what I would consider the foundations of data science
but they are important never the less
you could also ask how do you collect and store
annotate and store data in various domains
in fact some of these responses will depend what domain will it dwell
be it astronomy, commerce. I put up three areas here in which we do have in fact
really a big growth in data that's been collected and stored
but I would like to suggest that this is not, for us, foundations of data science at the moment
partly because it's very important but it depends on the domain
so it's very specific to each domain perhaps
now you could also say basic statistics is important
because if you have a lot of data, more than you can handle simply by traditional algorithms
surely you must sample
that is you must draw a random sample of the data and deal with that
so sampling is important, so a study of sampling and basic statistics is perhaps important
now basic statistics is always important, but we have to assume that and move on
now the later parts of this are becoming progressively more "yes" answers
but perhaps here is a sort of mea culpa though I am a computer scientist
and in particular specialize in algorithms
for the last three decades perhaps, the area of algorithms focused on discrete structures
graphs and various other discrete structures, data structures are a big thing
if you've done computer science courses you've done [lifts?] arrays
and stacks and so on so forth, that was a big thing
now also we spent a couple of decades improving the algorithms for various discrete problems
like graph problems, shorter spots and flows
now these are very important going forward
but we have focused enough attention on these matters for the last thirty years
and learnt enough and progressed enough in some sense, which is very good
but yet ignored some other parts, I would like to say, somewhat controversially
we ignored some other parts in computer science, not overall in human knowledge, in computer science
linear algebra, numerical methods which have come out to be very important
so if you asked me twenty years ago whether computing eigenvalues or eigenvectors of a matrix
with a million non-zero entries is practical and important in the future
I would have said no, so would most computer scientists
but in fact this is what is used in basic search
so if you look at how Google does page rank or ranks the pages on the web it's based on eigenvalues
I won't tell you how but it's based on eigenvalues
so in fact it's been a surprise over the last decade or two
that what we might have thought wouldn't scale up, would not be important
has become important
one of them is this, sampling, not basic sampling but in fact most of this talk will be about sampling
but sampling in the context of big data is going to be different from what you might think of as statistical sampling
and that's important, you'll see that
and also very important it turns out is high dimensional geometry, you'll see some of this
so in fact even when you least expect, even for problems which don't look like that
it turns out those problems can be formulated, we'll see some of that
those problems can be formulated as problems to do with let's say ten thousand dimensional vectors
so what does ten thousand dimensional space look like, that turns out to be an important thing to worry about
and probability limit laws, central limit theorem, the very classical probability limit laws, they turn out to be very important
now you can sort of intuitively guess why, if you have lots of data you sort of learn to limit
right? and therefore such things should be more important than let's say basic statistics
and indeed in a lot of these areas we'll have to develop new tools
and we have developed some which handles this big data problem, that's what I'm hoping to convince you
so sampling, so it's clear that if you have a lot of data you have to sample
so that you get a subsample which is smaller and can be handled
but is it just picking uniformly at random a part of the data
is that going to be good enough, that's the question we want to ask right
so we have ten million pieces of data
just uniformly at random pick ten thousand of them and analyze them
is that what we are going to do
that's what we think of as sampling traditionally, perhaps the most elementary method
but here is a problem typically that we want to solve
it's an optimization problem, there are many of those this is one
you have a very large matrix A, m by n matrix
which we want to do what's called principal component analysis on A
if you're not familiar with this bear with me for a moment
you don't have to be at the moment, familiar with this, we'll see that a little more
but a lot of you are familiar with this I'm sure
so that just means we want to find a vector x, so x is an [n, or maybe m] vector of unit length
so that when I multiply A with x and take the length, that's as high as possible
so this turns out to be a basic linear algorithm problem, this is very important right?
so we want to maximize over all unit length vectors x the length of A
now A is very big so we can't do the whole problem perhaps
we can't even necessarily put A into random access memory
so it's going to be difficult to run traditional algorithms, what do we do
somehow we like to say we sample A to get a sample out of it: B
now B might have a smaller number of rows or columns maybe
more zeros or something makes it easier
we won't see particularly what at the moment
we want that B to have this property
see I don't know what x is going to be what I'm going to find
so I better have this property, that for every... red is important...
for every x, Ax and Bx are nearly the same length
if that were true I could deal with B instead of A right? if that were true
if that were not true for every x I cannot do that
because for every x I may find maybe a bad x for which B gives me the wrong answer right?
so how do I do that, that's the kind of sampling we want to do
we want the sample of A that's good for every x
and x is an n dimensional vector, there are infinitely many of them
but a rule of thumb it turns out, in n dimensions you can pretend there are only e to the n vectors
it's not true, there are infinitely many, but you can pretend that there are e to the n vectors
that's still a lot of vectors so this sampling better work for all the vectors, not just for one right?
that's one issue, here's another issue that can come up in sampling
big data means that the data is perhaps too big to be stored in one machine or one unit of memory, some memory
so it may be distributed among many servers
now important sampling, uniform sampling means everybody gets drawn with probability which is the same
importance sampling means some items have a higher probability based on their importance
so importance is sampling each item with probability proportional to its importance
but then all servers must share the vectors of importance right?
they must be sampling with the same vectors to be consistent
now maybe the number of items are so large that this vector is costly to translate
this is the kind of problem we are going to worry about a bit more, both of these problems
by the way I should tell you the talk is not exhaustive
I'm not going to tell you all the problems about big data
that's why we have a whole series of lectures you can see here
we'll have many more interesting lectures in the series in the coming months, one a month roughly
so I'm going to cut to a slice of it and these are some of the problems we'll talk about in detail
so consistency among various servers is one issue
here is a very simple example that you might want to think about mentally, it's a mental exercise, a very simple one
so I want an average of a set of real numbers, a large set of real numbers, a big set right?
now you can just take a sample and take the average, that's an approximation
but the variance may be very high, obviously right? variance is how to spread entries so I might be very high
so how do we achieve low relative variance
now one thing to focus your mind on is the cancellation problem
suppose there are lots of big positive entries and lots of big negative entries and they're canceled out
and the total was zero, the average was zero
so if the answer is zero, if you have to make small relative error, you must get it exactly right
right? if the answer is zero there is no error allowed
allowing one percent error if the answer is zero I have to get exactly the answer
so how do you do that with samples, ok that's our question
now for average, plain simple average it's easy you can just keep a running sum if you read the whole thing
but we'll have to worry about other statistics for which this is not easy right?
so the problem is that the final answer will be very small and therefore the error allowed will be very small
how do you do it with samples
so these are some of the problems I deal with, I'll tell you some of the problems as we go along
sampling is our first major issue, the second major issue we'll deal with in this talk is communication
so again first one definition, what is "big data"? what's a "big data" problem?
let's simply define it as data does not fit into random access memory
so every computer has random access memory, if the data is big enough that doesn't fit in RAM then we call it big data
that's the sort of working definition of it
so let's say we run a matrix algorithm, you all know traditional matrix algorithms
as the algorithm is running along, a step of the algorithm may say "bring me the i j entry of the matrix"
and in analyzing or implementing that we assume that can be done in unit time
because if you had random access memory you can quickly access, that's what random access means
you can quickly access let's say each entry of the matrix by putting down its index
now this we cannot do if it doesn't fit into RAM
so in fact the traditional paradigm of algorithm design assumes you can do it in unit time
and that already fails that's the primitive that fails
so people devised models that avoid this assumption, one model is the streaming model
the streaming model says data is written on some external memory and it's steaming, it just goes by
you can only read once from right to left
I'll draw a picture here, I've been lazy, I should have drawn pictures on the slide but that takes a long time
this is a stream if you will, the close part you are sitting here reading it you can only read once and it goes away
well that per say is not good enough, there is a random access memory which is much smaller than this stream
so I'll write this I've a very small
so you can remember some of this stream, let's say by sampling you've sampled some of this stream
uniform sampling is not going to do much
good but there are sophisticated methods that do actually work and solve a lot of problems in this model
it's I should say the streaming model was the object of study even before the phrase big data was coined
it's studied for the last two decades and there's quite a body of very nice results
I won't tell you the entire body the way I'm structuring this talk cuz I'm going to give you some more or less self-contained vignettes
so we'll see one vignette from streaming data, streaming model, but I won't be able to show you a lot of stuff right?
so now where does communication come in
so the random access memory you can think of as communicating info information pertaining to the first part of the input to the second part
so that's how the communication takes place
so when I read up to this point this is all gone
whatever information I need of that is stored in my random access memory
so in some sense this bit is passing on is communicating some information to the second part by writing something on the random access memory
that's one way to think of it so this analogy actually relates space and communication
and this has been studied widely and it's is used to derive lower bounds in space
ok a subject that I won't touch, very much into a [dista? distant?] high level concept somehow space is related to communication
cuz you've got to write down what you want to communicate to the rest of the input [unintelligible word]
so so far I will say it's been fairly up in the sky but one more slide of that and then we'll come to a very particular piece
so streaming is one model that's been studied a lot
a little less restrictive model of big data is that data is split among many servers
but number of servers is much smaller
now you might have, you could think of streaming as if each bit is sitting on a different computer, different server
that's one way to do this, the only way they communicate is through RAM right? otherwise they cannot communicate
now that's however if the length of this stream is n this is thinking of it as n servers
now you can argue that a lot of real problems have data that's not so big
in fact you can accommodate it on log n servers
many smaller many fewer servers than the amount of data
so that's a better model perhaps for a lot of data and that's one other model we'll study, we'll study both of these
now again up to this point the talk has been about generalities
now I want to zoom in on some examples which are self-contained examples for what is going on
ok so let's start with an example
this actually was a [starting/study?] example and motivated a lot of research on streaming algorithms
we have a large network with lots of computers sending messages to each other
there are routers which route the message
so there are n computers, n is very large, perhaps in a million
but there are routers which are square boxes, maybe there are only ten of them or a hundred of them
and so a message from here to here might go through this router and they might send it to this and they might send it to that
and let's say the message finally wants to go there, it'll go there so it goes through three routers and then goes to the end destination
so we won't worry about the mechanics of routing let's just study what happens here for the logs of the messages
so the last router that sends it to the destination
the last one keeps a log of the message
the log just has for us the sending computers name i, and the length of the message, that's the log it keeps
and you want to analyze these logs, you want to do statistics on these logs to better improve the efficiency of the network that's there that's all A
so let's say Ai is the total length of all the messages sent by computer i in one day let's say
and you want statistics of Ai, the statistics are important to again optimize the network
that's the problem we want to solve
now statistics one thing you want to do is perhaps the average of Ai or the total of Ai
but you may want the variance, you may want the second moment
so that's just 1 over n, there are n computers
and n Ai, you sum the Ai squared and then take the average right? let's say we want to do that
now it's that simple let's see what happens
the trouble is no router knows Ai in full
so i was this computer, it might have sent messages which have gone through many routers
and some of them went there, some of them went there, some of them went there, so nobody knows the full value of Ai right?
so if you want to find this you seem to have to communicate all the partial Ai and that requires O(n) space
because there are n computers, you have to communicate for each one the total from each router
so think of the problem actually just for two routers, already interesting
now let's get to the routers formulated abstractly
each router has just an n vector so this is where vectors come in
there are no vectors to start with right? this not a geometry problem
but here I am going to make up vectors
so each router you can think of as having an n vector
and the components tell you the total length of all messages from each computer that's been logged by this router
so for computer i all the messages that were logged with this router, that total is kept there let's say that's a vector
so again vectors have come in surreptitiously they have nothing to do with the problem but we've formulated the vectors
we'll see the advantage of that, it's not a bookkeeping device that I put down vectors it's for keeping track of this it's more than a bookkeeping device
so what we want to find I say alas inner sum n over t
so we want to take the sum over all routers of the total length of message logged by that router coming from i
I want to sum inside first, then square and then add
it would have been nice if the sum was outside
the trouble is the sum is inside so you have to first total over all routers for each i, square, and then sum over all i right?
and that's a problem because these route this information is not contained in any body
now if you don't follow the exact mechanics that's fine
I'm going to abstract it even more that makes life a lot simpler
so here's a vector problem this is the abstract problem we want to solve
there's an n component vector, bold face is vectors
a sub t residing in server t
and you want to take the sum and you want to estimate the length squared of the sum right? sum of squares of length
we want to sum the vectors component wise and then take the sum of squares
now if we had the whole vector and we could write it down this is a trivial problem
but we don't want to write down the whole vector so we want to use very little communication compared to the number of components, how do we do that
ok so maybe I can sample k of the n components of the vector v right?
v has too many components I don't want to write them all down
maybe I can sample k and just collect information on that
is that any good and the answer is a gentle no the variance can be very high
some components can be much higher than other components so this will be a loss if you do that
well here is a beautiful theorem which is a geometry theorem, now you see that geometry is necessary and useful
called a Johnson Lindenstrauss Theorem
if you perhaps don't remember anything from this talk hopefully you can take this home if you didn't see it before
so this theorem says the following
if I pick a matrix R which has a small number of rows, k is supposed to be small
matrix with independent random random unit vectors, so they're independent random vectors with unit length as rows
then I take the length of R times v and that tells me the length of v but there is a little scale factor here don't worry about that
which is a known factor, we know this so we don't care
it tells me the length of v, so a little schematic picture here
so we had a vector x with a lot of components, n components
and we multiply it by an R which is a very small number of rows
it becomes now a k vector, this is R x
and it's enough to find the length of that right?
so what we did was again we had to find the length of some n things squared, instead this says a sample of k things will do
not a plain sample that won't do right?
but this kind of random vector then multiplied it will do
the proof is not difficult I mean obviously I won't do the proof here but the proof is not difficult
but what it says is that a sample of k components, plain components won't do
but a sample of k combinations of components will do
so now the trouble is this if all servers happen to have the same random matrix R they can do their own R times a t and send these vectors
now these are only k vectors they are very small ok?
you can send these vectors over to a central processor which can sum the vectors and since things are linear it can find R times v and compute the length
but you need to know the same R, everybody needs the same R ok?
how do we do that, we need a lot of communication it seems to agree on one R
and this is going to be this has been a simple problem and I want to isolate this problem now, forget the vector problem
how to share randomness this is a very important problem it turns out in many areas
how can many servers share the same they have to agree on the same n bit random string without transmitting random R right?
they all have to have exactly the same random string how do they do that
the string has n bits of information so it seems to need n bits of communication
we'll see how to get around that but for many applications of this problem as well as other problems in distributed computing, complexity and cryptography
we don't need all the components to be independent we need only what's called 4-way independence
now 4-way independence is every set of 4 or fewer bits are independent
so full independence is the entire thing should be independent mutually
but we only need every collection of 4 bits or 3 bits or 2 bits or 1 bit to be independent, that's enough it turns out
now 4-way independent things are easier to get coding theory, and coding theory gives us this
it's actually a very classic code
so here's one way to get the 4-way independent stream very long stream but a 4-way independent
I pick at random coefficients, 4 coefficients and form a degree 3 polynomial, a not plus a 1 x plus a 2 x squared plus a 3 x cubed it's a real polynomial right? just the polynomial of degree 3
then I evaluate this polynomial at n points, p at 1, p at 2, and p at n, and so on
what happens is that this string which is much longer than 4, right? same length, is 4-way independent
and you have to do it over a finite field but this is the idea
there are four degrees of freedom right? four degrees of independence, a 1, a not, a 1, a 3, a 4, and that suffices to give 4-way independence
now these are called pseudo-random sequences and many of you will notice now the answer for the communication problem is simple
you just generate the seed, some central location, and transmit the seed
a not, a 1, a 2, a 3, centrally and transmit to all servers
they can individually find the string, the strings will all be the same right? it's the same string so they'll all be the same
so they've agreed on an n length random string with just very little transmission
and that the communicating randomness like this we've said is an important derivative
so finishing the vector problem as I've said there was an important paper due to Alon Szegedy about fifteen years back
which started the field of streaming algorithms so I want to go through what we have more or less summarizing what we have
there's a central processor which generates a seed for the random matrix, it transmits the seeds to all the servers
so let's just find, apply R to their individual so they build up the whole matrix from the seed
apply this and then send it to the central processor which sums up all these things and then finds the length
if server t did not have it explicitly, so it's possible that server t did not have it explicitly but we had only the streaming model
it only has a log of every entry but the logs are in arbitrary order, they're not sorted, so they're not sorted altogether for one i
but whenever I see that the i source has sent a message of length a then a little thought will tell you that all I have to do to R times a t is update it by adding a times column i of R to R times a t
again it's not important to remember the details but the point is whatever order I give these logs I can update my matrix vector product and you can do this in the streaming model once I have the seeds
now that [someone asks a question, I can't hear] so v is not available locally [audience speaks again] we have only these a t, v is the sume of what's available locally so we use the vector sum of vectors available at each server
and we want to be able to estimate the length of the sum rather than each individual one, ask me other questions that you have we can go slow
[someone may be asking a question, I can't hear anything just a long pause]
I'm talking about scenarios where each server has a certain amount of information but we want the statistics of the total and we are not allowed to just transmit the whole vector that's too costly
briefly how to [say one/save on?] communication
so I want to study something called higher order correlations. let's say you have time-series data of n events and over T times because n and T are supposed to be large this is again large data
so Aij is 1 over 0 depending on whether event Ei happened at time t j, so whether the [IT?] event happened at time j if so then Aij is 1 over 0
so this is time series right? time series just means for each event I have a bit, I have a long string of zeros and ones which tells you when the event happened
now pairwise correlations wants to know how many pairs of events co-occured, so you want triples Ei, E1, E2, t, so that E1 and E2 both occur at time t
so if E1 and E2 both co-occur at time t, how many times do they co-occur? add them up, this is clearly of interest. I won't motivate it but I'll give you some examples in a minute
but it turns out higher order correlations are also of interest, we have four events E1 through E4, and t times three time steps, and we want to know how many such things where all four occurred at all these three times right?
it turns out there is something actually [national or natural?] motivations which I won't describe in detail, these higher order correlations are important in a lot of contexts one is neuron styling but uh we'll see a couple of other examples on the slide
now big data again means that events are split up on servers, so no server knows all the events, each server knows some of the events. so each server knows some of these time series, nobody knows all of them.
another example of this is from commercial data right? customers buying products, each customer is on one server and you want to know for instance how many triples of customers and products are there so that all three bought quite a bit of these two
so these kind so of analysis are necessary for instance they optimize what products should be put where and so on and so forth. again the details of what the exact problem is not important but it's this correlation that we want to know
so documents and terms in an information retrieval are co-occurrence of terms trigrams or triples of terms, whether they co-occur and how many times they co-occur are important, that's a very exact similar problem to this
here's the abstract formulation, you have a bipartite graph so i can draw it on the board
so one side we have events, the other side we have time steps, and you put an arrow if it occurred. so some things occurred some things didn't.
this whole graph is not presented on any server. servers only know for one particular event what are all the time steps that it happened, perhaps these two.
and some other server, maybe the elliptic server might know some of the other stuff, the square server might know some of this, that's the situation
so uh and you can think of this ok here is a concrete version of this problem, estimate the number of (2, 4) sub-graphs with each of the two left vertices connected to at least three of the four right vertices
so it's again not very important exactly what happens but here's a graph with two vertices on the left and four on the left, four on the right, and you want to study the connections
you want to do the averages of this over all sets of two and four right? that's total you want the statistics of it, and the point is the data is split
so you can formulate this as a bipartite graph with left and right vertices, it turns out this problem, and i'm going to go over this quickly if you don't follow it don't worry about it
this problem is more or less exactly the vectors problem for reasons that should become clear, so it's a vector problem in a very high number of dimensions
so if there are 10 right vertices you form a 10 to the 4 component vector v and it's that vector's length we want.
so component v i is the number of left vertices connected to at least three of the four right vertices, again you need not follow exactly all the details but it's very simple
and the answer we want is more or less the squared length of v, it's the same problem that we had earlier but in a very high dimensional space, so if there are n vertices here it will be n [choose?] four dimensions so n to the four dimensional space
so this is an example where the number of dimensions is even bigger than what you started with
now it turns out that can be computed by the previous algorithm but you don't in the neuron firing case it turns out two is not enough, you want higher order correlations than two
so then uh sorry so what we did is only for two, what do we do for higher order? now I'm going to go over this quickly but in the abstract setting now
we have a vector v with n non-negative components, we want.. which is actually not in one place it's a some of vectors on different servers, again the proof is same as before
but now we want to estimate the k [moment?] we want the sum of the k powers, k is larger than two perhaps, k is three, four, k is something else, how do we do that?
the methods for two don't apply, this beautiful theorem [which aries?] doesn't work any more, it turns out that sort of theorem only works for two no more for anything higher than two
but in a recent paper we showed that it can be done with not too much communication, it turns out to be enough for each server to do its own important sampling according to its own vectors' components raised to the k power
so I would have liked to draw samples according to [sum or some?] vector to the k power, it suffices it's important to do it individually each server and then exchange a bit of communication,
this is not trivial, but I won't tell you the details, but important sampling per server is enough, that's the point of the story
I want to go to the next topic, perhaps if there are any questions briefly we can, I don't know whether there are any, if I've gone fast enough that maybe you're all lost which is fine then [audience laughs] any questions?
[someone asks a question, unintelligible] so important sampling, uniform sampling is every item is uniformly likely to be picked, important sampling means the probabilities are not uniform that's all
[another question, unintelligible] how do you pick the importance? in this case it's proportional in the previous slide it was proportional to this k power v i
that is what we'd like to do but we don't have the vector v so instead it turns out each server its own
[unintelligible question] what to have any server? [audience clarifies] ah it's uh maybe um I'd want to adjust because you can speed up competition, but here we are looking at data being so big that it is being put on many servers
or in a network routing case there are different routers they just log messages right? each one. if you want them all to collect in one place you need a huge amount of memory so you can't do that.
anything else? [unintelligible question] yeah so the answer to that is I'm a theoretician. [audience laughs]
well you know this is the model in which you can. k typically wants to be small
[unintelligible question] of the dimension of the number of rows it's logarithmic actually, it's only logarithmic, it's much smaller than [m or n?] so Johnson-Lindenstrauss theorem would logarithmic
[unintelligible comment] no I thought you meant this scale [laughter] this scale is also [unintelligible]
anything else? ok good. so let me quickly do principal component analysis.
so we have a large matrix in this case and the matrix you can think of with each row is a data point, there are m points in n space, n dimensions
the number of points is much larger than dimensions, so maybe they all live in ten dimensional space and there are a million points, or two hundred dimensional space there are a million points right?
so basic concept of linear algebra again this is a recapsulating this you want to find the Unit Vector x which maximizes the length of Ax, that's called the first principal component
Unit Vector y perpendicular to the first principal component maximizing this called the second principal component and so on
again a lot of you are familiar with this, if not just think of it as an optimization point
very Nice Linear Algebra Theory, for many problems you want to find these
now big data the matrix x of A may not be stored all on one server
here is a simple model we can think of, there are many servers, each stores a similar dimension matrix,
so the whole dimension is there, but maybe there are a lot of zeros in each server so the data [in each of them?] is smaller
and you want to deal with the sum of all the matrices but you don't want to communicate all of that right?
so you want to find principal components of the sum but communicate only a tiny fraction of the whole data amongst them
so PCA for distributed data, server t has matrix A t you want to sum and take the principal component
how do we do that? again uh so I want to keep the theme to this random uh sampling of Johnson-Lindenstrauss in some sense
we use that, that told us that there's a random, if you pick a random matrix R then the length of x for every vector x, R times A times x
now in the old setup we multiply R by a vector, well A times x is a vector right? so R times A times x the length is estimate, is a good estimate of the length of A times x
I really want the length of A times x but it's enough to do this
R makes it much smaller, we erased that, R makes it much smaller so we can communicate better
but now if this is only true for one x then it wouldn't help us, but if it were true for every x, this is the optimization problem that I first pointed out
if it were true for every x we could just solve the problem on R times A instead of for A right? because x I find for R times A should also be good for A if this kind of relation is true for every A
and in fact it turns out well the number of x's is exponential in n but Johnson-Lindenstrauss, now this is one more step
gives us a low enough probability of failure for one x that we get this actually works for every x simultaneously, for all the x's simultaneously
not only is this true for one x it's true for every x at the same time, ok that's asking for a lot because there are many many x's but that's given to us
so there's one random matrix R so again the picture was, oh I think I have a picture on the next slide
there's one random matrix R so that R times A times x and A times x are similar length for every x, where big n is not very big
so a picture here would make it clearer, here is a big matrix, here is R times A which is far fewer rows for the same number of columns but has a very nice property
that for any vector x that you can think of the length of A applied to x and the length of RA applied to x are similar
that's quite a striking property, so anything you want to do with A you can do with R times A because all these lengths are preserved
so that finishes PCA which is a very brief thing, now the area of distributed data problems, as far as big data goes a big part of big data is that data is distributed
so there are many problems that people are currently studying, how to do linear non-linear problems, optimization problems is an important thing in this model
machine learning in a distributed setting is an active area
there are dynamic versions of these questions you can ask where the data is subject to updates
there are some papers here, I point out only one reference but there are many references here
ok good, I want to do one more topic uh I picked this topic partly because it relates to it, partly because it's very beautiful recent work and one of the co-authors is in Bangalore actually so I thought it'd be nice to do
so this is called sparsification which is another twist on sampling
now we already saw that if you have a matrix A which is big we can compress it by using a random matrix A in front, you get R times A right?
now you can think about RA as combinations of the rows of A right? RA is the combination of the rows of A
here is a, so instead of RA, so combining the rows of A is it possible to just take a sample, a subset of rows, not combinations but a subset of rows maybe with weights and make that do this job?
how about graphs? because graphs are a special case of the matrices
so here is a picture, a description of what a graph looks like
now I've gone to columns and to rows excuse me
so here's a graph, it's represented by this edge [nor?] adjacency matrix
so edge 1 goes from A to B so I put a plus one on A, minus one on B, there's vertix A and vertix B
similarly edge 2 goes from B to C, and that's that edge, B to C and so on
I put down this matrix and uh here's a cut which cuts the graph into two pieces
I look at all the edges going across the cut, these three edges now going across that cut
it turns out, and this is a calculation that you don't have to do at this point
it turns out I can represent the cut by a vector which puts ones on the vertices on the left bank, these two a and d, and zero for the vertices on the right bank, b and c of the cut
and if I take the length of the vector vA squared that's a [slice?] of the cut, it's always true but you have to prove this
so from this we can formulate the following problem which is exactly the same as what I had before
so I want now but a subset of edges, a subset of columns, so that the length of vB and the length of vA are close
I don't want the combination, I want a subset
so in pictures this is for graphs here is a graph on ten vertices which has all the [tensions or tensials?] to edges, so it's a lot of edges
if n vertices or have n choose two edges, that's many many edges
can I sample a subset of edges, so in this case I have I think fifteen edges instead of [tensials?] two
and perhaps I weight them, I make them thicker, so that I want to guarantee that any cut I make
so there are n vertices I can cut them into two to the n possible ways
any cut I make here, and I make here, has the same value
I take the total number of edges crossing this cut, I take the total weight of edges crossing this cut, they must be the same, roughly the same
so again I want to sparsify the graph, choose a subset of edges, so that every cut here has roughly the same weight as every, the corresponding cut here
that's a problem we might want to solve and um here's a problem with this setup
here is a pathological graph
if you have a graph which is very dense here and very dense here and only one edge connecting the two this is called a dumbell graph
here is a cut just cutting it into two pieces, there is one edge crossing it
I'd better get this edge in my sample otherwise I'll get a zero instead of one, that's not good, that's not good relative error right?
zero is not within relative error one percent or one
so if I want to sparsify this graph I'd better always pick the same
so uniform sampling of the edges will not do
I have to do something else and a beautiful theorem of Spielmann, Teng and Srivatsava
Nikhil Srivatsava is at Microsoft in Bangalore
uh says that uh if you have an n by m matrix where m is larger than n
you could, there is a probability distribution it cannot be uniform I have to make sure I put a high probability on this edge
there is a probability distribution we can put on the rows of A so that if we do IID sampling of a certain number of rows
only on log n rows, a small number of rows think of it, according to the distributions
then for every x length of Ax and length of Bx are the same
and that turns out answers the cut problem for a reason I won't actually describe
and if A actually came from a graph like the last one, sampling probabilities are proportional to the electrical resistances
when you view the graph as a resister network and in fact sampling can be done in a nearly linear time
so again I have a graph I must sample a certain set of edges, a small set of edges, so that every cut is correctly represented and they say we can do that provided you choose the right probabilities
you cannot do that if you choose uniform probability right? and the probabilities are proportional to electrical resistences
so this theorem they proved about five years back, there's been a lot of work on this area and one of the people who's worked on this area is Ramesh Hariharan
who is our next speaker in this series he will talk next month, perhaps not about this but something else uh but he is also from Bangalore so he has done quite a bit of work on this also
now this led to something quite unexpected uh but proved about two months ago and that's the uh which also Srivatsava was, Nikhil Srivatsava was one of the co-authors
there was a beautiful result that settles a classic mathematics problem and the problem is actually very important in quantum theory as well as operator theory
well it's one of those few things which can be stated very simply to do with vectors
I won't be able to describe what connection it has to the previous theorem but it does, it's actually connected to the previous theorem
so if big data you thought was only going to let you handle big data well here is something very fundamental that came out of
not necessarily looking staring at big data but something that has to do with compression and sparsification
so the theorem here says the following you have a finite set of vectors, this is going somewhat far afield but I want to tell you this theorem because it's a spectacular achievement right?
um by these people, so if you have a finite set of vectors which are in what's called inertial position
inertial position means the set of vectors is cheap
inertial position means you take any vector x and sum of the squares of x dot v, dot product over the set that's exactly the length squared
so you may think of as this as the energy of x and the direction v, so this says the energy of x together along the directions, and t is exactly the length squared
so that needs to be true and no vector should be big, so vectors are all small in length
then you can always partition this set of vectors into two sets that are about half inertial
so this was about x squared, each set is about half inertial so for every x I take the sum of vectors in the first part of the energy squared in the direction
that's approximately x squared over two for the first set, so it must be true for the second set also right? because the total is x squared
so it turns out again this settles actually a very long standing problem in operative theory
now this has something to do with graph sparsification in fact that was their starting point
this actually says that not only can you cut up a graph, can you sparsify a graph, you can actually split it up into very sparse pieces
you can split it up into many pieces each of which is sparse, but while there's some conditionals that's what this theorem ends up saying in a way that I won't be able to completely describe
but I believe that's all so I'm done, we are now onto questions if you want [audience applauds]
{moderator} so we're open for questions now
{audience} sir you are taking the [unintelligible, just one word] approximately the length of the x and the R x so [our theory? (two more words)] how the x alone with [several words unintelligible] what would be the order of that approximately
{Kannan} oh in terms of epsilon? so in terms of the [vertiver?] epsilon required the number of rows will grow as one over epsilon squared, so not too bad, and in terms of n it's only [longer or logr or log R?]
{audience} [first sentence not at mike, unintelligible] ...true for all time that we have used computers right? why is that called big data?
{Kannan} no, ok so uh good point. so it's true, it has been true in practice for a long time, but in theory the paradigm we had for algorithms was
I store my graph for my matrix or my input for any problem in RAM and then I can quickly access various things
we never, well not never, we almost never worried about access problems if data was not stored [in area?]
we did sometimes, there is some literature, but we didn't sort of seriously worry about that
but big data means even in theory we better seriously worry about that somehow
{moderator} one other person
{audience} sampling, is there any connection theoretically to this [micro?] sampling about minimum frequency of sampling equal and in big data as to theoretical work on is there something [ecoland?]
{Kannan} yeah so you say our optimal sampling rate that we need, we don't often know optimal answer
[niquis?] was nice to help me know the optimal answer, we often don't know the optimal answer, we know lower and upper bounds which don't quite meet
but in a few cases we do know the optimal answer
{audience} well what is that kind of
{Kannan} is work in that kind of thing? the lower ones are very hard to come by that's the problem [niquis?] sampling is something else, lower bounds were also possible there
{audience} in your presentation you are dealing with [well in?] numerical data and maybe you are not talking of
{Kannan} so good point good point, throughout the talk I only focus on numerical data partly to spite my friends who focused on Boolean variables for too long {audience laughs}
but partly, partly is the following, uh machine learning in general or other subjects have feature vectors
feature vectors can have Boolean fields but generally is much nicer to deal with real data because there's a lot more structure
{audience} but there's some of this uh uh you know text or even pictures really or audio or all that, can they be converted into numerical
{Kannan} actually that's a very good question, so for instance if you have zero one, so for things occurring or not occurring zero or one
now the numerical distance squared between those two is of course the number of flips or the dot product for instance even though they are Boolean
the dot product is the number of common so there are connections like this which can be spotted
now it turns out, actually it is a very good point you raised, it turns out for instance for the vet matrix you have the point of making some hypertext links
so uh there's a one in the ideal position if the [ite?] were a page linked to [jates?] web page
now this is purely a Boolean thing but you take that matrix and do eigenvalue analysis of it, that's how you get page rank
the reason it works is distance is squared and dot products make sense as if they were real even though they're Booleans
{audience} sir I've heard a lot of big data talks and oftentimes they're about the systems aspect of big data and it was fascinating to hear the foundational aspects of big data
{Kannan} completely removed from reality I'm sorry {audience laughs} but yeah that's true
{audience} sir where does theory and practice meet and how do they meet?
{Kannan} actually that's a good question so for instance uh this idea of using Johnson-Lindenstrauss right? really in a way comes from theory
ok, so, I mean in fact, I probably want to claim I'm not probably even sure, I would I would think theoreticians are the first to think of random [theoreticians?] because they're {sermos arah?}
ok so we prove this theorem that says if you take a number of rows, hundred log n over epsilon squared then I can prove that this works
well in practice that's too big but however it guides practice in a sense that the whole method comes from theory
now in practice you can go and say I'll use only five log n over epsilon and that works beautifully
so, ok, we need two things, we need empirical studies to translate this theory into practice, because the bounds may be prohibitive
we also need the other way mechanism, in practice people use certain heuristics or algorithms
I mean people are happy using the k means algorithm for anything they want, it always works
theoreticians are puzzled that it always works and we are still trying to prove that there are cases where it works
but in trying to prove that maybe we come up with twists that are interesting in practice so it's probably both ways that it would go
but that's how all this vector stuff came from theory in some sense
{audience} so the problem on [insulate?] comparative analysis on distributed data so what are the objectives there?
what are the things that you want to compress it to within maybe a target rate?
and then of all possible ways, all those R matrices, all possible ways by which you can compress it to [dot or target?] size
so are there uh analytical lower bounds on the amount of communication that is needed and which is possible?
{Kannan} yes there are lower bounds actually and it turns out this algorithm had meets the upper and lower
this is one of these algorithms which actually is tight with the lower bounds, we're there for that problem already
so I can give you references but roughly for, well I won't tell you the exact lower bound but yeah in this case the lower and upper bounds meet
so also for the v i to the k there are lower bounds there are lower bounds that meet the upper bounds
{audience} this [bipartite?] graph you draw graph you draw you say that each server has its own respective information but how do you combine them finally together?
{Kannan} so that's still the important sampling, so each of the, what the model of what I said was each server has important sampling
just on its own events, and somehow that's enough it turns out with some exchanges and rejection sampling which I didn't go into
that's enough to do something which is as if importance sampling on the whole thing with the sum
so there's some work to be shown there, I didn't show it
I'll move to the other side, no I won't move to the other side {laughter}
{audience} ok so on this geometric embedding of symbolic uh problems and so on uh you know of course in logic you can also embed many problems in logic
is there a sort of a sampling theorem there that is striking in logic?
{Kannan} for logic uh?
{audience} so for theorem proving or for [combine this/compactness?]
{Kannan} actually I don't know, uh um, the difficulty for theorem proving you want the exact thing right?
so the closest thing I can think of at the programming languages people, to verify a problem
I mean you would like a theorem that says the problem is always true which is often difficult to prove
they do have sampling methods of generating random inputs on which it's enough to check so you can assert with high probability
even sometimes that's not enough there also there are ways of coming up but not full fledged frugal ways but they have heuristic ways of coming up with a test state
{audience} yeah but there could be other things like uh finding deep resolvants or steps in theorem proving
{Kannan} that's right
{audience} that could come from
{Kannan} yeah maybe some steps can be subject to sampling but I don't know much of anything along those lines actually
{audience (also first and only female voice to speak so far)} look this is really not uh um [deduhdinesys?] question as such uh um think of me as a layman asking question to uh you know professor
so to what extent all these algorithms have been implemented?
um say I'm from a softer background and I'm trying to implement these things with respect to a [field?] problem
to what extent are these implemented so that they're useable?
{Kannan} ok uh I don't know a lot about where the streaming algorithms have been implemented but perhaps they've been, they're around
the matrix algorithm is actually, people have begun to study in these statistical architectures I know you're familiar with MapReduce that's one particular discrete uh distributed architecture
of how the machines interact which Google built and there have now been maybe two or three year old studies of the matrix algorithms
um streaming I would guess is implemented but I don't know precisely
uh the matrix algorithm you don't want to solve it's uh you have large matrices and you want to do this
oh and clustering is another example where which people have implemented and k means, I didn't talk about that, in in MapReduce and other settings there has been some study
{moderator} like just to add to that other question to that actually the one of the streams of activity here is to take
very well established algorithms like clustering, single value decomposition, that have been around for awhile
but put them on a sort of more firm foundational basis where you understand when they work, when they don't
how you can sample them to make them faster etcetera, that's hat's clearly one of the streams
along that line I had a question which would be um are there, are there methods that are very well established like analog there is [really?] clustering etcetera?
which clearly have an impact in practice but do not have a mathematical foundation yet which we all need to look at, examples of those?
{Kannan} yeah uh certainly, graphical models, relief propagation for examples, there there's some theory but not enough
uh deep learning is a big, so there's a subject called deep learning that um machine learning people have devised over the last maybe ten years
uh it is supposed to be spectacular. no theory establishing that as such
topic modeling is another area that, one of our future speakers Chiranjib works on
is another area where there is a lot of heuristic methods, we perhaps have few proofs and uh things need to be proved along those lines so
I mean I mean there are a lot, so, so I'd say, so both ways right, one question was how to take theory to practice
but there's the other way that practical people, I mean they are generally happier people because whatever they use it seems to work {audience laughter}
but we can't prove anything I mean it makes us unhappy but that might be one, another way to go also
{audience} there is another basic question from my side like uh even if we go with all of these algorithm uh being a kind of uh
if I look at from the softer [bound?] of a few [of our applications?] [bound?] a few, how are you going to get the data into this [theorem?] like with the matrices theorem?
so I can implement to the application side also?
{Kannan} ok so that's a a question, more generally you might have a, you might have big data that you have to annotate
I mean that's a huge problem, I mean in uh biology, in astronomy, and so on, there's a huge problem
I don't know whether there is a sort of simple solution for that
obviously not because every domain has to do its [unintelligible]
now as far as these specific things how to convert them into vectors, these more or less come as these logs right?
it was just messages, source and for instance, source and number of packets
it's very easy to run through the log and build your vectors, that's what we were saying
so in some of these instances it is easy, but more generally the problem of how to make data not only machine readable
but intelligible sort of is, is a big problem for which I don't think I have a solution
so this is the quiet, I can come to the quiet side and then
{moderator} all the questions, were almost on that side yes, the questions come from that side
{Kannan} unless we are done with time
{moderator} any other questions?
{silence}
{moderator} ok so if there are no more questions then we'll um thank Ravi again for uh {applause} very impressive talk
{Kannan} oh thank you
{presenter} this is very small gift for a very big lecture
{laughter}
{Kannan} well the next one will say big data on it
{laughter}
{off camera} I'd just like to mention and those of you who don't know Ravi is writing, he mentioned at the beginning
a foundational book on this topic and uh some of it might be available on the web uh
{Kannan} oh it's available to download yeah
{off camera} at least even for me who's been in this community for awhile to have all of these different algorithms strung together
under a very nice umbrella that relates now to the, to the things in the world is, is certainly, certainly very interesting, very you know foundational
so I would encourage all of you to take a look at it and uh
{Kannan} yeah please feel free to download it and uh use it anyway
{off camera} thanks Ravi again and uh I'll turn it over to Professor
ok so we do have uh coffee and things right next door so please help yourself there
and then we'll meet again in a month's time for the next lecture and the details will be up on the web
{Kannan} so thanks for coming and thanks thanks for the questions and...
{applause}