NeuroComparatives: Neuro-Symbolic Distillation of Comparative Knowledge

Phillip Howard, Junlin Wang, Vasudev Lal, Gadi Singer, Yejin Choi, Swabha Swayamdipta

Abstract

Comparative reasoning—understanding that "steel is stronger than styrofoam"—is fundamental to human-like world knowledge. While Large Language Models (LLMs) possess vast information, extracting reliable comparative facts remains a challenge. We introduce NeuroComparatives, a neuro-symbolic framework designed to distill massive amounts of comparative knowledge from LLMs. By combining large-scale "overgeneration" with rigorous symbolic filtering and a trained discriminator, we produced a knowledge base of 8.8 million comparisons. This resource is 10x larger and significantly more accurate than previous benchmarks, proving that smaller models like GPT-2 can generate high-quality knowledge when guided by appropriate constraints.

The Challenge of Comparative Reasoning

LLMs are frequently evaluated on general knowledge, but they often falter on specific, reliable comparative reasoning. Fundamental world knowledge, such as the relative strength or weight of objects, is essential for solving complex linguistic tasks like the Winograd Schema Challenge. Existing comparative knowledge bases (KBs) are typically small, manually curated, or suffer from high noise levels when scraped from the web.

This research addresses two primary questions:

  1. How do models of varying scales (from GPT-2 to GPT-4) perform at generating high-quality comparative knowledge?
  2. Can neuro-symbolic techniques—merging neural generation with symbolic logic—build a superior knowledge base compared to existing methods?

The NeuroComparatives Framework

The authors propose a three-stage pipeline to distill knowledge from LLMs, moving from entity selection to constrained generation and final validation.

The three-stage NeuroComparatives pipeline: entity collection, overgeneration, and multi-stage filtering.

1. Collecting Comparable Entities

The process begins by seeding Wikidata classes (e.g., "physical object") and expanding them using CategoryBuilder to identify related everyday items. This resulted in 1.74 million entity pairs, such as "blender" and "food processor."

2. Overgenerating Comparatives

The framework utilizes different strategies based on model type:

  • Open-Source LMs (GPT-2 XL, Llama-2): These models use NeuroLogic, a constrained decoding algorithm. It forces the inclusion of "positive constraints" (e.g., "typically," "more") while excluding "negative constraints" (e.g., pronouns) to ensure clean, declarative comparative statements.
  • Proprietary LLMs (GPT-4, ChatGPT): These models generate completions via few-shot prompting for the same entity pairs.

3. Multi-Stage Filtering

To ensure high precision, the generated statements undergo a rigorous filtering process:

  • Deduplication: T5 embeddings are used to cluster and remove redundant information.
  • Contradiction Filtering: A RoBERTa-based classifier discards mutually exclusive statements.
  • Discriminative Filtering: A "knowledge discriminator" trained on human-annotated data ranks statements by validity.

Datasets and Benchmarks

The primary output is the NeuroComparatives (NC) dataset, containing up to 8.8M comparisons. It is released in three tiers: NC-XL (full set), NC-L (top 50%), and NC-S (top 20%). Additionally, the authors introduced ComparativeQA, a benchmark of 656 reasoning questions derived from human-verified statements.

Key Results and Insights

The study yields several significant findings regarding the scale and quality of distilled knowledge.

  • Small Models, Big Impact: Surprisingly, a small model like GPT-2 XL, when guided by NeuroLogic constraints, can produce knowledge that rivals the quality of few-shot generations from GPT-4.
  • Superior Accuracy and Scale: NeuroComparatives is 10x larger than WebChild (the previous gold standard). The NC-S subset achieved a 90.1% human acceptance rate, a massive improvement over WebChild's 58.1%.
  • The Power of Filtering: The effectiveness of the discriminator is a key driver of quality. As the filtering threshold increases, the reliability of the remaining facts improves significantly.
Human acceptance rate increases significantly as the knowledge discriminator filters out lower-ranked generations.
  • Downstream Performance: Fine-tuning a Llama-2-7b model on NC data improved its performance on the ComparativeQA task from 60.7% to 92.7%.

Limitations and Future Directions

While NeuroComparatives represents a major leap forward, it is currently limited to English and noun-based physical objects. Future work could expand the framework to include comparisons between verbs and adjectives or adapt it for multilingual contexts. Furthermore, while the discriminator is highly effective, the risk of "hallucinated" facts remains, necessitating caution in sensitive applications.

Summary updated

BibTeX
@inproceedings{howard2024neurocomparatives,
  author = {Phillip Howard and Junlin Wang and Vasudev Lal and Gadi Singer and Yejin Choi and Swabha Swayamdipta},
  title = {{NeuroComparatives: Neuro-Symbolic Distillation of Comparative Knowledge}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-naacl.281},
}
Figure