## 3 The Proposed SSP-AA Model
### Adaptive Attention Mechanism
Accordingly, the attention to the output features is as follows:  
\[\mathbf{e}_{ij}^{l+1}=\left(W^{l+1}h_{i}^{l}\right)^{T}\cdot W^{l+1}h_{j}^{l} \tag{2}\]  
(2) Normalization of the attention weight  
Normalization of the original attention scores into attention weights involves applying the _softmax_ function across all neighboring nodes of a given node \(i\). The formulation for this normalization process is as follows:  
\[\alpha_{ij}=softmax_{j}(e_{ij}^{l})=\frac{\exp(e_{ij}^{l})}{\sum\limits_{k\in N _{i}}\exp(e_{ik}^{l})} \tag{3}\]  
where \(\alpha_{ij}\) denotes the normalized attention weight between nodes \(i\) and \(j\), \(N_{i}\) represents the set of neighboring nodes of node \(i\), and \(e_{ij}^{l}\) and \(e_{ik}^{l}\) are the original attention scores between node \(i\) and its neighboring nodes \(j\) and \(k\), respectively. The process of weight normalization is shown in Figure 2.  
This ensures the sum of the attention weights for all neighboring nodes of node \(i\) equals 1 to make the model better balance the importance of different nodes when aggregating neighboring node information. By dynamically adjusting attention weights to capture relationships between nodes, the normalized attention weights also contribute to the  
Figure 2: Weight normalization. stability of the training process. The formula for calculating the adaptive attention weights of the model is as follows:  
\[\alpha_{ij}=\frac{\exp(LeakyReLU(\alpha^{T}[W^{l}h_{i}^{l}\parallel W^{l}h_{j}^{l }]+b_{ij}))}{\sum\limits_{k\in N_{i}}\exp(LeakyReLU(\alpha^{T}[W^{l}h_{i}^{l} \parallel W^{l}h_{k}^{l}]+b_{ik}))} \tag{4}\]  
(3) Aggregating Neighbor Node Information  
The normalized attention weight \(\alpha_{ij}\) is used to weigh the information of neighboring node \(j\), and this information is then aggregated into the target node \(i\). This process updates the representation of node \(i\) in the subsequent layer \(l\). The aggregation representation formula is as follows:  
\[h_{i}^{l+1}=\sigma(\sum\limits_{j\in N_{i}}\alpha_{ij}(W^{l}h_{j}^{l})) \tag{5}\]  
\(h_{i}^{l+1}\) is the representation of node \(i\)'s features in the \(l+1\) layer. To stabilize the model's learning process, it is beneficial to extend the attention mechanism to use multi-head attention. Specifically, \(K\)-independent attention mechanisms are used to transform the above formula, and their features are concatenated using the operator \(\parallel\). Concatenation preserves the output information of multiple heads \(K\), enabling the model to understand the input information from different perspectives. Each head may focus on different parts of the input, so concatenating the output of these heads can result in a more comprehensive representation. Moreover, the concatenation operation does not change the independence of each head's output, thus avoiding information confusion between different heads. The representation of node \(i\)'s features in the \(l+1\) layer is as follows:  
\[h_{i}^{l+1}=\mathop{\parallel}\limits_{k=1}^{K}\sigma(\sum\limits_{j\in N_{i} }\alpha_{ij}^{k}W^{l^{k}}h_{j}^{l}) \tag{6}\]  
In this formula, \(\parallel\) denotes concatenation, \(\sigma\) represents a non-linear activation function, \(\alpha_{ij}^{k}\) is the normalized attention coefficient of the \(K\)th attention mechanism, and \(W^{l^{k}}\) corresponds to the weight matrix of the respective linear transformation of the input. (4) Integrate the attention mechanism into the SSP-AA model  
Through the aforementioned steps, the attention mechanism can be effectively integrated into the SSP-AA model, enabling it to adaptively assign weights to each neighboring node and efficiently aggregate neighbor node information to generate representations of the target node. Furthermore, to further improve model performance, a multi-head attention mechanism is adopted, enabling the model to capture various relationships between neighboring nodes.