# A Lightweight Graph Neural Network Algorithm for Action Recognition Based on Self-Distillation
## 3 Algorithm
### ST-GCN Compression Based on Self-Distillation  
#### 3.3.1 ST-GCN Blocks  
Actions are usually demonstrated by videos. The input skeleton graphs extracted from videos consist of both spatial and temporal information. ST-GCN is proposed to handle this information, with spatial graph convolution extracting along the human skeleton graph topology, and traditional convolution processing along the temporal dimension.  
The spatial graph convolution is similar to the traditional convolution on images, because it updates the features of each node. For each pixel of an image, traditional convolution convolves its \(k\)-nearest pixels on the image grid, while spatial graph convolution defines the \(k\)-nearest neighbors along the graph topology. Specifically, the spatial graph convolution \(Conv_{s}\) is defined as [1]  
\[Conv_{s} = \boldsymbol{\Lambda}^{-\frac{1}{2}}\boldsymbol{\tilde{A}} \boldsymbol{\Lambda}^{-\frac{1}{2}}\boldsymbol{X}\boldsymbol{W}, \tag{3}\] \[\boldsymbol{\tilde{A}} = \sum_{k=1}^{3}\mathbf{A}_{k},\] (4) \[\boldsymbol{\Lambda}_{ii} = \sum_{k=1}^{3}\sum_{j}\mathbf{A}_{k,ij} \tag{5}\]  
where \(\boldsymbol{X}\) is the input features, \(\boldsymbol{W}\) is the matrix of trainable weights and \(\boldsymbol{\Lambda}\) is the Laplacian matrix for renormalizing the new adjacency matrix \(\boldsymbol{\tilde{A}}\). Concretely, \(\mathbf{A}_{1}=\mathbf{I}\) is the identity matrix that represents the nodes themselves and \(\mathbf{A}_{2},\mathbf{A}_{3}\) are the adjacency matrices redefined by spatial partitioning. Specifically, \(\mathbf{A}_{2}\) records the centripetal joints and root joints and \(\mathbf{A}_{3}\) records the centrifugal joints. Examples of \(\mathbf{A}_{2},\mathbf{A}_{3}\) are shown in Figure 2. Spatial partitioning classifies joints and their \(k\)-neighbors into three groups with the allowance of applying different weights. The three groups are the node itself, the centrifugal group and the centripetal group (Figure 3).  
The idea of spatial partitioning comes from [1]. The centripetal joints usually relate to different movements compared with the centrifugal joints, e.g., for the shoulder joint, its centripetal node (the neck) has smaller movements compared with the centrifugal joint (the elbow) while running.  
The spatial graph convolution and convolution along the temporal dimension together build an ST-GCN unit, combining the process of spatial and temporal information together. The proposed ST-GCN in [1] has 9 units, and therefore 18 convolutional layers. Taking the input preprocess layer and the fully connected layer into consideration, it has 20 layers in total. Here they are divided into three blocks. Each block is marked as \(\{f_{h}^{b_{i}};i=1,2,3\}\). The division of blocks is shown in Figure 4. By removing some units from each block, ST-GCN in 12 layers and ST-GCN in 8 layers (Figure 4b,c) are also built, denoted as ST-GCN 12 and ST-GCN 8 separately.  
Figure 2: The normalized adjacency matrices after spatial partition. Each row or column represents one pair of nodes. The centripetal matrix records the root nodes and their centripetal nodes, while the centrifugal matrix only records the centrifugal joints.