TL;DR
EvoPath introduces an evolutionary framework that leverages Large Language Models (LLMs) to automatically discover high-quality meta-paths in complex Heterogeneous Information Networks (HINs). By combining a prioritized replay buffer with in-context learning, EvoPath successfully bridges the gap between an LLM's open-world knowledge and an HIN's closed-world constraints, significantly outperforming traditional methods in graph reasoning—especially in inductive scenarios.
What Problem Does This Paper Address?
Heterogeneous Information Networks (HINs) are graphs containing diverse types of entities and relations (e.g., a network connecting Scientists, Universities, and Countries). To reason over these networks, researchers use meta-paths—schema-level sequences of relations that connect entity types (e.g., Scientist -> WorksAt -> University -> LocatedIn -> Country).
Discovering these meta-paths is notoriously difficult because the search space grows exponentially with path length. While LLMs possess vast repositories of commonsense knowledge that could theoretically help identify these paths, directly applying them to HINs introduces severe "knowledge conflicts":
- Corpora Bias: LLMs are trained on open-world data, whereas HINs operate in a closed-world environment with specific, strict facts.
- Lexical Discrepancies: An LLM might suggest the relation
isCitizenOf, while the HIN strictly usesnationality. - Hallucination: LLMs routinely generate plausible-sounding but entirely invalid or nonexistent paths.
EvoPath addresses these challenges by wrapping the LLM in a structured, evolutionary loop that constrains and refines its outputs.
Methods
EvoPath uses an iterative, evolutionary process consisting of five key components:
- Meta-path Sampler: To give the LLM a starting point, it performs random walks on the HIN to gather instance-level paths and summarizes them into initial meta-paths.
- Atom Selector: To combat lexical discrepancies, this module extracts valid entity types and relations from the HIN and expands them using semantic similarity (Gestalt pattern matching). This creates a strict "vocabulary" pool for the LLM.
- Prioritized Replay Buffer: Discovered meta-paths are stored here and scored based on coverage (how often they appear) and confidence (how accurate they are). It uses a stochastic, rank-based sampling method to select the best paths to serve as few-shot examples.
- Meta-path Generator (LLM): Using In-Context Learning (ICL), the base LLM (e.g., LLaMA-2-7B) receives a carefully structured prompt containing background information, candidate vocabularies, and the top-scored meta-paths from the buffer. It then generates new candidate meta-paths.
- Meta-path Cleaner: This final module filters the LLM's output, fixes minor errors using synonym searches, discards paths that violate HIN schema rules, and feeds valid paths back into the replay buffer.
Datasets
The authors evaluated EvoPath on three large-scale, real-world benchmarks:
- YAGO26K-906: 26,078 entities, 906 entity types, 34 relations, and 390,738 facts.
- Dbpedia: 111,762 entities, 174 entity types, 305 relations, and 863,643 facts.
- NELL: 49,869 entities, 756 entity types, 827 relations, and 296,013 facts.
Key Insights and Ideas
- Scored Prompts Matter: Simply giving an LLM examples of meta-paths isn't enough. Providing the numerical plausibility scores (coverage and confidence) alongside those examples dramatically improves the LLM's ability to generate high-quality paths (yielding a 6.26% average performance boost).
- Inductive Superiority: Embedding-based methods (like RotatE) map entities to specific coordinates, making them fail completely when encountering new, unseen entities. Because EvoPath extracts high-level rules (meta-paths), it maintains remarkably stable performance in inductive reasoning tasks.
- Smaller LLMs Suffice: Interestingly, scaling up to massive models like LLaMA-2-70B did not guarantee better results. Compact, efficient models (like LLaMA-2-7B) combined with the evolutionary framework achieved optimal performance with much lower computational overhead.
Key Results
The framework was tested on Knowledge Base Completion (KBC) and Link Prediction tasks against 13 baseline methods:
- Knowledge Base Completion: On YAGO26K-906 and Dbpedia, EvoPath consistently outperformed traditional meta-path and rule-based baselines, matching or exceeding state-of-the-art embedding models like RotatE in key metrics like Hits@3 and Hits@10.
- Inductive Link Prediction: In experiments on the NELL dataset where nodes were progressively removed to simulate unseen entities, embedding models suffered a catastrophic performance drop. EvoPath showed minimal impact, vastly outperforming all baselines at a 100% node removal rate.
- Ablation Efficiency: Removing the Atom Selector caused a 7.49% drop in performance and slowed down processing speeds by 2.5 times, proving that constraining the LLM's vocabulary space is vital for efficiency.
Limitations and Future Work
While EvoPath effectively mitigates knowledge conflicts, the authors note a few areas for improvement:
- Deep HIN Embedding Comprehension: Future iterations will focus on enhancing the LLM's direct understanding of complex structural knowledge embedded within HINs.
- Reasoning Enhancements: The authors plan to integrate a Chain-of-Thought (CoT) mechanism directly into the meta-path discovery loop to help the LLM reason through multi-hop paths more logically.
- Cross-Database Expansion: Extending the framework to discover rules and reason across other types of offline databases beyond standard HINs.
Summary updated