# AFGN: Adaptive Filtering Graph Neural Network for Few-Shot Learning
## 2 Materials and Methods  
### Related Background  
The goal of few-shot learning is to train models with a small number of labeled samples and achieve good generalization performance on unseen samples. Generally, these few-shot learning models can be divided into four types: generation-based methods, optimization-based methods, metric-based methods, and graph neural network-based methods. As we know, data in few-shot learning is scarce, and generation-based methods improve the generalization ability and performance of models by generating additional training samples to expand the original few-shot data set [7,8]. Data augmentation play an important role in few-shot learning, as they can effectively alleviate data scarcity and overfitting issues. However, generation-based methods can introduce various variations and noises, and complex data augmentation may increase computation costs and training time. There are two ways to implement optimization-based methods. One is to train a meta-learner to adjust the relevant parameters, for example, interpreting the update rule of stochastic gradient descent as a gated recursive model with trainable parameters in [9], which adapts the gradient update strategy for different classification tasks by training the meta-learner. The other way is related to learning prior knowledge, for example, as proposed in [10], after learning a good set of initial parameters for a task, only a small amount of gradient updates are needed to quickly adapt to new tasks. Optimization-based methods can adapt to different tasks and data distributions, but they have high computational costs and training complexity. When encountering tasks with significant distribution differences, the optimization strategy needs to be readjusted. Moreover, optimization methods are sensitive to hyperparameters and typically require fine-tuning. In few-shot learning, a commonly used approach is metric-based methods. These methods focus on learning an  
Figure 1: Given three images \(A\), \(B\), and \(C\), and the category of them is apple. \(h_{1}\), \(h_{2}\) and \(h_{3}\) represent the high\(-\)frequency features extracted from images \(A\), \(B\) and \(C\), while \(l_{1}\), \(l_{2}\) and \(l_{3}\) denote the low\(-\)frequency features extracted from images \(A\), \(B\) and \(C\). Assumption 1: Given the labels of \(A\) and \(B\), predict the label of \(C\). From the performance of low\(-\)frequency features, \(l_{3}\) shows significant differences from both \(l_{1}\) and \(l_{2}\), making it impossible to determine the label of \(C\) using low\(-\)frequency similarity. Conversely, comparing the high\(-\)frequency features of \(B\) and \(C\) in \(h_{23}\), it is found that \(h_{3}\) mostly overlaps with \(h_{2}\). Therefore, effectively utilizing high\(-\)frequency features significantly contributes to predicting the label of \(C\). Assumption 2: Given the labels of \(B\) and \(C\), predict the label of \(A\). Starting with high\(-\)frequency features, \(h_{1}\) is notably different from \(h_{2}\) and \(h_{3}\), making it impossible to determine the label of \(A\) based on high\(-\)frequency similarity. However, comparing the low\(-\)frequency features of \(A\) and \(B\) in \(l_{12}\), it is found that \(l_{1}\) and \(l_{2}\) almost overlap. Thus, predicting the label of \(A\) based on the similarity of low\(-\)frequency features is the same as that of \(B\) and \(C\). In conclusion, the high and low-frequency information in images significantly influences the prediction of labels in different scenarios. effective metric space for the model, where samples of the same class are closer together and samples of different classes are farther apart [11; 12]. In metric-based few-shot learning methods, there is a model FGFL that utilizes frequency components [9]. It generates frequency masks through discrete cosine transform, which guides network learning in the spatial domain by using masks. These metric-based models usually have a simple architecture and good generalization abilities.