Adapting Unsigned Graph Neural Networks for Signed Graphs: A Few-Shot Prompt Tuning Approach

Zian Zhai, Sima Qing, Xiaoyang Wang, Wenjie ZhangarXiv 2024 · arXiv · OpenReview

Abstract

Signed Graph Neural Networks (SGNNs) are powerful tools for signed graph representation learning but struggle with limited generalization and heavy dependence on labeled data. While recent advancements in "graph pre-training and prompt tuning" have reduced label dependence in Graph Neural Networks (GNNs) and improved their generalization abilities by leveraging pre-training knowledge, these efforts have focused exclusively on unsigned graphs. The scarcity of publicly available signed graph datasets makes it essential to transfer knowledge from unsigned graphs to signed graph tasks. However, this transfer introduces significant challenges due to the graph-level and task-level divergences between the pre-training and downstream phases. To address these challenges, we propose Signed Graph Prompt Tuning (SGPT) in this paper. Specifically, SGPT employs a graph template and a semantic prompt to segregate mixed link semantics in the signed graph and then adaptively integrate the distinctive semantic information according to the needs of downstream tasks, thereby unifying the pre-training and downstream graphs. Additionally, SGPT utilizes a task template and a feature prompt to reformulate the downstream signed graph tasks, aligning them with pre-training tasks to ensure a unified optimization objective and consistent feature space across tasks. Finally, extensive experiments are conducted on popular signed graph datasets, demonstrating the superiority of SGPT over state-of-the-art methods.

Introduction

Signed graphs, where edges denote positive (e.g., trust) or negative (e.g., distrust) relationships, are fundamental to modeling complex social networks. However, training effective Signed Graph Neural Networks (SGNNs) is often constrained by two primary factors: the scarcity of labeled data and the violation of the homophily assumption—the principle that connected nodes are similar—by negative links. While pre-training on large-scale unsigned graphs offers a potential solution, the structural and task-level mismatches between unsigned pre-training and signed downstream tasks create a significant barrier to effective knowledge transfer.

The SGPT Framework

To overcome these challenges, we introduce Signed Graph Prompt Tuning (SGPT). SGPT adopts a "pre-train, prompt, and predict" pipeline that keeps the pre-trained GNN backbone frozen, which prevents the catastrophic forgetting and overfitting typically seen in few-shot scenarios. The framework unifies the pre-training and downstream phases through four key components.

Methodology

  1. Graph Template: Grounded in Social Balance Theory (e.g., "the enemy of my enemy is my friend"), this template decomposes the signed graph into three channels: Positive, Negative, and Topological. By transforming negative paths into positive structural signals, it restores the homophily assumption required by the frozen GNN backbone.
  2. Task Template: This component reformulates downstream tasks, such as node classification, into a link prediction format. This ensures the optimization objective remains consistent with the pre-training phase.
  3. Feature Prompts: These are tunable vectors added to input features to align the downstream data distribution with the pre-trained model's feature space.
  4. Semantic Prompts: A bottleneck adapter mechanism that learns to adaptively weight the contributions of the three graph channels based on the specific requirements of the downstream task.
The SGPT framework overview, showing the integration of graph and task templates with feature and semantic prompts to bridge the gap between unsigned pre-training and signed tasks.

Experimental Evaluation

SGPT was rigorously tested on seven benchmark datasets, including Bitcoin-Alpha, Epinions, and Wikipedia-based networks, covering both Link Sign Prediction (LSP) and Node Classification (NC) tasks. The method proved robust regardless of the underlying pre-trained model (e.g., GCN, GAT, or GIN).

Key Results

The experimental results demonstrate that SGPT consistently outperforms state-of-the-art supervised SGNNs and existing prompt-tuning methods, particularly in label-scarce settings. For instance, in 1-shot and 100-shot scenarios, SGPT achieved significant gains in AUC scores across all tested datasets.

AUC scores across different shot numbers for Link Sign Prediction on Epinions, Slashdot, WikiElec, and WikiRfA datasets, highlighting SGPT's superior performance in few-shot scenarios.

Key insights from the study include:

  • Balance Theory as a Bridge: Using social psychology principles allows standard GNNs to process complex signed relationships effectively by "untangling" mixed semantics.
  • Parameter Efficiency: SGPT requires significantly fewer tunable parameters (~4K) compared to supervised models like SDGNN (~20K), making it more stable and faster to train on limited data.

Conclusion

SGPT effectively addresses the structural and task-level divergences between unsigned graph pre-training and signed graph applications. By leveraging social balance theory and prompt tuning, it enables high-performance representation learning even when labeled data is extremely limited, providing a scalable solution for real-world social network analysis.

Summary updated

Abstract

Signed Graph Neural Networks (SGNNs) are powerful tools for signed graph representation learning but struggle with limited generalization and heavy dependence on labeled data. While recent advancements in "graph pre-training and prompt tuning" have reduced label dependence in Graph Neural Networks (GNNs) and improved their generalization abilities by leveraging pre-training knowledge, these efforts have focused exclusively on unsigned graphs. The scarcity of publicly available signed graph datasets makes it essential to transfer knowledge from unsigned graphs to signed graph tasks. However, this transfer introduces significant challenges due to the graph-level and task-level divergences between the pre-training and downstream phases. To address these challenges, we propose Signed Graph Prompt Tuning (SGPT) in this paper. Specifically, SGPT employs a graph template and a semantic prompt to segregate mixed link semantics in the signed graph and then adaptively integrate the distinctive semantic information according to the needs of downstream tasks, thereby unifying the pre-training and downstream graphs. Additionally, SGPT utilizes a task template and a feature prompt to reformulate the downstream signed graph tasks, aligning them with pre-training tasks to ensure a unified optimization objective and consistent feature space across tasks. Finally, extensive experiments are conducted on popular signed graph datasets, demonstrating the superiority of SGPT over state-of-the-art methods.
BibTeX
@misc{zhai2024adapting,
  author = {Zian Zhai and Sima Qing and Xiaoyang Wang and Wenjie Zhang},
  title = {{Adapting Unsigned Graph Neural Networks for Signed Graphs: A Few-Shot Prompt Tuning Approach}},
  year = {2024},
  eprint = {2412.12155},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.12155},
}
Figure