GOT : Testing for Originality in Natural Language Generation (2021)

Abstract: We propose an approach to automatically test for originality in generation tasks where no standard automatic measures exist. Our proposal addresses original uses of language, not necessarily original ideas. We provide an algorithm for our approach and a run-time analysis. The algorithm, which finds all of the original fragments in a ground-truth corpus and can reveal whether a generated fragment copies an original without attribution, has a run-time complexity of theta(nlogn) where n is the number of sentences in the ground truth.

## introduction this research addresses an ethical consideration for natural language generation, namely, plagiarism. the oxford english dictionary defines original (adjective) as "present or existing from the beginning; first or earliest" and "created directly and personally by a particular artist; not a copy or imitation". but, if we apply the definitions of "original" to language, then there are two ways in which a piece of generated text may be original. for one, the text may express an "original idea", such as einstein did in 1905 with "@xmath0. on the other hand, a non-original idea may be expressed in an original way, via, for example, figurative language. our proposed approach addresses original uses of language. it does not necessarily address original ideas. how do we protect intellectual property when it comes to language generators that are trained on a world-wide-web of data? our language generators have to be held accountable. they should also be protected. what if a language generator generates an original analogy? what if it writes a poem that is so great that it ends up in the history books? multiple language generators may be trained on the same ground truth (e.g., wikipedia) with the same embedding vectors (e.g., bert @xcite and gpt @xcite ) and the same technologies (deep neural networks, lstm cells @xcite , transformers @xcite ). it will become a question of "whose generator said it first?" with automatic language generation, we need a way to automatically measure, store, and reference original ideas and language. we propose one possible solution to these originality-related problems. for the purposes of our analyses, we define ground truth as the set of sentences that are compared with the generated sentences. the ground truth may be larger than the training set, but should include the training set. the gound truth would also, ideally, grow. for example, the ground truth could start out as the training set, but as new sentences are generated with a trained model, then the new sentences may be added to the ground truth. we also claim that generated sentences should only be added to the ground truth if they are original or include citations where appropriate. ## background our criteria and basis for evaluating measurements of originality are: therefore, when measuring generation originality by comparing the generated sentence with the sentences in the ground truth, then the answers to numbers 1 and 2 above are binary. either the generated sentence is an original use of language or it is not. either the generation is at risk of plagiarism or it is not. however, if we consider that the ground truth may not be representative of all the sentences that have ever been generated, then there is a measure of uncertainty that may be added to the binary outcome. there are no standard automatic measures for novelty and originality in stylized language generation @xcite . high perplexity (ppl) and a low bleu @xcite score may suggest novelty, but they are not sufficient for testing for originality. high ppl and a low bleu score may be achieved when there is little overlap between the generated language and the ground truth, but nonesense and off-topic sentences are rewarded. while nonesense sentences may be novel, they may be grammatically incorrect, and sentences that are grammatically correct will likely have some overlap with fragments (n-grams) in the ground truth, such as using phrases like "she said that". so, we want a generation originality test that doesn't penalize n-gram overlap. (an original use of language may combine common n-grams in a new way.) we also want a generation originality test that flags potential plagiarism of original fragments in the ground truth, which neither bleu nor ppl does. we propose a generation originality test (got) that addresses original uses of language. it does not necessarily address original ideas. got is equally appropriate for stylized text generation, where novelty is desirable, and for other generation tasks where there is not an imposed style but the generation is open-ended, including summarization tasks. ## proposed approach our proposed generation originality test (got) determines whether: definition 1 (original sentence). a sentence, whether generated or in the ground truth, of n tokens is original if there exists an original k-gram within the sentence for some @xmath1. the originality of k-grams is defined next. the definition of originality of a fragment (or k-gram) depends on whether we are referring to a generated fragment or to a fragment in the ground truth. generated fragments are tested against the ground truth. if the generated fragment does not appear in the ground truth, then the generated fragment is considered original. if it appears once in the ground truth, then it is considered not original and so a citation may be needed. see ## example: results on one application to see how got performed on a generation task, we applied it to a metaphor generator that we built, based on an rnn @xcite architecture with lstm cells @xcite for training a language model on the language of metaphors, using only metaphors and their topics as input. (a topic was inserted at the beginning of each input sentence.) the model was trained to predict the next word in the sentences from our ground truth-a set of 22,113 quotes, where each quote contains at least one metaphor and is labeled with a topic. there are 1,684 unique topics (e.g., "animals", "fear", "fishing", "grandparents", "happiness", "motives", "politics", and more examples listed in to the trained language model, we apply an inference engine that uses weighted random choice with a "constraining factor" to encourage language coherence and originality in the output, and pat-terns of metaphors to encourage the generation of grammatically correct metaphors @xcite . the constraining factor, c (for @xmath2, causes the inference engine to select-with a probability of 1 c -the most likely word to appear next. otherwise, and with a probability of 1 -1 c , the inference engine will make a weighted random selection. selecting the most likely next word encourages language coherencey in the output, while weighted random selection encourages originality. (we found that a constraining factor of 3 or 4 worked best with our model.) a generated sentence failed the got if a fragment of at least 2 words appeared as an "original" fragment in the training set; that is, if the fragment appeared just once in the ground truth. using our metaphor generator, we generated 500 metaphors from randomly chosen topics. applying got on each of the 500 generated metaphors, we found that only 32 repeated an "original" fragment from the training set. from this experiment, we conclude that out of the 500 generated metaphors, 468 of them, or just over 93%, can be considered original. ( ## conclusion our approach to originality testing includes two contributions: the first contribution tells us whether a generation is an original use of language. the second contribution tells us whether a generation is, at least, not at risk of committing plagiarism. for example, the sentence "a bird built a nest" is not an original use of language; however, it is at least probably not in violation of plagiarism since it does not contain a fragment that is so rare that it should be protected as an original use of language.