Unlocking the Power of Large Language Models for Entity Alignment

Xuhui Jiang, Yinghan Shen, Zhichao Shi, Chengjin Xu, Wei Li, Zixuan Li, Jian Guo, Huawei Shen, Yuanzhuo Wang

TL;DR

ChatEA is a novel framework that injects the reasoning power and deep background knowledge of Large Language Models (LLMs) into the task of Entity Alignment (EA) across Knowledge Graphs. By translating graph structures into Python-style code and using an iterative, two-stage "collect-then-reason" dialogue strategy, ChatEA dramatically outperforms traditional embedding-based methods, particularly on highly complex and heterogeneous datasets.

What Problem Does This Paper Address?

Entity Alignment (EA) is the process of identifying identical real-world entities across different Knowledge Graphs (KGs)—a foundational step for data integration in AI.

Traditional EA methods rely heavily on Knowledge Representation Learning (KRL) to project entities into a low-dimensional embedding space, comparing them in a black-box manner. However, these methods suffer from two major flaws: they are strictly limited to the data present within the KGs (lacking external real-world context), and they fail to handle highly heterogeneous KGs where graph structures and densities differ significantly.

While LLMs possess the external knowledge and reasoning skills to solve this, you cannot simply dump entire KGs into an LLM prompt; the sheer volume of data easily shatters standard context length limits. ChatEA bridges this gap by combining the efficiency of traditional embeddings with the cognitive power of LLMs.

Methods

The ChatEA architecture consists of three main components:

  1. Entity Feature Pre-processing: Traditional KRL techniques (specifically, a baseline called Simple-HHEA) are used to generate multi-view embeddings for entities, combining name semantics (via BERT), temporal attributes (via Time2Vec), and structural topology (via biased random walks).
  2. KG-Code Translation: To help the LLM comprehend graph structures, ChatEA translates KG triples into a Python-style class format (Entity) with explicit member functions like get_neighbors(), get_relations(), and get_temporal(). This format prompts the LLM to autonomously generate concise entity descriptions, effectively activating its internal background knowledge.
  3. Two-Stage EA Strategy:
  4. Stage 1 (Candidate Collecting): Uses fast vector similarity (CSLS) on the pre-processed embeddings to quickly filter down a small pool of candidate matches for a target entity.
  5. Stage 2 (Reasoning & Rethinking): The LLM acts as a reasoning agent in a dialogue format, scoring candidates step-by-step based on name, description, structure, and time. If the top candidate's score is distinct and meets a confidence threshold, the alignment is made. If not, a "rethinking" loop triggers an expansion of the candidate pool for the next iteration.
Figure 2: The overview framework of our proposed ChatEA, which consists of three main components: (1) entity feature pre-processing, (2) KG-code translation, and (3) two-stage EA strategy.

Datasets

The authors evaluated ChatEA across four benchmarks:

  • DBP15K(EN-FR) & DBP-WIKI: Standard, relatively simple datasets where the graph pairs share similar structures, densities, and equal entity counts.
  • ICEWS-WIKI & ICEWS-YAGO: Highly challenging, heterogeneous, and practical datasets. The graph pairs here vary significantly in entity counts, structural density, and contain complex temporal facts.

Key Insights and Ideas

  • Code as a Graph Interface: LLMs are extensively pre-trained on code repositories. Wrapping graph structures in Python classes makes structural and relational data far more digestible for the model than raw text or triples.
  • Activating Parametric Memory: Traditional graphs are self-contained silos. By forcing the LLM to generate entity descriptions before alignment, ChatEA unlocks the vast external knowledge the LLM learned during pre-training (e.g., correctly identifying that the entity "British Monarch" aligns with "Monarchy of the United Kingdom", whereas traditional embeddings mistakenly aligned it with "British Raj").
  • Robustness to Embedding Noise: ChatEA acts as a powerful error-correction layer. Even if the initial KRL embeddings are highly degraded or noisy, the LLM's multi-dimensional reasoning filters out false positives effectively.

Key Results

  • SOTA Performance on Complex Data: While ChatEA performs on par with top-tier baselines on simple datasets (~0.99 Hits@1), it achieves massive breakthroughs on heterogeneous datasets. It outperforms the best state-of-the-art method (Simple-HHEA) by 16% on ICEWS-WIKI (0.880 Hits@1) and 8.8% on ICEWS-YAGO (0.935 Hits@1).
  • High Noise Tolerance: In noise-injection experiments, when embedding noise was increased up to 40%, traditional methods saw their Hits@1 scores plummet by up to 0.19. In contrast, ChatEA's performance dropped by a mere 0.01 to 0.09, demonstrating incredible stability.
Figure 3: Performance influence of entity embeddings comparing ChatEA and Simple-HHEA for EA.
  • Adaptive Efficiency: On simpler datasets, ChatEA converges rapidly in the first round of dialogue, conserving computational resources. On complex datasets, it adaptively utilizes extra iterations to ensure accuracy.
Figure 4: Proportions of iteration rounds of ChatEA’s two-stage reasoning on different datasets.

Limitations and Future Work

  • Latency and Cost: Relying on large LLM API calls or local 70B parameter models introduces significant inference latency and computational cost, making ChatEA less ideal for real-time applications.
  • Sensitivity to Model Scale: The framework's success is highly dependent on model size. When tested with smaller models like Llama2-13b, ChatEA suffered from formatting errors and reasoning hallucinations.
  • Future Directions: The authors point toward model distillation or Supervised Fine-Tuning (SFT) on smaller open-source models to retain ChatEA's high accuracy while slashing resource demands.

Summary updated

BibTeX
@inproceedings{jiang2024unlocking,
  author = {Xuhui Jiang and Yinghan Shen and Zhichao Shi and Chengjin Xu and Wei Li and Zixuan Li and Jian Guo and Huawei Shen and Yuanzhuo Wang},
  title = {{Unlocking the Power of Large Language Models for Entity Alignment}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.acl-long.408},
}
Figure