Fig 1.
Comparison between traditional GNN and the IGNN proposed in this paper.
The IGNN adds an improved attention module and a pre-message-passing mechanism on top of the traditional GNN. The grey circles represent query set sample nodes, while the circles in other colors represent support set sample nodes.
Fig 2.
and
represent feature embedding functions. Gray circles represent query set sample nodes, while nodes in other colors represent support set sample nodes. The model first extracts image features from the support set and the query set using the feature embedding functions, and these features are then constructed as nodes in a graph. Next, through the pre-message-passing mechanism, the features of the support set and query set images are associated, and the feature representations of each node are updated. Finally, with the help of the message-passing mechanism, the labels of the query set are predicted, and the predicted labels are compared with the true labels to compute the loss value. The images in this figure are similar to but not identical to the original ones and are therefore for illustrative purposes only.
Fig 3.
and
respectively represent the ECA attention module and the self-attention module. In the process of extracting image features, four 3 × 3 convolutional layers are used, and modules
and
are integrated sequentially after each layer. The images in this figure are similar to but not identical to the original ones and are therefore for illustrative purposes only.
Table 1.
Pre-message-passing process: Initially, the extracted support set features and query set features
are used to compute the cosine similarity between the query set and the support set, as well as the similarity among samples within the support set. Then, based on the computed similarities, the features of the support set and query set samples are updated. Subsequently, the updated features are input into GRU for
iterations, resulting in
and
. Finally, the embeddings
and
for the support set and query set samples are obtained.
Fig 4.
Pre-message-passing mechanism.
represents the pre-message-passing within the support set, while
represents the message-passing between the support set and the query set. Gray circles represent query set sample nodes, and nodes in other colors represent support set sample nodes.
Table 2.
Hyperparameter of the model built in our experiments.
Table 3.
Identification accuracy of various models on the Omniglot dataset.
Table 4.
Identification accuracy of various models on the MiniImageNet dataset.
Table 5.
Identification accuracy of various models on the CUB-200-2011 dataset.
Fig 5.
Visualization of node features on the MiniImageNet dataset.
The figure represents 5 different classes, with distinct colors corresponding to different classes. Circles represent the support set, and triangles represent the query set. (a) The distribution of different classes before classification; (b) The distribution after classification by GNN; (c) The distribution after classification by IGNN. Compared to GNN, the distribution of nodes with the same color in the support set and query set is more compact in IGNN, indicating better classification performance.
Table 6.
Comparison of the effects of the ECA module and the improved attention module.
Fig 6.
The impact of varying the number of pre-message-passing steps on model performance across the MiniImageNet dataset.
Fig 7.
The impact of varying the number of pre-message-passing steps on model performance across the Omniglot dataset.
Fig 8.
The impact of varying the number of pre-message-passing steps on model performance across the CUB-200-2011 dataset.
Table 7.
The impact of the improved attention module and pre-message-passing mechanism on the baseline model.
Table 8.
Inference time and memory usage of various models on the MiniImageNet dataset (5-way-1-shot).