Mining Knowledge for Natural Language Inference from Wikipedia Categories

Mingda Chen, Zewei Chu, Karl Stratos, Kevin Gimpel

Introduction

Natural Language Inference (NLI) and Lexical Entailment (LE) are fundamental tasks in artificial intelligence that require a deep understanding of logical relationships between phrases. To determine if "I bought a Honda" entails "I bought a car," a model must possess the world knowledge that a "Honda" is a type of "car." Traditionally, this knowledge has been sourced from curated bases like WordNet or Wikidata. However, these resources are often limited by their coarse granularity or the high cost of manual maintenance.

This paper introduces WIKINLI, a novel dataset derived from the vast, naturally annotated hierarchy of Wikipedia categories. By leveraging this overlooked entailment graph, researchers provide a rich source of fine-grained world knowledge for pretraining language models.

Methodology: Constructing WIKINLI

The authors developed an automated pipeline to transform the Wikipedia category graph into a structured training dataset of over 400,000 phrase pairs. The process involves several key steps:

  1. Relationship Mapping: Child-to-parent category links are treated as entailment relations. For example, the category Bone fractures logically entails the broader category Injuries.
  2. Filtering and Quality Control: To maintain high data quality, the pipeline removes trivial pairs (such as substrings), limits phrase length, and excludes meta-categories like "stubs" or "lists."
  3. Hard Negative Sampling: To improve the model's discriminative power, "neutral" pairs are sampled. The authors used ELMo embeddings to identify phrases that are topically related but lack a hierarchical link, creating challenging negatives that prevent the model from relying on simple keyword overlap.
Examples of category pairs and their mapped relationships (P: Parent, C: Child, N: Neutral).

The "Middle Road" of Knowledge

A core contribution of this work is identifying Wikipedia categories as a "middle road" between raw text and rigid knowledge bases. While WordNet is highly structured, it often lacks the diverse, commonsense connections found in real-world usage. Wikipedia categories, by contrast, capture multifaceted relationships. For instance, New Year's Eve is linked not just to Days but also to Entertainment Events—a connection frequently absent in more formal databases.

Comparison of hierarchies for "New Year's Eve" across Wikipedia, Wikidata, and WordNet.

Experimental Results

The researchers evaluated the impact of WIKINLI by using it for a "second stage" of pretraining for BERT and RoBERTa models before finetuning them on specific downstream tasks.

Performance Gains

Pretraining on WIKINLI yielded superior results across eight different NLI and LE tasks. BERT and RoBERTa models pretrained on WIKINLI achieved average performances of 81.0% and 83.8%, respectively, outperforming versions trained on WordNet or Wikidata.

Low-Resource Scenarios

The most significant advantages were observed in "low-resource" settings. When downstream training data was limited (e.g., only 2,000 samples), WIKINLI acted as a powerful "knowledge injector," providing the model with the necessary background information that it could not otherwise learn from the small task-specific dataset.

Directionality and Robustness

WIKINLI specifically helps models distinguish between symmetric relationships (synonyms) and directional ones (hypernyms). It teaches the model that while a "car" is a "vehicle," the reverse is not necessarily true. This improved logical grounding was evident in the Break dataset—an adversarial set designed to fool models with word-level swaps—where the WIKINLI-pretrained BERT saw a 5.5% accuracy increase over the baseline.

Conclusion and Future Directions

While WIKINLI significantly enhances phrase-level reasoning, the authors note a "context gap" when dealing with complex, paragraph-long reasoning tasks like those found in the ANLI dataset. Future work aims to bridge this gap by incorporating actual sentences from Wikipedia articles (a proposed "WikiSentNLI") to provide richer sentential context. Nevertheless, WIKINLI stands as a robust, scalable, and multilingual resource for injecting world knowledge into modern NLP architectures.

Summary updated

BibTeX
@inproceedings{chen2020mining,
  author = {Mingda Chen and Zewei Chu and Karl Stratos and Kevin Gimpel},
  title = {{Mining Knowledge for Natural Language Inference from Wikipedia Categories}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.findings-emnlp.313},
}
Figure