# AFGN: Adaptive Filtering Graph Neural Network for Few-Shot Learning
## 2 Materials and Methods
### The Proposed Method
#### 2.2.4 Graph Convolution of AFGN
Moreover, When \(\lambda_{n}\) is high-frequency, its corresponding frequency component is the high-frequency component, which represents the part where the graph signal changes dramatically. Here, these \(\{p(\lambda_{i})_{i=1}^{n}\}\) are referred to as coefficients of frequency components, and different filters \(g_{(\theta)}\) can be constructed by adjusting these coefficients. In Formula (11), setting \(\mathcal{P}(\Lambda)=diag[\lambda_{1},\lambda_{1},...\lambda_{n}]\) and \(\beta=\alpha_{0}=-\alpha_{1}\), we can obtain:  
\[ \begin{split} x*_{G}g&=\beta[\mathbb{I}-(u_{1} \lambda_{1}u_{1}^{T}+u_{2}\lambda_{2}u_{2}^{T}+....u_{n}\lambda_{n}u_{n}^{T})]x \\ &=\beta(\mathbb{I}-L)x,\end{split}  \tag{12}\]  
by adding an activation function \(\sigma\), Formula (12) is equivalent to Formula (7). Therefore, as we mentioned earlier, the essence of graph convolution is filtering of graph signals, and GCN is a special form of Spectral CNN. In Formula (12), the coefficient of the frequency component \(p(\lambda_{i})_{stat}=\lambda_{i}\), which indicates that the filter does not enhance either the high frequency component or the low frequency component. Thus, we refer to the filter of GCN in the frequency domain as a stationary filter. In [18], ChebyNet constructs a high-pass filter by suppressing the coefficients of low-frequency components and enhancing the coefficients of high-frequency components. The coefficient of the frequency component \(p(\lambda_{i})_{high}=\alpha_{1}\lambda_{i}+\alpha_{2}\lambda_{i}^{2}+...+ \alpha_{k-1}\lambda_{i}^{k-1}\). Furthermore, in [6], HDGN constructs a low-pass filter by suppressing the coefficients of high-frequency components and enhancing the coefficients of low-frequency components. The coefficient of the frequency component \(p(\lambda_{i})_{low}=e^{-s\lambda_{i}}\), where \(s\) is a scalable parameter. However, the aforementioned models are not flexible enough, they cannot preserve the parts of signals that are necessary for different tasks. In order to flexibly handle a wide variety of episodic tasks in few-shot learning, we design a dynamically changing frequency component coefficient \(p(\lambda_{i})_{adapt}\) to construct an adaptive filter. Specifically, these numerous episodic tasks can generate different graphs, and we hope that this filter can adaptively adjust \(\mathcal{P}(\Lambda)=\mathcal{V}\Lambda\) based on graph signals of different graphs, where \(\mathcal{V}=diag[v_{1},v_{2},...v_{n}]\). Therefore, we construct a Multi-Layer Perceptron (MLP) with parameter \(\eta\) to learn \(V\). The node features \(F\) of graph \(G\) serve as the input of the MLP, which consists of three layers. The activation functions of the first two layers are set to ReLU, and to ensure the results of the final output layer are positive, we set the activation function of the last layer to Softplus. Thus, feeding \(F\) into the MLP, we can obtain the dynamically adjustable vector \(V=[v_{1},v_{2},...v_{n}]\in\mathbb{R}^{n}\). By substituting \(\mathcal{P}(\Lambda)=\mathcal{V}\Lambda\) into Formula (11) and setting \(\beta=\alpha_{0}=-\alpha_{1}\), we can obtain:  
\[ \begin{split} x*_{G}g&=\beta[\mathbb{I}-(v_{1} \lambda_{1}u_{1}u_{1}^{T}+v_{2}\lambda_{2}u_{2}u_{2}^{T}+....v_{n}\lambda_{n}u_ {n}u_{n}^{T})]x\\ &=\beta(\mathbb{I}-L_{\mathcal{V}})x,\end{split}  \tag{13}\]  
the multi-layer graph convolution in AFGN is denoted as:  
\[F^{(l+1)}=\sigma[(\mathbb{I}-L_{\mathcal{V}}^{(l)})F^{(l)}W^{(l)}]. \tag{14}\]  
In the aggregation update of nodes at each layer of the graph network, in addition to updating node features \(F^{(l)}\) based on \(F^{(l-1)}\), AFGN also needs to utilize the measurement methods in BDM and \(F^{(l)}\) to update the edge features \(A^{(l)}\) of the graph. In the final layer of the graph network, taking the submatrix \(\bar{H}\in\mathbb{R}^{q\times(M\times k)}\) of \(A^{(l)}\), which is composed of the edge features between the nodes in the query set \(Q\) and support set \(S\).