Maximizing Influence Over Streaming Graphs with Query Sequence

Now, with the prevalence of social media, such as Facebook, Weibo, how to maximize influence of individuals, products, actions in new media is of practical significance. Generally, maximizing influence first needs to identify the most influential individuals since they can spread their influence to most of others in the social media. Many studies on influence maximization aimed to select a subset of nodes in static graphs once. Actually, real graphs are evolving. So, influential individuals are also changing. In these scenarios, people tend to select influential individuals multiple times instead of once. Namely, selections are raised sequentially, forming a sequence (query sequence). It raises several new challenges due to changing influential individuals. In this paper, we explore the problem of Influence Maximization over Streaming Graph (SGIM). Then, we design a compact solution for storing and indexing streaming graphs and influential nodes that eliminates the redundant computation. The solution includes Influence-Increment-Index along with two sketch-centralized indices called Influence-Index and Reverse-Influence-Index. Computing influence set of nodes will incur a large number of redundant computations. So, these indices are designed to keep track of the nodes’ influence in sketches. Finally, with the indexing scheme, we present the algorithm to answer SGIM queries. Extensive experiments on several real-world datasets demonstrate that our method is competitive in terms of both efficiency and effectiveness owing to the design of index.


Introduction
With the prevalence of social networks, more and more people are engaged in online activities where they interact with each other and produce an unprecedented amount of content.By making better use of these data, we can improve our comprehension of information diffusion which plays a significant role in a variety of practical applications including rumor control [1,2], social recommendation [3], and business performance optimization [4].One of the most extensively studied problems of social networks is Influence Maximization (IM) [5] which originates from viral marketing [6].It aims to select a subset of individuals to adopt a new product and trigger a large cascade of further adoptions.This problem has attracted researchers from different fields ever since its formulation.Many effective approaches have been proposed over the last decade.
Most of them are under the assumption of static networks.However, the social networks, rapidly evolving in the real world [7], are innately dynamic.The fact that the classical IM fails to capture the dynamics of these networks motivates many researchers to pursue the answers in dynamic scenarios from different perspectives.Some extend the original problem from static scenarios to dynamic ones [8][9][10].They try to reuse some intermediate data to avoid recomputing from scratch, so that the target set can be calculated efficiently when the network changes.And some others propose new models in consideration of different factors like data recency [11] and user distinction [12].While researchers have explored the dynamic aspect of network to some extent, most of them ignore the fact that not only the graph is evolving but also the requirement of user selections (queries) are raised sequentially which form a query sequence.From a more practical standpoint, queries are prevalent in real life.There are many rounds of promotions to advertise the products rather than merely one round.Every time when promoters launch viral marketing campaigns for promotion purpose, a set of users are selected.Previous works regard different queries as isolated events.In this way, when analysis is carried out in a static angle, the users who were selected previously are highly likely to be chosen repetitively due to their centrality.As a result, selections that have large "overlaps" will be generated.This will definitely dampen the cascade effect of further adoptions, since users who have been influenced might experience a period that is similar to refractory period in physiology.During refractory period, a body organ or cell is incapable of repeating a particular action or reacting to a repetitive stimulation.The effect of each selection can be viewed as a stimulate to evoke users' desire to shop.Like the viscera, influenced users tend to be hard to be influenced again, since they are still "activated" or they show a dwindling appetite for similar stimulus in short terms.Therefore, selections with large overlapping cannot guarantee the effectiveness among several queries.
As mentioned before, regarding each query as independent one will be disadvantageous to further adoptions.Therefore, we investigate a new problem called Influence Maximization over Streaming Graphs (SGIM) which aims to find the seed set that has the maximum influence when considering previous query sequence.One of the major challenges of the problem formulation is its inborn uncertainty.Due to complex relationships among nodes, the possibility with which a node influence another node cannot be deduced from the uncertain graph and whether an individual is truly influenced cannot be observed.Thus, it is infeasible to directly remove the influenced individuals from selection candidates.To address this issue, we use sketch-based methods to transform an uncertain graph to many deterministic sketches which can be viewed as many possible worlds.Then, the results in each possible world are aggregated to estimate the expectation of influenced users that have not been influenced before.Additionally, users who have been activated will experience "refractory period" and they can recover from this state and become capable of being influenced again after some time.Consequently, we adopt the sliding window model [13] to manage the nodes in the "refractory period".
To solve the SGIM problem, the difficulty lies in the dynamic features of the problem.In real world, social networks are highly dynamic, evolving rapidly.When network evolves, the obtained answer soon becomes outdated.In the meantime, queries are raised successively and form a query sequence.These two evolving factors both raise the question of how to efficiently identify the users with maximum expectation of newly influenced users at any time.We find that directly extending the existing algorithms in static scenarios to this new problem will incur inefficiency in terms of time and space.And the cause is redundant computation among different sketches and queries.For each sketch, the search algorithm will be performed to acquire the average of node influence.We construct Influence-Increment-Index to avoid running from scratch when answering queries along with two sketch-centralized indices called Influence-Index and Reverse-Influence-Index to aid in the maintenance of Influence-Increment-Index. We also design update algorithms and its optimized version to prune unnecessary operations during index maintenance.Besides, we maintain the results of query sequence with sliding window model.Two extra indices are designed to facilitate the update process.With the aid of these components, SGIM problem can be solved expeditiously in a steaming manner.
In summary, our main contributions are as follows: • Motivated by practical factors, we formalize a new problem called Influence Maximization over Streaming Graphs (SGIM) which takes the influence of the most recent queries into consideration.• We construct Influence-Increment-Index along with Influence-Index and Reverse-Influence-Index to save the intermediate results and devise corresponding update algorithms.We introduce prune technique to speed up the update process.• We maintain the results of evolving query sequence with sliding window and design two extra indices to expedite its update.• We experimentally demonstrate the efficiency and effectiveness of our method on several real-world graphs.
The simulation-based methods repeatedly simulate the diffusion process to obtain an approximation of influence spread.Some optimization approaches have been proposed to alleviate the pain of expensive computation caused by Monte Carlo (MC) simulation [5].They either decrease the number of simulations [14,15] or reduce the complexity of MC simulation [16].
The heuristic-based methods estimate the influence of a node according to some metrics (such as using degree [17] 1 3 or using local arborescence structures of each node [18]) rather than running heavy MC simulations.These methods are more scalable and efficient than the simulation-based methods, but they often lack theoretical guarantee, thus generating poor quality seeds in some datasets.
The sketch-based methods provide efficient solutions with a good guarantee.They rely on sampling-based exploration and estimate the influence with the aid of generated sketches, such as forward influence sketch [19][20][21] and reverse reachable sketch [22][23][24].Rather than repeatedly running simulations, they generate sketches that capture the diffusion process through simulations.As the names suggest, the forward influence sketch method generates sketches by conducting forward simulations while reverse reachable sketch method builds sketches by performing reverse simulations.
These methods are proposed in static scenarios and directly applying them to dynamic scenarios is computationally expensive.
Recently, there is another type of work called adaptive IM [25][26][27][28][29], which has attracted many researchers' attention.These works assume that the feedback in the real-world is available.In this way, k seeds can be selected in batches rather than at once since researchers could use the feedback to choose more high-quality seeds in the following selections.Han et.al. [25] extends the reverse reachable sketch work to select the most influential nodes in a batch and then rule out the influenced nodes with the observation of realworld data.In the next batch, the selection is based on the new graph that the influenced nodes have been removed.This process continues until all seeds are selected.This line of work emphasizes that different batches of selections are not independent with previous ones.However, the actual feedback sometimes cannot be observed in real life.Without the observation of feedback, it will be hard to extend these works to dynamic scenarios.

Influence Maximization in Dynamic Networks
There are several recent studies of IM problem in dynamic networks [8][9][10][30][31][32].The majority of the literature focus on solving the problem extended directly from static networks which aim to acquire seeds efficiently when the networks change.Song et al. [8] devised an Upper Bound Interchange Greedy (UBI) approach which started from previously found seed set with node replacement instead of constructing the set from scratch.Ohsaka et al. [9] and Yang et al. [10] extended the sketch-based method [22].They maintained a sample of random RR sets and devised incremental algorithms for updating the sets when networks change.The problem they tried to solve is a special case of our proposed problem.
There are also some variants of IM in dynamic networks considering specific conditions.Zhao et al. [11] is concerned about data recency which means that older user interactions are less significant than more recent ones when evaluating influence.Thus, they proposed a general time-decaying dynamic interaction network (TDN) model to smoothly discard outdated data and designed three efficient algorithms based on this model.Huang et al. [12] modeled evolving network as a sequence of snapshots and proposed a new problem called DIM which aims to find a fixed seed set of k target users to maximize the influence spread over distinct users in an evolving social network.They integrated all the snapshots for one selection and devised two different strategies (HCS and VCS) to solve the DIM problem.They think influencing a large number of different people is more important.This motivates us to pay attention to the value of user distinction, but instead of focusing on one query, we are more concerned about the query sequence.

Preliminaries and Problem Formulation
In this section, we extends classical IM problem in static scenarios to dynamic ones.Several notations are listed in Table 1.

Preliminaries
A static graph is composed of fixed nodes and edges.While in dynamic scenarios, a graph is always evolving, which can be defined as a sequence of streaming edges.Definition 1 (Streaming Graph) A streaming graph consists of an infinite stream of edges that arrive chronologically.Each edge in the stream is a 5-tuple (u, v, + , p, t) where u is the source node, v is the destination node, +∕− is the notation which indicates whether the edge is inserted or removed, p is the probability with which u can influence v, and t is the timestamp when the edge arrives.
In this paper, we only consider the edge insertions.But edge deletions can also be integrated into the solution in a similar way.Edge insertions and deletions are both frequent actions in the social networks.For example, the "retweet" The influenced node set of S in the i-th sketch (S) The influence spread of node set S BS i The blocked nodes maintained in the sliding window in the i-th sketch The influence spread increment of node set S in graph G actions on Twitter, the "reply" actions on Stackoverflow, and the "comment" actions on Facebook are all common activities in the real world.These actions insert edges when they are created, and the edge is deleted when that action is canceled.
Definition 2 (Snapshot) A snapshot at a specific timestamp t is a graph that consists of nodes and edges appearing before timestamp t.
To capture the state of streaming graph at timestamp t, a snapshot can be constructed.For each snapshot, influence of nodes and node sets can be evaluated as influence spread.Our problem is based on a widely adopted information diffusion model called Independent Cascading model (IC model) [5].In this model, each edge e = (u, v) has a weight p uv rep- resenting the probability with which u can activate v. Given an initial activated set (seeds), the independent cascading process unfolds as follows.The active nodes will activate their dormant neighbors with corresponding probabilities.This process is iterated recursively until no more activation happens.
The influence spread of seeds S, denoted by (S) , is the expected number of activated nodes after the cascading process.Since (S) cannot be derived analytically sometimes, simulation-based methods [33] can be applied to simulate the activation process for many times.Due to the heavy computational cost of simulation process, sketch-based methods [33] are proposed to approximate the expectation, which have already been exploited in many previous researches [19,20].One of the sketch-based methods is called forward influence sketch approach.This approach transforms a probabilistic graph to scores of deterministic sketches with coin flip technique and performs reachability test on each of these sketches to estimate influence spread.Definition 3 (Sketch) A sketch is an instance induced by the diffusion process.Given a graph (snapshot) G, a sketch (denoted by SG i ) is constructed by removing each edge e = (u, v) with probability 1 − p uv from G. Definition 4 (Influence Set) The Influence Set of a seed set S in a sketch SG i (denoted by IS SG i (S)) is the set of nodes reachable from S in sketch SG i .
Given R sketches SG 1 , SG 2 , … , SG R and a set S, (S) is estimated by averaging the number of nodes that are reachable from S on different sketches. (1) The influence maximization problem (IM) is to find a seed set S * of k nodes that satisfies: Although Kempe et al. [5] proved that this problem is NPhard, owing to the property of monotonity and submodularity of function (S) , a greedy hill-climbing strategy (Algo- rithm 1) can achieve an approximation ratio of (1 − 1∕e) to the optimum solution.This greedy strategy iteratively adds the node v with a largest marginal gain ( (S ∪ {v} − (S) ) until k nodes have been selected.

Problem Formulation
Due to the observation that graph evolves and large-overlapping selections will reduce the effectiveness, we propose a new problem.We focus on dynamic graph rather than a static one.Besides, we take into account mutual interaction of different queries.As shown in Fig. 1, the graph evolves with the arrival of new edges.When a query is raised, the corresponding snapshot at that time can be obtained to capture the latest state of streaming graph.There are two points about mutual interaction when answering a query.On one hand, the results of previous queries will definitely have a strong impact on the effectiveness of current selection.On the other hand, the effect of past selections is not permanent.
A user who has been influenced in the past will still have the chance to be influenced again after some time.Therefore, the query is then answered by considering both the current snapshot and certain number of previous selections.Specifically, we adopt the sliding window model [13] and utilize the active window to control the range of the effect.Given an infinite stream of queries, let current query be Q t , the influence results of query Q t− , Q t− +1 , ..., Q t are in the active window of sliding window where is the window length.And the length of active window means how many number of rounds that needs to be considered.By focusing on the freshest data in the active window and ignoring the oldest data, nodes that have been recently influenced can be ruled out and blocked nodes can be activated again after (2) S * = argmax S⊆V and |S|=k (S) some time.Each data element in the active window records the influence of that round of selection and expires exactly after rounds of queries, which means the influenced/activated nodes in the active window are blocked for following rounds and they can be influenced again after the release.We generate several sketches for a snapshot to estimate the expectation of newly activated nodes.When a query is raised, those nodes that have been influenced in previous rounds of queries are correspondingly ruled out in each sketch.We denote the blocked nodes in the active window in the i-th generated sketch ( SG i ) as Blocked Set BS i .And then the expectation of newly activated nodes can be estimated by influence spread increment.
Definition 5 (Influence Spread Increment) Given R sketches SG 1 , SG 2 , ..., SG R of snapshot G, the result of previous rounds of queries BS 1 , BS 2 , … , BS R , and a set S, influence spread INCrement of S equals the average of the number of the nodes which are activated in the most recent round of selection in each sketch.Therefore, influence spread increment of snapshot G is defined as For example, in Fig. 1, when query Q i+2 is raised, nodes v 1 , v 3 , v 4 , and v 5 are blocked in the first sketch, and node v 1 , v 4 , and v 5 are blocked in the second sketch.Therefore, node v 7 can newly influence node v 7 , v 2 , and v 8 in the first sketch while influencing node v 7 in the second sketch.Con- sequently, the influence spread increment of node v 7 equals 2. Since our goal is to find the maximum influence spread number of sketches=2).Current query Q i+2 takes into the account of the results of Q i and Q i+1 when obtaining the influence spread increment for each node.After the query process completes, new nodes are blocked (shaded circle).Therefore, the window slides and the blocked nodes in the active window change correspondingly increment instead of influence spread, we formulate SGIM problem as follows.
SGIM problem Given positive integer k, SGIM problem is to find the seed set S * of k nodes in the latest snapshot of streaming graph G when a query happens that satisfies: Since the classical IM problem is NP-hard and is a special case of SGIM problem when setting to 0, SGIM problem is also NP-hard.

Property
Now, we prove that the objective function INC G (S) is mono- tonic and submodular under the IC model.
Proof 1 (Monotonicity) For each sketch, BS i is fixed and add- ing a node v to set S guarantees IS SG i (S) ⊆ IS SG i (S ∪ {v}) , s o |IS SG i (S)⧵BS i | w i l l n o t d e c r e a s e .T h u s , , we only need to prove that for each i, function as the non-negative linear combination of submodular function is also submodular.Given SG i and BS i , let we only need to prove that for any Instead of providing a theoretical analysis, we turn to a more intuitive way to show the property of submodularity (Fig. 2).As the equation illustrates, H(S) equals the number of elements that are in Therefore, H(S 1 ) equals the number of elements in black area which is uncovered by grey circle and white circle, and H(S 2 ) equals to the number (4) of elements in black area which is uncovered by shaded circle and white circle.Since S 1 ⊆ S 2 , IS SG i (S 1 ) ⊆ IS SG i (S 2 ) , which means that the area of the shaded circle is larger or equal to the grey circle.Conclusion can be drawn according to the uncovered area that H(S 1 ) ≥ H(S 2 ) .◻

Extension of IM Solutions to Solve SGIM Problem
Since our objective function satisfies monotonicity and submodularity at the same time, we can use greedy algorithm to approximate the optimum to within a factor of (1 − 1∕e)(where e is the base of natural logarithm) [5].The algorithm goes as follows.When a new query arrives, the blocked nodes can be ruled out in each sketch based on the memory of the most recent results.Then, the influence spread increment of a node v can be obtained by averaging the number of nodes that are reachable from node v while not in the blocked set in each sketch.The node with the maximum marginal gain is selected successively until the query finishes.However, this approach may require large storage for sketches and induce redundant computation among queries.We design intermediate results to facilitate the query process with the aid of Influence-Increment-Index along with sketchcentralized Influence-Index and Reverse-Influence-Index.

Influence-Increment-Index
When a query is raised, running from scratch will incur a large amount of redundant computations.We analyze those inessential operations and design Influence-Increment-Index to facilitate generating answers efficiently.Besides, we design two types of indices to assist in the update of Influence-Increment-Index. Since the reliance on the sketch-separated principle is one of the major reasons of inefficiency, we carefully design them in a sketch-centralized manner.

Structure
The core to answer a query is obtaining the influence spread increment of each node.To obtain the value, two phases are typically required.The first phase is to get the influence set of the node.The second phase is to count the number of influenced nodes in each sketch that are not blocked.Specifically, for each node v, given blocked nodes BI , its influence spread increment can be calculated by Algorithm 21 ,2 .  [1; [2] ).count; Since the influence set of nodes and blocked nodes change gradually in the dynamic scenarios, influence spread increment is also evolving correspondingly.Consequently, we can incrementally update influence spread increment rather than running from scratch.We maintain the value of influence spread increment in Influence-InCrement-Index ( CI ) so that it can be directly used to efficiently generate seed set as the answer.Each node v can obtain its influence spread increment by getting the value of CI [v].
During the graph evolution, if the subgraph that contains a certain node has not changed, then the node's reachability would not change, either.In this case, there is no need to compute from scratch.On other occasions where its reachability has changed, in order to get the latest reachability, one way is to recompute.This will guarantee the accuracy of reachability, but it neglects the unchanged calculation that can be utilized to expedite the process of retrieving the influence set, resulting in computational overhead.So maintaining the intermediate results of the influence set would avoid repeating the same process when answering different queries.Furthermore, during the query process, the maintained results can also assist in answering SGIM queries since less update operations are needed when a node is selected.Therefore, we maintain the influence set of each node in Influence-Index.Motivated by work [12], we also use bitset to represent the reachability in different sketches.
Influence-Index of a node v (denoted by v.II ) records its influence in different sketches.v.II is composed of a series of tuples , …} which contains a node id v i and a corresponding bitset b R i , while R stands for the number of generated sketches.Tuple ( v i , b R i ) in v.II means node v can reach v i in at least one of the R sketches, and b R i , which aggregates the reachability between these two nodes in R sketches, can be viewed as the weight of a virtual edge between v and v i .If the i-th number in b R i equals one, it means node v can influence node v i in the i-th sketch.
Equipped with Influence-Indices, we can compute the latest influence spared increment for any node v when its influence set or the blocked nodes have changed.However, the maintenance of Influence-Indices itself can also be time-consuming if only the information of influence is stored.Therefore, we also maintain the information of reverse influence in Reverse-Influence-Indices to facilitate the update of Influence-Index when an edge is inserted.
Reverse-Influence-Index of a node v (denoted by v.RI ) records its reverse influence in different sketches.v.RI , which has a similar structure with v.II , is composed of a series of tuples.Each tuple ( v i , b R i ) in v.RI means node v i can reach v in at least one of the R sketches, and b R i aggregates the reachability between these two nodes in R sketches.If the i-th number in b R i equals one, it means node v i can influence node v in the i-th sketch.

Update Indices
When an edge is inserted, a part of nodes' reachable nodes will change, raising the requirement of updating maintained indices.Specifically speaking, when edge (u, v, + , p, t) is inserted to the graph, the Influence-Index of u and its ancestors in the graph along with the Reverse-Influence-Index of node u and its children will change.Consequently, the influence spread increment of node u and its ancestors become different.As shown in Fig. 3, when edge ( v 3 , v 5 , + , 0.5, t) is inserted, Influence- Index of node v 3 and its ancestors v 1 and v 7 are different after the edge insertion.Reverse-Influence of node v 3 and its child v 8 also changes.Naturally, Influence-Increment-Index changes along with Influence-Index.We can use a reverse search from node u to visit the ancestors and update their maintained indices.Since the way reachable nodes transmits along the path matches Depth-First Search (DFS)'s nature of going in depth, DFS is more suitable than Breadth-First Search (BFS) in this scenario.Therefore, the algorithm of update indices goes as follows.When edge (u, v, + , p, t) arrives, bitset uv is generated according to probability p where each bit represents whether the edge (u, v) is inserted to each sketch.After inserting the generated bitset to compressed graph, 3 the indices are updated during the reverse DFS process.A naive update algorithm is first introduced and then an improved version with pruning technique is illustrated afterward.

Naive Algorithm for Intermediate Results Update
The reachability between nodes in a compressed graph is represented by a bitset rather than a bool value.If the reachability from u to v in R sketches is b uv and from v to t is b vt , then it equals b uv &b vt from u to t.This property is used when updating the indices.In Algorithm 3, v t denotes the nodes that could be reached from v. Given a bitset b t which contains the reachability between v and v t , the latest reachability R uv t between u and v t can be calculated as shown in 3th line.Subsequently, node u's Influence-Index ( u.II ), node v t 's Reverse-Influence-Index ( v t .RI ) and u's influence spread increment ( CI[u] ) are updated with R uv t .This operation of intermediate results update of one node is then applied to u and its ancestors during reverse DFS (Algorithm 4).We also use a bitset rather than a bool value to record the visit information of nodes, denoted as visited [v] in the compressed graph.

Pruned Algorithm for Intermediate Results Update
There are certain conditions when naive update algorithm will cause inefficiency.If node u can already reach v before the edge insertion, the intermediate results of node u and its ancestors do not need to be updated, because the insertion of this edge will not affect their reachability.As shown in Fig. 4, since the reachability from node v 1 to node v 5 has not changed, there is no need to update the indices of node v 1 and v 7 .
Based on this observation, we propose pruned algorithm to filter out the invalid update operations in the naive algorithm.Specifically, the pruning rule is described as follows.
In each sketch, if node v t can reach node v before this edge insertion, then the intermediate results of v t and its ancestors do not need to be updated, which is implemented by skipping node v t of performing the reverse DFS process.This rule will not reduce the accuracy.
Having been armed with the pruning rule, an improved algorithm on compressed graph is illustrated in Algorithm 5 and 6.Rather than using the same piece of information ( v.II ) to update all the ancestors in Algorithm 3, the pruned Fig. 3 Influence-Index, Reverse-Influence-Index, and Influence-Increment-Index change when an edge is inserted update algorithm uses different information for different ancestors.For each ancestor v a , only necessary information that will influence v a 's reachability will be used.During the process of reverse DFS, the size of updateIndex will continue to decrease by screening off the unchanged nodes.Besides, when the updateIndex becomes empty for a node v t , the algorithm stops updating the reachability of v t 's ances- tors.Since the reachability of node v t has not changed, its ancestor's reachability will not change, either.In a nutshell, the pruning technique can both prune the number of times that an ancestor is visited and the number of times that the node in node v's reachability set is visited while warranting the accuracy.

Solution
SGIM problem needs to consider the result of last rounds of queries.In this section, we will first introduce how to maintain the results of query sequence and then how to answer SGIM queries.

Maintaining the Results of Query Sequence
We use sliding window model to manage the results of queries.Its active window (denoted as Blocked Window) records the results of last rounds of queries and current query.Along with Blocked Window, we also save two extra indices to facilitate the query process.These three structures as shown in Fig. 5 store the results of previous query sequence in a more compact way.
Fig. 4 When a new edge (v 3 , v 5 , +, 0.5, t) arrives, v 1 can reach v 5 before this insertion, so the reverse DFS from v 1 can be halted

Blocked Window (BW)
Blocked Window is the active window of sliding window model.It contains + 1 data elements (denoted as BI , BI −1 , ..., BI 0 ), and each one chronologically represents the result of each query from left to right, while the rightest blank in Fig. 5 corresponds to the result of current query, which is initially empty.To be more specific, each data element is a tuple sequence and each tuple (v, b R i ) means node v has been influenced in that round of query and thus is blocked for following rounds of selections.The bitset b R i is the detailed information in different sketch where value one means node has been influenced in that sketch.
When a new data element arrives, the oldest element is discarded and is no longer in the active window.For example, as illustrated in Fig. 5, Blocked Window of Q i+2 main- tains the query result of Q i , Q i+1 , and Q i+2 .When new query Q i+3 arrives, Blocked Window slides one step.Therefore, current Blocked Window of Q i+4 stores the query result of Q i+1 , Q i+2 , and Q i+3 .The sliding window model guarantees that the last rounds of query sequences will be considered and the blocked nodes will have the chance to be activated again after rounds.

Query Sequence Influence and Count (QInf and QC)
Blocked Window maintains the results of previous query sequence; however, it is not convenient to directly use it to answer a query since the blocked nodes in each data element need to be ruled out successively.This will make some common nodes in different sketches be processed more than once, resulting in extra computation.Therefore, we further maintain two aggregation indices-Query Sequence Influence (QInf) and Query Sequence Count (QC).
Query Sequence Influence (QInf) represents whether a node is influenced in each sketch during any of the selections (including the current one).In this way, the blocked nodes in different query is aggregated together and each blocked node will be merely processed once instead of several times when being ruled out.To be more specific, QInf is a tuple sequence and each tuple ( v i , b R i ) means that node v i has been influenced and if the bit in b R i equals one, then node v i has been influenced in that particular sketch.Its relationship with Blocked Window can be written as Eq. 5.The union operation compresses all indices into one by merging all bitsets for each node v ∈ ∪ k i=1 I i .V4 with OR operations.
Every time when the window slides, QInf is updated simultaneously.An naive way to fulfill this aim is to recalculate Eq. 5.However, part of the redundant computation can be spared since the information from BI −1 to BI 1 remains the same after one step.Based on this observation, Query Sequence Count (QC) is designed.It records the number of times of a node being influenced in each sketch across all past selections.Similarly, each tuple ( v i , b R i ) in QC represents the detailed information in each sketch.It means that node v i has been influenced and it has been influenced b R i [i] times in the i-th sketch.It can be formulated as Eq. 6.The sum operation transforms bitsets for each node v ∈ ∪ k i=1 I i .V into integer lists which are then added together.This operation aggregates scattered information of the blocked nodes so that these nodes can be processed unitedly when solving the SGIM problem.
We adopt lazy update strategy, resulting in the difference that QInf integrates BI 0 , while QC does not.Since the query process is dependent on QInf, whenever a node is picked as seed, its influence set needs to be updated to QInf immediately for subsequent selections.However, QC serves to simplify computation during window slide movement exclusively, so it can be updated after the selection of k seeds completes when the slide movement is ready and necessary to be performed.

Update
During the query process, BI 0 changes due to the selection of seed.After the query process completes, the sliding window slides one step.The outdated data are moved out, while new data element is moved in.Two corresponding algorithms (moveIn and moveOut) are illustrated in Algorithm 7 and 8 5 .   [(QC[id]); moveIn(data) moves current blocked node into BI 0 and updates QInf by performing union operations.This operation integrates the information of the blocked nodes in current selection.According to our problem setting, the size of sliding window is fixed.Therefore, when a new data element arrives, the Blocked Window slides one step.moveOut operation moves out BI and moves in an empty data ele- ment.It simultaneously updates QC and QInf.We bring in two operations called addCount and minusCount to update QC.They are supplementary to sum operation mentioned above.They aim to precisely modify the output of sum by integrating or disintegrating an index.Along with these two operations, Eq. 6 can be transformed to Eq. 7. In this way, instead of calculating the aggregation of Blocked Window from scratch, only incremental computation is needed.
QInf is updated by transforming each integer list in QC to a bitset.For each tuple in QInf, the XOR result of the bitset before and after the update is calculated and stored.This information is returned and will be further used to update intermediate result CI.

Answering SGIM Queries
The solution (Algorithm 9) consists of five phases which will be introduced sequentially.Firstly, the node v i with the maximum influence spread increment is added to the seed set.Secondly, the result of query sequence is updated by performing moveIn operation according to the selected seed.This step blocks the nodes that are influenced by the newly selected seed v i , which guarantees the effectiveness of following selections.Thirdly, the intermediate result CI is updated due to the insertion of the blocked nodes.After these three phases are repeated until all k seeds are selected, moveOut operation is performed to discard outdated data.Lastly, the intermediate result CI is updated correspondingly due to the release of blocked nodes.The insertion and the release of blocked nodes both contribute to the change of the intermediate result CI .We pre- sume that v i is a node which is removed due to the release of blocked nodes and b i aggregates detailed information in different sketches.If i-th bit in b i equals one, it means that node v i was blocked before this removal and has been released after the movement in the i-th sketch.We suppose node v j can reach node v i in some sketches.Since node v j can only influence node v i in sketches where v i is not blocked, the release of v i in some sketches where it was blocked will enable v j influence v i in those sketches, leading to an increase in CI[v j ] .A detailed illustration when sketch number equals 2 is presented in Fig. 6.The incremental contribution to the influence spread increment made by node v 2 to node v 7 in all sketches can be calculated as the number of ones in (7) QC = minusCount(addCount(QC, BI 0 ), BI ) the AND results.The update operation due to the insertion of blocked nodes goes similarly.The whole algorithm for update the intermediate result is presented in Algorithm 10.For each node that has been released in some of the sketches, its ancestors' values in CI are updated according to their reachability and condition of whether the update operation is due to a removal movement or an insertion one.

Analysis
In this section, we analyze the time complexity of our proposed solution and also show the comparison with other methods.Additionally, we further provide the theoretical guarantee on the number of sketches.

Time Complexity Analysis
In algorithm 9, line 3 and line 4 take O(1) time.The moveIn operation in line 5 can be regarded as two union operations of indices.Suppose that each bitwise operation takes O(c) time and the number of nodes and edges in the current graph is denoted as n and Merging two indices can be implemented in O(cn) time.The updateCI operation takes O(cn 2 ) time to traverse the nodes and perform bitwise operations.The moveOut operation takes O(nR) time for modifying the frequency value in each sketch.Therefore, the complexity for algorithm 9 is O(ckn 2 + nR) .The complexities of algorithms that are extended from previous researches to answer this query are as follows.The typical Monte Carlo simulation method (MC method) would run R rounds of simulations while excluding the already influenced nodes.The cost to compute the nodes that have been influenced/ blocked in each round of previous queries is O( nR) for each node.The total complexity is O( Rkn 2 + mnRk) .Since [20] provides several techniques to speed up the MC method but does not substantially improve the complexity, its complexity stays the same as O( Rkn 2 + mnRk) .While using the same strategy with our method to maintain the query sequence in the extended version of [12], its complexity is O(cmnRk + mR + nR) .Owing to the strategy that we exploit to maintain the results of query sequence, the parameter is moved out from the time complexity equation.Furthermore, since real-life graphs usually have more edges than nodes, our method has better complexity than the method extended from [12].As analyzed above, the bottleneck of our method is the update process.It will take a long time when the number of influenced nodes is large.However, it is unavoidable if we would like to keep track of the exact number of increments in each sketch.In the future, maybe heuristic methods with good guarantees can be proposed to seek an estimated value instead of an exact one.

Theoretical Guarantee on the Number of Sketches
We follow similar steps in [20] and theoretically analyze the error ratio of estimated influence spread increment.Firstly, we introduce Hoeffding's inequality.
Lemma 1 Let G be a graph and S be a family of node sets.Let R = O( 1 2 log 2|S| ) .Then, with probability at least 1 − , |INC G (S) − E G (S)| ≤ n for every set S ∈ S , where and E G (S) denotes the expecta- tion of the number of newly activated nodes.
Proof 3 For brevity, we denote Since each sketch is generated independently and f SG i (S) ∈ [0, n] , for any set S ∈ S , by applying Hoeffding's inequality on Then, we apply the union bound over all sets in S , the prob- ability that the condition |INC G (S) − E G (S)| ≤ n is satisfied for every S ∈ S is at least 1 − 2|S|e −2 2 R .We have the desired bound when we choose R = O( 12 log 2|S| ) .◻ Given a positive integer k, the number of node sets whose length equals k satisfies |S| ≤ kn .Thus, we have the above guarantee when we choose R = O( 1 2 log 2kn ).

Experiments
In this section, we evaluate the effectiveness and efficiency of our proposed approach for SGIM problem on various realworld datasets.

Datasets
Our method is exhaustively tested on 5 real-world datasets.The summary of these datasets is listed in Table 2.

Environments
We conduct experiments on a Linux server with intel CPU (2.40GHz).All algorithms are implemented in C++ and compiled with -O3 option, and run in single thread.

Compared Approaches and Parameters
We compare our method with the following algorithms extended from state-of-the-art methods of solving IM problem in static graphs and a baseline algorithm.The number of generated sketches is set to 200 in all sketch-based methods.
• baseline: the naive algorithm that is directly extended from the sketch-based method for solving IM problem in static scenarios.• CSO: due to the compact and streaming features, we denote our method as a Compact Streaming Optimization approach (abbreviated as CSO).
• VCS [12]: the algorithm extended from the VCS approach that uses compression techniques to manage graph.
• PMC [20]: the algorithm extended from PMC approach that exploits the existence of a hub to accelerate BFS for reachability tests.

Probabilistic Settings
We validate the performance of algorithms under a classical probabilistic model called weighted cascade model [5].
In this model , probability of each edge e = (u, v) is set to 1∕d − (v) .Since the graph is evolving, the in-degree of node ).count = 1 , where [10] is the reachability of edge ( v 7 , v 2 ) and [11] is result of the blocked bitset of node v 2 before and after the movement ( [11] ∧ [00] = [11]) is changing, too.And the probability is generated based on the snapshot when the edge is inserted.

Experimental Method
For evaluating effectiveness and efficiency of different methods when solving SGIM problem, we set up experiment as follows to model the SGIM problem.Firstly, we generate a preprocessed file from the original dataset.This file consists of two types of lines: edge line and query line.An edge line is a tuple (u, v, p) where u is the source node, v is the destination node, and p is the probability with which u will influence v.A query line is composed of a character "Q" and a positive integer k, which means how many nodes are expected to be selected in this round.We first order the temporal edges in each dataset by time and use the first thr% of edges as the base graph.Then, the remaining edges in the dataset are inserted chronologically to model the streaming process.For example, there are 90 edges as base graph and 10 edges as remaining graph, a random number r between (90, 100] is generated and the query is inserted exactly in the r-th line.In this experiment, thr = 90 , = 3 , and 5 queries with k = 10 are inserted to each dataset.
In real life, graph is dynamic and queries can happen at any time.This can still be captured with the format of the preprocessed file.Then, given the preprocessed file, algorithms for experimental evaluation run as follows: when an edge arrives, the edge is inserted into the graph.And when a query is raised, the SGIM query is answered based on the current snapshot and results of previous rounds of queries.

Experimental Results for the SGIM Problem
We compare different methods on these datasets in terms of Influence Spread Increment and running time.We conduct experiments to measure the maintenance cost of index, and the memory cost of methods with and without compression.Besides, we compare the insertion time of our proposed approach with pruning technique and the one without pruning technique.The parameter can also be set to other values, and the effect of this parameter will be analyzed afterwards.

Influence Spread Increment
Figure 7a shows the influence spread increments that are calculated by different algorithms under weighted cascade model.influence spread increment of different algorithms are very close to each other.This means that seeds from these algorithms have close quality.
We also compare the influence spread and influence spread increment calculated by our proposed method.The result is shown in Fig. 7b.The value of influence spread increment is always smaller than influence spread, since those nodes influenced in previous selections are not included in the calculation.We further investigate the difference of these two concepts by a case study.In two consecutive rounds of queries when processing dataset higgs, the value of influence spread is 125 and 127, respectively, while the influence sets are highly overlapping with each other.However, the value of influence spread increment of these two same rounds of queries is 82 and 61, respectively, while the influence sets are different from each other.The result identifies that, following the greedy strategy of selecting nodes with maximum influence spread increment, the seeds can trigger larger cascade among different users than choosing nodes with maximum influence spread.Therefore, the advantage of influence spread increment is confirmed.
The largest dataset stackoverflow-c2q has a small influence spread increment.This is due to the scenario of the dataset.The dataset stackOverflow-c2q captures the relationship of people who ask questions and who comment on the question.Each edge (u, v) represents that user u's question has been commented by user v.This relationship is not as strong as the normal relationship among friends.The interactions among users who post questions and comments are not that frequent as the ones among friends.Therefore, the influence spread increment is relatively smaller than the influence spread increment in other datasets despite its large size.

Running Time
As depicted in Fig. 8, our proposed method CSO outperforms other compared methods, which shows that CSO is competitive in algorithm efficiency.Especially when graphs are large, the difference is much more significant, because running from scratch will result in more redundant computations in this case.Indices are designed to speed up the process of query; however, it will simultaneously bring computational overhead of maintenance.Our method greatly reduces query time compared with other methods; thus, the effectiveness of our index design is validated.[34] 159,316 964,437 superuser [34] 194,085 1,443,339 stackoverflow-c2q [34] 1,655,353 20,268,151

Update Time of Index
Since the update operation is the most frequent operation when processing a streaming graph, we conduct experiment to measure the maintenance cost of index.The result is as follows (Fig. 9).When a graph is dense, the cost of update becomes higher.Since the number of related nodes, whose influence spread increment has changed, is larger, and the update cost for each of these nodes is also higher.

Memory Consumption
As shown in Fig. 10, our proposed method CSO could reduce the memory cost when compared with methods without compression.

Effect of Pruning Technique
The naive version of the insertion would incur large amount of unnecessary computations.And the prune version chips out the excessive calculation.We compare the average number of nodes that are visited during the insertion process.When an edge e = (u, v, +, p, t) is inserted, as explained in the naive version, every ancestor of node u would update its intermediate results with the information of node v's reachable nodes (v.II).However, owing to the pruning technique, the ancestors are not necessarily visited and also the number of nodes that would make a difference to the ancestors' reachability is decreasing during the reverse DFS process.The average number of times that ancestors are visited is illustrated in Fig. 11a, and the average number of times that nodes in v.II are visited is presented in Fig. 11b.As shown by the figures, the pruning technique reduces both the average number of times ancestor is visited and the average number of times node in v.II is visited in all datasets.The decrease in the average number of times node in v.II is visited is more significant.

Effect of Parameter
We evaluate the performance of CSO with different values of , including query time, insertion time, and influence spread increment.Owing to the transformation from equation QC = sum(QS[ ], QS[ − 1], … , QS [1]) to QC = minusCount(addCount(QC, QS[0]), QS[ ]) , the pro- cess of aggregating information across queries is simplified to one addCount and one minusCount operation.Thus, in Fig. 12a, the insertion time and query time are not increasing with .Interestingly, the query time is decreasing, which seems counterintuitive at first glance.However, this phenomenon is reasonable under further scrutiny.Under extreme circumstances, if is big enough, all information of previous selections is maintained.The number of nodes whose influence spread increment needs to be updated is small, since nearly all nodes are blocked.Consequently, the query time decreases.Additionally, we conduct experiment to measure influence spread increment of different .As shown in Fig. 12b, the influence spread increment decreases when increases.This is due to the fact that when becomes larger, the number of blocked nodes becomes larger.Therefore, generally, the influence spread increment becomes small.

Conclusion
In this paper, we propose and study the SGIM problem in which the graphs are modeled in a dynamic manner and the effect of query sequence is taken into account.While directly extending existing approach to address this issue will bring in non-negligible computational cost due to the redundant computation among sketches and queries, we design Influence-Increment-Index to avoid running from scratch along with two sketch-centralized indices called Influence-Index and Reverse-Influence-Index to facilitate the update process.We also design structure using sliding window and update algorithms to maintain evolving query sequence.By exploiting these components, we can answer the query at the latest  In the future, we plan to further improve the scalability of the method and have a better performance on larger streaming graphs.One way to achieve this is to propose heuristic method to reduce the cost of updating influence spread increment.Additionally, the explore-exploit strategy, which is a trade-off between the value of activating some peripheral nodes versus giving the activated central nodes a second stimulation, will be applied to our method.Another future work is to extend reverse reachable sketch methods to solve this problem.
otherwise in a credit line to the material.If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.To view a copy of this licence, visit http:// creat iveco mmons.org/ licen ses/ by/4.0/.

Fig. 2
Fig. 2 Submodularity.The black circle denotes the influence set of node v in sketch SG i .The white circle denotes the blocked nodes in sketch SG i .The grey and shaded circle correspondingly denotes the influence set of node set S 1 and S 2 in sketch SG i

Fig. 6
Fig.6 Blocked nodes in BW change due to the change of data elements.Consequently, the influence spread increment of some nodes change correspondingly.For example, before the release operation, node v 2 is blocked in the first and second sketches (its INC equals 0); after the release operation, it has been released in these two sketches

Fig. 10 Fig. 11
Fig. 10 The memory cost of intermediate results with and without compression

Table 2
Summary of datasetsa The Higgs dataset consists of a mention network and a reply network denoted as higgs-MT and higgs-RE, respectively.