Abstract
Node classification is a fundamental task in graph mining, yet standard Graph Neural Networks (GNNs) often fail when labels are scarce. While meta-learning offers a potential solution, it is frequently hampered by "task variance"—the discrepancy between the distributions of training and testing tasks. This paper introduces TENT (Task-adaptivE few-shot Node classificaTion), a framework designed to bridge this generalization gap through a hierarchical adaptation strategy. By performing adaptation at the node, class, and task levels, TENT effectively generalizes from data-rich base classes to data-poor novel classes, achieving state-of-the-art performance across multiple graph benchmarks.
1. Introduction
Predicting the category of a node within a network is essential for applications ranging from protein function prediction to social network analysis. However, real-world graphs typically exhibit a "long-tail" distribution where a small number of categories possess abundant labels, while the vast majority are associated with only a few examples.
Existing few-shot learning methods for graphs often struggle with the inherent variance between tasks. A model trained on one set of classes (meta-training) may fail on a new set (meta-test) because local connectivity patterns (node-level variance) and overall class distributions (class-level variance) differ significantly. Most current methods treat every task as if it were sampled from the same distribution, leading to a substantial generalization gap. TENT addresses this by explicitly modeling and adapting to these variances.
2. The TENT Framework
The TENT framework tackles task variance through a three-level hierarchical adaptation process:
2.1 Node-level Adaptation
To mitigate the impact of noisy or erratic local connectivity, TENT constructs "class-ego subgraphs." It introduces a virtual class node that serves as a structural anchor, connecting all support nodes of a specific class and their immediate neighbors. This mechanism smooths the local structure and allows the model to learn more stable "centroid" representations for each class, rather than relying on potentially anomalous individual node embeddings.
2.2 Class-level Adaptation
Recognizing that different classes may require different feature transformations, TENT employs class-specific adapters. Using Feature-wise Linear Modulation (FiLM), the model dynamically adjusts the GNN weights for each specific category. This allows the framework to leverage discriminative information unique to a class, ensuring that the feature extraction process is tailored to the specific characteristics of the data at hand.
2.3 Task-level Adaptation
In the final classification stage, TENT moves beyond static distance metrics. It utilizes a task-adaptive matching strategy designed to maximize the mutual information between query nodes (the targets for classification) and support nodes (the references). By framing classification as an information-theoretic matching problem, the model becomes more robust to the scattered nature of embeddings in few-shot scenarios.
3. Experimental Evaluation
3.1 Datasets and Setup
The researchers evaluated TENT on four diverse real-world graph benchmarks:
- Amazon-E: An electronics product network where edges represent "also viewed" relationships.
- DBLP: A citation network where nodes are papers and edges represent citations.
- Cora-full: A large-scale version of the classic citation dataset.
- OGBN-arxiv: A massive directed citation network from the Open Graph Benchmark.
The experiments followed a "base/novel" split, where the model was trained on classes with abundant labels and tested on entirely different classes with only 3 or 5 labeled examples per class (3-shot and 5-shot settings).
3.2 Performance and Results
TENT consistently outperformed state-of-the-art baselines, including MAML, G-Meta, and GPN, across all datasets and settings:
- Accuracy Gains: On the DBLP dataset (5-way 5-shot), TENT achieved an accuracy of 82.84%, a significant improvement over the 80.85% achieved by the previous best-performing model (GPN).
- Resilience to Complexity: As the complexity of the tasks increased (e.g., moving from 5-way to 10-way classification), the performance of standard models typically plummeted. TENT maintained significantly higher accuracy, demonstrating that its adaptation modules are particularly effective at handling complex class distributions.
- Ablation Studies: Systematic removal of the node, class, or task adaptation modules resulted in a measurable drop in performance, confirming that all three levels of the hierarchy are essential for effective generalization.
4. Conclusion and Future Work
TENT demonstrates that task variance in few-shot graph learning is a multi-level problem requiring a multi-level solution. By integrating structural anchors, parameter modulation, and information-theoretic matching, the framework successfully bridges the gap between training and inference tasks.
Future research directions include extending TENT to inductive settings, where the model must classify nodes on entirely unseen graphs, and exploring more sophisticated adaptation modules to handle the extreme heterogeneity found in multi-relational or dynamic graphs.
Summary updated