Graph-structured data is everywhere. From social networks connecting billions of users to intricate molecular structures and vast knowledge graphs, our world is built on relationships. Graph Neural Networks (GNNs) have become the go-to tool for learning from this data, powering everything from recommendation engines to drug discovery.

But these powerful models have an insatiable appetite — they thrive on data, particularly labeled data. They achieve state-of-the-art performance only when fed a mountain of labeled examples. What happens when those labels are scarce? What if you’re dealing with an emerging category, a rare disease, or a brand-new user on your platform?

In these situations, performance plummets. This challenge, known as data scarcity, is a major obstacle to applying graph machine learning in the real world. A recent comprehensive survey, A Survey of Few-Shot Learning on Graphs: from Meta-Learning to Pre-Training and Prompt Learning, unpacks how researchers are overcoming this limitation through a rapidly developing field: Few-Shot Learning on Graphs.

This article walks you through that survey — explaining the problems, the key approaches, and the breakthroughs that enable machines to learn effectively from just a handful of examples.


The Two Faces of Data Scarcity on Graphs

The survey identifies two primary types of scarcity on graphs: label scarcity and structure scarcity—as illustrated below.

Different types and applications of few-shot learning problems on graphs: (a) label scarcity, (b) structure scarcity, and (c–e) applications like social networks, recommender systems, and molecular prediction.

Figure 1: Overview of few-shot learning challenges on graphs, showing label scarcity, structural sparsity, and applications.

  1. Label Scarcity: The classic few-shot problem. Acquiring labels can be costly or impossible — think classifying proteins when only a few have verified properties, or detecting new fraudulent behaviors in a social network. You have raw data, but few labeled examples.

  2. Structure Scarcity: Unique to graphs. GNNs depend on rich connectivity for message passing between nodes. But in many graphs, most nodes have few connections (the “tail” nodes in a long-tailed distribution). Or, in cold-start scenarios, new nodes have none. Without enough nearby information, the model struggles to learn meaningful representations.

To tackle these, researchers have evolved three broad paradigms — Meta-Learning, Pre-Training, and emerging Hybrid approaches that combine both.

Three main paradigms of few-shot learning on graphs: meta-learning, pre-training, and hybrid approaches.

Figure 2: The primary technical paradigms enabling few-shot learning on graphs.


A Quick Refresher: How GNNs Learn

Before diving into solutions, let’s recall how GNNs operate. Their goal is to learn representations (embeddings) for nodes, edges, or entire graphs — compact vectors that encode both local features and global graph structure.

Formally, a graph encoder \( f_g \) maps a node \( v \) to its representation \( \mathbf{h}_v \):

\[ \mathbf{h}_v = f_g(v, G; \theta_g) \]

Modern GNNs follow a message-passing framework: at each layer, every node aggregates features from its neighbors and updates its own embedding accordingly.

\[ \mathbf{h}_{v}^{l} = \operatorname{AGGR}(\mathbf{h}_{v}^{l-1}, \{\mathbf{h}_{u}^{l-1} : u \in \mathcal{N}_v\}; \theta_{g}^{l}) \]

After several layers, the node embedding encodes multi-hop neighborhood information. A readout function then produces a global graph-level embedding:

\[ \mathbf{h}_G = \mathsf{READOUT}(\mathbf{h}_v : v \in V) \]

When data is scarce, the challenge is how to train or adapt this encoder efficiently, without abundant labels or connectivity.


The Problem Landscape: What “Few-Shot” Really Means

To organize a complex field, the survey introduces a taxonomy of few-shot learning problems on graphs.

Taxonomy of few-shot learning problems on graphs: label scarcity (class-based, instance-based) and structure scarcity (long-tail, cold-start).

Figure 3: Taxonomy of few-shot learning problems on graphs.

Label Scarcity – Few Labeled Examples

This occurs when annotations are limited. The survey divides it into:

  • Class-based scarcity:
    Data is split into “base classes” with ample labels and “novel classes” with only a few. The classic N-way K-shot setting trains on base classes to generalize to novel ones.

  • Instance-based scarcity:
    The scarcity appears at different levels of the graph:

    • Node-level: Classify users or papers with few examples.
    • Edge-level: Predict relationships or interactions with sparse link data.
    • Graph-level: Assign properties to molecules or proteins with only a handful of labeled samples.

Structure Scarcity – Sparse Connectivity

Structure scarcity stems from graph topology:

  • Long-tail distribution:
    A few nodes (“head”) have many edges, while most have few (“tail”). Tail nodes lack neighborhood information, making representation learning difficult.

  • Cold-start:
    Newly added nodes are disconnected or weakly connected, such as new items or users on a platform. Models must infer their attributes without structural cues.


Technique #1: Meta-Learning — Learning to Learn

Meta-learning teaches a model how to learn. Instead of solving a single task, it trains over many small tasks (“episodes”) so the model can rapidly adapt to new ones.

Each meta-training task consists of:

  • a support set (few labeled samples), and
  • a query set (samples for evaluation).

The model aims to learn meta-knowledge \( \omega^* \) optimizing across tasks:

\[ \omega^{*} = \arg\min_{\omega} \mathbb{E}_{\mathcal{T}^{i}_{\text{train}} \in \mathcal{T}_{\text{train}}} \mathcal{L}(\mathcal{T}^{i}_{\text{train}}; \omega) \]

During meta-testing, that knowledge helps quickly adapt to novel tasks via lightweight fine-tuning based on the few available samples:

\[ \theta_i^{*} = \arg\min_{\theta} \mathcal{L}(\mathcal{S}_{\text{test}}^{i}, \omega^{*}; \theta) \]

Meta-learning on graphs: training on base-class tasks and transferring meta-knowledge to few-shot novel-class tasks.

Figure 5: Illustration of meta-learning on graphs—learning transferable priors from base to novel tasks.

Graph-Specific Enhancements

Two main improvements make meta-learning work better for graph data:

  1. Structure-based Enhancement:
    Exploit topology for richer priors:

    • Node-level: Weight nodes in a support set by structural significance (e.g., GPN learns context-aware prototypes).
    • Edge- and Path-level: Use edges or paths to model relationships and dependencies (e.g., RALE extends adaptation via path reasoning).
    • Subgraph-level: Use neighborhoods as contextual subgraphs for each node (e.g., G-Meta builds prototypes from subgraph features).
  2. Adaptation-based Enhancement:
    Refine how models adapt:

    • Graph-wise: Customize global priors per graph’s topology (as in GFL).
    • Task-wise: Adjust features and embedding spaces per task to handle feature diversity (as in AMM-GNN).

Meta-learning provides elegant adaptability, but it relies heavily on labeled base classes and assumes new tasks follow a similar distribution — limits that pre-training methods aim to overcome.


Technique #2: Pre-Training — Building a Graph Foundation Model

Inspired by breakthroughs from BERT and GPT in language modeling, graph learning adopts the pre-train–then–fine-tune paradigm.

  1. Pre-training stage: Learn from unlabeled graphs using self-supervised “pretext” tasks.
  2. Adaptation stage: Transfer the learned graph encoder to downstream tasks with limited labels.

Pre-training and adaptation process for graphs, including contrastive and generative strategies and fine-tuning or prompt tuning.

Figure 6: Overview of pre-training and adaptation pipelines for few-shot learning on graphs.

Pre-training Strategies

The survey highlights two major families of pretext tasks:

1. Contrastive:
Learn by comparison — maximize similarity of positive pairs and minimize similarity of negative pairs.
Different variants contrast nodes, subgraphs, or entire graphs using augmentations such as random sampling, diffusion, or learned views.

Formally, contrastive loss is:

\[ -\sum_{o\in\mathcal{T}_{\text{pre}}}\ln\frac{\sum_{a\in\mathcal{P}_o}\exp(\frac{sim(\mathbf{h}_a,\mathbf{h}_o)}{\tau})}{\sum_{a\in\mathcal{P}_o}\exp(\frac{sim(\mathbf{h}_a,\mathbf{h}_o)}{\tau})+\sum_{b\in\mathcal{N}_o}\exp(\frac{sim(\mathbf{h}_b,\mathbf{h}_o)}{\tau})} \]

Methods like GRACE, GraphCL, and DGI extract robust structural features across different graph types.

2. Generative:
Learn by reconstruction — corrupt the graph and teach the model to restore it.
Examples include GraphMAE (masked node feature prediction) and GPT-GNN (masked edge reconstruction). These encourage encoding intrinsic graph structure and semantics.

3. Integrating Large Language Models (LLMs):
For text-attributed graphs, nodes often contain rich textual descriptions. Combining graph encoders with LLMs (e.g., CLIP-inspired contrastive learning) aligns semantic text embeddings with structural node embeddings, bridging NLP and graph learning.

Adaptation Techniques

Once pre-trained, the model must adapt efficiently:

  • Fine-tuning:
    Standard approach — attach a small task head and update all parameters. Effective but expensive and prone to overfitting in few-shot scenarios.

  • Parameter-efficient adaptation:
    Instead of touching all parameters, update only a few via:

    • Prompt Tuning: Freeze the model; learn small prompt vectors that modify inputs or graph structures to align the downstream task with pre-training objectives. Methods such as GraphPrompt and MultiGPrompt have unified diverse tasks through subgraph similarity templates.
    • Adapter Tuning / LoRA: Insert tiny trainable modules into the network or apply low-rank parameter updates. Examples include AdapterGNN and G-Adapter, improving transferability without large retraining costs.

Pre-training opens the door to robust generalization from vast unlabeled graphs — ideal for few-shot adaptation.


Technique #3: Hybrid Approaches — Combining Meta-Learning and Pre-Training

Instead of choosing one paradigm, recent studies fuse both. Hybrid strategies first pre-train a strong encoder on unlabeled data, then adapt it via meta-learning using limited labeled base tasks.

Hybrid approach: pre-training followed by meta-adaptation on few-shot tasks.

Figure 7: Hybrid few-shot learning combines pre-trained graph encoders with meta-adaptation.

This approach merges broad structural understanding from pre-training with fine-grained adaptability from meta-learning. Methods such as VNT and ProG use structural prompts or meta-nets to adapt pre-trained embeddings for node-, edge-, and graph-level tasks—showing promising improvements on complex or cross-domain graphs.


The Road Ahead: Opportunities and Challenges

The survey concludes with several future directions for few-shot learning on graphs:

  1. Addressing Structure Scarcity:
    Current solutions focus more on label scarcity. Specialized pre-training for sparse or cold-start structures remains underdeveloped and presents a major opportunity.

  2. Scaling Up to Large Graphs:
    Many few-shot methods work on small benchmarks. Extending them to web-scale graphs with billions of nodes requires innovations in sampling, distributed processing, and efficient adaptation.

  3. Complex Graphs and Cross-Domain Transfer:
    Future research must handle 3D, multi-modal, dynamic, and heterogeneous graphs seamlessly — and enable cross-domain learning across social, biological, and knowledge graphs.

  4. Graph Foundation Models:
    The ultimate goal is a universal model pre-trained across diverse graphs and tasks, similar to foundation models in NLP. Achieving broad transferability demands tackling domain shift and structural heterogeneity.

  5. Interpretability:
    Few-shot methods, especially those involving prompts or learned embeddings, largely behave as black boxes. Making them more transparent and explaining their decision process will be crucial for practical adoption.


Conclusion

Few-shot learning on graphs tackles a fundamental limitation of modern deep learning: dependency on labeled data. From the “learning to learn” strategy of meta-learning to the “build a strong foundation” philosophy of pre-training — and now hybrid paradigms marrying the two — this research frontier is rapidly reshaping the future of graph intelligence.

As parameter-efficient techniques like prompting mature and foundation models for graphs emerge, the dream of trains that learn effectively from scraps—just a few examples—moves ever closer to reality.