Abstract
Commonsense generation requires models to produce plausible sentences from a sparse set of concepts. While pretrained language models are fluent, they often struggle with the underlying logic of everyday scenarios. We present EKI-BART (Enhanced Knowledge Injection BART), a "retrieve-and-edit" framework that leverages external prototypes to inject world knowledge. By utilizing a novel scaling module and position indicators, EKI-BART effectively filters and integrates retrieved information, achieving state-of-the-art performance on the CommonGen benchmark.
Introduction
Large-scale pretrained language models like BART and T5 have revolutionized natural language generation. However, these models frequently fail at tasks requiring "commonsense"—the basic understanding of physical and social interactions. In the CommonGen task, models are given a set of concepts (e.g., front, guitar, microphone, sit) and must generate a logical sentence. Standard models often produce grammatically correct but nonsensical outputs, such as "the guitar sits in front of a microphone," failing to recognize that inanimate objects like guitars do not "sit" independently.
The core challenge lies in bridging the semantic gap between isolated concept words and a coherent, plausible scene. To address this, the authors propose EKI-BART, which retrieves real-world sentences ("prototypes") containing similar concepts to guide the generation process.
Methodology
EKI-BART follows a "retrieve-and-edit" paradigm. Instead of generating text from scratch, the model identifies prototypes from external corpora that share concepts with the input. To ensure the model uses this retrieved knowledge effectively without being overwhelmed by noise, three primary components are introduced:
- Group Embeddings (GE): These help the model distinguish between the user-provided concepts and the text from the retrieved prototype at the input layer.
- Scaling Module (SM): Acting as a "soft mask," this module assigns importance weights to prototype tokens. It learns to emphasize relevant concepts while down-weighting filler words.
- Prototype Position Indicator (PPI): This module provides the decoder with information regarding the relative distance between prototype tokens and target concepts, leveraging the intuition that proximity often implies semantic relevance.
Data Sources
The model was evaluated on the CommonGen benchmark. For retrieval, the authors utilized both in-domain ($D_{in}$) sources—such as VaTeX, SNLI, and Activity—and out-of-domain ($D_{out}$) sources like Wikipedia.
Results and Discussion
EKI-BART demonstrated significant improvements over baseline models. By retrieving prototypes, the model gains access to "missing" context; for instance, a prototype for guitar and microphone might include the word singer, helping the model construct a more natural scenario.
Quantitative Performance
As shown in the results table, EKI-BART ($D_{in}$) achieved state-of-the-art performance across multiple metrics. On the test set, it reached a BLEU-4 score of 36.10, a substantial increase from the vanilla BART baseline of 24.90.
Key Insights
- Soft Masking vs. Hard Masking: Ablation studies confirmed that the Scaling Module's "soft masking" approach is superior to "hard masking" (deleting non-concept words). Soft masking preserves useful descriptive context that would otherwise be lost.
- Domain Relevance: While Wikipedia prototypes provided some benefit, the most significant gains came from in-domain corpora rich in everyday activity descriptions. This highlights that the quality and relevance of the retrieved knowledge are critical.
Conclusion
EKI-BART successfully integrates external knowledge into the generation process, significantly improving the commonsense reasoning of language models. While the model excels at identifying scenario priorities, future work could explore more structured relationship modeling, such as using knowledge graphs, to further refine the logical consistency of generated scenes. Additionally, improving the robustness of the retrieval step remains a key area for development.
Summary updated