💡 Our Solution: KG-TRACES
KG-TRACES is a novel framework that explicitly teaches LLMs how to reason by supervising their internal "thought process" with knowledge graphs guidance. We guide them to:
- 🗺️ Chart the Course: Predict symbolic knowledge graph reasoning paths from question to answer.
- 📝 Show Their Work: Generate attribution-aware reasoning explanations, clearly claim whether each step comes from the KG or the LLM's internal knowledge 🧠, and how effective it was!
🌟 Why KG-TRACES Rocks
- 🔍 Crystal-Clear Explanations: Understand why the LLM reached its conclusion.
- 🛡️ Trustworthy & Attributable: Know the evidence source of each reasoning step.
- 💪 Robust Performance: Excels even with limited or no direct KG access during inference.
- 🌍 Versatile: Shows strong generalization to specialized fields like medicine.
🚀 Quickstart: Pretrained Models
You can easily load our fine-tuned KG-TRACES models from the Hugging Face Model Hub using the transformers library:
from transformers import AutoModelForCausalLM, AutoTokenizer model_hub_name = "Edaizi/KG-TRACES"tokenizer = AutoTokenizer.from_pretrained(model_hub_name)model = AutoModelForCausalLM.from_pretrained(model_hub_name)
📚 Datasets
We've meticulously prepared augmented SFT datasets for WebQSP and CWQ, packed with reasoning paths and augmented reasoning processes with source attributions. Find them on Hugging Face:
You can load these datasets as follows:
from datasets import load_dataset webqsp_sft_data = load_dataset("Edaizi/KG-TRACES-WebQSP")cwq_sft_data = load_dataset("Edaizi/KG-TRACES-CWQ")
📜 Citation
If KG-TRACES helps your research or project, we'd love a shout-out! Please cite:
@misc{wu2025kgtracesenhancinglargelanguage, title={KG-TRACES: Enhancing Large Language Models with Knowledge Graph-constrained Trajectory Reasoning and Attribution Supervision}, author={Rong Wu and Pinlong Cai and Jianbiao Mei and Licheng Wen and Tao Hu and Xuemeng Yang and Daocheng Fu and Botian Shi}, year={2025}, eprint={2506.00783}, archivePrefix={arXiv}, primaryClass={cs.CL}, url={https://arxiv.org/abs/2506.00783}, }