[论文解读] Let Your Graph Do the Talking: Encoding Structured Data for LLMs
GraphToken 学习一个图编码器,生成对 LLMs 的软令牌提示,显式对图进行编码,从而在图推理任务上获得显著提升(在 GraphQA 上高达 73 个百分点)。
How can we best encode structured data into sequential form for use in large language models (LLMs)? In this work, we introduce a parameter-efficient method to explicitly represent structured data for LLMs. Our method, GraphToken, learns an encoding function to extend prompts with explicit structured information. Unlike other work which focuses on limited domains (e.g. knowledge graph representation), our work is the first effort focused on the general encoding of structured data to be used for various reasoning tasks. We show that explicitly representing the graph structure allows significant improvements to graph reasoning tasks. Specifically, we see across the board improvements - up to 73% points - on node, edge and, graph-level tasks from the GraphQA benchmark.
研究动机与目标
- 激励对 LLMs 编码结构化数据,以提升超越纯文本表示的推理能力。
- 提出一种参数高效的编码器,在保留 LLMs 语言能力的同时融入图结构。
- 证明对图进行显式编码可以提升 GraphQA 上的图级、节点级和边级任务的性能。
- 展示 GraphToken 能泛化到未见过的图和任务,并且与 LLM 相比计算开销仍然较小。
提出的方法
- 提出 GraphToken,一种学习的图提示函数,将由图得到的标记追加到 LLM 提示之前。
- 使用图编码器(GNN)生成与 LLM 嵌入空间对齐的固定长度的图标记,同时冻结 LLM 参数。
- 通过对增强提示下的 LLM 困惑度进行反向传播来训练图编码器,仅更新编码器参数。
- 探索多种图编码器(GCN、GIN、MPNN、HGT、MHA、NodeSet、EdgeSet)和用于图级、节点级和边级任务的读出方案。
- 通过最后一层密集层将图表示投影到 LLM 令牌空间,然后再提示 LLM(例如 PaLM 2/Flan-tuned)。
- 在 GraphQA 基准上以经验方式将 GraphToken 与基线进行比较(zero-shot、few-shot、CoT、zero-cot、cot-bag、soft-prompt)。
实验结果
研究问题
- RQ1一个学习的图编码器是否能够在最小参数更新的前提下,有效地将结构化数据转换为与 LLM 兼容的提示?
- RQ2在配合冻结的 LLM 时,哪种图编码器架构与节点特征最适合支持图推理任务?
- RQ3与文本基础或软提示基线相比,显式图编码在图级、节点级和边级推理任务上的提升程度如何?
- RQ4GraphToken 对未见过的图和超出训练分布的任务的泛化能力如何?
主要发现
| 方法 | 节点数 | 边数 | 环检查 | 三角计数 | 节点度 | 连通节点 | 可达性 | 边存在性 | 最短路径 |
|---|---|---|---|---|---|---|---|---|---|
| zero-shot | 0.217 | 0.124 | 0.760 | 0.015 | 0.140 | 0.147 | 0.849 | 0.445 | 0.115 |
| zero-cot | 0.146 | 0.094 | 0.323 | 0.127 | 0.104 | 0.088 | 0.735 | 0.335 | 0.336 |
| few-shot | 0.253 | 0.120 | 0.374 | 0.030 | 0.174 | 0.124 | 0.794 | 0.368 | 0.227 |
| cot | 0.276 | 0.128 | 0.580 | 0.081 | 0.292 | 0.131 | 0.452 | 0.428 | 0.386 |
| cot-bag | 0.269 | 0.125 | 0.521 | 0.081 | 0.280 | 0.158 | 0.452 | 0.373 | 0.404 |
| soft-prompt | 0.056 | 0.018 | 0.832 | 0.162 | 0.098 | 0.068 | 0.838 | 0.544 | 0.462 |
| GraphToken | 0.996 | 0.426 | 0.956 | 0.348 | 0.962 | 0.264 | 0.932 | 0.738 | 0.638 |
- GraphToken 在 GraphQA 测试中的图级、节点级和边级任务上显著超过基线,提升高达 73 个百分点。
- 不同的图编码器在任务上各有特定优势;没有单一编码器能统治所有任务。
- 用学习的节点特征打破等变性通常会提升性能,结合学习特征与谱特征对某些编码器还能带来进一步提升。
- GraphToken 使用一个相对较小的编码器(数万至数十万参数),相对于 LLM 的规模,在最小参数更新下取得显著提升。
- 在循环检验或三角形计数上训练的编码器表现出对二分性检测的泛化,表明可迁移的图推理表示。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。