# Background-Filtering Feature-Enhanced Graph Neural Networks for Few-Shot Learning
## 3 Method
### Initialization of Figure in FEGNN (Feature-Enhanced GNN)  
The FEGNN used in the image classification stage is different from the ordinary GNN. It is divided into two stages: the feature-enhanced training stage and the main training stage, as shown in Figure 1b,c. The image initialization of the two different stages is now described. As seen in Figure 1b, this section explains the few-shot categorization classification network portion. Feature representations of all samples of a specified target task were extracted from BFCNN. Initially, two fully connected graphs are built. Each node in the graph represents the features of a single image sample generated during the feature extraction stage. One is the fully connected graph that was employed throughout the training stage of feature gap improvement. In this graph, only the segments that reinforce the concentration are nodes. The fully connected graph utilized for the primary training is the other. Parts of the inquiry set and the support set are represented as nodes in this network. Every node in the chosen set is a sample, and the similarity between any two connected nodes is indicated by the weight of each edge. Let \(G=(V;E;T)\) be a graph constructed with samples of tasks, where \(V:=\left\{V_{i}\right\}_{i=1,\ldots,|T|}\) and \(E:=\left\{E_{ij}\right\}_{i,j=1,\ldots,|T|}\) represent the node set and edge set of the graph, respectively. Let \(v_{i}\) be the node feature of \(V_{i}\), and \(e_{ij}\) be the edge feature of \(E_{ij}\). \(|T|=N\times K+Q\) is the total number of samples in the task, \(T\). Each similar label \(y_{ij}\) is defined by the initial single image label and indicate whether the two connected images belong to the same category. If \(x_{i}\) and \(x_{j}\) belong to the same category, that is, \(y_{i}=y_{j}\), then use \(y_{ij}=1\) to represent that they belong to the same category, otherwise use \(y_{ij}=0\) to represent that they belong to different categories:  
\[y_{ij}=\left\{ \begin{array}{ll}1,&if\ y_{i}=y_{j}\\ 0,&otherwise\end{array} \right. \tag{4}\]  
This gives us a relationship diagram showing whether or not all of the images are in the same category. The loss of the final image can be computed using this relationship diagram in order to optimize the model. Next, we define the graph that will participate in the training, where \(e_{ij}\) represents the edge between the sample \(v_{i}\) and the sample \(v_{j}\). The weight of the edge represents the similarity of the two feature vectors. The range of values is \([0,1]\), where \(0\) denotes two. One indicates that the two feature vectors are entirely identical and have a high probability of belonging to the same category; the other two samples are completely different and are unlikely to belong to the same group. Since \(0.5\) is the same distance from \(0\) and \(1\), we presume that it is an unknown value at the graph's initialization stage so that the model may change more easily. The initialization of the graph during the feature improvement training phase is the first:  
\[e_{ij}^{0}=\left\{ \begin{array}{ll}1,&if\ i=j\\ 0.5,&otherwise\end{array} \right. \tag{5}\]  
The edge weight of the first layer is represented by the number in the upper right corner of \(e_{ij}^{0}\). The original similarity, even for support set samples, is set to unknown since feature-reinforcement training necessitates further learning of the sample similarity between support set samples. It is recommended to set the feature similarity to \(1\) at first. Then comes the graph initialization for the main training phase:  
\[e^{0}_{ij}=\left\{ \begin{array}{ll}1,&\text{if }\text{y}_{ij}=1\text{ and }i,j\leq N \times k,\\ 0,&\text{if }\text{y}_{ij}=0\text{ and }i,j\leq N\times k,\\ 0.5,&otherwise\end{array} \right. \tag{6}\]  
The support set's data is provided at this point. Since we are aware of whether or not two images in the support set are identical, the real labels are used to determine the initial similarity between them.