arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.08092cs.CLcs.AI

GCoT:用于图的思维链提示学习

GCoT: Chain-of-Thought Prompt Learning for Graphs

Singapore Management University(新加坡国立管理大学);University of Science and Technology of China(中国科学技术大学)

Xingtong Yu, Chang Zhou, Zhongwei Kuai, Xinming Zhang, Yuan Fang

AI总结:

本文提出首个面向无文本图的思维链提示学习框架GCoT,通过将下游任务分解为多步推理、思考生成和条件提示学习,在八个数据集上验证了其有效性。

摘要:

思维链(CoT)提示在自然语言处理(NLP)中取得了显著成功。然而,其巨大潜力在图领域很大程度上仍未被探索。这引发了一个有趣的问题:我们如何为图设计CoT提示,以引导图模型逐步学习?一方面,与自然语言不同,图是非线性的,并具有复杂的拓扑结构。另一方面,许多图缺乏文本数据,使得构建基于语言的CoT提示变得困难。在这项工作中,我们提出了首个面向无文本图的CoT提示学习框架GCoT。具体而言,我们将每个下游任务的适应过程分解为一系列推理步骤,每个步骤包括基于提示的推理、“思考”生成以及基于思考条件的提示学习。虽然这些步骤模仿了NLP中的CoT提示,但其确切机制存在显著差异。具体来说,在每个步骤中,输入图连同提示首先被输入到预训练图编码器中进行基于提示的推理。然后,我们聚合编码器的隐藏层来构建“思考”,该思考捕获了当前步骤中每个节点的工作状态。基于该思考条件,我们根据当前状态学习每个节点特定的提示。这些提示被输入到下一个推理步骤,重复该循环。为了评估和分析GCoT的有效性,我们在八个公共数据集上进行了全面实验,证明了我们方法的优势。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑