为无文本图设计类思维链提示,分步引导模型推理
GCoT: Chain-of-Thought Prompt Learning for Graphs
- 将图任务分解为多步推理,每步包含提示推理、思想生成与条件提示学习
- 在8个公开数据集上验证,提升图模型在无文本场景下的推理能力
- 适合研究图神经网络推理机制或少文本图任务的开发者
类思维链(CoT)提示在自然语言处理中取得显著成功,但其在图数据上的潜力尚未被充分探索。本文提出首个针对无文本图的CoT提示学习框架GCoT。我们将下游任务的适应过程分解为一系列推理步骤,每个步骤包含基于提示的推理、‘思想’生成和基于思想的提示学习。具体而言,输入图与提示首先通过预训练图编码器进行提示推理,随后聚合编码器的隐藏层以构建‘思想’,捕捉节点在当前步骤的状态;基于该思想,学习每个节点的特定提示,并输入下一推理步骤,循环执行。我们在8个公开数据集上进行综合实验,验证了GCoT的有效性。
原文摘要 · Abstract (English)
Chain-of-thought (CoT) prompting has achieved remarkable success in natural language processing (NLP). However, its vast potential remains largely unexplored for graphs. This raises an interesting question: How can we design CoT prompting for graphs to guide graph models to learn step by step? On one hand, unlike natural languages, graphs are non-linear and characterized by complex topological structures. On the other hand, many graphs lack textual data, making it difficult to formulate language-based CoT prompting. In this work, we propose the first CoT prompt learning framework for text-free graphs, GCoT. Specifically, we decompose the adaptation process for each downstream task into a series of inference steps, with each step consisting of prompt-based inference, ``thought'' generation, and thought-conditioned prompt learning. While the steps mimic CoT prompting in NLP, the exact mechanism differs significantly. Specifically, at each step, an input graph, along with a prompt, is first fed into a pre-trained graph encoder for prompt-based inference. We then aggregate the hidden layers of the encoder to construct a ``thought'', which captures the working state of each node in the current step. Conditioned on this thought, we learn a prompt specific to each node based on the current state. These prompts are fed into the next inference step, repeating the cycle. To evaluate and analyze the effectiveness of GCoT, we conduct comprehensive experiments on eight public datasets, which demonstrate the advantage of our approach.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。