Prompt-Based Zero- and Few-Shot Node Classification: A Multimodal Approach

Yuexin Li, Bryan HooiarXiv 2023 · DOI

Introduction: The Challenge of Limited Labels in GNNs

Standard Graph Neural Networks (GNNs) typically rely on precomputed features, such as Bag-of-Words (BoW), which often discard the rich semantic information present in raw text. This dependency becomes a significant bottleneck in zero-shot or few-shot scenarios where labeled data is scarce. While meta-learning has been proposed as a solution, its complexity and requirement for diverse "seen" classes make it difficult to implement in many real-world applications.

Comparison of the standard GNN pipeline versus the proposed TAG framework.

The TAG Framework: Bridging Text and Topology

To address these limitations, the authors introduce TAG (Text-And-Graph), a multimodal framework designed to classify nodes using raw text and graph structure directly. Unlike traditional methods, TAG leverages the internal knowledge of Pretrained Language Models (PLMs) to generate initial predictions, which are then refined using the graph's topology.

Zero-Shot Classification (TAG-Z)

The zero-shot component, TAG-Z, operates through Prior Logits Generation (PLG). It transforms node classification into a natural language "cloze" task. For instance, a node's text is prepended with a prompt like Topic: [MASK].. A PLM then predicts the most likely tokens for the mask. These predictions are smoothed across the graph via propagation, allowing nodes to benefit from the semantic context of their neighbors.

Few-Shot Learning (TAG-F)

When a small number of labels are available, TAG-F employs Prior Logits Calibration (PLC). A lightweight MLP is trained on these few examples to adjust the zero-shot "prior" logits. To prevent overfitting—a common pitfall in few-shot learning—TAG uses a shrinkage ensemble technique. This method pulls the learned parameters toward the strong zero-shot prior, ensuring the model generalizes well from minimal data.

TAG replaces the complex meta-learning process with a simpler PLM-based prior knowledge injection.

Key Insights and Results

The TAG framework demonstrates that raw text is a "goldmine" for graph tasks. By using prompts, the model taps into the common-sense reasoning of large-scale PLMs.

  • Performance Gains: On the ogbn-arxiv dataset, TAG-Z achieved 35.86% accuracy in a zero-shot setting, significantly outperforming text-only baselines. In 2-shot settings, TAG-F surpassed strong GNN baselines by over 25% on ogbn-arxiv and 18% on ogbn-products.
  • Synergy: The integration of text and graph structure is synergistic; graph propagation on top of PLM-derived logits yields much higher accuracy than either modality alone.
  • Simplicity: By avoiding the "seen/unseen" class splits required by meta-learning, TAG offers a more practical and user-friendly approach for practitioners.

Conclusion

TAG represents a shift toward multimodal graph learning that prioritizes raw semantic data. While inference costs for large graphs remain a consideration, the framework's ability to perform robustly with zero or few labels opens new doors for applying GNNs to data-sparse domains. Future work may extend this prompt-based approach to link prediction and whole-graph classification.

Reference: Yuexin Li and Bryan Hooi.

  1. Prompt-Based Zero- and Few-Shot Node Classification: A Multimodal Approach. In Proceedings of ACM Conference (Conference’17).

Summary updated

BibTeX
@misc{li2023prompt,
  author = {Yuexin Li and Bryan Hooi},
  title = {{Prompt-Based Zero- and Few-Shot Node Classification: A Multimodal Approach}},
  year = {2023},
  eprint = {2307.11572},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.11572},
}
Figure