[Paper Review] ATRM: Attention-based Task-level Relation Module for GNN-based Few-shot Learning.
This paper proposes ATRM, an attention-based task-level relation module that enhances GNN-based few-shot learning by modeling relations between samples through task-level context rather than direct sample-to-sample embeddings. By capturing sample-to-task relationships via learnable attention, ATRM improves few-shot classification accuracy across four benchmark datasets.
Recently, graph neural networks (GNNs) have shown powerful ability to handle few-shot classification problem, which aims at classifying unseen samples when trained with limited labeled samples per class. GNN-based few-shot learning architectures mostly replace traditional metric with a learnable GNN. In the GNN, the nodes are set as the samples embedding, and the relationship between two connected nodes can be obtained by a network, the input of which is the difference of their embedding features. We consider this method of measuring relation of samples only models the sample-to-sample relation, while neglects the specificity of different tasks. That is, this method of measuring relation does not take the task-level information into account. To this end, we propose a new relation measure method, namely the attention-based task-level relation module (ATRM), to explicitly model the task-level relation of one sample to all the others. The proposed module captures the relation representations between nodes by considering the sample-to-task instead of sample-to-sample embedding features. We conducted extensive experiments on four benchmark datasets: mini-ImageNet, tiered-ImageNet, CUB-200-2011, and CIFAR-FS. Experimental results demonstrate that the proposed module is effective for GNN-based few-shot learning.
Motivation & Objective
- To address the limitation of existing GNN-based few-shot learning methods that model only sample-to-sample relations, ignoring task-level context.
- To improve few-shot classification performance by explicitly incorporating task-level information into the relation modeling process.
- To develop a learnable module that captures relations between samples based on their relevance to the current task, rather than solely on embedding differences.
Proposed method
- The ATRM module replaces traditional sample-to-sample relation computation with a task-aware attention mechanism that models relations based on sample-to-task interactions.
- Input features for relation computation are derived from the difference in sample embeddings, but the attention mechanism attends over task-specific context vectors to weigh relations.
- The module computes attention scores between each sample and the task, using query, key, and value projections derived from the task embedding and sample features.
- The final relation representation is a weighted aggregation of sample features, where weights are determined by task-aware attention, enabling dynamic relation modeling per task.
- The ATRM is integrated into a GNN framework where nodes represent support set samples, and edges are updated via the task-aware relation module.
Experimental results
Research questions
- RQ1How does modeling task-level relations improve few-shot classification performance in GNN-based frameworks?
- RQ2Can an attention-based module effectively capture task-specific relations between samples beyond simple embedding differences?
- RQ3Does the proposed ATRM generalize across diverse few-shot learning benchmarks?
Key findings
- The ATRM module achieves state-of-the-art performance on mini-ImageNet, tiered-ImageNet, CUB-200-2011, and CIFAR-FS benchmarks.
- The method improves few-shot classification accuracy by explicitly modeling task-level context, outperforming standard GNNs that rely only on sample-to-sample relations.
- The ablation study confirms that the attention-based task-level relation modeling contributes significantly to performance gains.
- The proposed module demonstrates consistent improvement across all four benchmark datasets, indicating strong generalization ability.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.