Harnessing Black-Box Control to Boost Commonsense in LM ’s Generation (2023)

Abstract: Large language models (LLMs) such as GPT-3 have demonstrated a strong capability to generate coherent and contextually relevant text. However, amidst their successes, a crucial issue persists: their generated outputs still lack commonsense at times. Moreover, fine-tuning the entire LLM towards more commonsensical outputs is computationally expensive if not infeasible. In this paper, we present a computation-efficient framework that steers a frozen Pre-Trained Language Model (PTLM) towards more commonsensical generation (i.e., producing a plausible output that incorporates a list of concepts in a meaningful way). Specifically, we first construct a reference-free evaluator that assigns a sentence with a commonsensical score by grounding the sentence to a dynamic commonsense knowledge base from four different relational aspects. We then use the scorer as the oracle for commonsense knowledge, and extend the controllable generation method called NADO to train an auxiliary head that guides a fixed PTLM to better satisfy the oracle. We test our framework on a series of GPT-2-, Flan-T5-, and Alpaca-based language models (LMs) on two constrained concept-to-sentence benchmarks. Human evaluation results demonstrate that our method consistently leads to the most commonsensical outputs.

## introduction recent years have witnessed remarkable progress in massively pre-trained language models such as @xcite , llama @xcite and instruction following models such as flan-t5 @xcite , @xcite , and alpaca @xcite . however, one significant drawback is the lack of commonsense knowledge in their generated texts. there have been criticisms around their commonsense 1 source code will be available at https://github.com/ pluslabnlp/boost_emnlp23 ## experimental results for the oracle in this section, we show the results of the commonsense scorer described in §2.2. the experiments and results of commonsense-guided generation ( §2.3) can be found in §4 and §5. ## related works controllable generation with frozen ptlms there are two major lines: modifying the decoding algorithm and guiding ptlms with auxiliary models. recently, @xcite propose neurologic decoding with a look ahead heuristic, and @xcite propose energy-based constrained decoding. one drawback of this line that the inference is slow due to the large search space. in the other line, @xcite ; @xcite guide the generation process with an auxiliary model in a plug-and-play fashion by leveraging statistical principles such as the bayesian rule. @xcite propose to solve the distributional discrepancy of training data and ptlm's generated tokens by training with data directly sampled from the base model. however, mistakes in commonsense are neglected when previous works formulate the whole task as a lexical constrained generation game. commonsense metrics @xcite measures the commonsense of dialogue turns by hard and soft matching the relations across each turn to conceptnet. accent @xcite propose an unsupervised metric to measure the event commonsense of dialogue responses via the atomic knowledge graph @xcite . our commonsense oracle is inspired by accent but we primarily focused on factoid commonsense in a constrained generation setting. a concurrent work of ours is vera @xcite , a supervised model that learns to estimate the plausibility of statements. on the other hand, our metric is unsupervised and neuro-symbolic, thus more interpretable. ## conclusion we present boost, a framework to boost the commonsense in pltms' generation by training an auxiliary model with a commonsense scorer as the oracle. our o-scorer is task-agnostic and referencefree, meaning that it is generalizable to many downstream tasks such as dialogue and open-ended text generation. for such application, one may need to replace the vanilla ptlms with task-specific models and then train the nado head. the o-scorer can also be combined with task-specific guidance.