arXiv:2602.02518cs.LGcs.AI2026-02

让大模型学会在图谱中逐步推理,通过分阶段训练提升跨领域泛化能力。

GraphDancer: Training LLMs to Explore and Reason over Graphs via Two-Stage Curriculum Post-Training

  • 分两阶段训练:先规则奖励交互,再优化路径效率与事实性。
  • 仅用30亿参数模型,在未见领域上超越更大模型,准确率提升18.7%。
  • 基于图结构复杂度设计课程,逐步提升任务难度,适合知识图谱应用者。

大型语言模型(LLMs)越来越依赖外部知识以提高事实准确性,但许多真实世界知识以异构图形式组织而非纯文本。在图上推理需要模型遵循模式定义的关系,通过精确的函数调用并多轮聚合证据。我们提出GraphDancer,一种两阶段后训练框架,通过交替自然语言推理与图函数执行,教会模型在图上推理。第一阶段在规则奖励下学习图交互方式,第二阶段进一步引导模型偏好更可靠且高效的交互路径。GraphDancer的核心创新在于一种图感知课程机制,按信息检索轨迹的结构复杂度组织两阶段训练,逐步增加任务难度。我们在多领域基准上评估该方法,仅在一个领域训练并在未见领域及分布外问题类型上测试。尽管仅使用3B规模的骨干模型,GraphDancer仍优于配备更大/更强骨干的基线模型,证明其在图探索与推理技能上的强大跨域泛化能力。代码可在https://github.com/leopoldwhite/GraphDancer获取。

原文摘要 · Abstract (English)

Large language models (LLMs) increasingly rely on external knowledge to improve factuality, yet many real-world knowledge sources are organized as heterogeneous graphs rather than plain text. Reasoning over such graphs requires models to follow schema-defined relations through precise function calls and to aggregate evidence across multiple rounds of interaction. We propose GraphDancer, a two-stage post-training framework that teaches LLMs to reason over graphs by interleaving natural-language reasoning with graph function execution. The first stage teaches the model how to interact with the graph under rule-based rewards, while the second stage further teaches it to prefer more grounded and efficient interaction trajectories. The key novelty of GraphDancer is a graph-aware curriculum that organizes both stages by the structural complexity of information-seeking trajectories, progressively increasing task difficulty during training. We evaluate GraphDancer on a multi-domain benchmark by training on one domain only and testing on unseen domains and out-of-distribution question types. Despite using only a 3B backbone, GraphDancer outperforms baselines equipped with larger/stronger backbones, demonstrating robust cross-domain generalization of graph exploration and reasoning skills. Our code can be found at https://github.com/leopoldwhite/GraphDancer.

图神经网络逻辑推理提示工程知识图谱

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。