TL;DR
This paper introduces a novel framework to improve lexically-constrained text generation—the task of writing a coherent sentence using a specific set of "must-have" words. By extracting multi-hop relationships from the ConceptNet knowledge graph and injecting them into a UniLM model via a specialized attention mechanism, the authors significantly improve both the common-sense plausibility and the keyword coverage of generated text.
What Problem Does This Paper Address?
State-of-the-art language models (LLMs) are excellent at generating fluent text, but they often stumble when forced to include specific keywords (lexical constraints). On the CommonGen benchmark, models frequently fail in two ways:
- Logical Hallucinations: They generate syntactically correct but nonsensical sentences. For example, given the set
{dog, catch, throw, frisbee}, a model might produce "A dog throws a frisbee at a football player"—technically a sentence, but physically improbable. - Poor Coverage: Models often simply "forget" to include one or more of the required concepts or use them with the wrong Part-of-Speech (POS) tag (e.g., using "comb" as a noun when the constraint required a verb).
The authors argue that these models lack the underlying "world knowledge" needed to understand how these concepts relate in reality.
Methods
The researchers propose a three-step pipeline to bridge this gap:
- Knowledge Extraction: For a given set of concepts, the system searches ConceptNet for multi-hop paths (1 to 3 hops) that link the words together. To avoid overwhelming the model with noise, they use heuristic selection methods, such as filtering by POS tags and using prior probabilities to pick the most relevant relations.
- Knowledge Injection: Instead of just appending this knowledge to the input text, they use an Attention Injection Method. As shown in Figure 1, they encode the ConceptNet triples using a Bi-LSTM and inject this context into the UniLM encoder layers. This allows the model to "attend" to the logical relationships between concepts while processing the input.
- Constrained Decoding (Best-N Beam Scoring): To ensure the model actually follows the rules, they modify the decoding process. They scan the top $N$ candidates from the beam search and select the one that best satisfies the keyword coverage and POS tag requirements, rather than just picking the candidate with the highest raw probability.
Datasets
The primary benchmark used is CommonGen, a dataset specifically designed for generative commonsense reasoning. It requires models to generate a sentence from a concept-set of 3-5 words. The external knowledge is sourced from ConceptNet 5.5, a large-scale semantic network of general human knowledge.
Key Insights and Ideas
- Multi-hop is Mandatory: Many concepts in CommonGen aren't directly linked in knowledge graphs. By looking 2 or 3 hops away, the model finds the "connective tissue" (e.g., connecting "broccoli" to "pizza" via "plate") that makes a scene plausible.
- Knowledge Filtering is Crucial: Simply dumping all related triples into a model creates "noise" that degrades performance. The authors found that "Prior subset selection"—choosing relations based on how often they appear in the training data—yielded the best results.
- Decoding vs. Training: While injection helps the model "understand" the concepts, the Best-N Beam Scoring is what truly fixes the coverage problem. It acts as a safety net to ensure the model doesn't get distracted and leave out a required word.
Key Results
The proposed methods showed clear improvements across standard NLP metrics like BLEU, METEOR, and CIDEr.
As seen in Table 1, the "Attention + Prior subset selection" model achieved the highest BLEU-4 score (28.4), outperforming the baseline UniLM.
More importantly, the lexical analysis in Table 3 highlights the impact of their decoding strategy. The baseline UniLM missed required concepts 42.9% of the time. By adding the Best-N Beam Scoring, that failure rate dropped to 27.04%.
Qualitatively, the model produced much more logical sentences. In Table 4, for the concepts {board, boat, ride, water}, the baseline produced a repetitive mess: "People board a boat and board a ride in the water." The proposed model generated: "A man rides a boat in the water with a boy on board."
Limitations and Future Work
While the results are promising, the authors note a few areas for improvement:
- Repetition: Even with better logic, models still occasionally repeat words.
- Expansion Noise: Attempting to "expand" the query with even more concepts sometimes introduced irrelevant information that confused the model.
- Future Directions: The team plans to explore pre-training the injection layers directly and testing the framework on other knowledge graphs like ATOMIC or Wikidata to see if different types of knowledge (e.g., cause-and-effect) provide further benefits.
Summary updated