Random walk based in-network computation of arbitrary functions
Iqra Altaf Gillani, Pooja Vyavahare, Amitabha Bagchi

TL;DR
This paper introduces decentralized algorithms based on random walks for computing arbitrary functions in network settings, providing bounds on computation rate and time for asymmetric functions.
Contribution
It presents the first fully decentralized algorithms for arbitrary functions modeled as binary trees, using random walks, with theoretical bounds on performance.
Findings
Lower bound on computation rate for asymmetric functions.
Upper bounds on average computation time.
Algorithms applicable to general network topologies.
Abstract
We study in-network computation on general network topologies. Specifically, we are given the description of a function, and a network with distinct nodes at which the operands of the function are made available, and a designated sink where the computed value of the function is to be consumed. We want to compute the function during the process of moving the data towards the sink. Such settings have been studied in the literature, but mainly for symmetric functions, e.g. average, parity etc., which have the specific property that the output is invariant to permutation of the operands. To the best of our knowledge, we present the first fully decentralised algorithms for arbitrary functions, which we model as those functions whose computation schema is structured as a binary tree. We propose two algorithms, Fixed Random-Compute and Flexible Random-Compute, for this problem, both of which…
| Graph | Fixed Random-Compute | Flexible Random-Compute |
|---|---|---|
| Cycle | ||
| Star with sink at centre | ||
| Hypercube | ||
| Rand. reg. | ||
| Torus | ||
| Torus | ||
| Rand. geometric graph | - |
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.
Random Walk-based In-network Computation of Arbitrary Functions
Iqra Altaf Gillani
Department of Computer Science and Engineering, IIT Delhi
{iqraaltaf,bagchi}@cse.iitd.ac.in
Pooja Vyavahare
School of Computing and Electrical Engineering, IIT Mandi
Amitabha Bagchi
Department of Computer Science and Engineering, IIT Delhi
{iqraaltaf,bagchi}@cse.iitd.ac.in
Abstract
We study in-network computation on general network topologies. Specifically, we are given the description of a function, and a network with distinct nodes at which the operands of the function are made available, and a designated sink where the computed value of the function is to be consumed. We want to compute the function during the process of moving the data towards the sink. Such settings have been studied in the literature, but mainly for symmetric functions, e.g. average, parity etc., which have the specific property that the output is invariant to permutation of the operands. To the best of our knowledge, we present the first fully decentralised algorithms for arbitrary functions, which we model as those functions whose computation schema is structured as a binary tree. We propose two algorithms, Fixed Random-Compute and Flexible Random-Compute, for this problem, both of which use simple random walks on the network as their basic primitive. Assuming a stochastic model for the generation of streams of data at each source, we provide a lower and an upper bound on the rate at which Fixed Random-Compute can compute the stream of associated function values. Note that the lower bound on rate though computed for our algorithm serves as a general lower bound for the function computation problem and to the best of our knowledge is first such lower bound for asymmetric functions. We also provide upper bounds on the average time taken to compute the function, characterising this time in terms of the fundamental parameters of the random walk on the network: the hitting time in the case of Fixed Random-Compute, and the mixing time in the case of Flexible Random-Compute.
Keywords: Function computation, random walks, coalescing random walks, stable rate
1 Introduction
Since most commercially available sensor nodes used in today’s sensor networks are capable of performing small operations on the data, distributed function computation (also known as in-network computation) algorithms seek to exploit the computation capability of these nodes to increase the efficiency of communication and computation of function [22, 24, 19] over plain data forwarding techniques [20, 17]. The in-network computation paradigm is based on the following simple idea: instead of moving all the distinct data items generated at different nodes of the network to the sink and computing the function of interest at the sink, we leverage the meetings of the data items at intermediate nodes to compute partial functions which can then be combined at the sink. The idea is to reduce the load on the network and thereby increase the rate at which the data can be read.
Clearly, the key question here is: is it always possible to combine any two data items that meet at a node? In the simplest scenario, the answer is yes, and the class of functions for which the answer is yes are known in the literature as “symmetric functions” and most of the existing literature on in-network function computation mainly deals with such functions (see, e.g.,[15]). In this paper, our aim is to study the distributed computation of arbitrary functions where the sequence of operations of the data is important to compute the final function value. Generalising from the class of symmetric functions requires us to be able to specify the kinds of functions we handle and typically functions are specified by a computation schema which describes the structure of allowable combinations of operands and partial functions that make up the final function being computed. In particular, we study a class of functions whose computation schema can be represented by a binary tree. Another major contribution of our work is to distinguish between two modes of computing intermediate values (partial functions) that make up a larger function contribution, the distinction made on the basis of whether the node at which a specific intermediate value is computed is specified in advance (we call it the “Fixed” scenario) or not (the “Flexible” scenario.)
The distributed computation of functions with computation schema modelled by a directed graph has recently attracted some attention in the literature [32, 26, 34], but these works typically take a centralised approach to the problem, centrally computing routings that realise the function within the network. Our approach, based on random walks, is fundamentally decentralised. Such a communication strategy is very useful when the network is changing constantly and the routing information can become invalid frequently. Any node of the network in our algorithm does not need global information (like the number of nodes or topology of the network) and the communication depends only on the knowledge of the neighbourhood. In our algorithms, multiple data packets move across the network leading to multiple random walks in the network. In order to compute the function in the network, our algorithms combine these data packets in the order defined by the computation schema of the function. This combination of packets leads to coalescence of random walks which have been studied in [9, 21].
Our contributions
We describe two in-network computation scenarios: (a) the fixed scenario under which each internal node of the function schema is mapped to a specific network node that is tasked with computing the subfunction corresponding to that internal node of the schema and (b) the flexible scenario in which a subfunction computation takes place opportunistically at any network node that happens to have the two relevant operands. 2. 2.
We propose simple, decentralised random walk-based algorithms, Fixed Random-Compute and Flexible Random-Compute, to compute a function with a binary tree computation schema in the fixed and flexible network scenarios respectively. 3. 3.
We present upper and lower bounds on the rate of computation for Fixed Random-Compute in a setting where data is generated stochastically in rounds. In particular, the lower bound presented is a general lower bound for the function computation problem and to the best of our knowledge is the first of its kind for asymmetric functions. We also find the average function computation time taken by these algorithms.
Related work
As discussed earlier, most of the extant literature study the in-network computation of symmetric functions (see [15, 28, 12, 18]) where the sequence of computation does not matter. Researchers have studied the computation time as well as the rate of computation of various classes of symmetric functions for different network models. In particular, [15] study the rate of computation of classes of symmetric functions namely type-thereshold (example: maximum) and type-sensitive (example: average) for collocated and random planar multihop networks. Following the work of [15], various authors studied these functions in various network settings; for example [12] studied for noisy communication model, [23] for grid networks and [24] for random geometric graphs. Further, Banerjee et. al. [4] study the rate of computation of divisible functions which can be computed by a divide-and-conquer method on any subset of the source data. Another variant studied in the literature is of -divisible functions which can be computed by performing operations on at most source data values at any time [22]. Note that all the work discussed above only present upper bounds on the rate. However, Kamath et al. [19] find a lower bound for computing a symmetric function MAX in a pipelined setting different than ours, which requires knowledge about network structure. To the best of our knowledge no lower bound result has been presented for asymmetric functions so far.
In this work, we not only extend the function computation study to the class of arbitrary functions but also present a general lower bound on the rate of function computation which is a first lower bound presented for this class of problem. In particular, we present random walk-based algorithms to compute arbitrary functions with binary tree schema. The communication strategy in our setting is similar to that of gossip algorithms [6, 28, 31] where each node sends a data packet to a randomly chosen neighbour in every time slot. In this setting, the time to compute the average of data values is studied by [6] and separable functions of data are studied in [28]. Separable functions are a class of functions which can be written as the sum of functions on the subsets of source data values. Mosk-Aoyama and Shah [28] give an upper bound on the computation of such functions which is directly proportional to the logarithm of the size of the network and inversely proportional to the conductance of the network. The analysis and thereby the results of gossip algorithms depends on the random walk properties which in turn depends on the transition matrix of the random walk. Our results also depend on the random walk parameters like the spectral gap of transition matrix, hitting time and mixing time.
Moreover, in our setting movement of different data operands in the network essentially leads to multiple random walks on the network. These random walks combine with each other based on the sequence defined by the computation schema resulting in the coalescence of random walks. Properties of multiple random walks have been studied in the literature [2, 10, 13, 29]. Interaction of multiple random walks has been studied by [10] where two random walks either annihilate each other or combine when they meet and a bound on the cover time of such walks has been presented. Coalescing random walks (two random walks combine when they meet) has been studied by [9, 21]. An upper bound on the time to coalesce random walks each starting from different vertices in the graph is given by [9]. Recently [21] improved this bound on coalescence time for various kinds of graphs. Our analysis of algorithms also involves multiple and coalescing random walks.
Paper organization
In Section 2, we describe our in-network computation model, the data generation model (Section 2.1), the class of functions we deal with (Section 2.2) and the two in-network computation scenarios (Section 2.3) that we propose: the fixed and the flexible. In Section 3, we first define the routing scheme used by our algorithms and then we discuss our two random walk-based algorithms for the two scenarios in Section 3.2 and Section 3.3 respectively. In Section 4, we define our performance metrics and discuss our main results with some examples. In Section 5, we present the proofs of our theorems. In particular, we discuss the proof of the rate analysis of Fixed Random-Compute algorithm in Section 5.1 and in Section 5.2 we analyse the average time taken by our algorithms in computing an asymmetric function in both fixed and flexible models. We conclude in Section 6 and provide some directions for future work.
2 Modelling Assumptions and Computation Scenarios
In this section, we first describe our network, data generation and computation model. Then, we define the particular function schema we work with and discuss the two in-network computing scenarios, the “Fixed” and the “Flexible” where such functions can be computed.
2.1 Network and Computation Model
The network model
The communication network is denoted by an undirected connected graph where is the set of nodes, with is the set of source nodes and is the set of edges. An edge is present between nodes if they can communicate with each other and we denote . The nodes in the network follow a slotted time model for communication and we assume that each node can send at most one data packet to a single neighbour in any time slot. This is known as the transmitted gossip constraint in the gossip literature [28]. Note that under this network model a node may receive multiple packets in one time slot.
The model of computation in the network
We need to compute a function defined as in the given network. The operand is generated by a data generation model at source node and we have the source set . We need to compute and make it available at a designated node of the network called the sink . We work within the paradigm of in-network computation [4] for computing , i.e., nodes can compute intermediate functions called subfunctions of the data while relaying it in the network. We elaborate this further when we discuss the two specific in-network computation scenarios we work with.
The data generation model
We consider the data generation process at each source node as a stochastic arrival process in discrete time that is Bernoulli with parameter and independent of the arrivals taking place at all other nodes, i.e. at each time slot each node generates a new data packet with probability independent of all other nodes. We partition the data generated into rounds: the data packet to be generated at source node is said to be part of round . If we denote this data item as then note that the function computed in round is . So, each data packet is identified by an identifier which denotes their associated round. We will refer to this model of data generation as independent Bernoulli data generation with parameter . We will use this data generation model for analysing our algorithms and then in Section 6 we will also discuss two other data generation models and present our latency results in their context.
2.2 The Binary Tree Function Schema
After defining our network model, model of computation and data generation model now we will define the type of functions we work with i.e. particular class of asymmetric or arbitrary functions. Recall, a function is symmetric if the output value does not depend on the permutation of input values and sequence of intermediate operations does not matter. To generalise from the notion of symmetric to asymmetric we need some language to describe function classes that allow only specific argument combinations. We use the abstraction of a directed acyclic graph to capture the partial combinations that are possible in a given function. We call this graph to be the computation schema of the function. In this work, we study a class of functions whose computation schema is a directed tree. An example is shown in Figure 1.
Our algorithms and results are presented for a binary tree computation schema, but this does not, in fact, lead to any great loss in generality when it comes to the class of asymmetric functions. In the function computation schema, any intermediate node representing unary operation can be merged with its parent node as it requires only one operand. The unary operation can be performed by the network node which performs the operation for its parent node. Thus a function computation schema can have only binary and -ary operations. Our results of binary tree schema can easily be extended to arbitrary directed trees (like -ary trees) and we discuss these extensions in Section 6. With this in mind, we now formalise the notion of binary tree computation schema and present the notation we will use in the subsequent sections.
Let be a function whose schema is described by a binary tree with leaves as sources and height where . For complete binary tree , where for some value and . So, let the root of the tree where finally is computed be at level 0 and have id ; note it is the only node at this level. In general, level has at most nodes with id set . Let be the value computed at node with id . For level i.e. the leaf level, each node performs an identity function on data so, for and in general for level and , node with id computes the function , where is the binary operation to be performed by node specified by the function schema. Note that in case of a non-complete binary tree such node can compute identity function as well if it corresponds to a source node. Also, we have .
Consider an example schema for function as shown in the Figure 1a. Note that it is a complete binary tree with height and the source nodes are present at the leaf level. The data packets are called the operands for the subfunction and are obtained by the identity functions on the respective nodes i.e. and . Also, the nodes labelled represent the specific operations that need to be performed on the data. For example, node performs the multiplication operation and represents the subfunction for the function . Next, consider a non-complete binary tree schema for function as shown in the Figure 1b with height . In this case, apart from the leaf level source nodes are present at other levels as well and they perform identity function like and . All other nodes perform specific operation on data like node combines the subfunctions and to compute function .
2.3 In-network Computation Scenarios
Now, for the given function schema i.e. the binary tree schema let us look at the two computation scenarios by which we can compute such functions. These two scenarios differ based on whether the node at which a specific intermediate value is to be computed is known in advance or not.
In-network computation scenario 1: The Fixed model
In this model, any subfunction of computation schema can be performed only at a specific node in the network i.e. we are given a mapping We assume is a one-to-one mapping. The schema node id is hard-wired into at the time of deployment of the network so that knows the specific operation which it has to perform along with the data identifiers of the operands that are the arguments of that operation. Every node that is in the codomain of maintains two queues; one for storing the data operands of the operation specified by , we call it , and another for data transmission, namely . Once packets of both data operands are received in node performs the operation defined by and stores the generated data packet in This increases the data transmission queue size by one. Packets other than these operands are directly stored in for future transmissions.
Consider the schema of Figure 1a and the network of Figure 2a with a fixed mapping of nodes in schema to the nodes of the network. Note, is the source set for function which is mapped to schema nodes respectively and nodes of schema are mapped to nodes of the network respectively. So, network nodes know the ids of their operands and the function they need to compute and maintain both data operand queue and data transmission queue. On the other hand, network node (Figure 2b) is not mapped to any node in schema so it maintains only data transmission queue and relays data rather than performing the operation specified by on them (see Figure 2c). The operation of is performed by node at the end of time slot (Figure 2d). Note that the network node stores the operand in its data operand queue till it receives the other operand to perform the operation specified by in Figures 2d, 2e.
In-network computation scenario 2: The Flexible model
In the flexible network model, every node in the network knows the entire schema and can perform any operation within it. If the operand data packets for any subfunction of are available at any network node at any time then it performs the required operation and creates the data packet for the corresponding subfunction. Every node at time in the network maintains a single queue of data packets which it has received (or generated) so far, and has not transmitted (or used for generating any subfunction) yet. For a received packet, if the corresponding operand is available in the queue then they are combined i.e. we perform coalescence of packets and the new packet is stored in the queue for future transmission. On the other hand, if the corresponding operand for the received packet is not present in the queue then the received packet is simply stored in the queue without any coalescence.
Consider the schema of Figure 1 and network of Figure 3a. In this model, any node can compute the subfunctions of schema provided it has both the data operands required for computing the subfunction. See Figure 3b, where network node receives data packets at the end of two time slots and performs the operation of node generating Similarly, node of the network performs the operation of schema node and performs the operation of schema node in the network. All other nodes of the network relay the data packets.
3 Our Algorithms
In this section, we first discuss the random walk-based routing primitive that we use and then we describe our two algorithms for the two in-network computing scenarios discussed before.
3.1 Routing Scheme Used by Our Algorithms
The nodes in the network follow a slotted time model for communication and only one packet can be transmitted over an edge in a slot. Our algorithms use a push communication model [28] where at the start of any time step , every node selects a node with probability
[TABLE]
independent of other nodes and previous time step selections and sends it a randomly chosen data packet from the queue (if it is not empty). Note that this corresponds to the data packets performing simple random walk on the graph of the network. Next, we present the algorithms for the two in-network computation scenarios.
3.2 Fixed Random-Compute Algorithm
In the fixed model, we use the algorithm Fixed Random-Compute to compute (see Algorithm 1). In this algorithm, when a node which has a subfunction of mapped to it receives a packet it checks to see if the packet is one of the operands of that subfunction. If it is then the node checks its operand queue to see if it has the other operand. If the other operand is available, it combines the two as per the subfunction and moves the combination into its transmission queue. If not, it stores the received packet in the operand queue. If the received packet is not relevant to the subfunction mapped to this node, the node simply places it in its transmission queue for the onward relay. In every time step, the node also chooses a packet uniformly at random and transmits it to a neighbour chosen according to the probability distribution . An example run of the Fixed Random-Compute algorithm is shown in Figure 2.
3.3 Flexible Random-Compute Algorithm
We propose the algorithm Flexible Random-Compute for the flexible computation scenario (see Algorithm 2). This algorithm works by performing combinations allowed by opportunistically: when a node receives a new packet from a neighbour it checks its transmission queue to see if that packet can be combined with any packet currently in the queue. If such a combination is possible, it performs it and places the combined value in its transmission queue. As in the case of Fixed Random-Compute here too in every time step the node also chooses a packet uniformly at random and transmits it to a neighbour chosen according to the probability distribution . An example run of the Flexible Random-Compute algorithm is shown in Figure 3.
4 Performance Metrics and Our Results
In this section, we define our performance metrics, state the main theorems reflecting analysis of those metrics and then, we discuss the consequences of those theorems using examples based on some common network topologies.
Typically in-network computation algorithms are analysed on two metrics: (a) the rate at which the computation can be carried out given a model of regular data generation [28, 22] and (b) the computation time or the delay in computing the function under the assumption that all operands are available at their respective source nodes. These two correspond to notions of the throughput and latency in the in-network computation setting.
For our rate analysis, we consider the independent Bernoulli data generation model with parameter as described in Section 2.1. Note that this data generation model is stochastic and we use techniques from queuing theory to define the best possible function computation rate. The condition for the system to continue processing the data in a regular fashion is known as stability in the queueing literature [16] and is characterised by the fact that the expected size of each queue is finite. A rate that allows a given algorithm to achieve this condition is termed as the stable rate of computation for it.
Formally, following Szpankowski [33], we formally define the stable rate of computation of any in-network computation algorithm working under the independent Bernoulli data generation model as follows:
Definition 1** (Stable rate of computation).**
For any in-network computation algorithm with the data generation as independent Bernoulli process with parameter at all source nodes and with dimensional vector representing the state of the network at time , the data rate is said to be stable if the following holds
[TABLE]
where and is the limiting distribution.
We have dropped superscript from our data transmission queue representation where the rate is understood. Now, we will present the bounds for such a stable rate for the Fixed Random-Compute algorithm.
Theorem 1**.**
Given a network with source set of source nodes each receiving independent Bernoulli arrivals with stable rate and a function schema to compute a function with binary tree schema on sources, the stable rate of Fixed Random-Compute algorithm is given by:
[TABLE]
where is the second largest eigenvalue of the transition matrix of Fixed Random-Compute, and are the minimum and maximum degree of graph , is the mincut between node and sink and is the min-mincut of .
Regarding the stable rate for the flexible model, we do not have any bounds for this model for now. We discuss it in Section 6 as part of the future work.
Rate results: Discussion and examples
In Table 1, we present two rate bounds for some common network topologies. First we present the lower bounds obtained from Theorem 1 and then we present the lower bounds obtained by calculating the exact values using elementary algebra (see [14] for details). We note that for the complete graph the lower bound given by Theorem 1 is tight up to small constants, but in the case of the cycle a direct calculation gives us a rate that is higher by .
Our next metric related to the delay or the latency is what we call the average function computation time of an in-network computation algorithm. Now, under our regular data generation model with rate let the computed value of function for the data round be and let random variable denote the position of the round computed value at the start of time slot given that the data packets perform simple random walk on . Then, the function computation time of data rounds is defined as,
[TABLE]
So, this represents the earliest time by which the computed value of data rounds is available at the sink. So, now we can define the average computation time as follows.
Definition 2** (Average function computation time).**
The average function computation time for the network is defined as
[TABLE]
where is the the function computation time of the first rounds of data.
For Fixed Random-Compute we prove the following theorem:
Theorem 2** (Fixed model computation time).**
Given a network of nodes with set of source nodes each receiving independent Bernoulli arrivals with stable rate and a function with binary tree schema for , the average function computation time of using Fixed Random-Compute is
[TABLE]
where is a constant, is the height of the binary tree schema , is a continuous and increasing function of with and as where is the critical rate below which data rates are stable and above which they are unstable and is the worst-case hitting time of simple random walk on .
For Flexible Random-Compute we have the following theorem:
Theorem 3** (Flexible model computation time).**
Given a network of nodes with a source set of source nodes each receiving independent Bernoulli arrivals with stable rate and a function with binary tree schema for , the average function computation time of using Flexible Random-Compute is
[TABLE]
where is a constant, is the height of the binary tree schema , is a continuous and increasing function of with and as where is the critical rate below which data rates are stable and above which they are unstable. Here, is the mixing time of simple random walk on , where, is the degree of any vertex and is the average vertex degree.
Computation time results: Discussion and examples
Before comparing the two models, let us look at an important parameter in the flexible model latency result which represents the variability in the vertex degree. Recall where, is the average vertex degree. For regular graphs like cycle whereas for skewed graphs like star . This parameter affects the flexible model latency as we can see the star graph has a much lower latency then the cycle graph (see Table 2). This is because in the skewed graphs like star higher degree nodes allow more coalescences which are critical for our analysis, whereas it is not so in the regular graphs as all nodes are similar.
In Table 2, we compare the computation time of Fixed and Flexible Random-Compute for various graphs given that i.e. where is a continuous and increasing function of . The given condition ensures that the queues at the nodes are finite and function computation is carried in stable manner.
Consider Rand - reg graph, in this case the performance of both the algorithms is same whereas in the cycle graph Fixed Random-Compute is better than the Flexible Random-Compute but in the star graph latter dominates the former. So, the upper bounds in the table do not clarify whether Flexible Random-Compute is better from a computation time point of view or Fixed Random-Compute. Let us now analyse two models based on their working. Under the fixed schema, two operands that can be combined may meet at some node but may not be combined since the node at which they meet is not the designated node where they are to be combined. This is a major disadvantage that the flexible schema does not have: in the flexible schema the first time two combinable operands meet they are combined. However, the fixed model counterbalances this disadvantage with a significant advantage: since any node designated to combine two operands knows which specific operands it is to combine, it can recognise and store the first of the operands separately and wait for the second operand to arrive. The flexible model cannot do this and must perform opportunistic combinations. It is an open problem to try and establish if the computation time of Fixed Random-Compute is stochastically dominated by the computation time of Flexible Random-Compute or vice-versa.
In next section, we will discuss the proofs of theorems discussed in this section.
5 Proofs
In this section, we present the detailed proofs of all the theorems. First, we prove the bounds on the stable rate of computation for the fixed model. Then, we give an upper bound on the average function computation time of the fixed and flexible model in terms of the basic random walk primitives: the hitting time and the mixing time respectively.
5.1 Rate Analysis
Szpankowski defines the stable data rate as the rate which ensures that the queues at all nodes in are bounded (see Section 4). Now, we discuss the proof of the theorem giving bounds for such stable rate of computation for Fixed Random-Compute algorithm. We prove this theorem using an existing rate result of [14] and [4].
Proof of Theorem 1.
First, we will prove a lower bound on the stable rate of the Fixed Random-Compute . For this we will use the lower bound on the rate of data collection by an algorithm similar to ours. In an earlier work [14] authors propose an algorithm (called Random-Collect) collecting data packets from source nodes to a designated node called sink. In their setting, there is no combination of data packets and all the source data packets travel till they reach the sink. Random-Collect algorithm is a generalised algorithm where data packets perform random walk on the network and the specific type of random walk would depend on the transition probability of moving from one node to another like the transition probability given by Eq. 1 allows packets to move in a simple random walk fashion. We will use the following simple random walk specific result from [14] which proves a lower bound on the stable data rate in that paper.
Lemma 1** (Network throughput lower bound [14]).**
For a given graph with nodes, source set with data sources, each generating data as independent Bernoulli arrivals with stable data arrival rate , and a single sink, , we have that
[TABLE]
where is the second largest eigenvalue of transition matrix of simple random walk on graph , and are the minimum and maximum degree of nodes of the graph respectively. These results hold for , where is the critical rate below which data rates are stable and above which they are unstable.
Recall that the schema to compute the function on sources is given by a binary tree to Fixed Random-Compute algorithm. Thus, there are coalescences of data packets taking place while computing the function. Recall that in Fixed Random-Compute algorithm any coalescence, say of data packets can happen only at a particular node in the network and this is given by a mapping from to the vertex set of the network In this case, the node acts like a source to the data packets generated by the coalescence which is used for the next level coalescence. We restrict the coalescence which happens at node This reduces the problem to the collection by node By Eq. 2, the rate of collection of by using Fixed Random-Compute is Note that while achieving the rate , Fixed Random-Compute might be using some edge of at its full capacity. There are such coalescences happening in at the same time thus the rate achieved by each of them without exceeding any edge capacity is Thus, the stable rate of Fixed Random-Compute is lower bounded by
We now turn to the upper bound. Authors in [4] study the rate of function computation when the function is a divisible function. A function is said to be divisible if for any partition of its source data set, can be computed by computing a local operation on any set and aggregating the result [4]. In other words, they study functions whose source data packets can be combined in any order. In our case, source data packets of can be combined only by the order given by schema Thus, the rate achieved in [4] is an upper bound on the rate achieved by our algorithm. Authors in [4] show that maximum stable rate for a divisible function is the min-mincut of the network graph We define the equivalence of min-mincut for the transition matrix of our algorithm (transition probability given by Eq. 1) for as follows: recall that is the sink node in where the final computed function is collected and let be any node in the network. Then, the mincut between node and sink is defined as:
[TABLE]
Further, the min-mincut of is defined as Following the same proof technique as that of Theorem 1 of [4] we get that the maximum stable rate achieved by Fixed Random-Compute algorithm is upper bounded by
∎
5.2 Computation Time Analysis
Next, we discuss the latency in function computation or the average time taken to compute the function under the two given models: fixed and flexible. We start with the proof of theorem dealing with the analysis of the computation time for the fixed model and then, present the proof of the flexible model computation time theorem. In both proofs, we first find the expected maximum time taken by data packets to appear at each source node and then, we find the expected time taken to compute the function for such rounds of data generated. Since, all data rounds are independent we find this time by analysing the single round computation time i.e. the time taken to compute the function value for the data round comprising of data packets with round identifier . For the fixed model, we find the single round computation time by recursively reducing our problem to the hitting event of data packets from two nodes onto a designated third node and then we present an upper bound on the time taken for one such event using the techniques and queueing delay analysis of [14]. For the flexible model, single round computation time proof involves a major modification of the proof of Cooper et. al.’s main theorem [9] and also uses techniques from [14] to handle queueing delay.
Proof of Theorem 2.
Given a graph where each node in source set receives independent Bernoulli arrivals with stable rate . Each data round generated has a total of data packets and each round has its appearance and computation time in the network. Instead of individually finding such times for each round, we will proceed our analysis by finding the expected maximum time by which rounds of data arrival have happened and then after this time, we find the expected function computation time assuming all packets have appeared.
Let be the appearance time of rounds of data arrival on each node using Fixed Random-Compute algorithm for communication. Let be a hypothetical node where we assume packets reside before arriving at the network nodes, then, and , we have , where is the random variable denoting the position of round data packet of node at the start of time slot . If the data item appears at node at time then for all and . With this notation we can define appearance time as: . So, is the earliest time when packets have appeared at each node. Now, we find the expected appearance time of rounds.
Let be the event that a source node did not receive arrivals in time . Consider, and . So, we have
[TABLE]
As, , also, as , so Eq. (3) can be written as, . Now, let for , so using the fact that previous equation can be rewritten as, . So, we can easily find such that . Note that the value of will be only dependent as for some constant . So, for a node , . Since, all random walks of data packets from all nodes are independent of each other, considering worst-case analysis of all nodes we have,
[TABLE]
Now, we need to find the expected value of the maximum appearance time of packets at nodes let it be . We have,
[TABLE]
So, we get
[TABLE]
So, we have the expected maximum appearance time of data packets at source modes as at most where for some constant . Now considering the worse-case analysis, the maximum time it takes for complete rounds of data packets to appear at all source nodes is,
[TABLE]
Note that after time all nodes have arrivals. Let be the expected function computation time of data rounds given the data packets have arrived at all source nodes. Now, we know because of the appearance time of rounds, random walks of data packets across the rounds are independent, so we can write .
Now, to find the single round function computation time we perform the following analysis. Recall that the computation schema for function is given by a binary tree with height where . If is a complete subtree of binary tree with its root at level , then let be the coalescence time of . We define the coalescence time with respect to three vertices as where is the time taken for a random walk starting from to first hit , so for we have .
In general, considering the worse case scenario we have
where and are the two subtrees of the root with height . Applying the recursion again we get and Observing that for any four random variables , we get
[TABLE]
Therefore we get
[TABLE]
Note if we have a skewed binary tee schema with then in the above equation many variables of form will not be defined whereas for the complete binary tree schema with all such variables are present. Now, from the definition of coalescence time we know that each coalescence consists of two hitting time events. So, for each coalescence of form let us denote two random variables and for the two hitting time events. Let set be defined as . Note that there are always random variables of form for on the right hand side of Eq. (6). Now, let the hitting time for the out of hitting event in the Markov chain associated with the simple random walk (with no delay) be for node . So, we have where is the worst-case hitting time of the simple random walk starting from any node of the graph. By Markov’s inequality . Now, consider the probability of the random walk not hitting in times the worst-case hitting time i.e. we consider time and divide it into slots of each. By the Markov property of random walks, we know that the random walks in each of these slots are independent. Also, since we have used the worst case hitting time for bounding the probability of one slot using Markov’s inequality, this bound will hold true for any starting vertex at the start of any slot . So, we have . Now, let , then . Now, we have
[TABLE]
So,
[TABLE]
as both and . So without any queueing delay, the expected time taken by the data packets involved in coalescences (hitting events) to hit their designated nodes is . This analysis is done assuming there is only one packet in the queue of any node at any time.
Now, we analyse the delay caused due to more than one packets in the queue. Consider a packet generated at node , let us call it after its generating node. Let denote the position of packet at time , we drop the subscript denoting the round number as we are dealing with one round function computation. Now consider for any node ,
[TABLE]
We know,
[TABLE]
As, , we can write . Using this result in Eq. 8 we get
[TABLE]
[TABLE]
Now, we have
[TABLE]
Now, let be the maximum delay probability at time over all nodes in set for given data rate . So, at stationarity the maximum delay probability converges to i.e., . is a continuous and increasing function of (see Claim 1 [14] for details) with and as where is the critical rate below which data rates are stable and above which they are unstable. We know that any packet gets delayed at time slot , due to queue at a node because it is not picked for transmission in that slot among all the packets in the queue. Thus, the probability of a packet not being delayed by a node in a given time slot is . So, combining the queueing delay with the non-delayed hitting time events, we have the expected number of steps taken by the packets involved in coalescences (hitting events) to hit their designated nodes as . This expected time is computed without considering any dependence among the hitting events. Now, we use this result in Eq. (6) to capture the worse case relation between different levels of binary tree schema and hence the associated hitting time events. So, we have .
So, we have one round function computation time i.e., assuming each source node has generated only one data packet as , where is a continuous and increasing function of representing the maximum delay probability in the limit over all nodes in , being the worst-case hitting time of simple random walk on . So,
[TABLE]
Recall, is the expected function computation time of rounds of data arrival and so, we can write
[TABLE]
Now, using the results from Eq.s (5) and (12), we have
[TABLE]
So, we have,
[TABLE]
where is a constant and is the worst-case hitting time of simple random walk on . ∎
For the flexible model computation time we have the following theorem proof.
Proof of Theorem 3.
Now, for the flexible model again we are given a graph with source nodes in set receiving independent Bernoulli data arrivals at stable rate . We will prove this theorem on same lines as that of fixed model computation time proof. We will first find the expected maximum time by which rounds of data arrival have happened and then after this time, we find the expected function computation time assuming all packets have appeared given that .
Recall that is the appearance time of rounds of data arrival on each node using Flexible Random-Compute algorithm for communication, where is the random variable denoting the position of round data packet of node at the start of time slot . Using the same analysis as in the proof of Theorem 2, we get the expected time for complete data rounds to be generated at all source nodes as
[TABLE]
where is a constant. Note that after time all nodes have arrivals. Let be the expected function computation time of data rounds given the data packets have arrived at all source nodes. Now, we know because of the appearance time of rounds, random walks of data packets across the rounds are independent, so we can write .
Now, we perform the following analysis to find the value of . Recall that the communication network is represented by graph with sources in set The schema to compute function is a binary tree of height where thus has levels. We label the levels in the schema starting from the sink. Leaf level i.e. level simply acts as source of data for the function to be computed, hence nodes at this level perform identity function for . However, in case of a non-complete binary tree source nodes may be present at other levels as well, so network nodes in always perform identity function. Nodes other than the source nodes with id at all other levels i.e. level compute the function , where is the binary operation to be performed by node specified by function schema and . This subfunction computation can be seen as the coalescence of the data packets of the operands. For example, in Figure 1a, there are three levels with level providing four data operands, level performing two coalescences on the respective operands and level [math] performing one coalescence. So, because of the in-network computation paradigm each level acts as source for the level . Now, we will first analyse the computation time for level and replicate it for other levels. If the time required to complete level is then the total time to complete the function computation is For the simplicity of notations, we remove the subscript denoting the level number from various notations whenever it is clear from the context.
Multiple random walks to single random walk.
Given data packets from a single level, , of let us consider the collection of random walks executed by these packets in . We represent this collection as a single random walk on the product graph where Consider the set
[TABLE]
Note that when the random walk on visits any vertex it is equivalent to all the pairs of walks on simultaneously coalescing which is what we require for computing the collection of functions .
In other words, each node is a -tuple of nodes where each Thus, random walks on graph starting from can be replaced by a single random walk on graph with starting position . We further reduce the graph to a graph by contracting the set to a single vertex while retaining all other vertices, edges and loops. Thus, the degree of every vertex of is same as that of except for the vertex The degree of is the sum of degrees of all vertices of set and is given by Also if and are the stationary distributions of a random walk on graphs and respectively, then for and .
Hitting time from stationarity.
Recall that the probability of a random walk to move from vertex to in graph is given by (defined by Eq. 1) in our algorithm. Let be the stationary distribution of our random walk in . Let be the probability distribution of the Markov chain associated with the given random walk that begins at state at time . Then, the distance of this distribution from its stationary distribution at time is defined as . Then, for any mixing time of the random walk on with transition probability given by Eq. 1, is given by
[TABLE]
This measures the time required by the Markov chain for the distance to the stationarity to be small. The mixing time for graphs and are defined similarly and are denoted by and respectively. We use the following relation among the mixing times of the three graphs in our proof.
Lemma 2**.**
*([9], Lemma 2)
Mixing time of simple random walk with transition probability given by Eq. 1 on graphs are given as*
[TABLE]
such that
[TABLE]
where can be any of the graphs and is the spectral gap of the transition matrix of the simple random walk.
Proof.
The bound on mixing time of directly follows from Theorem 12.3 of [25]. Relation between the mixing times for and with that of follow directly from the proof of Lemma 2 of [9]. ∎
Let be the expected hitting time of a vertex starting from the stationary distribution From Proposition 10.19 of [25], we can write
[TABLE]
where,
[TABLE]
Let be the time until the first two random walks meet in when they start from In other words, is the time to reach the vertex in graph Now, if mixing time of graph satisfies Eq. 18, then
[TABLE]
where is the hitting time of vertex from stationary distribution in graph . The following lemma follows directly from Lemma 3 of [9].
Lemma 3**.**
Let the spectral gap of the transition matrix of simple random walk on graph be , then for any vertex of graph we have
[TABLE]
where is defined in Eq. 20. This lemma holds for all three graphs and .
Now we prove the following Lemma which will be used to prove the time for single level coalescence.
Lemma 4**.**
Let be a connected graph with vertices and edges and let
[TABLE]
where . Let be an integer, and be the vertex in graph representing the contracted set Then, there exists a constant such that,
[TABLE]
Proof.
Recall the definition of the set which is as follows:
[TABLE]
If then, the degree of set is:
[TABLE]
If and for any such that , we define subsets of as:
[TABLE]
We get, , where .
By the definition of our function for , . So, . Thus by inclusion-exclusion principle,
[TABLE]
The factor of in Eq. 23 is the result of fixed combinations among source nodes because of restricted coalescence defined by function and the combinatorial factor in other term is because of disjoint nature of nodes i.e. . The bound in Eq. 25 follows from Eq. 24, by using upper bound on from Eq. 22. Then, using bound on from Eq. 26 for , we get the desired result. ∎
Recall that is the expected time to hit the vertex from stationary distribution Then by Lemma 3 and Lemma 4 we get,
[TABLE]
Computation time without queueing delay for the simple random walk.
Recall that is the time of coalescences of random walks in i.e, the time to hit in graph which is given by Eq. 21. By Lemma 2 and Eq. 27 we get,
[TABLE]
Eq. 29 gives the bound for expected first coalescence time among data packets, indicating partial computation of level of function schema. Now, for complete computation of level, we will prove that with probability , where is some constant there cannot be a subset of data packets which did not coalesce by time where To prove this we need the following result.
Lemma 5**.**
*([9], Lemma 1)
The probability of the event such that a random walk starting from does not visit vertex in first time steps is given by*
[TABLE]
Here is the mixing time of the simple random walk on and is the expected hitting time of vertex from stationary distribution .
Let be the set of data packets starting from vertex There are two cases for coalescences of these packets. Either these data packets have coalesced during mixing time , or they have not. For latter case, we can use Lemma 5 on graph with vertex and . This gives us the probability that the data packets have not coalesced by time which is same as the probability of random walk on graph not hitting vertex by time So, using Lemma 5, is:
[TABLE]
So,
[TABLE]
The bound of earlier equation is achieved from value of in Eq. 22 and upper bound on binomial coefficient. So, expected number of steps until fewer than data packets remain is at most . This is because after every step, number of data packets reduces by half due to coalescing. Now combining the above mentioned result with Eq. 29, we can get the coalescence time for level as,
[TABLE]
Now, for
[TABLE]
Bound of Eq. 30 holds even if . Note that this analysis holds true for coalesced packets as well, as after coalescing they are treated in similar way as data packets which originated from source set . So, repeating similar analysis for all levels we get total function computation or coalescence time without any queueing delay as:
[TABLE]
By Lemma 2, the total coalescence time in terms of the mixing time is given by:
[TABLE]
Eq. 31 and Eq. 32 give the one round function computation time assuming only one packet inside each queue. Now, we will find the actual function computation time including queueing delays.
Incorporating queueing delay.
We will use the same queueing analysis as used in the proof of Theorem 2 to get a bound on the probability of a packet being delayed by a node at time . So, we have and we know,
[TABLE]
So, let be the maximum delay probability at time over all nodes in set for given data rate . Then, at stationarity we can say that the maximum delay probability converges to where and is a continuous and increasing function of (see Claim 1 [14] for details). Thus, the probability of a packet not being delayed by a node in a given time slot is . So, combining the queueing delay with the non-delayed computation time, we have the expected number of steps by which the function is computed as
[TABLE]
So, we have one round function computation time i.e., assuming each source node has generated only one data packet as \tau_{\mbox{\scriptsize comp}}(1)=C(K)=O\Bigg{(}\dfrac{ht_{\mbox{\scriptsize mix}}^{G}}{1-c(\beta)}\bigg{(}\log^{3}{K}+\dfrac{n}{\nu}\frac{\log{K}}{\log n}\bigg{)}\Bigg{)}, where is a continuous and increasing function of and is the worst-case hitting time of simple random walk on . So,
[TABLE]
where is a constant. Recall, is the expected function computation time of rounds of data arrival and so, we can write
[TABLE]
Now, using the results from Eq.s (16) and (33), we have
[TABLE]
So, we have,
[TABLE]
where are constants and is the worst-case hitting time of simple random walk on . ∎
6 Conclusion and Future Work
In this paper, we have tried to demonstrate how random walk-based methods can be used for the in-network computation of a very general class of functions: asymmetric functions whose schema is described by a binary tree. We present lower and upper bounds on the rate for the fixed scenario. Our lower bound on rate though computed for our fixed setting is a general lower bound on rate of function computation. To the best of our knowledge, this is the first lower bound on rate for this class of problem. We also present the average function computation time under Bernoulli data generation model for both fixed and flexible model. However, our results hold for other data generation models as well, we will discuss our results in context of two different data generation models, some of the questions our setting and our results raise and also possible future directions of this work in the remaining part of this section.
Other data generation models
First we consider a realistic data generation model which is semi-deterministic in nature. In this model, given a each node generates packet with sequence number () at time where is a normal random variable with mean 0 and variance and is called the clock drift parameter. We assume that is an independent collection of random variables. So, for this model the maximum appearance time of rounds is . So, using this in Eq. (13) and Eq. (34) we get the average function computation time under the given data generation model for the Fixed Random-Compute as and for the Flexible Random-Compute as \dfrac{1}{\beta}+\dfrac{ht_{\mbox{\scriptsize mix}}^{G}}{1-c(\beta)}\bigg{(}\log^{3}{K}+\dfrac{n}{\nu}\dfrac{\log{K}}{\log n}\bigg{)} where variables denote the usual quantities as discussed in earlier sections.
Now, consider the other data generation model which is continuous wherein each source node has data arrivals as Poisson process. This data generation model results in a Markov process defined by the queues of the nodes. Since, every Markov process has an embedded Markov chain and we already know that the Markov chain on the queues (as seen under the Bernoulli data generation model) achieves stationarity, so the results for the Bernoulli model also hold true for this model.
Discussion: How general is the binary tree function schema?
Note that any function of data consists of unary, binary or -ary operations. In the function computation schema, any intermediate node representing unary operation can be merged with its parent node, i.e., the unary operation can be performed by the network vertex which performs the operation for its parent node. Thus function computation schema with only -ary operations is general for . For an there are two possibilities. One is to create a binary tree for an -ary operation by dividing the -ary function into a series of binary operations. Then the time required to complete the -ary function is equal to completing the operations of the equivalent binary tree which can be done using the techniques of Fixed and Flexible model analysis (see Section 5.2). Another way is to look at the -ary function as a symmetric function of data sources. In this case, time to compute the function can be computed using the techniques available in the literature for symmetric functions; see [28].
Future work: Comparing the Fixed scenario and the Flexible scenario
As discussed in Sections 4, currently we are not able to determine which of the two scenarios provides more efficient function computation. Proving that Flexible Random-Compute always does better than Fixed Random-Compute is one direction that is worth pursuing since otherwise, we are not able to justify the extra information Flexible Random-Compute needs to store (each node must know the entire function schema). However, on the grounds of fault-tolerance Flexible Random-Compute justifies the extra storage. It is more robust than Fixed Random-Compute since a single failure can disable the entire computation in the latter case if the failure occurs at a node which is tasked with computing a subfunction. In Flexible Random-Compute on the other hand, as long as the sources are connected to each other the computation can always take place since any node can perform any subfunction. Characterising the computation time performance of Flexible Random-Compute under suitable faults is an interesting direction to extend this work since most real-world sensor nodes tend to be failure prone.
Future work: A rate result
In terms of analysis, the decomposition of Fixed Random-Compute into a set of instances of data collection using random walks problem allows us to leverage the ideas developed in [14] to characterise the rate of computation under an independent Bernoulli data generation model. However, characterising the rate of Flexible Random-Compute is not as straightforward and presents an interesting challenge that we look forward to addressing in the future.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] D. Aldous and J. Fill. Reversible markov chains and random walks on graphs, 2002. (Monograph in preparation).
- 2[2] N. Alon, C. Avin, M. Kouckỳ, G. Kozma, Z. Lotker, and M. R. Tuttle. Many random walks are faster than one. Comb. Probab. Comput. , 20(4):481–502, 2011.
- 3[3] C. Avin and C. Brito. Efficient and robust query processing in dynamic environments using random walk techniques. In Proc. of the 3rd Intl. Symposium on Information Processing in Sensor Networks , IPSN ’04, pages 277–286. ACM, 2004.
- 4[4] S. Banerjee, P. Gupta, and S. Shakkottai. Towards a queueing-based framework for in-network function computation. Queueing Syst. , 72(3):219–250, 2012.
- 5[5] R. Beraldi, R. Baldoni, and R. Prakash. A biased random walk routing protocol for wireless sensor networks: The lukewarm potato protocol. IEEE Trans. Mobile Comput. , 9(10):1649 – 1661, 2010.
- 6[6] S. Boyd, A. Ghosh, B. Prabhakar, and D. Shah. Gossip algorithms: Design, analysis and applications. In Proc. of the 24th Annual Joint Conf. of the IEEE Computer and Comm. Societies , INFOCOM ’05, pages 1653–1664 vol. 3. IEEE, 2005.
- 7[7] K. Censor-Hillel and H. Sachnai. Fast information spreading in graphs with large weak conductance. SIAM J. Comput. , 41(6):1451–1465, 2012.
- 8[8] C. K. Chau and P. Basu. Exact analysis of latency of stateless opportunistic forwarding. In Proc. of the 28th Annual Joint Conf. of the IEEE Computer and Comm. Societies , INFOCOM ’09, pages 828–836. IEEE, 2009.
