Sublinear Update Time Randomized Algorithms for Dynamic Graph Regression
Mostafa Haghir Chehreghani

TL;DR
This paper introduces the first sublinear time randomized algorithms for dynamic graph regression, enabling faster updates in data science applications by leveraging advanced sketching techniques.
Contribution
It proposes novel sublinear update time algorithms for dynamic graph regression using subsampled randomized Hadamard transform and CountSketch, improving efficiency over existing methods.
Findings
Supports edge insertion and deletion with $O(rd)$ update time
Supports node operations with $O(qd)$ update time
Achieves $1 ext{-} ext{approx}$ solutions with sublinear complexity
Abstract
A well-known problem in data science and machine learning is {\em linear regression}, which is recently extended to dynamic graphs. Existing exact algorithms for updating the solution of dynamic graph regression require at least a linear time (in terms of : the size of the graph). However, this time complexity might be intractable in practice. In the current paper, we utilize {\em subsampled randomized Hadamard transform} and \textsf{CountSketch} to propose the first sublinear update time randomized algorithms for regression of general dynamic graphs. Suppose that we are given a matrix embedding of the graph, where and has certain properties. Let be the number of samples required by subsampled randomized Hadamard transform for a approximation, which is a sublinear of . Our first algorithm supports edge insertion andâŠ
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Graph Neural Networks · Graph Theory and Algorithms · Complex Network Analysis Techniques
Sublinear Update Time Randomized Algorithms for
Dynamic Graph Regression
Mostafa Haghir Chehreghani
Department of Computer Engineering
Amirkabir University of Technology (Tehran Polytechnic), Iran
Abstract
A well-known problem in data science and machine learning is linear regression, which is recently extended to dynamic graphs. Existing exact algorithms for updating the solution of dynamic graph regression require at least a linear time (in terms of : the size of the graph). However, this time complexity might be intractable in practice.
In the current paper, we utilize subsampled randomized Hadamard transform and CountSketch to propose the first sublinear update time randomized algorithms for regression of general dynamic graphs. Suppose that we are given a matrix embedding of the graph, where and has certain properties. Let be the number of samples required by subsampled randomized Hadamard transform for a approximation, which is a sublinear of . Our first algorithm supports edge insertion and edge deletion and updates the approximate solution in time. Our second algorithm is based on CountSketch and supports edge insertion, edge deletion, node insertion and node deletion. It updates the approximate solution in time, where .
Keywords. Dynamic networks, dynamic graph regression, least squares regression, sublinear update time, subsampled randomized Hadamard transform, CountSketch
1 Introduction
One of the well-studied machine learning problems is linear regression, which is traditionally defined as follows. We receive data, where for each , the data consists of a row in a matrix and a single element in a vector . Matrix is called predictor values and is called measured values. The goal is to find a vector such that is the closest point to in the column span of , under some distance measure, e.g., the Euclidean distance (which is also called the least squares distance or the norm). In other words, we want to solve the following problem:
[TABLE]
or the equivalent problem:
[TABLE]
There is a long history of research on the regression problem for static matrix data and graph data [2]. All the current best bounds for graph regression are by using a matrix embedding (representation) for the graph. As an example motivating (linear) graph regression using a matrix embedding for the graph, assume that we are given the graph of a friendship network in which a score is assigned to each node reflecting its reputation or weight or importance etc. Suppose that we want to find a function with a minimum error for the scores of the nodes, which is linear in terms of their structural properties. Hence, first we need to find a matrix embedding of the nodes, in which each row represents the structural properties of node . Then we need to find a function for the scores which is linear in terms of the values in the rows of .
Since most of real-world graphs are dynamic, recently the problem was extended to dynamic graphs [8, 22]. Dynamic graphs are graphs that change over time by a sequence of update operations. They are generated in many domains such as the world wide web, social and information networks, technology networks and communication networks. An update operation in a graph might be either an edge insertion or an edge deletion or a node insertion or a node deletion.
Given a (update-efficient) matrix embedding111Note that this notion of embedding is different from the notion of embedding used in graph pattern mining [10, 11, 12]. of a graph , the author of [8] proposed an exact algorithm for dynamic graph regression, wherein first an time pre-processing is performed. Then after any update operation in the graph, the solution is updated in time. However, since in most of applications is a very large quantity, this time complexity might be too high to be used in practice. Therefore, we are interested in developing algorithms that are considerably faster than the exact algorithm, at the expense of producing an approximate solution. In particular, we want to develop algorithms that have a sublinear update time, in terms of .
To do so, in the current paper we utilize two sketching techniques, namely subsampled randomized Hadamard transform [1] and CountSketch [17], to develop sublinear update time randomized algorithms for the dynamic graph regression problem:
- âą
(Theorem 3 and Corollary 1). Let be a quantity that indicates the number of samples required for a approximation, as defined in Equations 6 and 9 of Theorem 1. Our first randomized algorithm is based on subsampled randomized Hadamard transform and supports edge insertion and edge deletion. It updates the approximate solution in time. With and in particular considering as a constant, this yields a sublinear update time.
- âą
(Theorems 5, 6 and 7, and Corollary 2). Let be the number of samples required for a approximation, using CountSketch. Our second randomized algorithm uses CountSketch and updates the approximate solution in time. Therefore if and are considered as constants, it yields a constant update time randomized algorithm. Unlike our first algorithm, our second algorithm supports all the update operations edge insertion, edge deletion, node insertion and node deletion.
Note that subsampled randomized Hadamard transform and CountSketch have already been used to improve regression in static data [1, 20, 5, 17]. However, in this paper for the first time we show how they can be used to improve update time in a dynamic setting, where it is required to update the sketches and the approximate solution, after an update operation in the data.
While our randomized algorithms considerably improve update time upon the exact algorithm, we also analyze their relative performance. We show that under some assumptions, if our first algorithm outperforms our second algorithm and if our second algorithm reveals a better update time.
The rest of this paper is organized as follows. In Section 2, we present preliminaries and necessary background and definitions used in the paper. In Section 3, we provide an overview on related work. In Section 4, we briefly introduce subsampled randomized Hadamard transform and CountSketch. In Section 5, we present our first randomized algorithm for the dynamic graph regression problem, which is based on subsampled randomized Hadamard transform222Parts of the results discussed in Section 5 were presented in Proceedings of the 29th ACM International Conference on Information and Knowledge Management (CIKM 2020), pp. 2045-2048 [9].. In Section 6, we introduce our second randomized algorithm, which is based on CountSketch. We discuss and compare our proposed algorithms in Section 7. Finally, the paper is concluded in Section 8.
2 Preliminaries
In this paper, we use the following standard for notations and symbols: lowercase letters for scalars, uppercase letters for constants and graphs, bold lowercase letters for vectors and bold uppercase letters for matrices. By we refer to a graph which is simple and unweighted. We use to denote the number of nodes of . We define a dynamic graph as a graph that changes over time by a sequence of update operations. The adjacency matrix of is a square matrix such that its element in row column is iff there exists an edge from node to node (and [math] if there is no such an edge). We define the distance between node and node , denoted by , as the size, i.e., the number of edges of a shortest path connecting to .
Let . The rank of is defined as the maximum number of its linearly independent column vectors. The transpose of , denoted with , is defined as an operator that switches the row and column indices of . The Singular Value Decomposition (SVD) of a matrix is defined as , where is a matrix with orthonormal columns, is a diagonal matrix with non-negative non-increasing entries down the diagonal, and is a matrix with orthonormal rows. The Euclidean norm or norm of a vector of size , denoted with , is defined as .
The Moore-Penrose pseudoinverse of matrix , denoted with , is the matrix , where is a diagonal matrix defined as follows: , if and [math] otherwise. It is well-known that the solution
[TABLE]
is an optimal solution for Equation 1 and it has minimum norm [36].
The approximate version of the regression problem is defined as
[TABLE]
where is the optimal solution, defined in Equation 2, and defines the desired accuracy. As we will see in Section 4, sketching techniques can be used to solve this approximate version.
3 Related work
In recent years, a number of algorithms have been proposed for different learning problems over the entire graphs [14, 37, 13] or nodes of a graph [31, 29, 8]. Kleinberg and Tardos [31] studied the classification problem for nodes of a static graph and showed the connection of their general formulation to Markov random fields. Herbster and Pontil [29] studied the problem of online label prediction of a graph with the perceptron. The key difference between online setting [30, 27, 26, 28] and dynamic setting is that online setting is used when it is computationally infeasible to solve the learning problem over the entire dataset. However, in dynamic setting the learning problem can be solved over the entire dataset and the challenge is to efficiently update the solution when the dataset changes. Culp, Michailidis and Johnson [18] presented representative multi-dimensional view smoothers on graphs that are based on graph-based transductive learning [40]. The authors of [4] proposed a family of learning algorithms based on a new form of regularization so that some of transductive graph learning algorithms can be obtained as special cases. Kovac and Smith [2] extended a model for nonparametric regression of nodes of a static graph, where the distance between estimate and observation is measured by norm. Chehreghani [8] studied regression over dynamic graphs. He proposed an exact algorithm for updating the optimal solution of the problem, where the update time is at least linear in terms of the number of nodes. In the current paper, we present randomized algorithms with sublinear update times.
A research problem that may have some connection to our studied problem is learning embeddings or representations for nodes of a graph [23], [39], [34]. While this problem has become more attractive in recent years, it dates back to several decades ago. For example, Parsons and Pisanski [35] presented vector embeddings for nodes of a graph such that the inner product of the vector embeddings of any two nodes and is negative iff and are connected by an edge; and it is [math] otherwise.
In the literature, there also exist several updating algorithms for different problems over dynamic graphs. Durfee et.al. [21] presented a sublinear update time randomized algorithm to approximate effective resistances. The effective resistance between two nodes is the electrical resistance seen between the nodes of a resistor network where edge weights form conductances. Their algorithm supports edge insertion/deletion and yields a approximation with a probability at least . Durfee et.al. [22] gave algorithms for updating Schur complements of general graphs, that support edge insertion/deletion and node insertion. Their algorithms maintain at any time a approximation to the Schur complement. The authors also presented a sublinear update time algorithm for least squares regression of bounded-degree graphs with gradual changes in . However in the current paper, we present the first sublinear update time algorithms for the general class of graphs with unbounded degrees, that captures most important real-world networks. Chen et.al. [16] developed a technique to reduce optimization problems based on undirected graphs to finding a data-structure notion of node sparsifiers. Using this technique, they presented a sublinear update time algorithm for flows. An overview on a number of update algorithms for different machine learning problems can be found in [24].
4 Sketching techniques
In this section, we briefly describe subsampled randomized Hadamard transform and CountSketch. Let be a matrix. A subsampled randomized Hadamard transform for is defined as , where
- âą
matrix is a diagonal matrix with on the diagonal (each one with the same probability),
- âą
matrix is a Hadamard matrix, and
- âą
matrix is a matrix that samples rows of uniformly with replacement. If in the sample row is selected, ; otherwise, it is [math].
For , the Hadamard matrix is defined as follows: where is the dot product of the binary representations of and over the field .
A CountSketch for the matrix is a matrix ( is defined in Theorem 2), defined as follows: for every column, a single nonzero entry is chosen uniformly at random, which takes values with equal probability [17]. Therefore, is a sparse matrix which has only nonzero elements. Moreover, can be computed in a time proportional to the number of nonzero elements of [17].
The high level procedure of solving regression using sketching (either subsampled randomized Hadamard transform or CountSketch) is as follows:
- âą
Compute a sketching matrix (either a matrix or a CountSketch matrix),
- âą
Compute matrices and ,
- âą
Compute and output the solution of the equation
[TABLE]
The solution of Equation 4 is
[TABLE]
which we call the approximate solution. When is defined as a matrix, Theorem 1 states the number of samples (the number of rows of ) that are sufficient for producing a approximation to the optimal solution.
Theorem 1** **(Theorem 2 (and the remark afterwards) of
[20]).
Suppose , , and let . If
[TABLE]
with a probability at least , we have:
[TABLE]
Time complexity of computing optimal , i.e., the approximate solution, is
[TABLE]
In particular, assuming that , we get:
[TABLE]
and the time complexity becomes:
[TABLE]
When is defined as a CountSketch matrix, Theorem 2 expresses time complexity of the procedure of computing a approximation to the optimal solution.
Theorem 2** **(Theorem 30 of
[17]).
Suppose that , and . Using a CountSketch with
[TABLE]
a approximation to the optimal solution of linear regression over and can be solved with a probability at least in
[TABLE]
time, where is the number of nonzero elements of .
5 Dynamic graph regression using
subsampled randomized Hadamard transform
In this section, we utilize subsampled randomized Hadamard transform to improve update time of dynamic graph regression, at the cost of having a approximation to the optimal solution. We here restrict ourselves to the following update operations: i) edge deletion, wherein an edge is deleted from the graph, and ii) edge insertion, wherein an edge is inserted between two nodes of the graph. We refer to these operations as edge-related update operations. The reason that in this section we do not consider node insertion and node deletion is that as we will see later, they require to change (the size of) the used Hadamard matrix , which requires time. Hence and since we are looking for algorithms that have a sublinear update time, we do not consider these two operations.333 Moreover, a property of real-world graphs is densification [32], i.e., their number of edges grows superlinearly in the number of their nodes. Therefore, we may say that most of update operations in a dynamic graph are related to edges, rather than to nodes. As a result, proposing algorithms that are efficient for edge-related update operations is useful and worthwhile. For node insertions/deletions, we may compute the solution from scratch, whose time complexity is not much worse than linear in (see Equation 13 of Corollary 1).
Before starting our proofs (and algorithms), we note two intrinsic limitation of randomized Hadamard transform: i) (respectively graph ) must have a power of rows/columns (respectively nodes), ii) the matrix embedding must have full rank. For now on, we forget these two limitations. We get back to them in Section 5.2.
We assume that the graph has an edge-update-efficient matrix embedding , and we define the regression problem with respect to it. More precisely, we want to compute and update , where is edge-update-efficient. Edge-update-efficient matrix embeddings are a superset of update-efficient matrix embeddings presented in [8]. The class of update-efficient embeddings characterizes those matrix embeddings for which the optimal solution of the graph regression problem can be updated efficiently [8]. For example, adjacency matrix of belongs to this class. Edge-update-efficient matrix embeddings, defined in Definition 1, characterize those matrix embeddings for which the approximate solution can be updated efficiently, when the updated operation is edge-related.
Definition 1**.**
Let be a matrix embedding of a graph and be a complexity function. We say is edge-update-efficientf*, if it satisfies the following condition: if and are the correct matrix embeddings before and after one of the edge-related update operations, there exist at most pairs of vectors and , with as a constant, such that:*
[TABLE]
Each vector has size and each vector has size wherein only one entry, whose position is known, is nonzero444So, can be compactly stored by keeping only the position and the value of its nonzero entry.. We refer to each pair and as a pair of update vectors, and to as the update matrix. Also, it is feasible to compute all pairs of update vectors in time. When function is clear from the context, we drop it.
At the high level, our algorithm consists of two phases: the pre-processing phase wherein we assume that we are given a static graph and we find an approximate solution for it, and the update phase, wherein after an edge-related update operation in , the already found approximate solution is revised to become valid for the new graph. During pre-processing, first we generate some matrices , and , as defined in Section 4. Then we calculate . Then, we compute . Then, we compute and finally, we compute . Time complexity of the algorithm is stated in Theorem 1. In the following, first in Section 5.1 we discuss how the approximate solution can be updated, after an edge-related operation. Then, in Section 5.2 we discuss how the limitations of the used technique can be addressed. The presented proofs are constructive.
5.1 The update algorithm
In this section, we assume that the update operation is an edge-related operation and show that the approximate solution, i.e., the value depicted in Equation 5, can be updated in time. Here, we condition on the existence of an edge-update-efficient matrix embedding, without emphasizing any specific one. Later in Section 5.2, we show that this condition holds.
Theorem 3**.**
Let be a edge-update-efficient matrix embedding of graph . Suppose that using a subsampled randomized Hadamard transform , a approximation to the optimal solution of graph regression over is already computed. Then, after an edge insertion or an edge deletion, the approximation can be updated in time.
Proof.
After one of the above-mentioned update operations, by the edge-update-efficient property of , can be updated by at most pairs of update vectors for the revised graph. Given these at most pairs of update vectors and of the graph before the update operation, we want to compute of the revised graph. Since the number of columns and the number of rows of do not change, the sketching matrix does not change, too. We have a sequence of at most rank- updates , , where and are a pair of update vectors, and is the correct matrix embedding of after the update operation. After each rank- update ,
- âą
given the matrix , we first compute and then, we compute by computing the matrix summation . Note that can be computed in time, as follows. First, we compute by taking into account only the column of , where is the sole nonzero entry of . The result is a vector of size . Second, we compute the vector product , which can be done in time.
- âą
then, we exploit the algorithm of Meyer [7] that given a matrix and its Moore-Penrose pseudoinverse and a pair of update vectors and , computes the Moore-Penrose pseudoinverse of , in time555Instead of Meyerâs algorithm [7], we can also use the general reduction technique of van den Brand [38] that maintains several operations (including pseudoinverse) on dynamic matrices, by maintaining only one specific matrix inverse. . Here, our matrix is which is a matrix, therefore updating for a given pair of update vectors will take time.
Therefore and after repeating this procedure for at most times, we can compute the Moore-Penrose pseudoinverse of for the updated graph in time. In the end, multiplication of the updated with yields the approximate solution of the updated graph, which can be done in time. â
5.2 Addressing the limitations
The first intrinsic limitation of randomized Hadamard transform is that the number of rows in , i.e., , must be a power of . This implies that we should always have a power of nodes in the graph. When applying randomized Hadamard transform to matrices, this issue is addressed by concatenating a zero matrix to the main matrix that makes its size a power of [33, 19]. We can follow a similar strategy for graphs. More precisely, if during pre-processing the number of rows of is less than a power of , we pad it with zeros up to the next larger power of . This might be seen as adding isolated nodes to the graph, with measured values [math], to make its size a power of . The second intrinsic limitation of randomized Hadamard transform is that must be a full rank matrix. However, this might not be a serious problem as many real-world matrices have a full rank.
The next restriction is that the matrix embedding must satisfy two properties. First, , because otherwise, randomized Hadamard transform will not be efficient. Second, it must be edge-update-efficient. In the following, first in Definition 2, we present a matrix embedding defined based on the closest nodes of each node, where can be arbitrarily small (we consider it as a small constant). So it satisfies the first property. Then in Theorem 4, we prove that it is an edge-update-efficient matrix embedding. For the sake of simplicity, we assume that is undirected. The extension of the results to directed graphs is straightforward.
Definition 2**.**
For each node in a graph , we define its vector embedding as a vector consisting of nodes of that have the smallest distances to , and call it the -nearest neighborhood of . If there are several such subsets of , we choose an arbitrary one. We define matrix embedding of as a matrix whose row is the vector embedding of node .
Lemma 1**.**
If node is reachable from node (i.e., there is a path from to ) but their distance is larger than , cannot be in -nearest neighborhood of .
Proof.
If and are connected by a path but , there exist at least nodes in the graph, such that their distances to are less than . Therefore, is not in -nearest neighborhood of . â
Lemma 2**.**
If an edge is inserted between nodes and of graph , vector embeddings of at most nodes of may change. Furthermore, each vector embedding that must be revised, can be updated in time.
Proof.
First, we determine those nodes that after inserting an edge between and , may have a change in their -nearest neighborhood. Let denote the set of such nodes. Nodes and belong to . Also, those nodes that have already node (resp. node ) in their -nearest neighborhood, after inserting an edge between and may find (resp. ) and some other nodes in their -nearest neighborhood. Lets focus on finding those nodes that have already in their -nearest neighborhood, and may have in their -neighborhood after the edge insertion (finding those nodes that may have in their -neighborhood after the edge insertion can be done in a similar way). To do so, we conduct a breadth-first search (BFS) from on the updated graph. We use the following pruning/stopping criterionâs:
- âą
at the first level, among all neighbors of , we meet only . The reason is that we are interested in finding those nodes that have a shortest path to passing over .
- âą
in other levels, if a node has a degree greater than , cannot be in the -nearest neighborhood of any of its adjacent nodes (and also any node such that is on a shortest path between and ). Because the adjacent nodes of have already at least nodes that are closer to them than .
- âą
if a node has a distance greater than from , as Lemma 1 says, cannot be in its -nearest neighborhood. Furthermore, any node such that is on a shortest path from to cannot be in the -nearest neighborhood of . Hence, those nodes that have a distance greater than from should not be traversed during the BFS.
As a result and in the end of the traversal, all the met nodes have a degree at most and a distance to at most . The number of such nodes is at most .
Second, from each node whose vector embedding may require an update, we conduct a BFS on its first nodes to compute its updated embedding. This can be done in time. â
Lemma 3**.**
If the edge between nodes and of a graph is deleted, vector embeddings of at most nodes change. Furthermore, each vector embedding that should be revised, can be updated in time.
Proof.
Our proof is similar to the proof of Lemma 2. First, we determine those nodes that after deleting the edge between and , may have a change in their neighborhood. Let denote the set of such nodes. Nodes and belong to . Also, those nodes that have already node (resp. node ) in their -nearest neighborhood, after deleting the edge between and , may also loose (resp. ) and some other nodes from their -nearest neighborhood. Lets focus on finding those nodes that have already in their -nearest neighborhood, and may loose and some other nodes from their -neighborhood (finding those nodes that may loose from their -neighborhood can be done in a similar way). We conduct a BFS from on the graph before the edge deletion. We use the three pruning/stopping criterionâs used in the proof of Lemma 2. In the end of the traversal, all the met nodes have a degree at most and a distance to at most . The number of such nodes is at most .
Second, from each node whose embedding may require an update, we conduct a BFS on its first nodes in the updated graph, to compute its updated embedding. This can be done in time. â
Theorem 4**.**
Assuming that is a constant, the matrix embedding defined in Definition 2 is an edge-update-efficient1 matrix embedding.
Proof.
We show that satisfies the conditions stated in Definition 1. When an edge is inserted/deleted between nodes and , as Lemmas 2 and 3 say, vector embeddings of at most nodes change and it take time to update each vector embedding. Since is a constant, we can consider as a constant. For each node whose vector embedding has been changed, we define a pair of update vectors and as follows: contains the new vector embedding of minus its old vector embedding; and the position and the value of the nonzero entry of are respectively set to and . Therefore, the conditions of Definition 1 are satisfied and is an edge-update-efficient1 matrix embedding. â
Corollary 1**.**
Suppose that we are given a graph whose matrix embedding is defined as Definition 2, with as a small constant, and it is a full rank matrix. Our first randomized algorithm, which is based on subsampled randomized Hadamard transform, performs the pre-processing phase in
[TABLE]
time. Then, after an edge insertion or an edge deletion, it updates a approximation to the optimal solution of graph regression in
[TABLE]
time.
Proof.
In Theorem 3, we conditioned on the existence of an edge-update-efficient embedding and showed that it takes time to update the approximate solution. Then in Theorem 4, we showed that this matrix embedding does exist. Therefore and by using the value of presented in Theorem 1 and discarding constants (including ), we obtain the time complexities stated in the theorem. â
We note that when computing embeddings for nodes of a graph, the objective is to map each node to a vector in a low dimensional space [15, 6]. In this way, many embedding computation methods such those that are based on random-walks [23] and deep graph neural networks [25], consider only a small neighborhood for each node. Therefore, it is reasonable to consider as a small constant. We also note that if the exact algorithm of [8] uses the matrix embedding presented in Definition 2, it will yield a linear time algorithm (in terms of ) for updating the solution, which is considerably worse than the sublinear update time presented in Equation 14.
6 Dynamic graph regression using CountSketch
In this section, we utilize CountSketch to develop our second randomized algorithm for the dynamic graph regression problem. Unlike our first algorithm, it works for all the update operations: i) node insertion, wherein a node is inserted into the graph and at most a constant number of edges are drawn between it and the existing nodes of the graph, ii) node deletion, wherein a node that has at most a constant number of edges, is deleted from the graph and its incident edges are deleted, too, iii) edge deletion wherein an edge is deleted from the graph, and iv) edge insertion wherein an edge is inserted into the graph.
We assume that a matrix embedding exists which satisfies the following conditions: i) is fixed and does not depend on the number of data rows (as a result, by changing the number of data rows, does not change), and ii) the matrix embedding is a CUE embedding. CUE666CUE is abbreviation for CountSketch-based Update-Efficient matrix embedding. characterizes a class of matrix embeddings for which we can efficiently update the approximate solution of graph regression, using CountSketch. It is less general then edge-update-efficient matrix embeddings presented in Section 5, which can be used for only edge-related operations.
Definition 3**.**
Let be a matrix embedding of a graph and be a (complexity) function of and . We say is CUEf, iff the following conditions are satisfied:
if and are correct matrix embeddings before and after an edge insertion/deletion in the graph, there exist at most pairs of vectors and , with as a constant, such that:
[TABLE]
*Each vector has size and each vector has size wherein only one entry, whose position is known, is nonzero. * 2. 2.
a node insertion in results in adding one row to and also (at most) a rank-* update matrix in .* 3. 3.
deleting a node from results in deleting one row from and also (at most) a rank-* update matrix in .* 4. 4.
*after any update operation in , it is feasible to compute all pairs of update vectors in time. *
When is clear from the context, we drop it.
Similar to the case of subsampled randomized Hadamard transform, during the pre-processing phase of our CountSketch-based algorithm and for a given , first we generate a matrix , as defined in Section 4. Then we calculate and . Finally, we compute and . Time complexity of the procedure is given in Theorem 2. In the following, first in Section 6.1 we discuss how the approximate solution is updated, after an update operation. Then, in Section 6.2 we discuss the existence of a CUE matrix embedding.
6.1 The update algorithm
In this section, we assume that we are given a matrix that satisfies the two above mentioned conditions and show, using CountSketch, how the approximate solution is efficiently updated after an update operation.
6.1.1 Edge insertion/deletion
In this section, we assume that the update operation is either an edge insertion or an edge deletion. Then, we show that the approximate solution can be updated in time.
Theorem 5**.**
Assume that is a CUE matrix embedding of graph . Suppose also that using a CountSketch with defined in Equation 11, a approximation to the solution of graph regression of is already computed. Then, after an edge insertion or an edge deletion, the approximate solution can be updated in time.
Proof.
The proof is similar to the proof of Theorem 3. Since is a CUE matrix embedding, after an edge insertion or an edge deletion, is updated by at most pairs of update vectors. Since the number of columns of does not change, matrix does not change, too. Therefore, we have a sequence of at most rank- updates , , where and are a pair of update vectors, and is the correct matrix embedding of after the update operation. After each rank- update , given the matrix , similar to the proof of Theorem 3, we can compute in time. Then we can use Meyerâs algorithm [7] to update , for a given pair of update vectors, in time.
After repeating this procedure for at most times, we can compute the Moore-Penrose pseudoinverse of for the updated graph in time. Finally, multiplication of the updated with can generate, in time, the approximate solution. â
6.1.2 Node insertion
In this section, we assume that the update operation is a node insertion and show how the approximate solution can be effectively updated.
Theorem 6**.**
Let be a CUE matrix embedding of graph . Suppose that using a CountSketch with defined in Equation 11, a approximation to the solution of graph regression of is already computed. Then, after inserting a node into , the approximate solution can be updated in time.
Proof.
After inserting a node into the graph, we need to revise matrices and . Matrix is revised because we need to add to the row corresponding to the new node. Matrix is revised because its number of columns is a function of the number of rows of . Therefore and as a result of a node insertion, we add a new column to and we choose a row uniformly at random as its nonzero element. Let be the index of this nonzero row. To update with respect to this change, we add to each entry of the row of the value of the entry of the last row of . This can be done in time. Furthermore, by the CUE property of , as a result of this node insertion, the vector embeddings of the other nodes change by at most pairs of update vectors. Since and do not change, the size of matrix does not change, too. Updating with respect to these at most pairs of update vectors can be done in time (as described in the proofs of Theorems 3 and 5).
To update with respect to the changes in , we can exploit the algorithm of Meyer [7]. Since the changes in row of can be expressed in terms of a pair of update vectors, can be updated with respect to them in time. Furthermore, for each of at most pairs of update vectors, we can use the algorithm of Meyer [7] to update in time.
After node insertion, we need also to append the measured value of the new node to the bottom of and then, update (with respect to the revised ). To update , it is sufficient to add the measured value of the new node to the entry of ( is the nonzero row of the new column of the updated ). In the end, a naive multiplication of the updated with the updated gives the approximate solution for the updated graph, and it can be done in time. â
6.1.3 Node deletion
In this section, we assume that the update operation is node deletion, and show, in Theorem 7, how the approximate solution is effectively updated.
Theorem 7**.**
Let be a CUE matrix embedding of graph . Suppose that using a CountSketch with defined in Equation 11, a approximation to the solution of graph regression of is already computed. Then, after deleting a node from , the approximate solution can be updated in time.
Proof.
After deleting a node from the graph, we need to revise matrices and . Matrix is revised because we need to delete from it the row corresponding to the deleted node. Matrix is revised because we should delete from it the the column corresponding to the deleted node. Let be the index of this nonzero row. To update with respect to these changes, we subtract from each entry of the row of the value of . This can be done in time. Furthermore, by the CUE property of , as a result of this node deletion, the vector embeddings of the other nodes may change by at most pairs of update vectors. Matrix can be updated with respect to these changes in time. Since and do not change, the size of matrix does not change, too.
To update with respect to these changes in , we can again exploit the algorithm of Meyer [7]. Therefore, since the changes in the row of can be expressed in terms of a pair of update vectors, can be updated with respect to them in time. Also, for each of at most pairs of update vectors, we can use the algorithm of Meyer [7] to update in time.
After node deletion, we need also to delete the measured value of the deleted node from and then, update . To update , it is sufficient to subtract the measured value of the deleted node from the the entry of , where is the nonzero entry of the deleted column. In the end, a naive multiplication of the updated with the updated yields the approximate solution of the updated graph and it can be done in time. â
6.2 Existence of a CUE matrix embedding
In this section, we show that the -nearest neighborhood vector embedding presented in Section 5.2 satisfies all the conditions we are looking for. First of all, in this embedding is a small constant and does not depend on . Second, in Theorem 8 we show that it is CUE777More than these two conditions and similar to our first randomized algorithm, here our matrix embedding must be a full rank matrix. .
Theorem 8**.**
Assuming that is a constant, the matrix embedding defined in Definition 2 of Section 5.2 is CUE1.
Proof.
We shall show that satisfies all the conditions stated in Definition 3 (for ).
When an edge is inserted/deleted between nodes and , in a way similar to the proof of Theorem 4, we can show that condition (1) of Definition 3 is satisfied. 2. 2.
When a new node is added to , we add a new row for it in , which contains its closest neighbors. Furthermore, since at most a constant number of edges are added between and existing nodes in and each edge insertion may change vector embeddings of at most nodes, vector embeddings of at most nodes change, which can be seen as a constant . Therefore and similar to the previous case, condition (2) of Definition 1 is satisfied. 3. 3.
When we delete a node from , we delete its corresponding row from . Furthermore, since the deleted node may have at most a constant number of edges (that are deleted too), and each edge deletion may change vector embeddings of at most nodes, vector embeddings of at most nodes change, which is a constant . Hence and similar to the previous case, condition (3) of Definition 1 is satisfied. 4. 4.
For all the update operations, each pair of update vectors and can be computed in time. As a result, condition (4) of Definition 1 is satisfied.
â
Corollary 2**.**
Suppose that we are given a graph whose matrix embedding is defined as Definition 2, with as a constant, and it is a full rank matrix. Using a CountSketch as the sketching matrix, we can perform the pre-processing phase in
[TABLE]
time. Then, after a node insertion or a node deletion or an edge insertion or an edge deletion, we can update the approximation to the solution of graph regression in time.
Proof.
In Theorem 5, we conditioned on the existence of a CUE matrix embedding and showed that it takes time to update the approximate solution. Then in Theorem 4, we showed the existence of this matrix embedding. As a result and by replacing with its value defined in Equation 11 and discarding all constants (including ), we obtain the time complexities stated in the theorem. â
7 Discussion
When , both of our randomized algorithms outperform the exact algorithm of [8], in terms of pre-processing and update times. However, we shall also compare the two randomized algorithms against each other.
- âą
Suppose that our randomized algorithms use -nearest neighborhood matrix embedding and we discard the terms and from the update time complexities (due to having terms such as and ). Under these assumptions, update time complexities of the first and second algorithms become and , respectively. Hence, if , the second algorithm finds a smaller update time, otherwise the first algorithm outperforms the second algorithm in terms of update time.
Note that in the general form and without relaying on any specific matrix embedding, our first algorithm updates the approximation in a sublinear time in terms of (Theorem 3 of Section 5.1). However, when we use CountSketch, the update time becomes independent of (Theorems 5, 6 and 7 of Section 6.1). In particular, if we consider and as constants, while update time of our first algorithm is a sublinear of (it still depends on ), our second algorithm updates the approximation in a constant time. As a result and in addition to the useful sparsity property of CountSketch [17], its another interesting property discussed in this paper is its constant update time for all the update operations node insertion, node deletion, edge insertion and edge deletion.
- âą
Similar to the case of update times, we may simplify pre-processing times by assuming that the algorithms use the -nearest neighborhood matrix embedding. We discard the terms and from Equations 13 and 15. Then, the pre-processing time complexities of the first and second algorithms become and , respectively. Therefore if , the first algorithm finds a smaller pre-processing time than the second algorithm.
8 Conclusion
In this paper, we presented sublinear update time randomized algorithms for dynamic graph regression. For a efficiently updatable matrix embedding where , our first algorithm is based on subsampled randomized Hadamard transform and supports edge insertion and edge deletion. It updates a approximation of the optimal solution in time, where is a sublinear of . Our second algorithm is based on CountSketch and supports edge insertion, edge deletion, node insertion and node deletion. It updates a approximation of the optimal solution in time, where .
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Nir Ailon and Edo Liberty. Fast dimension reduction using rademacher series on dual BCH codes. In Shang-Hua Teng, editor, Proceedings of the Nineteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2008, San Francisco, California, USA, January 20-22, 2008 , pages 1â9. SIAM, 2008.
- 2[2] Kovac Arne and Andrew D A C Smith. Nonparametric regression on a graph. Journal of Computational and Graphical Statistics , 20(2):432â447, 6 2011. Publisher: American Statistical Association.
- 3[3] Maria-Florina Balcan and Kilian Q. Weinberger, editors. Proceedings of the 33nd International Conference on Machine Learning, ICML 2016, New York City, NY, USA, June 19-24, 2016 , volume 48 of JMLR Workshop and Conference Proceedings . JMLR.org, 2016.
- 4[4] Mikhail Belkin, Partha Niyogi, and Vikas Sindhwani. Manifold regularization: A geometric framework for learning from labeled and unlabeled examples. J. Mach. Learn. Res. , 7:2399â2434, 2006.
- 5[5] C. Boutsidis and A. Gittens. Improved matrix algorithms via the subsampled randomized hadamard transform. SIAM Journal on Matrix Analysis and Applications , 34(3):1301â1340, 2013.
- 6[6] Hong Yun Cai, Vincent W. Zheng, and Kevin Chen-Chuan Chang. A comprehensive survey of graph embedding: Problems, techniques, and applications. IEEE Trans. Knowl. Data Eng. , 30(9):1616â1637, 2018.
- 7[7] Jr Carl D. Meyer. Generalized inversion of modified matrices. SIAM Journal on Applied Mathematics , 24(3):315â323, 1973.
- 8[8] Mostafa Haghir Chehreghani. On the theory of dynamic graph regression problem. Co RR , abs/1903.10699, 2019.
