G ra DA : Graph Generative Data Augmentation for Commonsense Reasoning (2022)

Abstract: Recent advances in commonsense reasoning have been fueled by the availability of large-scale human annotated datasets. Manual annotation of such datasets, many of which are based on existing knowledge bases, is expensive and not scalable. Moreover, it is challenging to build augmentation data for commonsense reasoning because the synthetic questions need to adhere to real-world scenarios. Hence, we present GraDA, a graph-generative data augmentation framework to synthesize factual data samples from knowledge graphs for commonsense reasoning datasets. First, we train a graph-to-text model for conditional generation of questions from graph entities and relations. Then, we train a generator with GAN loss to generate distractors for synthetic questions. Our approach improves performance for SocialIQA, CODAH, HellaSwag and CommonsenseQA, and works well for generative tasks like ProtoQA. We show improvement in robustness to semantic adversaries after training with GraDA and provide human evaluation of the quality of synthetic datasets in terms of factuality and answerability. Our work provides evidence and encourages future research into graph-based generative data augmentation.

## introduction recent work has seen the emergence of several datasets for improving commonsense reasoning of language models through tasks like question answering (qa) @xcite @xcite and natural language inference @xcite @xcite . some of these datasets are based on existing knowledge graphs that represent different aspects of commonsense through entities and relations. for example, annotators for socialiqa @xcite were shown an event 1 code and synthetic data files are available at https: //github.com/adymaharana/grada . original dataset question generator adversarial choice generator discriminator questions choices synthetic dataset knowledge graph filtering learner model optiongan graphgpt2 from the inferential knowledge graph atomic @xcite and instructed to turn it into a sentence by adding names, filling placeholders and adding context, etc. for multiple-choice qa datasets, annotators are also instructed to write distractor choices for each question. these useful datasets are collected through a time-taking and money-intensive crowdsourcing process which is hard to scale. large pretrained models like gpt2 @xcite can be finetuned to generate sentences from narrow data distributions, and it has recently been leveraged to augment datasets for text classification @xcite and question answering @xcite . however, it is challenging to generate augmentation data for commonsense reasoning because the generated questions and answers (referred to as "synthetic" in rest of the paper) need to depict plausible real-world scenarios accurately. hence, we develop grada, a graph-based generative data augmentation framework to generate synthetic samples from existing knowledge graphs that encode information about the real world. we focus on generating synthetic samples for models that perform discriminative and generative commonsense question answering. each sample in commonsense reasoning datasets comprises a question which describes a real-world scenario and can be mapped to a set of predefined entities and relations from knowledge bases like conceptnet and atomic. for instance, the question "besides a mattress, name something people sleep on." from the protoqa dataset @xcite can be mapped to the single-hop path (mattress, relatedto, people) using conceptnet. if a pretrained language model is trained to conditionally generate questions from such input paths, we can expect it to generate sensible questions when it is provided new paths with similar relations. the model will likely generalize to unseen entity nodes and generate questions containing unique commonsense knowledge. following this intuition, we finetune gpt2 @xcite to generate questions which explicitly depict the entities and relations in input path. when trained on the aforementioned example (alongside other similar examples) and provided with the new path (mattress, relatedto, soft), our model generates "besides a mattress, name something that's soft.", which is a valid question for probing real-world commonsense. usually, these paths contain multiple nodes with several hops and hence are referred to as graphs in rest of the paper. in order to represent the graph, we explore both (a) encoding of linearized graph and (b) augmentation of linear encodings with structure-aware encoding of graph, and find that the latter improves the transfer of semantic knowledge from graph to text. synthetic questions need to be accompanied by synthetic answers and distractor choices (for multiple-choice datasets), which are similarly generated by finetuning gpt2 for conditional generation of answers/distractors from the question. however, @xcite report that human annotators find it hard to pick a unique/unambiguous answer in more than 50% of the synthetic dataset generated in this manner. therefore, we explore an alternative where we finetune the generative model within a gan framework @xcite where it is continuously challenged by a discriminator model to generate unique distractors that can fool the discriminator (see optiongan, figure 1 ). the synthetic questions and answers thus generated are assembled into synthetic samples which are then used in a two-stage training pipeline @xcite . additionally, since the generative pipeline is only an approximate imitation of the human annotation process, we are left with several ambiguous and inaccurate samples in the synthetic pool. hence, we retain the most informative data samples from the synthetic pool by using question answering probability @xcite to measure accuracy by answerability. our contributions can be summarized as follows: ## related work explicit reasoning over knowledge graphs has been a popular approach for improving commonsense understanding of qa models. bauer et al. (2018); lin et al. (2019); de cao et al. (2019); feng et al. (2020) and lv et al. (2020) extract relevant multi-hop relational commonsense from knowledge graphs and show significant improvements over models that operate solely on text. devlin et al. (2019); yang et al. (2019); ye et al. (2019) expand the rich latent knowledge of large pretrained models by finetuning on similar corpora (havasi et al., 2010) before finetuning on the target dataset. mitra et al. (2019) convert external resources (koupaee and wang, 2018) to qa samples for data augmentation. yang et al. (2020) generate randomly initialized samples from finetuned gpt2 as augmentation data for target datasets. we ground the generated samples to real-world facts by providing knowledge graphs as input to the model. there has been a surge of efforts in neural graphto-text modeling in the recent years. @xcite encode input graphs using a graph convolutional encoder @xcite . @xcite propose the model graphwriter which improves on the graph attention networks presented in @xcite by replacing self-attention encoder with transformer blocks @xcite . several recent works have shown that pretrained generative models can be finetuned with or without structure-aware graph encoding to improve graph-to-text generation @xcite @xcite @xcite . query or question generation has also been shown to benefit from knowledge graphs in @xcite ; @xcite . we combine the structure-aware encoding capabilities of graph-to-text models with the rich contextual knowledge of pretrained models in graphgpt2 and generate rich real-world scenarios from sparse sub-graphs @xcite @xcite . good distractors are necessary for a task model to learn the right reasoning towards answering multiple-choice datasets. to this end, liang et al. (2018) rank distractors using feature-based ensemble methods. offerijns et al. (2020); yang et al. (2020) finetune gpt2 to generate distractors. chung et al. ( 2020 ) approach distractor generation as a coverage problem and select distractors for maximizing sample difficulty. @xcite use adversarial training to sample high quality negative training examples for knowledge graph embeddings. in a similar line of work, we use generative adversarial networks (gans) @xcite with the gumbel-softmax relaxation @xcite and train a generator with gan loss to imitate the creation of human-authored tricky, incorrect answer options. most nlp applications use reinforce @xcite algorithm and its variants @xcite @xcite to circumvent the discrete sampling issue for text-based gans. ## methods in this section, we describe the various modules in the grada framework. ## results & analysis first, we present results from the complete grada framework followed by results from ablation experiments. then, we discuss evaluation of the various generative models in grada using automated metrics as well as human annotators. finally, we evaluate the robustness of models trained with and without grada to semantic adversaries and discuss upper bounds of our data augmentation pipeline. see appendix for visualization of the quality of the synthetic datasets. ## conclusion we present grada, a graph-based data augmentation framework for commonsense reasoning qa datasets. we train a graph-to-text question generator and gan-based adversarial choice generator for creating synthetic data samples, which are used to augment the original datasets. grada promotes factuality in synthetic samples and improves results on five downstream datasets.