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 · OpenReview

Abstract

Entity Alignment (EA) is vital for integrating diverse knowledge graph (KG) data, playing a crucial role in data-driven AI applications. Traditional EA methods primarily rely on comparing entity embeddings, but their effectiveness is constrained by the limited input KG data and the capabilities of the representation learning techniques. Against this backdrop, we introduce ChatEA, an innovative framework that incorporates large language models (LLMs) to improve EA. To address the constraints of limited input KG data, ChatEA introduces a KG-code translation module that translates KG structures into a format understandable by LLMs, thereby allowing LLMs to utilize their extensive background knowledge to improve EA accuracy. To overcome the over-reliance on entity embedding comparisons, ChatEA implements a two-stage EA strategy that capitalizes on LLMs' capability for multi-step reasoning in a dialogue format, thereby enhancing accuracy while preserving efficiency. Our experimental results affirm ChatEA's superior performance, highlighting LLMs' potential in facilitating EA tasks.

Introduction

Entity Alignment (EA) is the task of identifying identical entities across different Knowledge Graphs (KGs)—for instance, matching "Apple Inc." in one database to "Apple" in another. Historically, this task has been dominated by Knowledge Representation Learning (KRL) methods, which map entities into a high-dimensional vector space (embeddings) and calculate their similarity. However, KRL-based methods face significant hurdles: they rely solely on internal KG structures (ignoring external human knowledge), offer "black-box" reasoning without explanation, and struggle with heterogeneous KGs that have differing structures or densities.

The ChatEA Framework

To overcome these challenges, we present ChatEA, a novel framework that treats EA as a dialogue-based reasoning task. ChatEA combines the efficiency of traditional embedding methods with the sophisticated reasoning power of Large Language Models (LLMs).

Overview of the ChatEA framework, detailing the KG-Code Translation and the Two-Stage EA Strategy.

The framework is built upon three main pillars:

  1. KG-Code Translation: To bridge the gap between graph data and LLMs, ChatEA converts KG structures into Python-style classes. This "code-as-interface" approach leverages the fact that LLMs are pre-trained on massive codebases, making them highly proficient at parsing structured data like neighbors, relations, and timestamps.
  2. Entity Feature Pre-processing: ChatEA utilizes a KRL model (specifically Simple-HHEA) to generate initial embeddings based on names, structures, and temporal attributes, providing a fast retrieval foundation.
  3. Two-Stage EA Strategy:
  4. Stage 1 (Candidate Collecting): Uses fast KRL embeddings to filter the search space down to a manageable set of likely candidates.
  5. Stage 2 (Reasoning and Rethinking): The LLM performs a multi-step evaluation of these candidates, analyzing name, structural, and temporal similarity. A crucial "Rethinking" step allows the model to expand its search scope if the top candidate is not sufficiently distinct from others.

Experimental Evaluation

ChatEA was evaluated on four benchmarks, ranging from simple, homogeneous datasets (DBP15K, DBP-WIKI) to complex, heterogeneous ones (ICEWS-WIKI, ICEWS-YAGO). The framework significantly outperformed 11 state-of-the-art baselines. On complex datasets, ChatEA improved the Hits@1 (top-match accuracy) by 16% on ICEWS-WIKI and 8.8% on ICEWS-YAGO compared to previous best methods. On simpler datasets, it achieved near-perfect scores (0.990+).

Robustness and Insights

A standout feature of ChatEA is its extreme robustness to noise. In experiments where random noise was injected into entity embeddings, ChatEA's performance remained remarkably stable, whereas traditional KRL methods saw their accuracy plummet. This suggests that the LLM's internal "world knowledge" acts as a powerful safety net when structural data is unreliable.

Performance of ChatEA vs. traditional embedding methods (Simple-HHEA) under varying levels of noise in the ICEWS-WIKI and ICEWS-YAGO datasets.

Furthermore, the research highlights that LLMs "think" more effectively when data is presented as code rather than raw triples. While GPT-4 yielded the best results, open-source models like Llama2-70b also demonstrated strong performance, though smaller models (e.g., Llama2-13b) struggled with reasoning errors and formatting constraints.

Conclusion

ChatEA demonstrates the potential of LLMs as a reasoning layer for complex data integration tasks. By combining fast retrieval with nuanced, code-based reasoning, it sets a new state-of-the-art for Entity Alignment. Future work will focus on improving efficiency and exploring Supervised Fine-Tuning (SFT) to distill these reasoning capabilities into smaller, more cost-effective models.

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