# PDASTSGAT: An STSGAT-Based Multipath Data Scheduling Algorithm
## 3 PDASTSGAT
### Aggregating and Cropping  
Max pooling is employed as the aggregation operation, which involves applying a max pooling operation to the outputs of all graph convolutions in STSGAT. To ensure compatibility with max pooling, it is necessary for all outputs to possess the same size. Consequently, in a module's graph convolution operation, the number of kernels should be equal. The max pooling aggregation operation can be expressed as follows:  
\[H_{AGG}^{{}^{\prime}}=max(\overrightarrow{h}_{1}^{K},\overrightarrow{h}_{2}^ {K},...,\overrightarrow{h}_{L}^{K}) \tag{6}\]  
The cropping operation selectively preserves nodes from the intermediate time step. It discards features associated with nodes from the preceding and succeeding time steps. This approach is adopted due to the inherent capacity of the graph convolution operation to assimilate information from both preceding and subsequent time steps. Even with the cropping of two time steps, each node still retains local spatiotemporal correlations. If multiple layers of STSGAT are sequentially stacked, while retaining features from all neighboring time steps, it would lead to a substantial redundancy in the model, thereby significantly jeopardizing its overall performance. The complete details of the PDASTSGAT-MPTCP algorithm design are presented in Algorithm 1. The training process for the data is as follows:  
1. For the spatiotemporal network sequence, we first incorporate packet-level features to obtain \(X_{G}\in\mathbb{R}^{N\times C\times T}\). We create a learnable time embedding matrix, \(T_{emb}\in\mathbb{R}^{C\times T}\), and a learnable spatial embedding matrix, \(S_{emb}\in\mathbb{R}^{N\times C}\). We then incorporate these two embedding matrices into the spatiotemporal network sequence through matrix operations, updating \(X_{G}\). 2. By applying a fully connected neural network, we transform the feature dimension of \(X_{G}\), resulting in \(X_{G}\in\mathbb{R}^{N\times F\times T}\). 3. We construct the weight matrix, \(A^{{}^{\prime}}\), to represent the localized spatiotemporal graph, where \(A^{{}^{\prime}}\) is the adjacency matrix \(A\) of the spatial network from three consecutive time steps. The regions adjacent to the diagonal illustrate the connectivity of each node over neighboring time steps, including its connection with itself, \(A=[\alpha_{ij}]=\frac{\exp(\alpha_{ij})}{\sum_{j\in N_{i}}\exp(\alpha_{ij})}\). 4. The convolution operation between the spatial weight matrix \(A\) and the feature vector \(\overrightarrow{\mathbf{h}}_{i}\) yields the output, which is stored in \(\overrightarrow{\mathbf{h}}_{i}\). 5. The maximum pooling aggregation operation is applied to the outputs of all graph convolutions in STSGAT. The maximum pooling aggregation can be represented as \(H_{AGG}^{{}^{\prime}}=max(\overrightarrow{h}_{1}^{K},\overrightarrow{h}_{2}^ {K},...,\overrightarrow{h}_{L}^{K})\). To isolate the nodes at the intermediate time step, the features corresponding to the preceding and subsequent time steps are excluded. Finally, the result is passed through a fully connected layer, and the training result is activated using the sigmoid function to obtain the sub-flow selection sequence. ```
0: Subflow state features \(X_{G}\in\mathbb{R}^{N\times C\times T}\), graph \(A\), Packet time series \(c_{packet}\in\mathbb{R}^{C_{p}\times T}\), path choose series \(p_{choose}\), weight matrices \(W\), time embedding matrix \(T_{emb}\) and spatial embedding matrix \(S_{emb}\). 0: Vector the optimal transmission path \(p^{{}^{\prime}}_{choose}\) Initialization:\(N_{Head}\) represents the initial number of self-attention mechanisms; \(N\) denotes the total number of nodes. 1:\(X_{G}=(X_{G}\mid c_{packet})\in\mathbb{R}^{N\times(C+C_{p})\times T}\)
2:\(X_{G}=X_{G+T_{emb}+S_{emb}}=X_{G}+T_{emb}+S_{emb}\)
3: Transform the input features, \(X_{G}\)\(\rightarrow\)Fully-connected Layer
4:for\(i=1\) to N do
5:\(\overrightarrow{h}_{i}^{1}=X_{G}[i]\)
6: To be continued.