Exploring Strategies for Generalizable Commonsense Reasoning with Pre-trained Models (2021)

Abstract: Commonsense reasoning benchmarks have been largely solved by fine-tuning language models. The downside is that fine-tuning may cause models to overfit to task-specific data and thereby forget their knowledge gained during pre-training. Recent works only propose lightweight model updates as models may already possess useful knowledge from past experience, but a challenge remains in understanding what parts and to what extent models should be refined for a given task. In this paper, we investigate what models learn from commonsense reasoning datasets. We measure the impact of three different adaptation methods on the generalization and accuracy of models. Our experiments with two models show that fine-tuning performs best, by learning both the content and the structure of the task, but suffers from overfitting and limited generalization to novel answers. We observe that alternative adaptation methods like prefix-tuning have comparable accuracy, but generalize better to unseen answers and are more robust to adversarial splits.

## introduction machine commonsense reasoning has recently gained new traction, largely due to a collection of diverse benchmarks @xcite @xcite and the successful application of language modeling methods on these benchmarks @xcite @xcite . the most widely adopted approach to solve these commonsense reasoning tasks is by fine-tuning large pre-trained language models (lms) @xcite on the task-specific training data. meanwhile, it has been shown that language models are able to acquire certain commonsense background knowledge, during their pre-training on large textual data @xcite @xcite . in light of these findings and the large capacity of these language models, recent work has proposed lightweight alternatives to finetuning lms, e.g., by only updating a small amount of additional parameters @xcite , or by updating the inputs while keeping the model weights intact @xcite . intuitively, these lightweight methods may retain the model's pre-trained knowledge to a large extent, and elicit the suitable knowledge for the target task, provided that much of this knowledge has already been encoded in the model parameters. however, to our knowledge, no comprehensive comparison exists between these model updating strategies. in this paper, we pose the question: what do models learn from commonsense reasoning datasets? we consider three representative learning methods: regular fine-tuning, model extension with prefixtuning @xcite , and model prompting with autoprompt @xcite . we apply them to two representative model classes: the autoregressive language model gpt-2 @xcite and sequence-to-sequence language model bart @xcite . we conduct thorough evaluation on the generative evaluation benchmarks protoqa @xcite and @xcite , by training on different partitions of the training data. our experiments show that fine-tuning performs best, by learning both the content and the structure of the task, but suffers from overfitting and limited generalization to novel answers. prompting methods have lower accuracy, but tend to show higher robustness to "adversarial" splits. extending the models by prefix-tuning represents a "sweet spot" between task accuracy, generalization, and robustness. ## related work prior works probe the commonsense knowledge learned by the lms. @xcite mined commonsense knowledge from lms, using templates with masked tokens; @xcite designed diagnostic tasks to probe lms' knowledge of definitions and taxonomic reasoning. the lama probes @xcite demonstrate that lms can largely recover knowledge in existing (commonsense) knowledge graphs: they could thus be queried/prompted directly as knowledge bases @xcite . ettinger (2020) diagnoses the bert model, finding that it struggles with complex inference, role-based event prediction, and grasping the contextual impacts of negation. the logical commonsense probes in rica @xcite show that lms perform similar to random guessing in the zero-shot setting, they are heavily impacted by statistical biases, and are not robust to linguistic perturbations. @xcite posit that while lms can learn to perform well on commonsense tasks, their commonsense reasoning ability mostly comes from fine-tuning on the task data. some works have sought to uncover what models learn through training on question answering datasets, exposing various dataset artifacts in the process @xcite @xcite . @xcite found that models trained on the squad2.0 dataset @xcite are insensitive to the meaningful changes in the question and predict the same answer. @xcite found that bert easily picks up the position bias in the squad dataset @xcite and models' performance can drop by more than 50 points on f1-score when training on a biased subset. @xcite analyzed the model's ability to generalize, by training on 5 different qa datasets, and found that no single dataset is robust to perturbations in the questions. @xcite tested models, trained on several multiple-choice qa datasets, and showed that they are largely relying on dataset biases. previous work mostly studies the language models, as-is, or evaluated models fine-tuned on the qa datasets. in this paper, we go a step further and investigate the models adapted to a target task, using three different methods, and we study their effect on the model's learning process. ## conclusions experiments with two language model classes, on two generative commonsense benchmarks, under three adaptation methods, revealed that the learning efficiency of lms relies heavily on the adaptation method. fine-tuning teaches the model both the structure of the task and the content, prompting approaches focus on learning the task structure only, while model extension by prefix-tuning falls between these two extremes. consequently, prompting is the least sensitive of the three methods to the training data size and quality, and prefix-tuning can generalize better to novel concepts regardless of the task format. future work on generalizable common sense leverage these findings, and: 1) avoid finetuning, as we may never be able to create datasets without any unintended biases (linzen, 2020); and 2) evaluate on multiple independent test-sets to better replicate real-world settings, as training on any split of data can lead to an overestimation of performance @xcite . evaluating robust inference capabilities based on commonsense axioms. arxiv preprint arxiv:2005.00782.