Unsupervised Pre-training with Structured Knowledge for Improving Natural Language Inference

Xiaoyu Yang, Xiaodan Zhu, Zhan Shi, Tianda LiarXiv 2021

Natural Language Inference (NLI)—the task of determining if one sentence logically follows from another—is a cornerstone of language understanding. While massive models like BERT have revolutionized the field by "reading" the entire internet, they still struggle with the kind of basic logic humans take for granted. In the paper "Unsupervised Pre-training with Structured Knowledge for Improving Natural Language Inference," researchers from Queen’s University propose a way to give these models a "cheat sheet" of human-curated knowledge to help them reason more effectively.

The Challenge of Implicit Knowledge

Modern NLP relies heavily on unsupervised pre-training. Models like BERT learn about language by predicting missing words in massive amounts of unstructured text. However, this "implicit" knowledge has limits. For example, a model might know that "dog" and "cat" often appear in similar contexts, but it might not explicitly understand that "dog" is a hyponym (a specific type) of "animal" or that "hot" is the antonym of "cold."

In NLI, these specific relationships are crucial. If a premise says "A man is playing a guitar" and the hypothesis says "A man is playing a banjo," a human knows these contradict because a guitar is not a banjo. A standard BERT model might see both as "musical instruments" and get confused. The authors aim to bridge this gap by integrating structured knowledge—human-organized databases of word relationships—directly into the neural network's architecture.

Integrating Structured Knowledge

The authors used BERT-Base as their foundation and proposed three distinct "M-blocks" to integrate knowledge from sources like WordNet and ConceptNet 5.5, focusing on five key relations: hypernymy, hyponymy, co-hyponyms, antonymy, and synonymy.

Architecture of the proposed model featuring M1, M2, and M3 integration blocks.
  1. M1 (Attention Weights Adjustment): This method modifies the Transformer's self-attention mechanism. It takes a matrix of semantic relations between word pairs and uses it to "nudge" the attention weights, helping the model focus on the most relevant word alignments between the premise and the hypothesis.
  2. M2 (Knowledge-Specific Layer): This approach adds a new attention layer on top of standard Transformer blocks. This layer is specifically designed to process features extracted from the knowledge base using a Convolutional Neural Network (CNN).
  3. M3 (Global Inference Integration): This method injects knowledge at the final classification stage. It combines the model's high-level sentence representation with structured knowledge features to make the final prediction (Entailment, Neutral, or Contradiction).

Experimental Results and Robustness

The models were evaluated on major benchmarks including SNLI, MultiNLI, and the Glockner diagnostic "stress test." The combined model achieved 91.0% accuracy on SNLI, surpassing the BERT-Base baseline of 90.6%. On the Glockner diagnostic set, the model reached 95.3% accuracy, demonstrating significant robustness against simple heuristics.

Accuracy comparison in low-resource training scenarios.

A key finding was that structured knowledge acts as a "force multiplier" for small data. As shown in the figure above, when using only 0.01% of the SNLI training set, the knowledge-enhanced model outperformed the standard BERT baseline by a significant margin. This suggests that while pre-training captures broad linguistic context, structured knowledge provides the "logical anchors" needed for precise inference when examples are limited.

Conclusion

The research demonstrates that unsupervised pre-training and structured knowledge are complementary. Injecting knowledge into the higher layers of BERT proved most effective, suggesting that semantic relations are most useful during high-level reasoning. While challenges remain regarding computational expense and knowledge sparsity, this work provides a clear path toward more robust and logically sound natural language understanding systems.

Summary updated

BibTeX
@misc{yang2021unsupervised,
  author = {Xiaoyu Yang and Xiaodan Zhu and Zhan Shi and Tianda Li},
  title = {{Unsupervised Pre-training with Structured Knowledge for Improving Natural Language Inference}},
  year = {2021},
  eprint = {2109.03941},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2109.03941},
}
Figure