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

Abstract

Entity Alignment (EA) is a fundamental task for integrating knowledge from diverse sources. Traditional methods relying on Knowledge Representation Learning (KRL) often struggle with data heterogeneity and lack interpretability. This paper introduces ChatEA, a novel framework that synergizes traditional embedding techniques with the reasoning capabilities of Large Language Models (LLMs). By translating Knowledge Graph (KG) structures into code and implementing a two-stage "reasoning and rethinking" strategy, ChatEA significantly improves alignment accuracy on complex datasets and demonstrates remarkable robustness to noise.

Introduction

Entity Alignment (EA) aims to identify identical entities across different Knowledge Graphs (KGs). This process is vital for building comprehensive knowledge bases and improving downstream AI tasks. Historically, EA has been dominated by Knowledge Representation Learning (KRL), which maps entities into a continuous vector space. While efficient, these "black box" embedding methods face significant hurdles: they are sensitive to structural differences between graphs and lack the external context or "common sense" required to resolve ambiguous matches.

Methodology: The ChatEA Framework

ChatEA addresses these limitations by positioning an LLM as an intelligent judge within the alignment pipeline. The framework operates through three integrated components:

1. Entity Feature Pre-processing

ChatEA leverages existing KRL-based EA methods (specifically Simple-HHEA) to generate initial embeddings. These embeddings capture basic semantic and structural information from entity names, relations, and timestamps, providing a computationally efficient starting point for the alignment process.

2. KG-Code Translation

A core innovation of ChatEA is the translation of graph structures into a Python-style code format. Entities are defined as class objects with specific member functions such as get_neighbors() and get_temporal(). This approach exploits the fact that LLMs are extensively trained on code, allowing them to parse complex relational data more effectively than raw text triples.

The ChatEA architecture, illustrating the transition from KG-Code translation to the two-stage reasoning strategy.

3. Two-Stage EA Strategy

To balance accuracy and computational cost, ChatEA employs a two-stage dialogue strategy:

  • Stage 1: Candidate Collecting: Fast embedding similarity is used to identify a small set of potential matches.
  • Stage 2: Reasoning & Rethinking: The LLM evaluates these candidates through a multi-step reasoning process. It considers name similarity, structural context, and its own internal background knowledge to generate entity descriptions. If the initial results are unsatisfactory, the model "rethinks" its decision and expands the search scope iteratively.

Key Results and Insights

The researchers evaluated ChatEA on several benchmarks, including the highly heterogeneous ICEWS-WIKI and ICEWS-YAGO datasets.

Performance Gains

ChatEA achieved state-of-the-art results, particularly on complex datasets. On ICEWS-WIKI, the Hits@1 score improved from 0.720 to 0.880. This performance leap suggests that the LLM's reasoning capabilities are far more effective at handling heterogeneous data than simple semantic matching used in previous pre-trained language model (PLM) approaches.

Robustness to Noise

One of the most significant findings is ChatEA's resilience to low-quality data. In experiments where random noise was injected into entity embeddings, traditional KRL methods experienced a sharp decline in performance. In contrast, ChatEA maintained high accuracy levels.

Performance of ChatEA vs. traditional embedding methods under varying levels of noise on ICEWS datasets.

As shown in the figure above, even with a 40% noise ratio, ChatEA's reasoning allows it to "overrule" misleading embedding data by relying on its internal knowledge and the logical structure provided via KG-Code translation.

Discussion and Future Work

While ChatEA represents a major advancement, it is not without challenges. The primary limitation is the high inference cost associated with large-scale models like GPT-4. Additionally, the framework's reasoning benefits are less pronounced with smaller models (e.g., Llama2-13B), which occasionally struggle with complex formatting or logical consistency.

Future research will focus on model distillation and supervised fine-tuning (SFT) to enable smaller, more efficient models to achieve comparable reasoning performance. This would make the ChatEA framework more viable for large-scale, real-time data integration tasks.

Conclusion

ChatEA demonstrates that the integration of LLMs into the entity alignment pipeline can overcome long-standing barriers in data heterogeneity and interpretability. By treating the alignment task as a structured reasoning problem, ChatEA sets a new standard for accuracy and robustness in Knowledge Graph integration.

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