# LSTGINet: Local Attention Spatio-Temporal Graph Inference Network for Age Prediction
## 3 Proposed Framework of LSTGINet
### Graph Inference Module with Local Attention Embedding (LAGIM)  
This module mainly comprises the local attention [34] embedding module (LAM) and the graph inference module (GIM). The LAM can not only fully use global timing information but can also minimize the impact on the representation of local spatial details. That is to say, when a particular branch feature is insufficiently represented, LAM can effectively prevent other features from being interfered with by it and retain the detailed information of other branch features to the maximum extent. At the same time, unlike the simple feature splicing and fusion strategy, we designed a feature fusion strategy to complement each other among different branch features, make up for the shortcomings of a single feature representation, and alleviate the difference in the distribution of temporal features and spatial features. GIM aims to further enable the interaction between different branch features through graph node transfer and aggregation capabilities and fully capture the hidden correlation between brain information and age. The steps are as follows:  
Step 4. High-level local spatial features have efficient discriminative capabilities and large receptive fields but need global context details and rich underlying information. The temporal features are rich in low-level semantics and global context details and are suitable for long-term age prediction. Therefore, we embed temporal features with global contextual details into high-level local spatial features to form a complementary relationship. At the same time, each feature is independent of the others and is not affected by additional information. It is worth noting that to reduce model complexity and alleviate information loss caused by increasing the number of model layers, we introduce a residual strategy in the local attention embedding module. The output feature \(\mathcal{F}^{\prime}\) of LAM is shown in Equation (8). \[ \begin{cases}\mathcal{F}^{\prime}=\mathcal{F}_{a}+\mathcal{F}_{a}\cdot\phi( \mathcal{F}_{a},\mathcal{F}_{b})\in\mathbb{R}^{\mathbb{C}\times H\times W}\\ \phi(\mathcal{F}_{a},\mathcal{F}_{b})=\mathcal{F}_{b}\oplus(\mathcal{F}_{b} \otimes\sigma^{*}(FC(Up(Conv_{1\times 1}(\mathcal{H}^{Pw}(\mathcal{F}_{a})))))) \end{cases}  \tag{8}\]  
where \(\oplus\) represents the addition of different features. \(\otimes\) indicates the matrix multiplication. \(FC(\cdot)\) indicates the fully connected operation. \(Up(\cdot)\) indicates the upsample operation. \(Conv_{1\times 1}(\cdot)\) indicates the \(1\times 1\) convolution operation. \(\mathcal{H}^{Pw}(\cdot)\) indicates the patchwise average pooling operation. Step 5. In the graph inference module (GIM), we reconstruct the aggregated spatio-temporal features \(\mathcal{F}^{\prime}\in\mathbb{R}^{\mathbb{C}\times N\times N}\) twice to obtain the feature map \(\mathbb{F}_{a}\in\mathbb{R}^{\mathbb{C}\times NN}\) and \(\mathbb{F}_{b}\in\mathbb{R}^{NN\times\mathbb{C}}\) and build a sizeable topological graph \(\mathcal{G}=(\mathcal{V},\mathcal{E})\) with \(\mathcal{N}\times\mathcal{N}\) relationships, where \(\mathcal{V}=\{\mathcal{V}_{1},\cdots,\mathcal{V}_{\mathcal{N}}\}\) indicates the set of nodes, \(\mathcal{E}=\{\mathcal{E}_{1},\cdots,and\mathcal{E}_{\mathcal{N}}\}\) indicates the set of edges. Secondly, the transfer and aggregation functions between the inference nodes in the topological graph are used to fully obtain the dynamic association relationship \(\mathcal{A}\) between them and the feature representation \(\mathcal{F}_{\mathcal{G}}\) of each inference node. \(\mathcal{F}_{\mathcal{G}}\) is shown in Equation (9). \[\mathcal{F}_{\mathcal{G}}=\sigma^{*}(\widetilde{D}^{-\frac{1}{2}}(\mathcal{A} +\mathcal{I})\widetilde{D}^{-\frac{1}{2}}\cdot\mathcal{F}^{\prime}\cdot \mathcal{W}) \tag{9}\]  
where \(\mathcal{I}\) stands for the identity matrix. \(D\) represents the degree matrix [35], and \(D_{ij}=\sum_{j}A_{ij}\). \(\mathcal{W}\) represents the weight matrix. \(\sigma^{*}(\cdot)\) represents the activation function of \(LeakyReLu\).