Introduction
Large-scale language models like BERT have demonstrated remarkable proficiency in capturing linguistic patterns and syntactic structures. However, they often lack the "world knowledge" or common sense that humans use to navigate everyday language. For example, while a model might understand the grammar of a sentence about "heartburn," it may not inherently know that heartburn is a painful side effect of eating certain foods unless it has been explicitly exposed to that relationship.
To address this limitation, researchers developed the Align, Mask, and Select (AMS) method. This approach provides a simple yet effective way to inject structured commonsense knowledge into language models, significantly improving their reasoning capabilities on benchmarks like CommonsenseQA and the Winograd Schema Challenge.
The Challenge of Knowledge Integration
Most commonsense knowledge is stored in structured Knowledge Graphs (KGs) such as ConceptNet, which represent information as triples (e.g., [eating lunch, Causes, heartburn]). In contrast, models like BERT are typically trained on unstructured text from sources like Wikipedia. Simply training a model on raw triples often fails because of the "domain gap"—the transition from natural sentences to rigid data structures confuses the model.
The AMS Method
The AMS method bridges this gap by converting structured knowledge into a format that resembles BERT's original training data. The process involves three key steps:
- Align: The system takes a triple from ConceptNet (e.g.,
[population, AtLocation, city]) and identifies a real-world sentence in Wikipedia that contains both concepts. This provides a natural language context for the relationship. - Mask: One of the concepts in the sentence is replaced with a special question token
[QW], effectively creating a fill-in-the-blank question. - Select: To ensure the model learns deep semantic nuances, the system selects "hard" distractors. Instead of picking random words, it searches ConceptNet for other concepts that share the same relationship with the unmasked concept. For a question about "population," distractors might include "country" or "state," which also have an
AtLocationrelationship.
The researchers used this method to generate a massive pre-training dataset of over 16 million multiple-choice samples, which was then used to "up-skill" a pre-trained BERT model.
Key Results and Evaluation
The resulting model, BERT-CS (Commonsense), was evaluated against several state-of-the-art benchmarks.
CommonsenseQA (CSQA)
CSQA is a dataset specifically designed to test world knowledge through multiple-choice questions. BERT-CS showed a marked improvement over standard models.
As shown in the table above, BERT-CS Large achieved 62.2% accuracy, a significant jump over the standard BERT Large (56.7%) and even outperforming models that utilized human-annotated explanations.
Winograd Schema Challenge (WSC)
The WSC involves resolving ambiguous pronouns (e.g., "The trophy doesn't fit into the suitcase because it is too large"). This task requires a deep understanding of physical properties and relationships.
On the WSC, the model reached 75.5% accuracy, a 3.3% absolute improvement over previous state-of-the-art results. This demonstrates that the AMS method successfully imparts logical reasoning capabilities.
General Language Understanding
A common concern in machine learning is "catastrophic forgetting," where a model loses its general capabilities after specialized training. However, evaluations on the GLUE benchmark showed that BERT-CS maintained performance nearly identical to the original BERT. This confirms that the AMS method is a "safe" way to add knowledge without degrading the model's foundational linguistic skills.
Conclusion
The Align, Mask, and Select method offers a scalable and effective solution for incorporating structured knowledge into language models. By leveraging natural language context and hard distractors, it allows models to move beyond statistical word association toward true commonsense reasoning. Future research may explore more sophisticated alignment techniques or apply AMS to even larger transformer architectures.
Summary updated