ANALOGYKB: Unlocking Analogical Reasoning of Language Models with A Million-scale Knowledge Base

Siyu Yuan, Jiangjie Chen, Changzhi Sun, Jiaqing Liang, Yanghua Xiao, Deqing Yang

Introduction

Analogical reasoning is a fundamental pillar of human cognition, enabling the transfer of knowledge from a familiar source domain to a novel target domain by identifying shared structural patterns. A classic example is the comparison between the solar system and the structure of an atom: just as planets orbit the sun due to gravitational force, electrons orbit a nucleus due to electric force. Despite the remarkable progress of Large Language Models (LLMs), their ability to perform such abstract relational mapping remains inconsistent, often hindered by a lack of diverse, high-quality training data.

Analogical mapping between the Solar System and Atom Structure.

The Challenge of Data Scarcity

The primary bottleneck in advancing analogical reasoning in AI is not necessarily the model architecture but the scarcity of large-scale datasets. Traditional benchmarks like the SAT or BATS contain only a few hundred to a few thousand samples. This scale is insufficient for models to learn the nuanced, abstract patterns required for sophisticated analogical "leaps." To address this, researchers have introduced ANALOGYKB, the first million-scale knowledge base specifically designed for analogical reasoning.

Methodology: Constructing ANALOGYKB

The authors developed an automated pipeline to extract and refine analogies from existing Knowledge Graphs (KGs) such as Wikidata and ConceptNet. The core innovation lies in the categorization of analogies into two types:

  1. Analogies of the Same Relation: These involve identical relations across different entity pairs (e.g., "Paris is to France as Tokyo is to Japan," where the relation is "capital of").
  2. Analogies of Analogous Relations: These involve different but conceptually similar relations, such as comparing a CEO's role in a company to a Head of State's role in a country.
The ANALOGYKB construction pipeline, distinguishing between same and analogous relations.

To identify these "analogous relations" efficiently, the team employed an LLM-in-the-loop approach. They used word embeddings to find semantically similar relation candidates, which were then validated by InstructGPT. The process was further refined using structural rules like Symmetry (if R1 is analogous to R2, then R2 is analogous to R1) and Meta-relation Summarization (ensuring both relations fall under a common abstract category, like "head of organization").

Dataset Characteristics

ANALOGYKB comprises over one million concept pairs spanning 943 distinct relations, including 103 pairs of analogous relations. This scale allows for robust fine-tuning and provides a rich source for retrieval-augmented reasoning. The dataset was evaluated across six established benchmarks, including E-KAR (explainable reasoning), BATS (linguistic/encyclopedic), and SAT (college entrance level), as well as the SCAN dataset for out-of-domain metaphorical analogies.

Key Insights and Results

The research yielded several critical insights:

  • Abstraction is Key: Training on analogies of analogous relations proved significantly more effective than using simple identical relations. This approach forces models to learn higher-order "meta-relations," mirroring human cognitive processes.
  • Performance Jumps: Models fine-tuned on ANALOGYKB showed substantial improvements. For example, a RoBERTa-Large model's mean accuracy across benchmarks increased from 59.92% to 77.44%. In generative tasks, a T5-Large model (AnalogyT5) saw its accuracy on the E-KAR task leap from 13% to 57%.
  • Retrieval-Augmented Reasoning: For massive models like ChatGPT, ANALOGYKB serves as an excellent retrieval source. By providing high-quality analogical examples in the prompt, the model's zero-shot reasoning capabilities are significantly enhanced.
  • Generalization: Models trained on ANALOGYKB demonstrated improved performance even on metaphorical analogies (SCAN dataset) not present in the training set, suggesting they learned the underlying process of analogizing rather than just memorizing facts.

Conclusion and Future Work

ANALOGYKB represents a significant step toward human-like reasoning in AI. By providing a massive, structured resource of relational mappings, it enables both small and large models to bridge domain gaps more effectively. While the current version focuses on the "A:B::C:D" format, future work aims to explore more complex, multi-entity analogies and expand into specialized domains like law and science to further unlock the potential of analogical AI.

Summary updated

BibTeX
@inproceedings{yuan2024analogykb,
  author = {Siyu Yuan and Jiangjie Chen and Changzhi Sun and Jiaqing Liang and Yanghua Xiao and Deqing Yang},
  title = {{ANALOGYKB: Unlocking Analogical Reasoning of Language Models with A Million-scale Knowledge Base}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.acl-long.68},
}
Figure