LightPROF: A Lightweight Reasoning Framework for Large Language Model on Knowledge Graph

Tu Ao, Yanhua Yu, Yuling Wang, Yang Deng, Zirui Guo, Liang Pang, Pinghui Wang, Tat-Seng Chua, Xiao Zhang, Zhen Cai

Abstract

Large Language Models (LLMs) often struggle with factual accuracy and multi-hop reasoning due to knowledge cutoffs and hallucinations. While Knowledge Graphs (KGs) offer a structured solution, existing integration methods suffer from structural information loss and high resource consumption. This paper introduces LightPROF, a lightweight framework that transforms graph structures into compact "soft prompt" embeddings. By bypassing traditional textualization, LightPROF achieves state-of-the-art accuracy on KGQA benchmarks while reducing token usage by 98% and reasoning time by 30%.

Introduction

The integration of Knowledge Graphs (KGs) with Large Language Models (LLMs) is a promising avenue for grounding AI in verifiable facts. However, current approaches face two primary challenges:

  1. Structural Loss: Converting graph triples into natural language lists often fails to capture the complex logical hierarchies and relationships inherent in the graph.
  2. Resource Intensity: Feeding extensive retrieved text into LLMs demands large context windows and multiple expensive API calls, making multi-hop reasoning slow and costly.

LightPROF addresses these hurdles by introducing a "Retrieve-Embed-Reason" pipeline that remains parameter-efficient by training only a small "Knowledge Adapter" while keeping the core LLM frozen.

Methodology

The LightPROF framework operates in three distinct stages to optimize both reasoning accuracy and computational efficiency.

Figure 2: The three-stage pipeline of LightPROF: Reasoning Graph Retrieval, Knowledge Embedding, and Knowledge Prompts Mixed Reasoning.

1. Reasoning Graph Retrieval

Instead of processing the entire KG, LightPROF utilizes a fine-tuned BERT model to predict the necessary "hops" and anchor entities based on the user's query. It then samples the most relevant reasoning paths to construct a concise "reasoning graph."

2. Knowledge Embedding

This core innovation replaces textual descriptions with a Transformer-based Knowledge Adapter. The adapter extracts factual and structural information, encoding them into continuous vectors (soft prompts). A trainable Projector then maps these vectors directly into the LLM’s token embedding space.

3. Knowledge Prompts Mixed Reasoning

The LLM processes a "mixed prompt" containing the user's question (hard prompt) and the graph-derived embeddings (soft prompt). This allows the model to "perceive" the graph structure directly within its internal latent space, avoiding the redundancy of long-form text.

Experimental Evaluation

The framework was evaluated on two standard multi-hop KGQA benchmarks derived from Freebase:

  • WebQSP: 4,737 questions requiring up to 2-hop reasoning.
  • CWQ (ComplexWebQuestions): 34,689 pairs requiring up to 4-hop reasoning and complex query handling.

Results and Discussion

LightPROF demonstrates significant improvements over both traditional KGQA methods and larger LLM-based approaches.

Figure 5: Performance comparison of LightPROF against state-of-the-art methods on WebQSP and CWQ datasets.

Key Performance Metrics

  • Accuracy: LightPROF achieved 83.8% on WebQSP (surpassing the previous SOTA of 75.1%) and 59.3% on CWQ.
  • Efficiency: The framework reduced input tokens by 98% (from ~24.7M to ~365k) compared to StructGPT.
  • Latency: Reasoning time was reduced by 30%, facilitating real-time application.

Insights

The results confirm that LLMs reason more effectively when graph data is presented as optimized embeddings rather than natural language. Furthermore, the inclusion of explicit structural information (links between entities) provides a significant performance boost over raw fact retrieval. Notably, small models (7B/8B) equipped with LightPROF can outperform 70B parameter models and closed-source systems like ChatGPT.

Conclusion

LightPROF presents a scalable, efficient solution for KG-grounded reasoning. While currently requiring KG-specific training for the adapter, future work will focus on cross-modal encoders and zero-shot generalization to unseen KGs.

Summary updated

BibTeX
@inproceedings{ao2025lightprof,
  author = {Tu Ao and Yanhua Yu and Yuling Wang and Yang Deng and Zirui Guo and Liang Pang and Pinghui Wang and Tat-Seng Chua and Xiao Zhang and Zhen Cai},
  title = {{LightPROF: A Lightweight Reasoning Framework for Large Language Model on Knowledge Graph}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i22.34510},
}
Figure