As is introduced in Section REF , graph diffusion provides a global view for the structural role of each node. With the edge connectivity vector \(\mathbf {s}_{e_{tgt}}\)  computed by Eq. (REF ), it is easy to acquired the strength of connectivity between the target edge and contextual node. Such property inspires us to design a spatial encoding that bases on graph diffusion. To prevent the indistinguishable encoding caused by similar diffusion values, we do not adopt the raw diffusion values directly but use a rank-based encoding. Specifically, for each node in a single-timestamp substructure node set \(v_j^i \in \mathcal {S}^i(e^t_{tgt})\) , we sort nodes according to their diffusion values and adopt the ranking as the data source. According to the ranks, we compute the diffusion-based spatial encoding with a learnable encoding function (a single-layer linear mapping), which is similar to the learned positional encoding in [1]}, [2]}. The definition of the diffusion-based spatial encoding is given as
\(\mathbf {x}_{diff}(v_j^i)= linear(rank(\mathbf {s}^i_{e_{tgt}}[idx(v_j^i)])) \in \mathbb {R}^{d_{enc}},\) 
