Adapting Unsigned Graph Neural Networks for Signed Graphs: A Few-Shot Prompt Tuning Approach
Zian Zhai,Sima Qing,Xiaoyang Wang,Wenjie Zhang
2024-12-11
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.
Machine Learning,Artificial Intelligence
What problem does this paper attempt to address?
The main problem that this paper attempts to solve is how to adapt pre - trained unsigned graph neural networks (GNNs) to signed graph tasks, especially when the labeled data is limited. Specifically, the paper proposes solutions to the following two challenges:
1. **Graph - level divergence**:
- There are significant differences in structure and semantics between unsigned graphs and signed graphs. The links in unsigned graphs only represent the connection relationships between nodes, while the links in signed graphs not only represent connections but also carry positive and negative signs, indicating different semantic relationships (such as friendship and enmity). This difference makes it difficult to directly apply pre - trained unsigned GNNs to signed graph tasks.
2. **Task - level divergence**:
- Pre - training tasks are usually aimed at preserving the structural information of graphs (such as node similarity and connectivity), while the tasks of signed graphs (such as node classification and link sign prediction) need to optimize specific task loss functions and handle complex link sign semantics. This inconsistency between tasks may lead to poor performance of the pre - trained model in downstream tasks, and even "negative transfer".
To solve these problems, the paper proposes the **Signed Graph Prompt Tuning (SGPT)** framework. SGPT bridges the gap between the pre - training stage and downstream tasks by introducing two templates (graph template and task template) and two prompts (feature prompt and semantic prompt).
### Specific solutions
1. **Graph Template**:
- The graph template is used to unify different types of graphs. It converts a signed graph into multiple sub - graph samples with single - semantic links (such as positive links, negative links, and topological links), thus satisfying the homogeneity assumption of pre - trained GNNs. These sub - graph samples are input in parallel to the pre - trained GNN to generate corresponding representations.
2. **Task Template**:
- The task template is used to unify the forms of pre - training tasks and downstream tasks. It reformulates the tasks of signed graphs (such as link sign prediction and node classification) into the same form as pre - training tasks (such as link prediction), ensuring the consistency of optimization objectives.
3. **Feature Prompt**:
- The feature prompt is used to adjust the input feature space, making the input features of downstream tasks more consistent with those of pre - training tasks. By adding learnable vectors to the input node features, the feature prompt can capture important features of different types of link semantics.
4. **Semantic Prompt**:
- The semantic prompt is used to adaptively integrate the embedding representations of different sub - graph samples generated by the graph template. Through an adapter, the semantic prompt can aggregate these embedding representations according to the requirements of downstream tasks and capture the importance of different channels.
### Experimental verification
The paper verifies the effectiveness of SGPT by conducting experiments on multiple publicly available signed graph data sets. The experimental results show that SGPT outperforms the existing state - of - the - art methods in node classification and link sign prediction tasks, especially in the few - shot setting.
In summary, the core problem of this paper is to solve the problems of insufficient generalization ability of pre - trained unsigned GNNs in signed graph tasks and the dependence on labeled data, and this goal is achieved by proposing the SGPT framework.