Abstract
Knowledge Graphs (KGs) provide essential structural information for recommender systems but suffer from inherent limitations: incompleteness, semantic loss during ID-based encoding, and difficulties in capturing long-range dependencies. This paper proposes CoLaKG, a novel framework that leverages Large Language Models (LLMs) to interpret KGs and augment item representations. By decoupling LLM-based KG comprehension from the recommendation task, CoLaKG achieves significant performance gains across multiple datasets while maintaining computational efficiency. Experimental results demonstrate its robustness to data sparsity and its ability to effectively "fill in" missing KG facts using the LLM's internal world knowledge.
Motivation and Problem Statement
Knowledge Graphs (KGs) are powerful tools for recommendation because they map out relationships between items (e.g., "Movie A" is "Directed by" "Director B"). However, traditional KG-based recommendation models face three major hurdles:
- Incompleteness: Most KGs are manually curated and suffer from missing facts or limited scope.
- Semantic Loss: Traditional models convert text (like "horror" or "thriller") into abstract ID numbers, losing the natural linguistic connection between similar concepts.
- The "Distant Neighbor" Problem: Graph Neural Networks (GNNs) struggle to capture relationships between items that are many "hops" away in the graph without becoming "over-smoothed," where node representations become indistinguishable.
The CoLaKG Framework
The CoLaKG framework operates in two decoupled stages, ensuring that the heavy lifting of the LLM does not introduce latency into the live recommendation process.
Stage 1: KG Comprehension with LLMs
- Local KG Comprehension: For every item, the system extracts a "subgraph" (an ego-network) of its immediate and secondary neighbors. This is fed into an LLM with a prompt asking it to summarize the item and fill in missing knowledge based on its training data.
- User Preference Comprehension: The LLM analyzes a user’s interaction history alongside the KG data to describe the user’s underlying preferences in natural language.
- Global KG Utilization: The system converts the LLM’s text summaries into semantic embeddings. It then constructs a new "item-item" graph based on the similarity of these summaries, allowing the model to find semantically related items that aren't directly connected in the original KG.
Stage 2: Integration and Recommendation
- Cross-Modal Alignment: Since LLM embeddings and standard ID embeddings live in different mathematical spaces, a learnable adapter aligns them.
- Representation Augmentation: The model uses an attention mechanism to pull in information from the "global neighbors" identified in the comprehension stage.
- Backbone: The final recommendation is powered by LightGCN, an efficient graph-based recommendation model.
Experimental Evaluation
The authors evaluated CoLaKG on four diverse real-world datasets: MovieLens (movies), MIND (news), Last-FM (music), and Fund (financial products).
Key findings include:
- Superior Performance: CoLaKG consistently outperformed 12 state-of-the-art baselines, including both KG-specific models (e.g., KGAT) and other LLM-augmented models.
- Sparsity Champion: The model showed the most significant improvements for "cold-start" or low-activity users, proving that the LLM's semantic understanding is a powerful substitute for a lack of interaction data.
- Robustness to Missing Data: In stress tests where 30% of KG facts were randomly deleted, CoLaKG’s performance dropped significantly less than traditional models, as the LLM could infer missing information from its internal knowledge.
Discussion and Key Insights
- LLMs as "Knowledge Fillers": LLMs can use their internal "world knowledge" to compensate for sparse KGs. If a KG lacks a movie's genre, the LLM likely already "knows" it from its pre-training.
- Breaking the "ID Prison": By maintaining information in text form longer, the model recognizes that "Horror" and "Thriller" are related, whereas an ID-based model treats them as unrelated integers.
- Decoupling for Efficiency: CoLaKG solves the latency issues typical of LLM-based recommenders by using the LLM as a feature extractor before the recommendation task begins. During live inference, the system only uses pre-computed embeddings.
Limitations and Future Work
The quality of the recommendation is dependent on the underlying LLM's knowledge; niche items not covered in the LLM's training may see less benefit. Additionally, while inference is fast, the initial pre-processing (generating embeddings for millions of items) can be computationally intensive. Future work will explore more complex fusions of local and global information and testing on larger, more diverse knowledge bases.
Summary updated