Human Perception in Natural Language Generation (2021)

Abstract: We ask subjects whether they perceive as human-produced a bunch of texts, some of which are actually human-written, while others are automatically generated. We use this data to fine-tune a GPT-2 model to push it to generate more human-like texts, and observe that this fine-tuned model produces texts that are indeed perceived more human-like than the original model. Contextually, we show that our automatic evaluation strategy well correlates with human judgements. We also run a linguistic analysis to unveil the characteristics of human- vs machine-perceived language.

## introduction pre-trained language models, such as the bert @xcite and the gpt @xcite families, are nowadays the core component of nlp systems. these models, based on the transformer @xcite and trained using huge amounts of crawl data (which can contain substantial noise), have been shown to produce high quality text, more often than not judged as human-written @xcite @xcite . existing evaluations of gpt-2 models @xcite have shown that while generated sentences were ranked lower in human perception than gold sentences, many gold sentences were also not perceived as human-like. to make the model produce more human-like texts one could train it only on gold data which is highly perceived as human, but such data is costly, and full model retraining is often a computationally nonviable option. as an alternative route, we explore whether and how an existing pre-trained model can be instead fine-tuned to produce more humanlyperceived texts, and how to evaluate this potentially shifted behaviour. we see the advantage of this experiment at least in two ways. one is that the generation of more human-like texts is highly beneficial for specific applications, as for example human-machine interaction in dialogues; the other is that it opens the opportunity to investigate what linguistic aspects make a text more humanly-perceived. we run our experiments on italian, using geppetto @xcite as pre-trained model. first, we collect human judgements on gold texts and texts generated by geppetto in terms of how they are perceived (human or automatically produced). we then fine-tune geppetto with this perceptionlabelled data. in addition, inspired by the classifierbased reward used in style transfer tasks @xcite @xcite , we reward the model to push its classification confidence. we evaluate the new perception-enhanced models in comparison with the original geppetto by running both an automatic as well as a human evaluation on output generated by the various models. lastly, we conduct a linguistic analysis to highlight which linguistic characteristics are more commonly found in human-and machine-perceived text. contributions we show that a gpt-2 pretrained model can be fine-tuned to produce text that is perceived as more human, and we release this model for italian. second, we provide a stronger automatic evaluation method where training is done on perception labels rather than the actual source, which yields results that correlate with human judgments, providing a different angle for automatic evaluation of generated sentences. lastly, we run a linguistic analysis of the humanly-perceived texts that can open up to new opportunities for understanding and model human-like perception. ## data we collected human judgments over a series of gold and generated sentences in terms of how much a given text is perceived as human-like. the obtained labelled data is used to fine-tune our base model towards generating more humanly-perceived texts; it is also used to test the resulting models through an automatic evaluation strategy that we implement next to human judgements. training data from the original geppetto's training corpus @xcite , we collected 1400 random gold sentences in the following way. we sentence split all the documents and we picked the first sentence of each document. in order to allow for length variation, which has an impact on perception, we selected the first 200 sentences with length 10, 15, 20, 25, 30, 35 and 40 tokens. we also let geppetto generate texts starting with the first word of randomly selected documents, we sentence-split the generated texts, and select the first 200 sentences with length 10, 15, 20, 25, 30, 35 and 40 tokens. this procedure creates a training set with perception labels containing a total of 2800 instances (1400 gold and 1400 generated). we asked native italian speakers if they felt the text they were seeing had been written, on a 1-5 likert scale, by a human (1) or a machine (5). each texts was assessed by 7 different judges. the subjects for the task were laypeople recruited via the crowdsourcing platform prolific foot_0 . we did not control for, and thus did not elicit, any demographic features. as a proxy for attention and quality control, we used completion time, and filtered out participants who took too little time to perform the task (we set a threshold of at least 5 minutes for 70 assessments as a reliable minimum effort). 2 mapping the average of human judgements to a binary classification (human @xmath0, we obtain the matrix in tab. 1 showing perception labels and the actual source labels. while human texts are more often perceived as human-like than machinegenerated ones, the matrix shows that 44.2% of the texts are perceived as artificial, suggesting that a good portion of the training data might lead to generation that is not so much human-like. we train two classifiers on 80% of this data on the task of detecting human-like perception and that of detecting the actual source. the classifiers are built adding a dropout @xcite and a dense layer on the top of umberto foot_2 , which is a roberta @xcite based language model trained on large italian corpora. we train them using adam (kingma and ba, 2015), initial learning rate 1e-5, and batch size 16. on the remaining 20% of the data we obtain @xmath1.97 for the source identification task, and @xmath2.92 for the perception task, showing the feasibility of the classification and thus the possibility of using these classifiers for evaluation (section 4). ## evaluation ippolito et al. (2020)'s and hashimoto et al. (2019)'s suggestions in terms of evaluation's diversity and quality. for the automatic evaluation, we train a regressor on the perception-labelled data (with the original 1-5 values) adding a dropout (srivastava et al., 2014) and a dense layer on the top of umberto. we use adam (kingma and ba, 2015) with initial learning rate is 1e-5, and set the batch size to 16. we calculate the correlation of the regressor's scores with human judgements over each single data point in the test set (@xmath3, and observe good scores (@xmath4.54 (@xmath5.75). for the human evaluation, we assign to each sentence the average score computed over all human judgements. we then average all resulting scores over the seven length bins. results are shown in two tables, as follows. first, as we did for the training data (see second, ai-perceived humanly-perceived geppetto 61.1% 38.96% geppetto-f 55.7% 44.3% geppetto-r 59.1% 40.9% gold 37.4% 62.6% as a first observation, in both the human and the automatic evaluations the final rank for the systems is the same, showing the reliability of the automatic evaluation. the gold texts are perceived as most human-like by humans (score: 2.41) and by the regressor (score: 2.47). regarding systems, the fine-tuned model (geppetto-f) performs better than both the basic and the rewarded model. to compare the overall performance of machine vs humans, in fig 1 we plot the average performance of the three models per length as judged by humans (blue) and the regressor (red). these two lines are compared with gold texts, again assessed by humans (yellow) and the regressor (green). comparing the models and the humans as assessed by humans (lines blue and yellow) we see that while for short sentences humans perceive the generated and the natural texts equally human-like, this changes substantially for longer fragments. at length 40, we observe the largest gap in perception between the models and the natural texts, with the latter being perceived much more human-like. in terms of machine-based evaluation (lines red and green), the behaviour of the bert regressor on human data is very similar to the human judgements (line green vs yellow). although the two curves are similar also for the texts generated by the models, the regressor here overestimates as human-produced texts that are actually machine generated (line red vs blue). this is potentially due to the fact that geppetto-f and geppetto-r use the same (human labelled) training data for finetuning which is used to train the regressor model. this phenomenon appears exacerbated with longer texts, as the blue and red lines are more distant after length 20. 7 this behaviour of the regressor is also reflected by its scores being more compressed towards the middle. indeed, the average standard deviations in ## linguistic analysis we ran a linguistic analysis over the human and the generated text using profiling-ud @xcite , a tool that extracts linguistic features of varying complexity, ranging from raw text aspects, such as average length of words and sentences, to lexical, morpho-syntactic, and syntactic properties. in particular, we study (i) which features characterise the most humanly-perceived texts in the training data, independently of who generated them; (ii) the difference between human-produced texts and those generated by our best model (geppetto-f) in the test set when they are perceived as human. 8 regarding (i), the features that most correlate with a text being perceived as human have to do with sentence length and complexity. for example, the longer the sentence or the clauses therein, or the longer and deeper the syntactic links, the more humanly-perceived is the text. on the other side of the spectrum, linguistic features associated to texts ## conclusions we elicited judgements on the human-likeness of gold and generated italian texts and used these judgements to fine-tune a pre-trained gpt-2 model to push it to produce more human-like texts. our evaluation shows that people indeed find the output of the fine-tuned model more human-like than that of the basic one. contextually, we show that our proposed automatic evaluation correlates well with human judgements, and it is therefore a reliable strategy that can be applied in absence of subjects. an analysis of linguistic features reveals that while complexity is associated with humanlikeness in gold data, simplicity is a key feature of artificial texts that are assessed as human-like, perhaps because simpler texts are less prone to expose machine behaviour. future work will include an expansion of the perception-labelled data to (i) assess training size in fine-tuning, and (ii) perform a finer-grained analysis correlating assessments to different text genres and subject demographics.