Can BERT Reason? Logically Equivalent Probes for Evaluating the Inference Capabilities of Language Models

Pei Zhou, Rahul Khanna, Bill Yuchen Lin, Daniel Ho, Xiang Ren, Jay Pujara

Abstract

Pre-trained language models (PTLMs) have achieved impressive performance on commonsense inference benchmarks, but their ability to employ commonsense to make robust inferences, which is crucial for effective communications with humans, is debated. In the pursuit of advancing fluid human-AI communication, we propose a new challenge, RICA: Robust Inference capability based on Commonsense Axioms, that evaluates robust commonsense inference despite textual perturbations. To generate data for this challenge, we develop a systematic and scalable procedure using commonsense knowledge bases and probe PTLMs across two different evaluation settings. Extensive experiments on our generated probe sets with more than 10k statements show that PTLMs perform no better than random guessing on the zero-shot setting, are heavily impacted by statistical biases, and are not robust to perturbation attacks. We also find that fine-tuning on similar statements offer limited gains, as PTLMs still fail to generalize to unseen inferences. Our new large-scale benchmark exposes a significant gap between PTLMs and human-level language understanding and offers a new challenge for PTLMs to demonstrate commonsense.

Introduction: Beyond Pattern Matching

While PTLMs like BERT and RoBERTa have reached human-level performance on many commonsense benchmarks, researchers suspect these models are "gaming" the tests by picking up on statistical biases rather than understanding underlying logic. True human-AI communication requires two major hurdles to be cleared: robustness to linguistic variation and the ability to reason about novel entities. If a model understands that "A is smaller than B implies A fits inside B," it should maintain this understanding when rephrased as "B is too large to fit inside A." Furthermore, to test pure reasoning rather than memorized facts (e.g., "elephants are big"), models must apply logic to unknown objects, such as a "prindag" or a "fluberg."

The RICA Framework: Systematic Axiom Generation

To address these challenges, the authors developed a systematic pipeline to generate the RICA (Robust Inference using Commonsense Axioms) challenge. This pipeline relies on a logical backbone of First-Order Logic (FOL) templates populated by arguments from commonsense knowledge bases like ConceptNet and ATOMIC.

The systematic pipeline for generating the RICA challenge, moving from logical predicates to diverse commonsense statements involving novel entities.

The generation process involves several key steps:

  1. Logical Backbone: Defining high-level predicates (Property, Comparator, and Relation) to build templates (e.g., Smaller(A, B) → FitsInside(A, B)).
  2. Linguistic Perturbations: Applying operators like negation, antonyms, and paraphrasing to create logically equivalent but linguistically diverse statements.
  3. Novel Entities: Replacing real-world nouns with randomly generated strings to ensure models cannot rely on pre-training memory.

Probing Methodology and Datasets

Models were evaluated using two primary tasks: Masked Word Prediction (filling in comparative words like "more" or "less") and Sentence Probability (determining which version of a logical statement is more likely). The study utilized three distinct tiers of data:

  • Raw Set (257k statements): Automatically generated via the FOL pipeline.
  • Human-Verified Set (10k statements): A subset verified by human workers to ensure logical consistency.
  • Human-Curated Set (1.6k statements): A "hard" set where humans authored the perturbations, introducing complex linguistic variety.

Experimental Results and the "Positivity Bias"

The results of the RICA challenge reveal significant limitations in current PTLMs. In zero-shot settings, all tested models (including BERT, RoBERTa, ERNIE, and GPT-2) performed near 50% accuracy—essentially random guessing. In contrast, human benchmarks reached 91.7%.

Average accuracy of various PTLMs across different data settings, highlighting the struggle in zero-shot scenarios and the limits of fine-tuning.

A striking discovery was the "Positivity Bias." PTLMs act as "statistical optimists," showing a heavy bias toward predicting positive-valence words (like "more" or "better") regardless of the logic, likely because these words appear more frequently in training corpora. Furthermore, models appeared to be "parroting" keywords rather than reasoning; when background knowledge was provided explicitly, scores rose, but if the prompt was negated, the models failed to flip their logic accordingly.

The Generalization Wall

Fine-tuning offered limited relief. While models fine-tuned on 100,000 automated examples reached ~90% accuracy on the Human-Verified set, they remained at ~50% on the Human-Curated set. This suggests that models learn the specific templates of the data generator rather than the underlying logical axioms. Future work must move beyond surface-level pattern matching toward models that can map natural language into internal symbolic representations and develop training objectives that penalize statistical biases while rewarding logical consistency.

Summary updated

Abstract

Pre-trained language models (PTLMs) have achieved impressive performance on commonsense inference benchmarks, but their ability to employ commonsense to make robust inferences, which is crucial for effective communications with humans, is debated. In the pursuit of advancing fluid human-AI communication, we propose a new challenge, RICA: Robust Inference capability based on Commonsense Axioms, that evaluates robust commonsense inference despite textual perturbations. To generate data for this challenge, we develop a systematic and scalable procedure using commonsense knowledge bases and probe PTLMs across two different evaluation settings. Extensive experiments on our generated probe sets with more than 10k statements show that PTLMs perform no better than random guessing on the zero-shot setting, are heavily impacted by statistical biases, and are not robust to perturbation attacks. We also find that fine-tuning on similar statements offer limited gains, as PTLMs still fail to generalize to unseen inferences. Our new large-scale benchmark exposes a significant gap between PTLMs and human-level language understanding and offers a new challenge for PTLMs to demonstrate commonsense.
BibTeX
@inproceedings{zhou2021can,
  author = {Pei Zhou and Rahul Khanna and Bill Yuchen Lin and Daniel Ho and Xiang Ren and Jay Pujara},
  title = {{Can BERT Reason? Logically Equivalent Probes for Evaluating the Inference Capabilities of Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.598},
}
Figure