Semi-decentralized Inference in Heterogeneous Graph Neural Networks for
  Traffic Demand Forecasting: An Edge-Computing Approach
Prediction of taxi service demand and supply is essential for improving
customer's experience and provider's profit. Recently, graph neural networks
(GNNs) have been shown promising for this application. This approach models
city regions as nodes in a transportation graph and their relations as edges.
GNNs utilize local node features and the graph structure in the prediction.
However, more efficient forecasting can still be achieved by following two main
routes; enlarging the scale of the transportation graph, and simultaneously
exploiting different types of nodes and edges in the graphs. However, both
approaches are challenged by the scalability of GNNs. An immediate remedy to
the scalability challenge is to decentralize the GNN operation. However, this
creates excessive node-to-node communication. In this paper, we first
characterize the excessive communication needs for the decentralized GNN
approach. Then, we propose a semi-decentralized approach utilizing multiple
cloudlets, moderately sized storage and computation devices, that can be
integrated with the cellular base stations. This approach minimizes
inter-cloudlet communication thereby alleviating the communication overhead of
the decentralized approach while promoting scalability due to cloudlet-level
decentralization. Also, we propose a heterogeneous GNN-LSTM algorithm for
improved taxi-level demand and supply forecasting for handling dynamic taxi
graphs where nodes are taxis. Extensive experiments over real data show the
advantage of the semi-decentralized approach as tested over our heterogeneous
GNN-LSTM algorithm. Also, the proposed semi-decentralized GNN approach is shown
to reduce the overall inference time by about an order of magnitude compared to
centralized and decentralized inference schemes.
Mahmoud Nazzal, Abdallah Khreishah, Joyoung Lee, Shaahin Angizi, Ala Al-Fuqaha, Mohsen Guizani
Semi-decentralized Inference in Heterogeneous Graph Neural Networks for Traffic Demand Forecasting: An Edge-Computing Approach

###### Abstract

Prediction of taxi service demand and supply is essential for improving customer's experience and provider's profit. Recently, graph neural networks (GNNs) have been shown promising for this application. This approach models city regions as nodes in a transportation graph and their relations as edges. GNNs utilize local node features and the graph structure in the prediction. However, more efficient forecasting can still be achieved by following two main routes; enlarging the scale of the transportation graph, and simultaneously exploiting different types of nodes and edges in the graphs. However, both approaches are challenged by the scalability of GNNs. An immediate remedy to the scalability challenge is to decentralize the GNN operation. However, this creates excessive node-to-node communication. In this paper, we first characterize the excessive communication needs for the decentralized GNN approach. Then, we propose a semi-decentralized approach utilizing multiple cloudlets, moderately sized storage and computation devices, that can be integrated with the cellular base stations. This approach minimizes inter-cloudlet communication thereby alleviating the communication overhead of the decentralized approach while promoting scalability due to cloudlet-level decentralization. Also, we propose a heterogeneous GNN-LSTM algorithm for improved taxi-level demand and supply forecasting for handling dynamic taxi graphs where nodes are taxis. Extensive experiments over real data show the advantage of the semi-decentralized approach as tested over our heterogeneous GNN-LSTM algorithm. Also, the proposed semi-decentralized GNN approach is shown to reduce the overall inference time by about an order of magnitude compared to centralized and decentralized inference schemes.

 GNN, netGNN, taxi demand forecasting, taxi supply forecasting, ITS, decentralized inference.

## I Introduction

Intelligent transportation system (ITS) is an essential item in modern city planning. A key component of an ITS is the means of public transportation such as taxis, buses, and ride-hailing vehicles. As the importance of these services grows, there is a corresponding need for accurately and efficiently forecasting the travel needs of passengers and the corresponding available supplies by vacant taxis ready to serve them. This forecasting enables efficient management of transportation resources and allows for dynamic allocation of taxis such that customer waiting time is minimized and the taxi occupancy times are maximized. It can also help optimizing routes, urban development, traffic flow, and public transportation planning.

Taxi demand forecasting has been receiving increasing amounts of attention in the recent transportation engineering literature [1, 2, 3, 4, 5, 6, 7, 8, 9]. Similar to other prediction problems, approaches to taxi demand and supply forecasting can be broadly categorized into two main categories; first is model-based approaches where a statistical model for traffic patterns is employed. Examples along this line include integrated auto-regressive moving average (ARIIMA) [3] and linear regression [10] models. Despite their simplicity, these methods focus only on temporal dependencies and overlook exploiting spatial dependencies for the prediction. The other category is deep learning (DL)-based methods where data-driven techniques are shown to well exploit spatiotemporal correlations for improved prediction. Along the DL line, recurrent neural networks (RNN) such as long short-term memory (LSTM) are especially important for taxi demand and supply forecasting as they can well address time dependency. Accordingly, there is a series of works on using RNN for taxi demand and supply forecasting [11, 12, 13, 7, 14].

Recently, there has been a growing interest in the use of graph neural networks (GNNs) for taxi demand and supply prediction. This approach models city regions as nodes in a graph and their relations as the edges linking these nodes. Along this line, several works have shown the advantage of GNNs in utilizing local region information and the relationships across non-Euclidean regions in improving the forecasting performance [2, 5, 6, 8, 9, 14, 15]. Despite the promising success of GNNs for taxi demand and supply forecasting, there are still outstanding challenges hindering their potential. First, as for graph representation, it is advantageous to simultaneously expose several node and relation types in the representation learning of transportation graphs [17]. Specifically, the existence of multiple types of nodes and edges in current transportation graphs calls for adopting a heterogeneous information network (HIN) approach to seamlessly exploit them. This requires the development of corresponding heterogeneous GNNs (hetGNNs) to handle their representation learning. Second, inferring taxi demand and supply predictions at the level of the whole transportation
system incurs a huge amount of computation as it is necessary to utilize the existing salient relationships. This calls for developing solutions to improve the scalability of the GNN approach to cope with city-wide or even larger graphs [18].

Based on the above discussion, in this paper, we propose a hetGNN-LSTM-based algorithm for taxi demand and supply prediction. Compared to the existing GNN-based approaches, our algorithm defines taxis as nodes in a graph. This allows taxi graphs to be dynamic as opposed to existing approaches assuming nodes as fixed geographical regions. On the other hand, this allows for predicting the demands and supplies for each taxi. Operating this algorithm in a centralized way is computationally intensive. Therefore, we develop a decentralized GNN inference approach. However, we show theoretically and through experiments that this decentralized approach has a huge amount of message passing delay which grows quadratically with the number of communication hops. To reduce this delay, we propose a semi-decentralized approach. This approach uses multiple cloudlet devices each handling a subgraph of the transportation graph. A cloudlet is a moderate computing capability device placed at a base station (BS) and able to communicate with the taxis in its coverage area. From now on, we refer to the cloudlet with its network as a cloudlet network (CLN). As for the BS, we assume a 5G small cell such as the architecture of eNodeB BS detailed in [19]. The contributions of this paper can be summarized as follows.

* We consider taxi demand and supply forecasting at a taxi level. Predicting on a taxi-node level provides drivers with immediate information on the availability of pick-ups and supply of other taxis in a region surrounding them.
* We propose a novel heterogeneous graph-based algorithm for taxi demand and supply prediction utilizing hetGNNs. We model the transportation system as a heterogeneous graph of taxis as nodes linked with three relationship types derived from road connectivity, location proximity, and target destination proximity. The proposed algorithm exploits these relationships to improve the prediction.
* We propose a _semi-decentralized_ approach to GNN-based traffic prediction. This approach is proposed to mitigate the scalability of centralized GNN inference and the huge message-passing delay in decentralized GNN inference.
* We propose an adaptive node-CLN assignment to minimize inter-CLN communication. We develop a heuristic protocol for this assignment in a distributed manner across cloudlet devices.

Experiments on real-world taxi data show a high-accuracy prediction of the proposed taxi demand and supply forecasting algorithm compared to the state-of-the-art, represented by DCRNN [14], Graph WaveNet [15], and CCRNN [16] being leading GNN-based approaches. Experiments also show that the inference time delay in decentralized GNN operation grows quadratically with the number of message-passing hops. Also, the proposed semi-decentralized GNN approach is shown to reduce the overall inference time by about 10 times compared to centralized and decentralized inference. The source code and datasets used in this paper are available on [https://github.com/mahmoudkanazal/SemidecentralizedhetGNNLSTM](https://github.com/mahmoudkanazal/SemidecentralizedhetGNNLSTM).

The rest of this work is organized as follows. Section II revises related works. The proposed taxi demand and supply algorithm and semi-decentralized GNN approach are detailed in Section Section III. Section IV presents experiments and results, with the conclusions in Section V.

## II Related Work

### _DL methods for traffic demand forecasting_

Similar to their use in other application areas, DL models achieve performance gains in a variety of traffic forecasting problems. This is due to their ability to leverage dependencies among training data. Along this line, recurrent neural networks such as LSTM [20] are used to exploit time correlations [21], whereas convolutional neural networks (CNNs) utilize spatial dependencies [22]. An LSTM is particularly well-suited for prediction tasks that involve temporal dependency. This is because LSTM networks can remember and use previous information over extended periods. A more recent research trend combines LSTMs and CNNs to exploit spatiotemporal correlations in what is known as ConvLSTM [7, 23]. However, these DL approaches share a common restriction; they overlook existing and potentially useful relationships across entities in a traffic system, such as taxis, roads, and customers. Such relationships model other types of dependencies such as road connectivity and proximity. For instance, the demands at two railway stations in the same city are very likely to be correlated [6], even though the two stations may be distant.

### _GNN models for traffic demand forecasting_

Graph data structures appear naturally in many fields such as user accounts in a social network and vehicles in a traffic system [24]. GNNs extend DL to graph data by combining graph structure and node information through message passing and aggregation [25, 26]. This combination enables GNNs to produce node embeddings to serve multiple downstream graph tasks such as node classification (inferring the class label of a node), link prediction (estimating the likelihood of a link to exist between given nodes), and graph classification (inferring a property of the graph as a whole). Each node in a graph has a computational graph composed of its \(L\)-hop neighboring nodes. Node embeddings are obtained by alternating between message passing, i.e., communicating local information across nodes, and aggregation where received messages along with previous node information are used to obtain an updated node embedding. Message passing is done according to the topology of the graph, whereas aggregation is done by the neural network layers of the GNN model obtained by training over graph data [27, 28].

As DL methods overlook useful relationships, recent literature considers modeling the traffic system as a graph and applying a GNN approach to problems such as taxi demand and supply forecasting and flow prediction [29]. A city area is divided into many regions and each region is represented by a node in the graph. Several works assume different edges linking these nodes such as having a common origin-destination relationship between two regions if there is a taxi moving from one region (origin) to the other (destination) [6].
A more recent example work [8] considers dividing a city into non-uniform regions serving as the graph nodes linked with edges representing their road connectivity.

Despite the clear advantages of GNNs, the existing research body on their usage for taxi demand and supply forecasting assumes homogeneous graphs. So, (homogeneous) GNNs along with other DL models such as LSTM are mainly used to perform the forecasting. Still, when modeling the traffic system as a graph, it may contain different types of nodes with different relation types. So, restricting the use of GNNs to homogeneous models overlooks this richness of relation types and limits the potential of GNNs. Therefore, it is advantageous to model traffic systems as HINs processed by hetGNNs [30] where the prediction can be improved by incorporating multiple relationships between the graph nodes. The main challenge hetGNNs face is handling heterogeneity. While some primitive hetGNNs project the HIN on the graph space to eliminate its heterogeneity [31], others use the metapath concept [32]1 to maintain and utilize the heterogeneity [33, 34, 35]. This is achieved by decomposing the HIN into multiple metapaths encoded to get node representations under graph semantics. hetGNNs have been shown to outperform their GNN ancestors in many applications such as malicious payment detection [36], drug/illegal trade detection [37], and network intrusion attack detection [38].

Footnote 1: A meta path is a composition of relations linking two nodes.

### _Decentralizing GNN inference_

Training and testing of GNN models over large graphs require huge memory and processing costs. This is because graph nodes are mutually dependent. Thus, they can not be arbitrarily divided into smaller subgraphs. Techniques such as neighborhood sampling [39] may ease the problem to some extent. Still, even a sampled computational graph and the associated features may not fit in the memory of a single device [40]. Thus, centralized GNN operation faces a scalability limitation [40, 41].

To mitigate the scalability limitation of centralized GNNs, decentralized (peer-to-peer) node inference has been applied to a few GNN applications like robot path control [42, 43] and resource optimization in wireless communication [18]. Decentralization naturally promotes GNNs' scalability. Still, it requires excessive communication overhead between nodes [40]. In turn, this communication delay significantly slows down the operation of a GNN because the progression of calculations across GNN layers needs to wait for a 2-way message passing to deliver messages from \(L\)-hop neighbors. Another disadvantage of decentralized inference is the difficulty of coordinating and synchronizing the operation of all nodes. Another less significant disadvantage is the need for each node to maintain and operate a copy of the GNN model.

While the literature considers either centralized or decentralized GNNs, it came to our knowledge while developing this work that there is another work [41] on distributed GNN operation. [41] proposes adaptive node to cloud server assignment minimizing a general cost function with the servers of different computational powers. However, this is done in a centralized manner; a solver needs to know the graphs of nodes and cloud servers to do the assignment. In our work, we optimize the assignment in a distributed manner at the cloudlet level. Also, according to [41], any node may be assigned to any cloud server, while our work focuses on the boundary nodes at each CLN and assigns them to their CLN or an adjacent one taking the geometry into account. Also, while our work focuses on minimizing the communication delay, [41] adopts a general cost function where the challenge is mapping nodes to cloud servers of varying computational capabilities while optimizing the other costs including the delay. It is also noted that [41] does not compare centralized and decentralized GNN implementations or consider their trade-offs.

## III The proposed work

### _System model_

The system model considered in this paper is a taxi service system composed of many taxis operating in a certain region/city as shown in Fig. 1-a. We set the objective of the system as providing future predictions for the demand (e.g., passengers) and supply (e.g., vacant taxis) in the vicinity around each taxi represented by the red circles in this figure. The approach assumed in this work is a GNN approach based on a graph representation of the taxis as shown in Fig. 1-b. To this end, we study and compare the following approaches to GNN inference with the taxi graph.

* A fully centralized approach: as represented in Fig. 2-a, a server or cloud is placed at a BS with a communication range converging the entire operation area. Taxis upload their local messages to the server which also keeps track of their locations. The server uses this information to obtain nodes' computational graphs and uses a local GNN to obtain updated messages. According to the graph structure, the server performs message passing by computation instead of communication. Next, the server sends the updated node messages to their taxi nodes. For taxi-server communication, a communication network under the ITS-G5 standard [44] is assumed.
* Our fully decentralized approach: taxis have GNN models locally and can only communicate with the taxis in their network's coverage area, as represented in Fig. 2-b. This way, each taxi forms its computational graph. Taxi-to-taxi

Figure 1: Taxis in a city (a) and their corresponding graph representation (b).
communication is done through a wireless ad-hoc network such as the one in [45].
* Our proposed _semi-decentralized_ approach as shown in Fig. 2-c: This approach uses cloudlets centered at CLNs. Taxis in the coverage area of each CLN use it to send their messages to its cloudlet device. Similar to the centralized setting, the cloudlet uses the uploaded taxi messages along with their locations to obtain node computational graphs and uses a local GNN to obtain updated messages. Message passing for the edges in the CLN is done by computation instead of communication as represented by the dashed lines in Fig. 2-c. However, the messages between connected taxis in adjacent cloudlets are shared through cloudlet-cloudlet communication, as represented by the solid lines in Fig. 2-c.

### _Graph construction and problem formulation_

We represent the transportation system as a HIN composed of taxis as its nodes linked with edges of three types. First, is a _connectivity_ edge [8] representing road connectivity. Second, is a _proximity_ edge [9] linking nearby taxis. Third, we define a _destination-similarity_ edge linking taxis going to nearby destinations. Accordingly, a _connectivity_ adjacency matrix is as follows [8].

\[\mathbf{A}_{c}[i,j]=\begin{cases}1&\text{if there is a road connecting nodes $i$ and $j$},\\ 0&\text{otherwise.}\end{cases} \tag{1}\]

A _proximity_ adjacency matrix is as follows [9].

\[\mathbf{A}_{p}[i,j]=\begin{cases}\operatorname{dist}(p_{i},p_{j})&\text{if } \operatorname{dist}(p_{i},p_{j})<th_{p},\\ 0&\text{otherwise.}\end{cases} \tag{2}\]

where \(\operatorname{dist}(p_{1},p_{2})\) is a function of the Euclidean distance between taxi positions \(p_{1}\) and \(p_{2}\), and \(th_{p}\) is a certain threshold. Next, our proposed _destination-similarity_ adjacency matrix is as follows.

\[\mathbf{A}_{d}[i,j]=\begin{cases}\operatorname{dist}(d_{i},d_{2})&\text{if } \operatorname{dist}(d_{i},d_{2})<th_{d},\\ 0&\text{otherwise.}\end{cases} \tag{3}\]

where \(\operatorname{dist}(d_{1},d_{2})\) is a measure of the Euclidean distance between destinations \(d_{1}\) and \(d_{2}\), and \(th_{d}\) is a prescribed threshold.

The structure of the proposed HIN is represented in the network schema in Fig. 3-a. We denote the HIN at a time instant \(t\) by \(G^{t}=(\mathcal{V}^{t},E_{c}^{t},E_{p}^{t},E_{d}^{t})\), or equivalently, \(G^{t}=(\mathcal{V}^{t},\mathbf{A}_{c}^{t},\mathbf{A}_{p}^{t},\mathbf{A}_{d}^{t})\) where \(\mathcal{V}^{t}\) is the node-set, \(E_{c}^{t},E_{p}^{t}\), and \(E_{d}^{t}\) represent the connectivity, proximity, and destination-similarity edges, respectively, \(\mathbf{A}_{c}^{t},\mathbf{A}_{p}^{t},\) and \(\mathbf{A}_{d}^{t}\) denote the

Figure 3: The network schema of the proposed HIN in (a) and the proposed system architecture in (b).

Figure 2: Three possible computation settings. (a) centralized: taxis upload their messages to a central server that performs the computations and returns the results to the taxis. (b) decentralized: taxis exchange messages with their neighbors and perform computations locally. (c) semi-decentralized: taxis in a CLN upload their messages to a cloudlet. The cloudlet performs the computations and returns them to taxis.
connectivity, proximity, and destination-similarity adjacency matrices, respectively. For simplicity, we represent the operation of the system on a time slot basis and assume the graph is fixed during a time slot. At a time step \(t\), each taxi knows the \(P\)-step historical demand and supply values of its current region of dimensions \(m\times n\) taxi positions, which serve as the node message (attributes).

The objective at each node is to predict the demand and supply values for the next \(Q\) time slots. In this sense, each taxi driver will be informed on both the availability of future passengers and other vacant taxi in an \(m\times n\) vicinity around their taxi. At a time instant \(t\), the graph \(G^{t}\) has an overall feature matrix \(\mathbf{X}_{t}\in\mathbb{R}^{N\times d}\) where \(d=m\times n\) is the input feature dimension and \(N^{t}\) is the number of nodes. So, we intend to obtain a mapping function \(\mathcal{F}\) as follows.

\[\left[\mathbf{X}_{t-P+1:t},G^{t}\right]\overset{\mathcal{F}}{ \longrightarrow}\mathbf{X}_{t+1:t+Q}, \tag{4}\]

where \(\mathbf{X}_{t+1:t+Q}\in\mathbb{R}^{Q\times N^{t}\times d}\) and \(\mathbf{X}_{t-P+1:t}\in\mathbb{R}^{P\times N^{t}\times d}\).

### _A heGNN-LSTM algorithm for taxi demand and supply prediction in a semi-decentralized approach_

#### Iii-C1 The proposed hetGNN-LSTM algorithm

To incorporate multiple edge types and time dependency in the prediction, we propose a hetGNN-LSTM algorithm as described in Fig. 3-b. For simplicity, we first present its operation in a centralized setting and then in a decentralized setting. After discussing the shortcomings of the centralized and decentralized settings, we present its use in the proposed semi-decentralized setting. In the centralized approach, first, the server constructs a HIN according to the network schema in Fig. 3-a. For each node, messages are shared across the HIN; then the hetGNN layer outcomes are calculated accordingly, and the process continues. Eventually, the final node embedding is obtained after \(L\)-hop messages are exchanged from the neighbors to the node in question. After that, these embeddings are fed to an LSTM model to produce the eventual demand predictions. The predictions are then sent to their respective nodes. However, this centralized operation lacks scalability due to the huge amount of computation done at the server. This suggests decentralizing the operation.

In the decentralized setting, represented in Fig. 2-b, each taxi maintains a copy of the hetGNN-LSTM model and it is assumed to do two main tasks. The first task is establishing the connection to receive the messages shared from its \(L\)-hop taxi nodes and using them along with its local information to obtain its final predictions, whereas the second task is sending its messages to these neighbors so that they can operate their GNNs. Due to the absence of a central server, a node needs to identify its \(L\)-hop neighbors and communicate with them. However, this is restricted to the communication abilities of these nodes and may not fully make use of the HIN structure between distant nodes. More importantly, the node-node message passing delay limits the number of achievable communicating hops at a reasonable inference delay.

Intuitively, the delay in decentralized GNN inference mainly depends on the message passing delay which significantly increases with the number of communication hops. To quantify this dependency, in Theorem 1, we derive approximate bounds for the overall inference time delay in decentralized GNNs. We show that this delay increases quadratically with the number of communication hops. Furthermore, this increase is determined by the topology of the computational graph of a node. The lower and upper bounds of GNN inference delay are determined mainly by the maximal degree2 of nodes in each communication hop, and the summation of node degrees in each communication hop, respectively.

Footnote 2: A node’s degree is the number of edges connected to it [46].

**Theorem 1**.: _In decentralized GNN inference, the overall inference delay with \(L\)-hop message passing, denoted by \(\Delta\), is within the following topology-dependent bounds with quadratic growth with \(L\)._

\[2t_{r}\sum_{l=1}^{L}(L-l+1)[ld_{i}+\max_{x\in N_{l}(i)}\{d_{x} \}+(l+1)t_{p}]\\ \leq\Delta\leq\\ 2t_{r}\sum_{l=1}^{L}(L-l+1)[ld_{i}+\sum_{x\in N_{l}(i)}d_{x}+(l+ 1)t_{p}] \tag{5}\]

_where \(L\) is the number of message passing hops (equivalently, the number of GNN layers), \(t_{r}\) is the packet transmission delay of the wireless network used for message passing, \(d_{i}\) is the degree of node \(i\), \(N_{l}(i)\) is the set of \(l\)-hop-away neighbors to node \(i\), and \(t_{p}\) is the GNN layer processing delay._

The proof of Theorem 1 is in the Appendix. To investigate the relationship between the number of hops and the overall GNN inference delay in real-world scenarios, we present the following experiment. A total of 255 taxis in a city region are considered to work in a decentralized GNN setting. We assume an ad hoc wireless network connecting taxi nodes. We calculate the overall inference time as specified in Section IV. For \(L\) hop values ranging from 1 to 5, an \(L\)-hop computational graph of a node is obtained, and the overall message passing delay is calculated. We also calculate the GNN inference delay bounds presented in Theorem 1. We repeat this experiment for 10 trials and plot average values of the overall GNN inference delay and its bounds versus hops in Fig. 4. As shown in this figure, the overall inference delay grows with increasing communication hops at a quadratic proportionality. Also, the actual delay is within the bounds specified in Theorem 1. This result shows the message passing delay bottleneck in decentralized GNN inference.

To resolve the limitations of scalability and excessive message passing delay in the centralized and decentralized schemes, respectively, we propose a semi-decentralized approach. As shown in Fig. 2-c, this approach uses a set of CLNs that span the work area of the taxis. Each CLN is associated with a certain city area and thus establishes a sub-HIN accordingly. Then, taxis in each CLN's region (sub-HIN) communicate their messages to the cloudlet, which performs predictions using its copy of the hetGNN-LSTM model, and then it communicates these predictions back to their respective taxis. It is noted that some boundary taxi nodes may have
edges connecting them to taxi nodes in an adjacent CLN. In this case, the CLNs serving these taxis need to exchange messages about these nodes for each GNN level. Adjacent CLNs exchange information on their boundary taxis that have edges across these CLNs, as represented by the solid lines in Fig. 2-c. The main steps of the operation in the semi-decentralized approach are outlined in Algorithm 1.

```
1:Initial CLN region boundaries for each cloudlet, a trained GNN-LSTM model at each cloudlet.
2:The next \(Q\)-future predictions of taxi demand and supply in an \(m\times n\) vicinity region around each taxi node
3:Each cloudlet \(u\) senses the existing \(n_{u}\) taxis in its CLN region.
4:Each cloudlet \(u\) obtains a sub-HIN \(G_{u}^{t}:(\mathbf{A}_{u,\mathbf{c}}^{t},\mathbf{A}_{\mathbf{u},\mathbf{p}}^{t},\mathbf{A}_{\mathbf{u}, \mathbf{d}}^{t}\in\mathbb{R}^{n_{u}\times n_{u}})\) based on the taxis in its CLN region.
5:Each cloudlet \(u\) obtains the feature matrix of the nodes in its CLN its nodes \(\mathbf{X}_{\mathbf{u}}^{t}\in\mathbb{R}^{n_{u}\times k^{t}})\)
6:Each cloudlet \(u\) determines the boundary nodes in its CLN connected to nodes in an adjacent cloudlet \(v\).
7:Each cloudlet \(u\) computes the messages passed across its nodes.
8:Each cloudlet \(u\) sends the messages of its boundary nodes to the CLNs containing their connected nodes.
9:Each cloudlet \(u\) receives the messages from the nodes connected to its boundary nodes through their CLN.
10:The updated node messages are aggregated and fed to the \(l\)-th GNN layer to produce new messages.
11:Each cloudlet \(u\) sends the eventual embeddings to their respective nodes in the CLN.
```

**Algorithm 1** Semi-decentralized GNN inference.

#### Iii-C2 Adaptive node-CLN assignment

In semi-decentralized operation, inter-CLN communication needs to happen for boundary nodes at each GNN level. The way the nodes are assigned to CLNs governs the number of inter-CLN edges. Therefore, an adaptive assignment can be employed to minimize the number of inter-CLN edges. We propose using minimum edge-cut graph partitioning to divide the shared subgraph between each pair of adjacency CLNs to serve this goal. As an example, in Fig. 5-a, uniformly assigning the nodes to CLNs results in 3 edges across the CLNs (denoted by the red dashed lines). However, applying minimum-cut graph partitioning to the nodes in the shared boundary region (\(\mathcal{V}_{b}\)) enclosed by the dashed lines in Fig. 5-b, a new assignment may add nodes \(v_{7}\), \(v_{8}\), and \(v_{9}\) to CLN 1, as seen in Fig. 5-c. This means that inter-CLN message passing needs to happen only across one node pair (\(v_{8}\)-\(v_{10}\)). This partitioning has to be done in a distributed manner between the CLNs. To achieve this, CLN 1 and CLN 2 share information on nodes and their positions in the boundary subgraph \(\mathcal{V}_{b}\). Nodes in this 2-\(L\) region are then to be partitioned between the two CLNs in a distributed 2-way manner. This means that one CLN will do the partitioning and instruct the other. For example, let us assume it is CLN 2. So, the partitioning problem is to optimize an assignment operator \(\Psi\) that assigns each node in the shared boundary subgraph (\(\mathcal{V}_{b}\)) to belong either to the set of nodes assigned to CLN 1 (\(\mathcal{V}^{1}\)) or to that of CLN 2 (\(\mathcal{V}^{2}\)), minimizing inter-set edges. The node assignment problem can be formulated as follows.

\[\begin{array}{ll}\operatorname{argmin}_{\Psi}&\sum_{u}\sum_{\mathcal{V}} \mathds{1}\{\mathcal{V}_{u}^{1},\mathcal{V}_{v}^{2}\}\\ \text{subject to}&(\mathcal{V}^{1},\mathcal{V}^{2})=\Psi(\mathcal{V}_{b})\\ &\mathcal{V}^{1}\cap\mathcal{V}^{2}=\varnothing\end{array}, \tag{6}\]

where the indicator function \(\mathds{1}\{\mathcal{V}_{u}^{1},\mathcal{V}_{v}^{2}\}\) is 1 if there is an edge between the \(i\)-th node in \(\mathcal{V}^{1}\) and the \(j-th\) node in \(\mathcal{V}^{2}\), and is 0 otherwise.

The node assignment problem in (6) can be solved as a minimum edge-cut graph partitioning process. The overall graph is divided into multiple subgraphs with minimum edge cuts, and each subgraph is assigned to a CLN. The graph partitioning problem is known to be NP-complete [47]. However, multi-level graph partitioning as in the METIS [48] algorithm provides suitable solutions by operating in three stages; coarsening the graph into smaller graphs, bisecting the smallest graph, and gradually projecting nodes on each graph partition. Still, the nodes in the taxi graph are aligned in a two-dimensional space. This eases the problem of graph partitioning by restricting partitioning to boundary nodes in neighboring CLNs. So, in this work, we apply k-means clustering between each pair of adjacent CLNs to partition their boundary nodes in a distributed manner. We propose a protocol for achieving adaptive assignment between each pair of adjacent CLNs in a distributed manner in Algorithm 2.

#### Iii-C3 Computational complexity analysis

The proposed algorithm assumes taxi nodes and generates predictions in the \(m\times n\) vicinity of each node, whereas the existing approaches predict aggregate demand and supply values for each region treated as a node. Assuming a city having \(N\) taxis operating in \(K\) regions, the proposed algorithm retrieves \(2m\times n\times P\times Q\) data values for \(N\) taxis whereas the existing approaches retrieve \(2\times P\times Q\) data values for \(K\) regions. It is interesting to compare the inference time complexity of the proposed algorithm to that of the existing approaches.

Fig. 4: Actual values of overall GNN inference delay versus the number of communication hops and their corresponding bounds of Theorem 1.
The inference time complexity of the existing approaches, depends on the following factors.

* Time complexity of passing 2\(PQ\)-dimensional messages across \(K\) (region) nodes within \(L\) GNN layers: assuming a message packet delay \(t_{r}\), this is proportional to \(P,Q,K\), and \(L^{2}\) (as concluded in the proof of Theorem 1).
* The time complexity of processing 2\(PQ\)-dimensional messages for \(L\) layers per node: assuming a processing delay \(\tau\) for each message, this is proportional to \(P,Q,L,K\), and \(\tau\).

Therefore, the inference time complexity of existing approaches is \(O(KPQ(L^{2}t_{r}+L\tau).\)

The inference time complexity of the proposed algorithm in the semi-decentralized setting is calculated at a cloudlet level since cloudlets operate concurrently. Let us assume that the number of nodes per CLN is \(N/K\), on average. The cloudlet inference time depends on the following factors.

* Message passing by computation of \(mnPQ\) messages for \(L\) GNN layers per node. Let us denote by \(t_{c}\) the time to pass an \(mnPQ\)-dimensional message by communication. So, the time complexity due to this delay is proportional to \(N/K,m,n,P,Q,t_{c}\) and \(L^{2}\).
* Layer processing time of \(mnPQ\) messages for \(L\) layers per node. Again, let us denote this processing time by \(\tau\). So, the time complexity due to this delay is proportional to \(L\tau\).
* Cross-CLN MP for boundary nodes: let us assume a faction \(\gamma\) of cloudlet nodes being boundary nodes connected to nodes in other CLNs, and let us denote by \(t_{CLN}\) the message packet transmission delay across CLNs. Then, this delay will be \(\gamma N/KL^{2}t_{CLN}\). So, the overall time per-cloudlet time complexity is \(O(mnPQt_{c}N/K+mnPQN/KL\tau+\gamma N/KL^{2}t_{CLN})\).

## IV Experiments and Performance Analysis

We present experiments on real-world data to analyze the operation of the proposed hetGNN-LSTM taxi demand and supply forecasting algorithm and the semi-decentralized GNN approach from the perspectives of prediction accuracy and GNN inference delay.

### _The setup and dataset_

The dataset used in this work is adopted from the NYC dataset [4]. This dataset consists of 35 million taxi trip records in New York City from April 1st, 2016 to June 30th, 2016. For each trip, the following information is recorded; pick-up time, drop-off time, pick-up longitude, pick-up latitude, drop-off longitude, and trip distance. As for the hetGNN, we use a heterogeneous graph convolutional network (HeteGCN). We implement the models using PyTorch Geometric (PyG) [49] version 2.0.3 built on PyTorch version 1.10.0. Experiments are conducted on a Lambda GPU Workstation with 128 GB of RAM, two GPUs each of 10 GB RAM, and an I9 CPU of 10 cores at a clock speed of 3.70 GHz. Table I lists key hyperparameters of the hetGNN-LSTM model.
### _Performance of the proposed hetGNN-LSTM forecasting algorithm_

In this experiment, we compare the accuracy of taxi demand and supply values predicted by the proposed hetGNN-LSTM algorithm with the following approaches representing the state-of-the-art.

* DCRNN [14]: uses a combination of diffusion convolutional layers and RNNs to make predictions.
* Graph WaveNet [15]: uses a combination of graph convolutional layers and dilated causal convolutional layers to capture the complex patterns in the data and uses an adaptive adjacency matrix.
* CCRNN [16]: uses a GCN model with coupled layer-wise graph convolution, which allows for more effective modeling of the spatial-temporal dependencies in transportation demand data with learnable adjacency matrices.

Comparisons are conducted in terms of the following quality metrics.

* Root mean squared error (RMSE) \[\mathrm{RMSE}(\mathbf{x},\hat{\mathbf{x}})=\sqrt{\frac{1}{n}\sum_{i}\left(x_{i}-\hat{ x}_{i}\right)^{2}}\]
* Mean absolute percentage error (MAPE) \[\mathrm{MAPE}(\mathbf{x},\hat{\mathbf{x}})=\frac{1}{n}\sum_{i}\left|\frac{x_{i}-\hat{ x}_{i}}{x_{i}}\right|\]
* Mean absolute error (MAE) \[\mathrm{MAE}(\mathbf{x},\hat{\mathbf{x}})=\frac{1}{n}\sum_{i}\left|x_{i}-\hat{x}_{i}\right|\]

where \(\mathbf{x}=x_{1},\cdots,x_{n}\) denotes the ground truth values of taxi demand and supply, and \(\hat{\mathbf{x}}=\hat{x}_{1},\cdots,\hat{x}_{n}\) represents their predicted values.

There are two major differences between the operation of the proposed algorithm and the existing algorithms in the literature [14, 15, 16, 2, 2, 5, 6]. First, our hetGNN-LSTM algorithm considers dynamically evolving graphs since its node granularity is at the taxi level. Thus, taxis can enter or leave the system generating a dynamic graph. In contrast, the existing approaches model city regions as graph nodes, and therefore, have static graphs. Secondly, our algorithm considers predicting the demands and supplies in a vicinity surrounding each taxi node whereas the existing approaches only predict at the locations of nodes (since each node is a region). Therefore, it is unfair to directly compare our algorithm to the existing approaches as this will compare different quantities. We thus include the following comparison cases where our algorithm is operated on a region level and the other algorithms are operated on a taxi level.

* A _taxi vs. region_ comparison case: in this case, we record the taxi demand and supply values obtained by the proposed algorithm at a 3x3 region surrounding each taxi, and record demand and supply predictions of the baselines at specific city regions. This is an unfair comparison since the proposed algorithm predicts more information compared to the baselines.
* A _region vs. region_ comparison case: from the demand and supply predictions obtained with the proposed algorithm at taxi locations, we calculate the overall predictions made in each city region. We compare these values to the predictions at the same regions obtained by each of the baselines. This is a fair comparison since we compare corresponding predictions.
* A _taxi vs. taxi_ comparison case: we record taxi demands and supplies obtained by the proposed algorithm at taxi locations. For the baselines, we use them to predict demands and supplies at the same taxi locations (rather than on a region level). This is also a fair comparison case since we compare predictions of the same information.

For each of the above-mentioned comparison cases, we operate the proposed hetGNN-LSTM model in the three decentralization settings. Namely, centralized, fully decentralized, and semi-decentralized settings denoted by scenarios \(SC1\), \(SC2\), and \(SC3\), respectively. Table II lists the results of this experiment. Considering Table II, let us first compare the performances of the proposed algorithm in centralized, fully-decentralized, and semi-decentralized settings (\(SC1\), \(SC2\), and \(SC3\), respectively). The centralized approach \(SC1\) has the best performance compared to \(SC2\) and \(SC3\). This is because it has access to all \(L\)-hop information for each node. Since \(SC3\) uses inter-cloudlet communication to achieve message passing between boundary nodes in adjacent CLNs, its performance is close to that of the centralized setting (\(SC1\)). It has some degradation compared to \(SC1\) because some nodes may have dependency across non-adjacent CLNs which is not accounted for in the inter-cloudlet communication. However, the fully decentralized setting \(SC2\) has more performance degradation as compared to \(SC1\) and \(SC3\). This is because the number of communication hops in \(S2\) is restricted to the communication ranges of taxis in the wireless ad hoc network (This is a distance of 100 m).

Now, let us compare the performance of the proposed algorithm in the three settings to that of the baselines according to Table II. First, for the _taxi-region_ comparison
case, the proposed algorithm has higher RMSE and MAE values compared to the other baselines. However, it has a lower MAPE than the baselines. This result is not conclusive since this comparison case compares different quantities in different settings (the proposed algorithm predicts on a taxi level, whereas the baselines predict on a region level), we only include this result for the reader's reference. The other two comparison cases are more reasonable in the sense that similar quantities are compared. In the region-region comparison case, the proposed algorithm significantly outperforms the baselines. For example, the proposed algorithm in the centralized setting achieves reductions of 45.4%, 56.0%, and 58.5% in MSE, MAE, and MAPE compared to CCRNN [16]. Similar reductions are obtained with the proposed algorithm in decentralized and semi-decentralized settings. A similar result is seen in the taxi-taxi comparison case, where the three metrics of the baselines become larger as they are operated at a taxi node level. As an example, the proposed algorithm in the centralized setting achieves reductions of 17.46%, 28.79%, and 50.31% in MSE, MAE, and MAPE compared to CCRNN [16]. A similar performance is obtained with the proposed algorithm in decentralized and semi-decentralized settings.

### _The impact of decentralization on the GNN inference delay_

In this experiment, the objective is to compare the overall GNN inference time in centralized, decentralized, and semi-decentralized settings, calculated as detailed below.

* In centralized GNN: The overall inference time equals the summation of; the time for nodes to upload their messages to the server, the time of inference for nodes using message passing by calculation and layer processing, and the time to send the eventual messages to their respective nodes. The communication medium between the nodes and the server assumed is the ITS-G5 standard from [44], and we adopt a packet transmission delay of 3.3 ms as reported in [44]. As for the GNN layer computation time, we measure it as the execution time for one GNN layer. Similarly, measure the time required to pass the messages by computation instead of communication.
* In decentralized GNN: The overall inference time for the nodes in the graph is calculated on a node level, where each node has its \(L\)-hop computational graph. We calculate the overall inference time for a given node by adding the transmission delays required to send and receive the messages to/from the nodes in its \(L\)-hop computational graph, and the processing time at each GNN layer. The communication medium assumed in this setting is an ad hoc wireless network, and we adopt empirical values for the transmission delay from [45]. In this network, a source node forwards its message to relay nodes that forward it till it reaches the destination node. As described in [45], the processing delay for a source node is about 16.55 ms which accounts for queuing and processing delays, whereas the link transmission delay is 7 ms. However, the processing delay at a relay node is 11.65 ms. Thus, an empirical value for the transmission delay calculated in this manner is about (16.55+7) ms for source nodes and (11.65+7) ms for relay nodes. As for the layer processing time, a decentralized device is assumed to have a 100 times longer processing time as compared to a centralized cloud server, as commonly assumed in the literature [50].
* In semi-decentralized GNN: The overall inference time is calculated as the time for the slowest CLN to obtain the embeddings of its nodes. This is calculated as the sum of the time required to upload the node messages to the CLN, the time for the CLN to produce latent embeddings based on the initial node messages, and the time to send these latent embeddings to their nodes. Furthermore, if a CLN has boundary nodes connected to nodes in an adjacent CLN, then the two CLNs have to exchange the updated messages of their connected nodes for each GNN layer. Thus, the overall message passing delay per GNN layer is the sum of the message passing by calculation (relatively small) and the inter-CLN message passing (relatively large). As for the layer processing time, a cloudlet in the semi-decentralized setting is assumed to have an order of magnitude slower computation as compared to the cloud server in the centralized setting. It is noted that if an adaptive assignment is applied, then we add its time delay. This is the sum of time to send information from a CLN to its neighbor, the time for

Figure 6: Comparison of the overall inference time versus the number of message passing hops in four decentralization scenarios, with the proposed model in (a), and CCRNN in (b).
the receiving CLN to perform adaptive k-means assignment, and the time for sending the result to the other CLN.

With the above specifications, we assume a total of 255 nodes spread in a city area. Then, we quantify the overall inference time over the number of communication hops for the following scenarios.

* _Cent.:_ centralized inference as shown in Fig. 2-a
* _Decent.:_ decentralized inference as shown in Fig. 2-b
* _Semi-decent.:_ semi-decentralized inference, as shown in Fig. 2-c, where decentralization is obtained using 10 CLNs of uniform node assignment. We also consider the case of 20 CLNs for observing the effect of the number of CLNs on performance.
* _Semi-decent.-adaptive:_ semi-decentralized inference where decentralization is obtained by splitting the nodes into the coverage of 10 non-uniform CLNs with the proposed adaptive assignment according to Algorithm 2. Similar to the previous scenario, we also include the case of using 20 CLNs.

Fig. 6 shows the results of the above experiment, with the GNN model being the proposed hetGNN-LSTM model in (a), and CCRNN [16] in (b). Several conclusions can be made from this figure. First, decentralization reduces the overall inference time (by comparing _Cent._ and _Decent._). Second, the added benefit of semi-decentralization is shown in the significant reduction, of about an order of magnitude, in inference time attained by the proposed setting (_Semi-decent._ and _Semi-decent-adaptive._) as compared to either centralization or decentralization. Furthermore, finer decentralization (20 CLNs) is shown more advantageous than coarse decentralization (10 CLNs). This is consistently seen in both _Semi-decent._ and _Semi-decent.-adaptive:_ Moreover, the advantage of adaptive node-CLN assignment is shown by a significant reduction of around 2-times in inference time in _Semi-decent.-adaptive_ compared to the case of uniform assignment _Semi-decent_. This is consistent with the expected reduction of inter-CLN edge communication.

Fig. 7 visually illustrates adaptive assignment by comparing a sample uniform assignment to an adaptive one in parts (a) and (b), respectively. In part (b), we obtain adaptive assignments using the proposed distributed adaptive assignment approach in Algorithm 2. CLN boundaries are denoted by solid yellow lines and nodes are denoted by yellow dots. It can be seen that adaptive assignment can help reduce the number of taxis connected across CLNs, and thus, the volume of inter-CLN communication. This interprets the reduction in inference delay shown in the _Semi-decent.-adaptive_ scenario in Fig. 6.

### _The generalizability of the hetGNN model_

A key advantage of GNNs is that even when trained with moderately sized graphs, they can generalize to larger graphs with unforeseen structures [42]. In this experiment, we investigate the impact of training graph sizes on the performance of the proposed hetGNN-LSTM algorithm. For this purpose, we consider a sample test graph of 1916 nodes and test it with different models trained with gradually increasing the training graph sizes from 220 to 1916. Fig. 8 shows the testing RMSE, MAE, and MAPE performance metrics versus the training graph size.

In view of Fig. 8, it can be seen that the drop in training set size does not incur a proportional drop in the performance as one moves from 1916 nodes to 220 nodes. With about one-tenth of the graph sizes for the training, the performance loss is still relatively marginal. This result establishes the generalizability of the hetGNN model.

Figure 8: Quality metrics for testing with a fixed graph size while varying training graph sizes.

Figure 7: Uniform and adaptive assignment samples in (a) and (b), respectively.
### _Training the model using federated learning_

The above experiments focus on the inference of the proposed model. Still, it is interesting to examine its operation with distributed learning such as federated learning (FL) [51, 52]. However, we assume a server-free FL framework due to the absence of a central server. This framework is similar to the server-free FL approach in [53] where neighboring clients exchange models, aggregate them to obtain a model initialization, train on local data, and then exchange the trained models, and so on. However, we assume that neighboring clients work with mutual trust. In this setting, each cloudlet is considered an FL client. Starting from the initial model states, each client exchanges its model with its adjacent neighbors, aggregates the received models along with its own local model, and trains on the aggregated model over its local data. Next, the trained models are again shared across direct neighbors and so on. This process is repeated for a predetermined number of FL rounds. In the following experiment, we divide the city area into 10 areas covered by 10 CLNs and apply this decentralized FL across them for 10 rounds. Table III lists several hyper-parameters and specifications for this experiment. We repeat this experiment with varying CLN graph sizes. For each case, we test the aggregate models over a test graph size of 1916 nodes and plot the average performance metrics across the 10 clients. Fig. 9 shows the results of this experiment.

One can make the following observations in view of Fig. 9. First, an FL-trained model exhibits a slight degradation in its prediction quality as compared to a model trained in a centralized manner. This can be seen in view of the drop in the RMSE, MAE, and MAPE in Fig. 9 compared to Fig. 8, where the values in FL training are on average 7% less than their corresponding values in centralized training. Second, it can be seen that the size of the client graph has a small impact on the quality of the aggregated model. This result is consistent with the generalizability of the GNN model established in the previous experiment. Therefore, one can still train with moderately sized graphs, possibly at the cloudlet area level without sacrificing the performance.

## V Conclusion and Future Work

In this paper, we propose a hetGNN-LSTM algorithm for taxi demand and supply prediction making use of several edge types between graph nodes. To enable this approach for large-scale training and inference, we also propose a semi-decentralized GNN approach that resolves the scalability and excessive communication delay limitations of centralized and decentralized GNNs, respectively. We propose the use of multiple CLNs to enable this semi-decentralized approach. Through experiments using real data, the proposed hetGNN-LSTM algorithm is shown to be effective in predicting taxi demand and supply on a taxi level. This allows for dynamic graph evolution over time as opposed to the existing approaches assuming static graphs. The proposed hetGNN-LSTM model is shown to generalize well to larger graphs with unforeseen structures. Moreover, the proposed semi-decentralized approach allows for cloudlet-level federated learning without sacrificing performance.

Future extensions to this work will include incorporating other node and edge types on the constructed HIN. Besides, extensions will also include the development of custom-made hetGNN models to better fit the traffic demand prediction. Namely, by more explicit incorporation of time dependency. It is also interesting to devise better ways of node-CLN assignment.

## VI Acknowledgment

This work is supported in part by the National Science Foundation under Grant No. 2216772.

### _The proof of Theorem 1_

Proof.: To derive the delay bounds, we quantify the inference delay bounds on a small graph with 2-hops and then generalize

Fig. 10: A sample node’s computational graph in the decentralized GNN setting.

Fig. 9: Quality metrics for testing with a fixed graph size and different average client graph sizes in distributed FL.
the derived bounds for \(L\)-hop graphs with arbitrary numbers of nodes. Consider the computational graph of node \(i\) shown in Fig. 10. This node has nodes \(j\) and \(k\) as its 1-hop neighbors, and nodes \(j_{1}\) through \(j_{3}\), and \(k_{1}\) through \(k_{4}\) as its hop-2 neighbors. Let us express the overall inference delay with messages from the 1-hop and 2-hop nodes to node \(i\) according to the topology of this computational graph. We assume that nodes communicate through an ad hoc wireless network. Also, a node can only communicate with one node at a time. Let \(t_{s}\) and \(t_{r}\) denote the (per-node) sending and receiving transmission delays, respectively. For simplicity, let us further assume that nodes have similar separations for simplicity and \(t_{s}=t_{r}\). Also, let \(t_{p}\) denote the processing time for messages received at a node through a GNN layer.

The total 2-hop inference delay (\(\Delta_{tot,2}\)) can be written as.

\[\Delta_{tot,2}=\Delta_{1}+\Delta_{2} \tag{7}\]

where \(\Delta_{1}\) is the time required to pass the 1-hop messages from \(j\) and \(k\) to \(i\), process them by the first GNN layer, and send the processed message to \(j\) and \(k\). So, the total delay of hop-1 is:

\[\Delta_{1}=2(t_{s}+tr)+tp=2\times 2(t_{r}+t_{p}) \tag{8}\]

In general, for node \(i\) with degree \(d_{i}\),

\[\Delta_{1}=2(t_{s}+tr)+tp=2\times d_{i}(t_{r}+t_{p}) \tag{9}\]

where \(d_{i}\) is the degree of node \(i\).

Let us consider the delay in the 2 communication hop. \(\Delta_{2}\) is the time required to receive the messages from the neighbors of \(j\) and \(k\), sending them to \(i\), processing them by the second GNN layer, and then sending the result back to the neighbors of \(j\) and \(k\). The time required for collecting the messages from the neighbors of \(j\) (to itself) is \(\Delta_{2}^{j}=d_{j}(t_{s}+t_{r}+t_{p})=2d_{j}t_{r}+t_{p}\). Similarly, the time required to collect the messages from the neighbors of \(k\) (to itself) is \(\Delta_{2}^{k}=2d_{k}t_{r}+t_{p}\). These two messages need then to be sent to \(i\). So, this requires another time delay of \(\Delta_{j,ktoi}=2d_{i}t_{r}\).

To this end, the topology of the graph determines the way how the delays of \(j\) and \(k\) contribute to the overall delay. Specifically, if \(j\) and \(k\) have uncommon nodes in their 1-hop graph (except for \(i\)) then they can work concurrently on receiving their messages. Thus, their delay will be determined by the slowest among them. This is the minimum value of their delays. However, if they have common nodes, then they must sequentially communicate with these nodes. This elongates the delay. It can be maximally equal to the summation of delays \(j\) and \(k\). So, the delay for hop-2 message passing is.

\[\Delta_{tot,2}=\Delta_{1}+\Delta_{2}^{j}+\Delta_{2}^{k}-\Delta_{ conc} \tag{10}\]

where \(\Delta_{conc}\) is the time duration when \(j\) and \(k\) concurrently receive messages (from their exclusive neighbors). The minimum value of \(\Delta_{conc}\) is zero when the \(j\) and \(k\) can not work simultaneously, i.e., when they share the same 1-hop neighborhood. This maximizes the delay to \(\Delta_{2,max}=\Delta_{1}+\Delta_{2}^{j}+\Delta_{2}^{k}\). On the other hand, the minimum value of \(\Delta_{conc}\) is \(\min(\Delta_{2}^{j},\Delta_{2}^{k})\) when \(j\) and \(k\) can work completely simultaneously (except for communicating with node (i)). In that case, \(\Delta_{2}\) is minimized to \(\Delta_{2,min}=\Delta_{1}+\max\{\Delta_{2}^{j},\Delta_{2}^{k}\}\).

Expanding \(\Delta_{2}^{j}\) and \(\Delta_{2}^{k}\) and adding common terms, and with the delay has the following bounds.

\[2t_{r}[2d_{i}+\max_{j\in N_{2}(i)}\{d_{x}\}]+3t_{p}\\ \leq\Delta_{tot,2}\leq\\ 2t_{r}[2d_{i}+\sum_{x\in N_{2}(i)}d_{x}]+3t_{p} \tag{11}\]

Following the same logic, we can generalize the above bounds for an \(l\)-hops since an \(l\)-hop message received at node \(i\) is an \(l-1\)-hop message received at \(j\) and \(k\) then forwarded to \(i\).

\[2t_{r}[ld_{i}+\max_{x\in N_{l}(i)}\{d_{x}\}]+(l+1)t_{p}\\ \leq\Delta_{tot,l}\leq\\ 2t_{r}[ld_{i}+\sum_{x\in N_{l}(i)}d_{x}]+(l+1)t_{p} \tag{12}\]

where \(N_{l}(i)\) denotes nodes connected to \(i\) and \(l\)-hops always.

In an \(L\)-hop computational graph, the hop-1 messages will be exchanged \(L\) times, the hop-2 messages will be exchanged \(L-1\) times, and so on. So, the total \(L\)-hop delay (\(\Delta_{tot,L}\) is within the following bounds.

\[2t_{r}\sum_{l=1}^{L}(L-l+1)[ld_{i}+\max_{x\in N_{l}(i)}\{d_{x} \}+(l+1)t_{p}]\\ \leq\Delta_{tot,L}\leq\\ 2t_{r}\sum_{l=1}^{L}(L-l+1)[ld_{i}+\sum_{x\in N_{l}(i)}d_{x}+(l +1)t_{p}] \tag{13}\]

These bounds have quadratic growth with the number of hops.
