Introduction
Knowledge Graphs (KGs) such as Freebase and NELL995 are essential for storing vast amounts of relational data in triplet form (subject, relation, object). While these graphs are excellent for simple retrieval, performing complex First-Order Logic (FOL) reasoning—which involves operations like intersection, union, and negation—remains a significant challenge. Traditional methods have largely relied on "geometric embeddings," mapping entities and relations into high-dimensional vector spaces. However, these approaches often struggle with multi-step chain reasoning, lack generalization across different graphs, and face scalability issues when graphs are updated.
This paper introduces LARK (Language-guided Abstract Reasoning over Knowledge graphs), a framework that leverages the inherent reasoning capabilities of Large Language Models (LLMs) to solve complex logical queries without the need for intensive embedding training.
The LARK Framework
LARK adopts a decoupled approach, separating the task of searching the knowledge graph from the process of logical deduction. This separation allows the system to utilize the strengths of LLMs while overcoming their limitations, such as context window constraints and the tendency to hallucinate based on internal training data.
The LARK pipeline consists of four primary stages:
- Query Abstraction: To ensure the LLM relies solely on the provided graph context, real-world entity names are replaced with unique identifiers (e.g.,
e1,r1). This abstraction acts as a logical filter, forcing the model to follow the provided triplets rather than making up facts. - Neighborhood Retrieval: Given the limited context windows of current LLMs (e.g., 4,096 tokens for Llama2), LARK performs a $k$-level depth-first search to extract a relevant subgraph "neighborhood" around the query entities.
- Logical Chain Decomposition: Complex queries are broken down into a sequence of elementary operations.
- Sequential LLM Answering: The LLM processes these simple steps one by one, with the output of each step serving as input for the next.
Logical Chain Decomposition
The core innovation of LARK is its ability to decompose multi-operator logic into a "chain of thought" that the LLM can easily process. While LLMs often struggle with dense, multi-step queries, they excel at single-step deductions.
As illustrated in the example above, a query regarding Nobel Prize winners not from specific regions is decomposed into several sub-questions. Each sub-question identifies a set of entities (e.g., $A1, A2, A3$), which are then combined using logical operators (union, negation, intersection) to reach the final answer. This sequential approach improved performance by 20-33% compared to processing the full query at once.
Evaluation and Results
The researchers evaluated LARK on three gold-standard benchmarks: FB15k, FB15k-237, and NELL995. The results demonstrate that LARK significantly outperforms state-of-the-art (SOTA) geometric embedding models like BetaE and CQD.
Key performance highlights include:
- Accuracy Gains: LARK achieved a 35% to 84% improvement in Mean Reciprocal Rank (MRR) across 14 different FOL query types.
- Negation Mastery: In queries involving negation—a historically difficult area for KG reasoning—LARK outperformed the best existing baseline by 140%.
- Scale Invariance: LARK's performance scales with the size of the underlying LLM. Upgrading from Llama2-7B to 13B provided a substantial boost in reasoning accuracy without requiring retraining on the graph data.
Conclusion
LARK represents a paradigm shift in knowledge graph reasoning by moving away from specialized geometric embeddings toward general-purpose LLM reasoning. By abstracting entities and decomposing complex logic, LARK achieves unprecedented accuracy and robustness. Future work will focus on overcoming the token bottleneck of context windows and optimizing the inference costs associated with large-scale LLM deployment.
Summary updated