# Background-Filtering Feature-Enhanced Graph Neural Networks for Few-Shot Learning
## 3 Method
### Edge Update Module  
After completing the point update, we continue to update the edge weights. We traverse each edge. First, we need to find the feature gap between each adjacent feature, which is represented by the absolute value of the feature difference. After obtaining the preliminary feature gap, we need to send the gap to the feature-enhanced module to strengthen and reduce the dimensionality of the features. Then, the enhanced feature gap is aggregated with the current edge information, and finally the aggregated information is sent to the fine-tuning network to obtain new edge weights; the formula is as follows:  
\[v^{l}_{ij}=abs(v^{l}_{i}-v^{l}_{j}) \tag{9}\]  
\[\tilde{e}^{l}_{ij}=\frac{f^{l}_{strength}(v^{l}_{ij};\theta^{l}_{strength}) e^{l-1}_{ij}}{\underset{k}{\sum}f^{l}_{strength}(v^{l}_{ik};\theta^{l}_{strength})} \tag{10}\]  
\[e^{l}_{ij}=f^{l}_{edge}(e^{l-1}_{ij}+\tilde{e}^{l}_{ij};\theta^{l}_{edge}) \tag{11}\]  
The result's absolute value is indicated by the symbol \(abs(.)\). \(f^{l}_{strength}(.;.)\) is the similarity-enhanced network of the \(l\)-th layer and \(\theta^{l}_{edge}\) is the parameter of the similarity-enhanced network. \(f^{l}_{edge}(.;.)\) is the edge-updating network of the \(l\)-th layer and \(\theta^{l}_{edge}\) is the parameter of the edge-updating network. The structure is shown in Figure 3 (lowerleft). The feature-enhanced training phase and the main training phase use the same edge update method.  
The feature-enhanced module, or \(f^{l}_{strength}(\cdot,\cdot)\), is a crucial component of the edge update module. To aid the model in more accurately analyzing the sample's properties, this module has the ability to bolster the initial feature gap. Nevertheless, we discovered that the model could not converge at a perfect location when this module was used alone, which slowed down the rate of model training. As a result, the feature-enhanced training phase is presented, which primarily supports the feature-enhanced module. The ensuing phases will clarify another advantage of implementing this level. Figure 4 illustrates the primary network architecture used in the edge update process of the model.  
Figure 3: Modular architectural diagram updated under the 2-way–1-shot setting. Nodes of the same color belong to the same class, with red and blue nodes originating from the support set, whose classes are known, and green nodes from the query set, whose classes are unknown. In the constructed connection graph, each pair of nodes is connected by an edge, with the value on the edge representing the similarity between the two images, depicted as a grayscale square; the darker the color, the higher the similarity. The grayscale circle represents the difference between the corresponding image feature vectors. Please note that this grayscale circle is also a feature vector, not a single value. The update module consists of two submodules: the point update module (**a**) and the edge update module (**b**). In the update module, the graph is updated by edges after being updated by points, thus accomplishing a full graph update. Depending on the network’s depth, these updates need to be completed a total of L times. The three dashed lines in the figure serve as auxiliary lines for phase or data division.