Abstract
Knowledge Graphs (KGs) are essential for modern information retrieval but are frequently incomplete. Answering complex logical queries over these sparse graphs has traditionally relied on specialized Knowledge Graph Embeddings (KGEs), which excel at structural patterns but lack semantic depth. This paper presents LACT (Logic-Aware Curriculum Tuning), a framework designed to bridge the gap between Large Language Models (LLMs) and structured logic. By decomposing complex queries into binary trees and employing a staged curriculum learning strategy, LACT enables LLMs to perform sophisticated first-order logic reasoning. Experimental results demonstrate that LACT achieves a new state-of-the-art, outperforming traditional embedding-based models by an average of 5.5% in Mean Reciprocal Rank (MRR).
Introduction
The challenge of answering complex logical queries—specifically Existential First-Order ($EFO_1$) queries involving multiple steps, intersections, unions, and negations—is central to KG reasoning. Current solutions generally fall into two categories: embedding-based models (KGE) and LLM-based approaches. KGEs are robust to missing data but lack semantic generalization. Conversely, LLMs possess extensive world knowledge but are prone to hallucinations and struggle with multi-hop logical constraints. LACT addresses these issues by providing LLMs with the structural discipline of a logic engine while leveraging their inherent semantic "common sense."
Methodology
The LACT framework introduces two core innovations to enhance the logical reasoning capabilities of LLMs.
Binary Tree Decomposition (BTD)
To prevent the model from being overwhelmed by complex query structures, LACT utilizes Binary Tree Decomposition. This process transforms a complex logical graph into a hierarchical tree of simple, binary operations. This effectively creates a "logical Chain-of-Thought," allowing the model to learn the procedural steps of reasoning rather than merely memorizing entity-relation pairs.
Logic-Aware Curriculum Tuning
Recognizing that logical queries vary significantly in difficulty, LACT implements a three-stage curriculum learning strategy. The training begins with a distribution heavily weighted toward "easy" samples (e.g., single-hop queries) and progressively shifts toward "medium" and "hard" structures (e.g., multi-hop queries with negations). This staged approach prevents the model from converging on suboptimal reasoning patterns early in the fine-tuning process.
Evaluation and Results
The framework was evaluated on three benchmark datasets: FB15K, FB15K-237, and NELL995, across 14 different logical query types.
Performance and Generalization
LACT established a new state-of-the-art across all datasets, outperforming previous models like GNN-QE and QTO. Notably, it showed a 5.5% average improvement in MRR. The model also demonstrated significant Task-level transferability, achieving a 9.9% relative gain on Out-of-Distribution (OOD) query structures that were not present during the training phase.
Scaling Analysis
The researchers observed that both model size and data volume contribute to performance gains. Using a Llama 2 7B base model, LACT achieved competitive results, while scaling to 13B further enhanced reasoning accuracy.
Discussion
The success of LACT highlights several key insights:
- Decomposition is Essential: BTD "arouses" the latent reasoning capabilities of LLMs by providing a structured path for logic.
- Semantic Gap Filling: LLMs use their pre-trained world knowledge to infer missing links in incomplete KGs, a task where purely structural models often fail.
- Curriculum Benefits: Staged learning is crucial for mastering the "grammar" of logical operations.
Future work may focus on addressing context window limitations in dense graphs and further reducing the computational overhead of the decomposition process.
Summary updated