用知识图谱增强语言模型,减少幻觉并提升事实准确性。
Aligning Knowledge Graphs and Language Models for Factual Accuracy
- 将知识图谱嵌入语言模型隐空间,通过投影层对齐实体与文本表示。
- 在三个问答数据集上显著降低幻觉率,大模型效果更明显。
- 适用于高精度需求场景,如金融领域真实应用验证有效。
GPT-4、Gemini 和 Claude 等大型语言模型虽推动了自然语言处理的发展,但易产生幻觉仍是主要挑战。融合知识图谱(KG)作为结构化、可靠、领域特定的外部信息,成为缓解该问题的可行方案。本文提出 ALIGNed-LLM,借鉴 LLaVA 的多模态对齐思想,通过预训练的知识图谱嵌入模型(如 TransE)与可训练投影层,将实体嵌入与文本嵌入对齐于语言模型的隐空间。该对齐机制帮助模型更好区分相似实体,提升事实关联性,减少幻觉。我们在三个主流问答基准数据集上测试不同规模的语言模型,均取得显著改进。此外,在欧洲某大型央行的真实金融应用场景中,也验证了该方法在高精度要求下的有效性,大幅提升了生成答案的准确性。
原文摘要 · Abstract (English)
Large language models like GPT-4, Gemini, and Claude have transformed natural language processing (NLP) tasks such as question answering, dialogue generation, summarization, and so forth; yet their susceptibility to hallucination stands as one of the major challenges. Among numerous approaches to overcome this challenge, integration of Knowledge Graphs (KGs) into language models has emerged as a promising solution as it provides structured, reliable, domain-specific, and up-to-date external information to the language models. In this paper, we introduce ALIGNed-LLM, a simple yet effective approach to improve language models' factuality via a lean strategy to infuse KGs into the latent space of language models inspired by LLaVA where visual and textual information is infused. We use embeddings from a pre-trained Knowledge Graph Embedding (KGE) model, such as TransE, and a trainable projection layer to align entity and text embeddings. This alignment enables the language model to distinguish between similar entities improving factual grounding and reducing hallucination. We tested our approach on three popular questions-answering benchmark datasets alongside language models of varying sizes, showing significant improvement. Furthermore, we applied our approach to a real-world financial use case from a large central bank in Europe, which demands high accuracy and precision, demonstrating a substantial improvement of the LLM answers.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。