arXiv:2410.23703cs.LGcs.CL2024-10被引 14

用知识图谱评估并优化大模型的推理链,提升逻辑一致性。

OCEAN: Offline Chain-of-thought Evaluation and Alignment in Large Language Models

  • 将推理链建模为马尔可夫决策过程,通过知识图谱生成反馈。
  • 提出KG-IPS估计算法,实现无偏评估与离线优化。
  • 不损害模型下游任务能力,适合需要可靠推理的场景。

大模型的离线评估对理解其能力至关重要,但现有方法在推理链评估方面仍不充分。本文提出OCEAN框架,利用知识图谱(如Wikidata5m)提供丰富知识和推理路径反馈,解决大模型推理与知识图谱结构间的异构性问题。通过将推理链建模为马尔可夫决策过程(MDP),引入基于策略的知识图谱探索与强化学习,生成逐标记的似然分布以模拟知识图谱的推理偏好。结合反倾向得分,提出KG-IPS估计器,并证明其无偏性及方差下界。基于离线评估值函数,实现无需在线交互的离线策略优化,显著提升推理链与知识图谱的一致性。实验证明,OCEAN可在不损害大模型下游任务表现或内部知识的前提下,高效优化推理路径的评估得分。

原文摘要 · Abstract (English)

Offline evaluation of LLMs is crucial in understanding their capacities, though current methods remain underexplored in existing research. In this work, we focus on the offline evaluation of the chain-of-thought capabilities and show how to optimize LLMs based on the proposed evaluation method. To enable offline feedback with rich knowledge and reasoning paths, we use knowledge graphs (e.g., Wikidata5m) to provide feedback on the generated chain of thoughts. Due to the heterogeneity between LLM reasoning and KG structures, direct interaction and feedback from KGs on LLM behavior are challenging, as they require accurate entity linking and grounding of LLM-generated chains of thought in the KG. To address the above challenge, we propose an offline chain-of-thought evaluation framework, OCEAN, which models chain-of-thought reasoning in LLMs as an MDP and evaluate the policy's alignment with KG preference modeling. To overcome the reasoning heterogeneity and grounding problems, we leverage on-policy KG exploration and RL to model a KG policy that generates token-level likelihood distributions for LLM-generated chain-of-thought reasoning paths, simulating KG reasoning preference. Then we incorporate the knowledge-graph feedback on the validity and alignment of the generated reasoning paths into inverse propensity scores and propose KG-IPS estimator. Theoretically, we prove the unbiasedness of the proposed KG-IPS estimator and provide a lower bound on its variance. With the off-policy evaluated value function, we can directly enable off-policy optimization to further enhance chain-of-thought alignment. Our empirical study shows that OCEAN can be efficiently optimized for generating chain-of-thought reasoning paths with higher estimated values without affecting LLMs' general abilities in downstream tasks or their internal knowledge.

大模型评估推理链知识图谱强化学习

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