# HiTIM: Hierarchical Task Information Mining for Few-Shot Action Recognition
## 3 Method
### HiTIM
#### 3.2.1 Inter-Task Learner  
The design principle of K\({}^{\text{inter}}\) is to highlight the differences between few-shot tasks and improve the generalization performance of the model. The feature representations of videos from different tasks may vary in both temporal and visual dimensions. However, most current networks have fixed parameters after training. Our motivation is to learn the differences between tasks and build task-related feature space. Thus, we designed \(\mathrm{K}^{\mathrm{inter}}\), which dynamically generates extraction network parameters.  
\(\mathrm{K}^{\mathrm{inter}}\) consists of three components: the task information extraction, noise injection, and fully connected layer, shown in Figure 2. Task feature extraction aims to encode the support-set features. To enhance the modeling capability, we introduce D3D, which exhibits a highly flexible receptive field and is more suitable for extracting task-specific features than 3D convolution. To improve robustness against interference, we inject random noise into task features, which makes the model less susceptible to small variations in input data and provides a degree of regularization to prevent overfitting. We employ Gaussian noise to introduce variability into the feature representation. The purpose of the fully connected layer is to generate parameters required by the feature extraction network. Furthermore, to decrease the degree of model redundancy and streamline the training process, \(\mathrm{K}^{\mathrm{inter}}\) generates a single layer of 3D convolution parameters, which are then shared across the three layers of 3D convolution within the task-related feature extraction. The computation is demonstrated as follows:  
The universal features through embedding of the support set \(F^{s}\) are input to the task feature extraction \(T\) to obtain task features \(TF\), which are then decomposed into expectation \(\mu\) and standard deviation \(\sigma\), as given by Equation (1). There are two reasons for only inputting the features of the support set into \(\mathrm{K}^{\mathrm{inter}}\). First, in few-shot learning tasks, there is only label information for the support-set videos; additionally, the category of the query set in practical scenarios is unknown and may not belong to the categories of the support set. Second, the number of videos in query sets is unknown, and adding query sets may limit the applicability of the method.  
\[\mu,\sigma=TF=T(F^{s}) \tag{1}\]  
Gaussian distribution based on \(\mu\) and \(\sigma\) is constructed, and the noise \(GN\) is injected into task features \(TF\), as follows:  
\[TF^{G}=TF+GN\Big{(}\mu,\text{diag}\Big{(}\sigma^{2}\Big{)}\Big{)} \tag{2}\]  
where \(GN\) represents the Gaussian function, and diag is the diagonal matrix construction function.  
Then \(TF^{G}\) is fed into fully connected layer \(f\) to generate the parameters \(P^{adaptive}\) of the task-related encoder as given by Equation (3).  
\[P^{adaptive}=f(TF^{G}) \tag{3}\]  
Figure 2: Architecture of \(\mathrm{K}^{\mathrm{inter}}\). \(\mathrm{K}^{\mathrm{inter}}\) can be mainly divided into three steps: task feature extraction, noise injection, and parameter generation. During task feature extraction, D3D with flexible receptive fields is used. Noise is injected into task features to enhance the robustness of \(\mathrm{K}^{\mathrm{inter}}\), and Gaussian noise is adopted here. Finally, adaptive parameters \(P^{adaptive}\) of the task-related encoder are generated through fully connected layers.