Decoding on Graphs: Faithful and Sound Reasoning on Knowledge Graphs through Generation of Well-Formed Chains
Abstract: Knowledge Graphs (KGs) can serve as reliable knowledge sources for question answering (QA) due to their structured representation of knowledge. Existing research on the utilization of KG for LLMs prevalently relies on subgraph retriever or iterative prompting, overlooking the potential synergy of LLMs' step-wise reasoning capabilities and KGs' structural nature. In this paper, we present DoG (Decoding on Graphs), a novel framework that facilitates a deep synergy between LLMs and KGs. We first define a concept, well-formed chain, which consists of a sequence of interrelated fact triplets on the KGs, starting from question entities and leading to answers. We argue that this concept can serve as a principle for making faithful and sound reasoning for KGQA. To enable LLMs to generate well-formed chains, we propose graph-aware constrained decoding, in which a constraint derived from the topology of the KG regulates the decoding process of the LLMs. This constrained decoding method ensures the generation of well-formed chains while making full use of the step-wise reasoning capabilities of LLMs. Based on the above, DoG, a training-free approach, is able to provide faithful and sound reasoning trajectories grounded on the KGs. Experiments across various KGQA tasks with different background KGs demonstrate that DoG achieves superior and robust performance. DoG also shows general applicability with various open-source LLMs.
- Gpt-4 technical report.
- Self-RAG: Learning to retrieve, generate, and critique through self-reflection. In The Twelfth International Conference on Learning Representations.
- Knowledge-augmented language model prompting for zero-shot knowledge graph question answering. In Proceedings of the 1st Workshop on Natural Language Reasoning and Structured Explanations (NLRSE), pages 78–106, Toronto, Canada. Association for Computational Linguistics.
- Freebase: a collaboratively created graph database for structuring human knowledge. In Proceedings of the 2008 ACM SIGMOD International Conference on Management of Data, SIGMOD ’08, page 1247–1250, New York, NY, USA. Association for Computing Machinery.
- Language models are few-shot learners. In Advances in Neural Information Processing Systems, volume 33, pages 1877–1901. Curran Associates, Inc.
- Large language models can better understand knowledge graphs than we thought.
- The llama 3 herd of models. Preprint, arXiv:2407.21783.
- Trace the evidence: Constructing knowledge-grounded reasoning chains for retrieval-augmented generation. ArXiv, abs/2406.11460.
- Towards revealing the mystery behind chain of thought: A theoretical perspective. In Thirty-seventh Conference on Neural Information Processing Systems.
- Improving multi-hop knowledge base question answering by learning intermediate supervision signals. In WSDM.
- G-retriever: Retrieval-augmented generation for textual graph understanding and question answering. Preprint, arXiv:2402.07630.
- Constructing a multi-hop QA dataset for comprehensive evaluation of reasoning steps. In Proceedings of the 28th International Conference on Computational Linguistics, pages 6609–6625, Barcelona, Spain (Online). International Committee on Computational Linguistics.
- The curious case of neural text degeneration. In International Conference on Learning Representations.
- Faithful question answering with Monte-Carlo planning. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3944–3965, Toronto, Canada. Association for Computational Linguistics.
- StructGPT: A general framework for large language model to reason over structured data. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 9237–9251, Singapore. Association for Computational Linguistics.
- Large language models on graphs: A comprehensive survey. IEEE Transactions on Knowledge and Data Engineering, pages 1–20.
- Graph chain-of-thought: Augmenting large language models by reasoning on graphs. In Findings of the Association for Computational Linguistics ACL 2024, pages 163–184, Bangkok, Thailand and virtual meeting. Association for Computational Linguistics.
- Complex knowledge base question answering: A survey. Preprint, arXiv:2108.06688.
- Yunshi Lan and Jing Jiang. 2020. Query graph generation for answering multi-hop complex questions from knowledge bases. In Annual Meeting of the Association for Computational Linguistics.
- Retrieval-augmented generation for knowledge-intensive nlp tasks. In Proceedings of the 34th International Conference on Neural Information Processing Systems, NIPS ’20, Red Hook, NY, USA. Curran Associates Inc.
- Grounded dialogue generation with cross-encoding re-ranker, grounding span prediction, and passage dropout. In Proceedings of the Second DialDoc Workshop on Document-grounded Dialogue and Conversational Question Answering, pages 123–129, Dublin, Ireland. Association for Computational Linguistics.
- Ruosen Li and Xinya Du. 2023. Leveraging structured information for explainable multi-hop question answering and reasoning. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 6779–6789, Singapore. Association for Computational Linguistics.
- Reasoning on graphs: Faithful and interpretable large language model reasoning. In The Twelfth International Conference on Learning Representations.
- Tree-of-traversals: A zero-shot reasoning algorithm for augmenting black-box language models with knowledge graphs. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 12302–12319, Bangkok, Thailand. Association for Computational Linguistics.
- Costas Mavromatis and George Karypis. 2024. Gnn-rag: Graph neural retrieval for large language model reasoning. Preprint, arXiv:2405.20139.
- ReLiK: Retrieve and LinK, fast and accurate entity linking and relation extraction on an academic budget. In Findings of the Association for Computational Linguistics ACL 2024, pages 14114–14132, Bangkok, Thailand and virtual meeting. Association for Computational Linguistics.
- Training language models to follow instructions with human feedback. Preprint, arXiv:2203.02155.
- Unifying large language models and knowledge graphs: A roadmap. IEEE Transactions on Knowledge and Data Engineering, 36(7):3580–3599.
- Qwen. 2024. Qwen2.5: A party of foundation models.
- A survey of large language models for graphs. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, KDD ’24, page 6616–6626, New York, NY, USA. Association for Computing Machinery.
- Gemma 2: Improving open language models at a practical size. ArXiv, abs/2408.00118.
- Comprehensive analysis of freebase and dataset creation for robust evaluation of knowledge graph link prediction models. In The Semantic Web – ISWC 2023, pages 113–133, Cham. Springer Nature Switzerland.
- Think-on-graph: Deep and responsible reasoning of large language model on knowledge graph. In The Twelfth International Conference on Learning Representations.
- ODA: Observation-driven agent for integrating LLMs and knowledge graphs. In Findings of the Association for Computational Linguistics ACL 2024, pages 7417–7431, Bangkok, Thailand and virtual meeting. Association for Computational Linguistics.
- Sparqa: Skeleton-based semantic parsing for complex questions over knowledge bases. In AAAI Conference on Artificial Intelligence.
- Alon Talmor and Jonathan Berant. 2018. The web as a knowledge-base for answering complex questions. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 641–651, New Orleans, Louisiana. Association for Computational Linguistics.
- Denny Vrandevcic and Markus Krotzsch. 2014. Wikidata. Communications of the ACM, 57:78–85.
- Knowledge-driven cot: Exploring faithful reasoning in llms for knowledge-intensive question answering. Preprint, arXiv:2308.13259.
- Xuezhi Wang and Denny Zhou. 2024. Chain-of-thought reasoning without prompting. ArXiv, abs/2402.10200.
- Finetuned language models are zero-shot learners. ArXiv, abs/2109.01652.
- Chain of thought prompting elicits reasoning in large language models. In Advances in Neural Information Processing Systems.
- Huggingface’s transformers: State-of-the-art natural language processing. Preprint, arXiv:1910.03771.
- Retrieve-rewrite-answer: A kg-to-text enhanced llms framework for knowledge graph question answering. Preprint, arXiv:2309.11206.
- Tree of thoughts: Deliberate problem solving with large language models. In Thirty-seventh Conference on Neural Information Processing Systems.
- RNG-KBQA: Generation augmented iterative ranking for knowledge base question answering. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 6032–6043, Dublin, Ireland. Association for Computational Linguistics.
- The value of semantic parse labeling for knowledge base question answering. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pages 201–206, Berlin, Germany. Association for Computational Linguistics.
- Do large language models know what they don’t know? In Findings of the Association for Computational Linguistics: ACL 2023, pages 8653–8665, Toronto, Canada. Association for Computational Linguistics.
- DecAF: Joint decoding of answers and logical forms for question answering over knowledge bases. In The Eleventh International Conference on Learning Representations.
- StructLM: Towards building generalist models for structured knowledge grounding. In First Conference on Language Modeling.
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.