# Reconstructed Prototype Network Combined with CDC-TAGCN for Few-Shot Action Recognition
## 3 Method
### Spatiotemporal Encoder and CDC-TAGCN  
This section will focus exclusively on the spatiotemporal encoder of this study. The study introduces DCD-TAGCN to enhance the encoder's ability to capture richer features from spatiotemporal sequences. **ST-GCN**[26]: The spatiotemporal encoder is a multi-step convolutional network. Due to the unique topological structure of skeleton sequences, traditional CNNs and RNNs make it difficult to encode skeleton features effectively. Therefore, [PERSON] et al. [26] introduced a spatiotemporal encoder that divided the convolution into two steps: CGN and TCN. In the GCN step, most research divides the joints into centrifugal, source, and centripetal joints based on biomechanics. At this point, the adjacency matrix A can be decomposed into the centrifugal matrix \(A_{1}=\left\{a^{1}{}_{ij}^{\cdot}\right\}\in R^{N\times N}\), the source matrix \(A_{2}=\left\{a^{2}{}_{ij}^{\cdot}\right\}\in R^{N\times N}\), and the centripetal matrix \(A_{3}=\left\{a^{3}{}_{ij}^{\cdot}\right\}\in R^{N\times N}\). Figure 4: This figure takes a 5-way 5-shot task as an example to show the process of the prototype network in the training phase. The content of the encoder will be introduced in detail in the next section. Figure 3: The visualization illustrates the effect of \(L_{RC}\), as observed from the results on the right. \(L_{RC}\) enhances the dispersion between classes while bringing samples of the same class closer together. After partitioning the adjacency matrix \(A\) using spatial strategies, the convolution Formula (12) for GCN is computed as follows:  
\[f_{gen}=\sum\limits_{j}^{n}D^{-\frac{1}{2}}A_{j}D^{-\frac{1}{2}}\Omega W_{j}^{g} \tag{12}\]  
\(D\) is the degree matrix of \(A\), and \(W_{j}^{g}\) are the coefficients of the convolutional kernels in GCN, where the kernel size is \(1\times 1\). GCN attempts to use three \(1\times 1\) convolutions to find the relationships between centrifugal, source, and centripetal joints. TCN is used to capture temporal features, and the computation process is as shown in Formula (12). TCN uses a \(T\times 1\) convolutional kernel. \[f_{out}=\sum\limits_{t}^{T}f_{gen}w^{t} \tag{13}\]  
**DCD-TAGCN:** In this study, the encoder primarily focuses on improving TCN. For the GCN part, considering that \(A\) alone may not enable the model to capture rich skeletal topological relationships, this paper employs the spatial convolution approach of AGCN [26]. \[f_{gen}=\sum\limits_{j}^{n}D^{-\frac{1}{2}}\big{(}A_{j}+M_{j}+J_{k}\big{)}D^{- \frac{1}{2}}\Omega W_{j}^{g} \tag{14}\]  
\(A\in R^{n\times n}\) is a static matrix recording the original skeleton topological relationship. \(M\in R^{n\times n}\) is a learnable matrix that is continuously updated with iteration. \(J\in R^{n\times n}\) uses two Gaussian convolution kernels (\(1\times 1\) conv) to find the similarity between the joints of each sample and then saves the values in \(J\). Both \(M\) and \(J\) are matrices obtained through learning. The difference is that \(J\) varies with the characteristics of the sample, while \(M\) focuses on the characteristics of the overall dataset. This study argues that for skeleton sequences, the TCN convolution operator may not fully capture the temporal characteristics of the skeleton. The convolution Formula (13) can be expressed in full as: \(f_{out}=\sum_{p_{n}\in R}w^{t}(p_{n})\cdot\big{(}f_{gen}(p_{0}+p_{n})\big{)}\). It indicates that the convolution kernel multiplies point-wise according to the position in the current convolution window. \(R\) represents the range of the convolution kernel, which is \(T\times 1\) in size. \(p_{n}\) represents the coefficient position in the convolution window, \(p_{0}\) is the current convolution central point, and \((p_{0}+p_{n})\) represents the position within the current convolution window. With each slide of the convolution window, it calculates the features within a specific time interval. However, there is additional information in the sequences that can be used to assist in recognizing action classes.