1. Home
  2. Explore
  3. Computer Science
  4. Practical Dynamic Graph Algorithms

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Practical Dynamic Graph Algorithms

Transcript

INTERVIEWER: And the talk is about "Practical Dynamic Graph Algorithms-- Data Structures and Connections Between Models." Please yeah. QUANQUAN C. LIU: Thank you for the introduction. So today, I will be talking about practical dynamic graph algorithms and specifically several models for which come up with algorithms that can be easily transferred between these models. And because I'll be talking about several models for the presentation, I will start by introducing these models.

So we're in a dynamic graphs workshop, so everybody knows the sequential dynamic model. So this is a classic model, where you have edge insertions and deletions that arrive sequentially. And you want to maintain a graph property after each edge insertion/deletion. There are several variants of this model that look at a variety of aspects. So you can think of various ways to represent the graph. You can also have different types of resources to process the graph.

In addition how to maintain your graph in memory and how to process these graphs, you can also have different ways to obtain the updates for the graph. And finally, you can have various adversarial models. And so, let's go through each of these one by one. OK. So there are several ways to represent your graph. You can store your graph on one machine, or you can partition your graph across many machines, and the machines talk to each other via some communication network.

If you store your graph on one machine, you can process the graph using multiple cores and multiple processors on your machine. So nowadays, we're dealing with machines with many more than one core. Even your laptop has at least eight cores nowadays. And for these cores they can process, parts of your graph in parallel and read and write from the same shared main memory. But generally, nowadays, one of the models that we use to study such a system is the shared-memory work-depth model.

There are various other models that have been used, like the PRAM model historically. But the work-depth model consists of two complexity measures-- the work, which is the total number of operations that is done by your algorithm; and the depth or the span, which is the longest chain of sequential dependencies in your algorithm. Now, you have more than one machine. You now have a distributed network. And one of the ways-- one of the models that models the distributed network is the Massively Parallel Computation Model, or the MPC Model. And this model has been supported by large companies who have many machines to process their large data. So Google is one of these companies that heavily pushes this model. And this model consists of M machines, which talk to each other via synchronous rounds.

So here are your M machines. And your graph is partitioned across these machines. Specifically, the edges of your graph are partitioned across these machines. Now, the machines each have S space. Generally, you want S to be linear in the number of nodes in your graph, not in the number of edges. And even better is when you have sublinear memory per machine. So, sublinear in the number of nodes per machine. And you can do some local computation in your machine, and the machines talk to each other via fully connected communication network.

So any other complexity measures that you care about is the total space, which is M times S. In the complexity measures that we specifically care about, in this model is the total space, the space per machine, and the number of rounds of communication. So here are the two models of how to process the graphs using these models. The other question is, how are the updates given to our dynamic graph? When you're given updates sequentially, you're given updates one at a time.

But if a lot of these updates happen at the same time, you can batch together the updates in batches of multiple updates. So we generally talk about the batch dynamic model in this case. And a number of previous presenters have talked about the batch dynamic model. And the batch dynamic model is you're given some graph, and you're given a batch of updates. So the batch of updates consists of insertions and deletions. And then after you're given this batch of updates, you obtain a final graph.

So this final graph is obtained after you perform all of your insertions, all of your deletions. In addition to processing the graph using a batch, another way that your graph could be represented is as a stream of edge updates. So this is your input graph. Your input graph could come as a stream of edges, where you have some amount of small memory to store parts of your stream. So this is, again, dealing with a very large graph. You don't have enough memory to store all of your graph. But instead, you can store a part of your graph. So you're given these edges one at a time, and you can choose to store some number of these edges in your memory for whichever problem you want to process. So you're given the stream, and you store parts of the stream.

And the relevant complexity measures in this model is the total memory that you're using to store whichever part of the stream you want to store and the number of passes through the stream that you need for your problem. OK. And then, finally, you have your adversarial models. So we've heard about the adaptive oblivious adversarial models. So just as a reminder, the oblivious adversary has no knowledge of your previous algorithm outputs for your previous updates. So your abilities adversary-- you can just think of as an offline adversary where they compute some number of updates before you run your algorithm, but the updates come to you online. So you're given these updates online,

but they're predetermined before they see the outputs of your algorithm. Now, for the adaptive adversary-- these adaptive adversaries can see the previous algorithm outputs. And sometimes you can even assume that your adaptive adversaries can see the internal bits of your algorithm. So specifically, if your algorithm is deterministic, your robust against this strongest version of adaptive adversary. And even stronger adversaries you can consider to be adversaries that violate the privacy of your algorithm. And for these privacy-violating adversaries, you can have two different types. You can have the central model of differential privacy in which your private graph is given to some trusted curator. The trusted curator is responsible for coming up with a private algorithm for which they output privatized answers to queries.

So the golden standard for protecting the privacy of these users is via differential privacy. And differential privacy is you're given some randomized algorithm A, and it is epsilon differentially private if for all pairs of neighboring inputs G and g prime and all sets of possible outputs, your algorithm outputs an element of this output with approximately equal probability. So epsilon is your privacy parameter. So, smaller epsilon means the difference between your probabilities is smaller.

Larger epsilon means you're allowed larger difference between your probabilities. And this neighboring inputs is the things you're trying to hide. And for graphs, we often talk about edge-neighboring graphs. So you want to hide the presence of any edge in your graph. So for edge-neighboring graphs, they differ by exactly one edge. OK. most of the previous results are in the central model of DP. More recently, what's become more popular is this local model of differential privacy.

So the central model, you're assuming your private graph is given to some central algorithm, private algorithm. But the central coordinator knows your entire private graph. Now, this is not the case for local privacy. So for local privacy, you're assuming each of your nodes contains some form of private algorithm. So we can say each of these nodes has some epsilon local randomizer, R. And this epsilon local randomizer is an epsilon differentially-private algorithm. And What this epsilon local randomizer takes as input is an adjacency list, which is private-- so its own adjacency list-- and some public information and outputs privatized answers. So the neighboring inputs, in this case, are the adjacency lists. So a neighboring input is a adjacency list that differs exactly one bit.

Now, using this local randomizer, you can now use a distributed algorithm on your nodes. So the way that distributed algorithm works is that the algorithm can proceed in several rounds, interactive rounds, where the nodes talk to some untrusted curator. Now, the nodes now are outputting privatized answers. So now we don't have to trust the curator with their private adjacency list information. So you just need some curator. You don't have to trust them.

They just need to do some coordination on the algorithm. So in each around, the coordinator sends some public information to the nodes. So let's say this public information is x. And then each node uses their private adjacency list and passes it as input into their private local randomizer algorithm and then outputs some privatized information back to the curator. Now, using this private information, the curator can produce some new public information, pass it back to the nodes.

The nodes now use their private information and this new public information to produce some additional outputs, send it back to the curator and so on, and you can use this via several rounds of the algorithm. And because we're talking about this, the relevant complexity measure that we care about here is the number of rounds of communication, as with any distributed algorithm. And the relevant comparison is to non-private distributed algorithms. So here I've described the model in terms of a curator. So some of these algorithms you can have as purely distributed, where each of the nodes are only sending messages to their neighbors. So each of the nodes are only sending privatized information to their neighbors. But it's easier to define it in terms of a central untrusted curator.

OK. So this is a very strong notion of privacy, where individuals trust nobody with their private information. And again, the private info that we want to keep private is any edge in the input graph. OK yes. Mm-hmm. Sure. SUBJECT: What happens if you allow the curator to-- what happens if you allow the curator to return messages that are customized to each node in the graph instead of a common message? QUANQUAN C. LIU: Ah. So that's a good question.

You can allow curators to return different messages. So one way to think about this is if you're in the point-to-point message model where you're only sending a privatized information to your neighbors, you're receiving customized information from your neighbors. So you can think of this as the curators returning back to you customized information. So you can definitely have this as part of your model. But the return information is based off of privatized information. So it's-- SUBJECT: But not everyone sees the message that you get back? QUANQUAN C. LIU: Yes, but everybody sees the message. You assume that everybody can see the message if they try hard enough. SUBJECT: Oh, I see. QUANQUAN C. LIU: Yes. So even if you return privatized-- even if you return personalized messages to each node, you're still assuming that if other people are curious and try hard enough, they can see your message that you personalized. SUBJECT: Oh, so then you might as well

give the union of all the messages to everybody. QUANQUAN C. LIU: That's right. Exactly. You might as well broadcast all the messages. SUBJECT: I see. QUANQUAN C. LIU: Yes. Yes. SUBJECT: Just a quick question-- are you allowed to use a cross-round adjacency list? If you are in round two-- just a quick question-- are you allowed to use cross-round adjacency list? If you are in round two, can you go back and reduce distances? QUANQUAN C. LIU: Ah, yes. So that's a great clarifying question. So we assume the adjacency list is constant throughout the rounds. So it's a static graph for this model. We don't currently have a model that's

a local privacy plus what's called a continual release model. I'll actually talk about the continual release model. So that's a dynamic model. But for this local model, it is static. So the graph is fixed at the beginning, and you're computing the rounds over a fixed graph. So the adjacency list stays the same across the rounds. But you're assuming that people keep track of the information they receive in each round. So in the next round, you can see the information from previous rounds that are sent and received.

OK. Great questions. So given these models, you can also combine the models to produce new models. So for example, you can combine batch dynamic with the shared-memory work-depth model, where you're using these shared memory processors to process each batch in parallel. You can also combine batch dynamic with MPC model. You can combine dynamic with differential privacy, and this gives you the continual release model. And continual releases, every single time

you receive an update, you want to output privatized outputs for your problem after every update. You can combine distributed with differential privacy, which I've talked about. And that gives you the local model. And of course, for streaming, you can have insertion-only streams, so incremental dynamic algorithms; or you can have fully dynamic streams. So combining fully dynamic updates with receiving these updates in a stream. And there are many more types of models.

Like, there are some interests in combining parallel with streaming. So you care about the amount of processing time that you're taking for all of the edges that you store from the stream, et cetera-- many other different combinations. So each model is great for a different real-world system. But unfortunately, there are a lot of these models. Even just the models individually, there are a lot of these models. Once you combine them, there's even more models.

And if I'm actually implementing these algorithms in systems, I probably don't want to implement a very different algorithm each time my company chooses to update their system. So I'm going to argue is we want to study problems where we want to find these problems where the solutions can be implemented in many models without many changes. So there are a large number of wonderful works in each of these models, and some of these works take inspiration from other models.

So I won't be talking about these works. Specifically, I'll be focusing in this presentation on a specific problem that I've studied in some of my works. But if you're interested in these other works, feel free to talk to me afterwards. Now, what do I mean by data structures that you can turn into ones that work in a variety of models? So specifically, I mean data structures that can be modified without much effort. So without much effort is, of course, debatable among people.

But you can generally think of, if you have an algorithm and you're reviewing the paper, and you think the algorithm's improvements are incremental, that is a good thing in this case. So these algorithms are universal in some sense. And what we want is we want the algorithm to achieve the best-known theoretical guarantees for some of these models. But for the other models, we want the guarantees to be not much worse than the best-known for these other models.

And what's ideal is you want the theoretical guarantees to be, of course, the best theoretical guarantees in as many models as possible. Yes. SUBJECT: I wonder, is there a universal model in some sense? QUANQUAN C. LIU: Yeah, that's a great question. SUBJECT: You could just design for this model, and then you can reduce to any other model that you want? QUANQUAN C. LIU: Yes, that's a great question. Of course, we don't know of one now nowadays, but that's definitely the end goal that we want to go towards-- so the universal model over all of these models.

But for now, I'd say probably studying the problems for which we have some solutions that we can transfer between models is a good stepping stone towards that end goal. OK. So how do we do this? So one specific type of algorithm I've studied is what's called these locally adjustable graph algorithms. And these graph algorithms are very simple. And you'll see how simple they are. And there's some algorithms with some local structure. And what do I mean by local structure?

So these algorithms proceed in a small number of rounds, where in each round, each node uses information from some local neighborhood. You can think of this local neighborhood as its immediate neighbors even. Then during each round, each node takes a small number of actions. So let's take a look at a very simple type of algorithm that falls under this category. So this algorithm, you can think of all the nodes as starting from some initial state. Using this initial state, they send some output,

some function output on their initial state to their neighbors. Now, each of these neighbors counts the number of function outputs that satisfy some constraint. So just counts the number of outputs that satisfy some constraint based on this count of outputs that satisfy some constraint, then they update their internal state. So this node counts the number of their outputs that satisfy some constraint and then updates their internal state to S1.

Now, this can proceed in some small number of rounds, where each node updates a random state based on the function outputs that they receive from the previous round and then sends new function output to their neighbors and then updates their state based on this count. And you can do this and so on until the algorithm terminates. So this is inherently a distributed algorithm and some local distributed algorithm. And you can think of the nodes as sending messages to each other via some point-to-point messages. It turns out these algorithms are very nice because they can be implemented in a variety of models.

And one specific algorithm class that I'll be talking about that falls under this locally-adjustable graph algorithms category are these level data structures. So there are a lot of algorithms that use levels. I'll mostly be talking about these structures that are very much similar to each other. Specifically, you're partitioning the vertices across levels, and you're moving these vertices up and down levels according to some rules. So there are definitely other algorithms that use levels,

but I won't be talking about those. And within this class of data structures, I'll focus on this k-core decomposition problem. In this k-core decomposition problem we, have solutions that can be adapted to all of these models. And the models which are italicized are the ones for which we have the best-known theoretical solution, or we match the best-known theoretical solution. And for the ones that I've highlighted in purple, I'll be talking about the results for these models in purple.

OK. So the solutions for this problem called the k-core decomposition. And surprisingly, this k-core composition problem is actually much more well-studied in the databases, data mining, ML, even computational biology communities. So you might have heard k-core decomposition from its related problems, which are dense subgraphs, arboricity degeneracy. For one reason or another, all three of those other concepts are more well-studied in the theory community than k-core composition.

So actually, a lot of these best-known theoretical papers for k-core decomposition actually come from VLDB, KDD, ICML. So these related adjacent communities. But hopefully, we can change that. Hopefully, it'll be more interested in the theory community on k-core decomposition specifically. And the k-core decomposition is defined in terms of this concept called the k-core. So k-core is the maximal induced subgraph, where each vertex in this induced subgraph has degree at least k.

But shown in this example, the cores, the k-cores in this graph. Now, using the course, you can assign a core number of a node v. And the core number is defined as the maximum k, where the k-core contains the node v. So the maximum value k, where the k-core contains this node. So here is a k-core decomposition of all the nodes in this graph.

And I just want to mention that k-core decomposition is not the same as a degree of the vertex. So a very large degree vertex could have a small k-core value. And one problem with the exact k-core decomposition definition is that there are no differentially-private algorithms for this problem. So there probably does not exist private algorithms for the exact k-core decomposition problem. So if we want to tame these algorithms-- and also for exact k-core, it's very difficult to find parallel algorithms or distributed algorithms in small rounds and depth. If we want to find algorithms for this problem, we should relax the problem a bit

into the approximate k-core decomposition problem. And a c-approximate core number-- exactly as it sounds-- is a 1 over-- so the approximation is lower bounded by 1 over c times the exact core number, upper bounded by c times the core number. So this is a two-sided error definition. You can turn it into one sided by multiplying c across. And the specific solution that we have for approximate k-core decomposition is part of this category of parallel level data structures. And there's a variety of these data structures, which have studied arboricity specifically. So arboricity, [INAUDIBLE] orientation, and apply this to some problems. But I'll specifically be talking about the set of data structures for which you obtain bounds, which is equal to the current arboricity of the graph. So there are some structures which obtain bounds

with respect to the maximum arboricity that you obtain over the rounds. But for k-core decomposition, we need to have the current bounds. So for this structure is a level data structure because you're partitioning the vertices across levels of the structure. So specifically, you have log n levels of the structure. And the vertices are moved up and down the levels according to some rules. So I'll be talking about insertions in this presentation. We also have a more complex procedure for deletions

that you'll hear from Julian later on this week. But for insertions, you can also model this as kind of a peeling algorithm if you're familiar with that literature. So the way that vertices are moved is that you assume that each vertex, which is initially adjacent to an edge update, is active. And what you want is you want to move the active vertices. So I've shown an example here. For this example, you can assume all the edges are inserted into the graph.

So the graph is initially empty or assuming all the edges are inserted as one batch into the graph. So all the vertices are initially active. And for each active vertex, you want to look at this quantity of, is induced degree in the same and higher level neighbors? So let's take a look at this example. For this example, the induced degree of each of these yellow active vertices is given here. Now, if the induced degree exceeds the threshold up here-- so 2.1 has 1 plus eta--

then you move the vertex up. So supposing that eta equals 0.1, we move all the vertices with degree greater than 2 up. So these set of vertices move up. Now, vertices we move up remain active. Vertices which did not move up become inactive. So once you've moved up the vertices, you find the new induced degree for the new active vertices, and you keep moving them up if they exceed the threshold. So you can iteratively do this for every level, starting from the bottom-most level and until you reach this graph. So terminating condition is, either you reach the topmost level in your iteration or all the vertices becoming active.

So for this example, this is the graph you get with this cutoff. Now, one observation I want to make here is that you somehow want to obtain the approximate core number from this data structure. So one observation here is that vertices in the highest level have core numbers approximately equal to the cut off for this structure. So vertices in the top level have approximately within factors of two of the cutoff for this structure. Now, we can do then is that you can stack copies of the structure on top of each other. And for each of these copies, you have cut-offs which increase by a factor of 1 plus eta. So you want O of log n copies of these structures, where the bottom structure has cut off 2.1 times 1 plus eta, and the topmost structure has 2.1 times 1 plus eta to the log n cut off.

And once you have this stacked structure, you can take the approximation as the largest cut off the vertex is above the topmost level. So for the core number approximation, you look at the vertex, and you look at the group for which the vertex is above the topmost level of that group with that cut off. And that's your approximation for your core number. SUBJECT: What's the significance of the 2.1? QUANQUAN C. LIU: Ah, the significance of the 2.1 is that it's easy for explanation. That's a great question. The 2.1 has to be turned into 2 plus any constant greater than 0 and the effect zero approximation vector.

OK. And this algorithm can be cast into this locally adjustable graph algorithm framework. It can be cast relatively straightforwardly, where the state of each node is the level that is currently on. Every single time the vertex needs to compute the state, the neighbors send their current levels to you. And then, counting the number of neighbors at or above your current level determines your new state.

So that's fairly easy cast of this algorithm into this framework. And now let me talk about some of the complexity measures we have for our models. So we can implement this in the bash dynamic shared-memory setting with these complexity measures. So we get work efficiency, which means that the work matches the best amortized work per update of the sequential algorithm, best known sequential algorithm. And we get a 2 plus eta approximation, two-side error with polylog depth.

So this batch-dynamic algorithm up here can actually be made deterministic with a few extra log factors in the depth. So it can be robust against the strongest adaptive adversary. And the only randomization here is we use hash tables. So that's the only randomization with this current depth. Now, almost immediately, we can turn our batch-dynamic shared-memory algorithm into an MPC algorithm with these complexity measures. So currently, there doesn't exist any batch-dynamic MPC algorithm for this problem. But compared to the static algorithm, our number of rounds is greater. So this is not highlighted in green because we want to improve the number of rounds.

So we want the rounds to be at least as good as the static number of rounds here. SUBJECT: What is delta? QUANQUAN C. LIU: Delta is any constant greater than 0 less than 1. So we can work for any constant in sublinear memory permission. And we also obtain a local edge-differentially private algorithm. The two differences here is we get an additive term. So the additive log n over epsilon is probably existing due to some lower bounds for densest subgraph, which is within a two factor of k-core, the max k-core number. But probably, you can reduce this log to something smaller. So that would be an open question. And the other difference is for local HTTP, we get 2 plus eta one-sided error.

So it's 2 plus eta on one side, not the other side. OK. And I want to conclude with my argument that the transformation to the private level data structure is easy. So we're actually working on some implementations, and the implementation actually is quite easy. You just use Google's DP package. But you can tell me whether this transformation is easy or not. So the way that we're transforming this data structure is that recall that we have some number of vertices. This is a static algorithm in local DB,

so we assume all of the edges are inserted as one batch at the start of the data structure. And then once you've inserted these edges, you're determining which of these nodes to move up. So the only change that we make is that when we're determining whether the vertex moves up, we draw this independent noise from this geometric distribution. So the PMF is given here for the geometric distribution. And once you draw this noise, you add this noise to your induced degree for your active vertex.

And the sum of the noise plus the induced degree determines whether your vertex moves up, and that's it. So the only difference is algorithm remains the same. You add this noise to determine whether the vertex moves up or not. And then everything else is the same. You draw a new noise. Every single time a vertex remains active, you add this noise, determine whether-- and then determine whether the added noise plus the induced degree exceeds the threshold, et cetera.

Approximation is using the maximum cut-off as before. And that's it. That's the only transformation for the algorithm. Analysis, it's a different story, but the algorithm at least is just this. And in terms of open questions, we maybe can get better approximation factors for the batch dynamic results. So this is a 2 plus eta two-sided error, So 4 plus eta one-sided error. Probably decrease that approximation while maintaining the depth and amortized time. MPC, we definitely want to reduce the number of rounds. So at least getting the number of rounds for the static setting. And for local DP, probably you can reduce the additive error. As I mentioned before, there are some lower bounds

for dense subgraphs that states that probably the log n over epsilon probably will stay. But decrease the number of logs, probably possible. The 2 plus eta, unfortunately-- so this paper gives a lower bound for log n rounds. So 2 plus eta, if you want log n rounds, probably needs to stay. And finally, for the larger question, we would like to see what other problems can be solved in different settings with algorithms that can transfer easily between the models and which problems encounter barriers to this. And that's it. [APPLAUSE] Happy to take any additional questions.

INTERVIEWER: Thank you very much for this presentation. Are there questions, comments? SUBJECT: So I have this universal model question. Is it possible that there's a rich enough set of algorithmic primitives that if you express your algorithm in terms of these primitives, then they translate? QUANQUAN C. LIU: Yes. SUBJECT: It looks like you identified some things. But is it at the level of here's a programming language, use this, and everything will work? QUANQUAN C. LIU: Yes, that will be great. That will be great as an end goal, identifying

some programming primitives, such that if you satisfy these, and you satisfy all of these models. So what we've done is we've shown that these locally adjustable graph algorithms-- there are some easy transformation to private algorithms in the local model. But even for that, we don't have approximation guarantees for these algorithms. We're currently working on that. But in the grand scheme of things, we want something like this-- either a universal model that covers all the models or some sort of primitives that allow you. So if you satisfy this primitive, you get these best guarantees and XYZ models.

SUBJECT: Yeah, I think I directly have a question about that. You showed this long list of problems, right? QUANQUAN C. LIU: Mm-hmm. Yes. SUBJECT: So are you saying now for all of them, you can do something in the local DP model? QUANQUAN C. LIU: So some of these problems-- that's a great question. So some of these problems are-- it's difficult to define for differential privacy. Matching is actually difficult to define as a problem for privacy because if you output the matching that violates privacy or violates edge privacy, at least-- so for the problems I've shown-- dense subgraphs, [INAUDIBLE] degree ordering, and k-core decomposition we have private algorithms for. The other ones are up for grabs.

SUBJECT: So follow-up question. QUANQUAN C. LIU: Yes. SUBJECT: What about if you only wanted to output the size of the matching? QUANQUAN C. LIU: Yes. Yes. For size of the matching, local DP-- currently, we don't have an algorithm for size of the matching for local DP, but I think that's much more tractable for local. SUBJECT: And can you also say a little bit about why the additive error is polylogarithmic, even? QUANQUAN C. LIU: Yes, definitely. So log squared n over epsilon comes from-- let me go back to this slide here.

OK. So log square n comes from this parameter that we pass into the geometric mechanism. So this directly translates to a log square n over epsilon R. The additional log that we have is for high probability. So our approximation bounds are given in terms of high probability. This parameter gives you a log square n times epsilon times log n for the high-probability approximation of that.

INTERVIEWER: Are there any other questions? SUBJECT: Do you mind going back to the last slide? QUANQUAN C. LIU: Sure. SUBJECT: Yeah. So for the 2 plus eta at the bottom, you said there's a lower bound for log n rounds. If you were to do polylog instead, is it like-- can you beat that 2 plus eta? QUANQUAN C. LIU: Yeah. I forget exactly whether the lower bound here is for polylog rounds. I think it is tied to log n. So if I recall correctly, it's-- if I recall correctly, is tied to log n that that's still open.

INTERVIEWER: OK, good. Let's thank the speaker again. [APPLAUSE] There's now a break, and the next talk is at 11:45.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent