## 4 Deep Learning-Based MEC System Energy Saving Framework
### Task Arrival Rate Prediction with STGCN  
In wireless mobile communication networks, base stations are deployed close to each other to ensure seamless services. Therefore, due to user mobility, the set of users connected to each base station exhibits spatio-temporal correlation. The amount of workload newly generated in the service area of \(B_{i}\) during a time slot \(t\) (i.e., \(\tilde{\lambda}_{i}(t)\)) depends on the users connected to BSs and the amount of workload imposed by them. Therefore, we use the spatio-temporal correlation among the amount of workload imposed by users connected to each base station during a time slot and predict \(\tilde{\lambda}_{i}(t)\) by using STGCN [15]. To take advantage of STGCN, we model the BSs in the MEC system as a graph \(G=(V,E,W)\), where \(V\) is a set of base stations, \(E\) is a set of edges, and \(W\) is a set of edge weights. We define an edge between BS \(x\) and BS \(y\) if a user connected to BS \(x\) can connect to \(y\) during a time slot. According to [35], we formally define an edge by using the following notations. We denote the set of BSs in the system by \(B\) and the distance between BS \(x\) and \(y\) by \(d_{x,y}\). We also denote the standard deviation of all the \(d_{x,y}\)s (\(\forall x,y\in B\)) by \(d_{std}\) and introduce an adjacency variable \(z_{x,y}=e^{-d_{x,y}/d_{std}}\) that determines the edge between two base stations \(x\) and \(y\). Since the distance a user can move during a time slot is physically restricted, we consider that an edge exists between BS \(x\) and \(y\) if \(z_{x,y}\geq z_{th}\), where \(z_{th}\) is a threshold value. When there is an edge between BS \(x\) and \(y\), the probability that a user connected to \(x\) is connected to \(y\) within the time slot decreases as \(d_{x,y}\) increases. Thus, we set the edge weight between \(x\) and \(y\) to \(z_{x,y}\). Consequently, the adjacency matrix of the graph \(G\) is given as \(A_{|B|\times|B|}=[a_{x,y}]\), where  
\[a_{x,y}=\left\{ \begin{array}{ll}z_{x,y}&\text{, if }z_{x,y}<z_{th}\\ 0&\text{ otherwise}\end{array} \right.,(\forall x,y\in B). \tag{10}\]  
If we denote the set of users connected to BS \(x\) during a time slot \(t\) by \(U_{x}(t)\) and the workload imposed by a user \(u\in U_{x}(t)\) by \(w_{u}(t)\), the amount of workload newly imposed on BS \(x\) during a time slot becomes \(w_{x}(t)=\sum_{u\in U_{x}(t)}w_{u}(t)\). To predict \(w_{x}(t)\) at the beginning of a time slot by using STGCN, the controller maintains the spatial and temporal workload distribution matrix \(O_{|B|\times h}(t)\) by collecting past \(h\)\(w_{x}(t-i)\)s (\(i=1,\ldots,h-1\)) for each BS \(x\in B\). In other words,  
\[O_{|B|\times h}(t)=\left[ \begin{array}{ccc}w_{1}(t-1)&\cdots&w_{1}(t-h)\\ \vdots&\ddots&\vdots\\ w_{x}(t-1)&\cdots&w_{x}(t-h)\\ \vdots&\ddots&\vdots\\ w_{|B|}(t-1)&\cdots&w_{|B|}(t-h)\end{array} \right].\]STGCN with parameter \(\psi\) takes both \(A_{|B|\times|B|}\) and \(O_{|B|\times h}(t)\) as inputs and outputs predicted \(w(t)=\{w_{x}(t):x\in B\}\), which is denoted by \(\hat{w}(t)=\{\hat{w}_{x}(t):x\in B\}\). Figure 3 shows the block diagram of the STGCN workload predictor, which is made of two ST-Conv blocks and one output block. The ST-Conv block consists of two temporal convolution modules named TGC (Temporal Gated Conv) and one spatial graph convolution module named SGC (Spatial Graph Conv) in between the TGCs. We configure the internal structure of each module to be identical to that proposed in [15]. The first TGC module extracts temporal features of each BS \(x\) by exploring its neighbors. The SGC module takes temporal features extracted by the first TGC module and aggregates the features from neighboring nodes based on the graph structure to determine the influence of neighboring BSs on a target BS's features. The temporal features of the output of the SGC module are extracted at the second TGC module. The output layer is made of a fully connected network and brings forth \(\hat{w}(t)\).