scieee AI-readable full text Open interactive document viewer

Efficiency of automatic text generators for online review content generation

Pérez-Castro, A.; Martínez Torres, María del Rocío; Toral, S. L.

Abstract

The evolution of Artificial Intelligence has led to the appearance of automatic text generators able to closely resemble human writing, endangering the development of e-commerce and the consumer confidence. Thus, it is critical to deeply understand how these text generators work to present the presence of deceptive reviews. This paper analyzes one of the most popular text generators, GPT2 (Generative Pre-trained Transformer 2), and studies its effectivity compared to human-generated reviews using previously published classifiers trained to distinguish between real and deceptive reviews. One parameter of the model is the so-called temperature, which determines how deterministic the model is. The temperature adjusts the probability distribution of the words in the model, so that a higher temperature translates into a higher degree of inventiveness in the generation of the texts. Findings reveal (i) that automatically-generated deceptive reviews worsen the accuracy of existing classifiers, this effect being accentuated by the degree of inventiveness; (ii) that their performance depends on the data used to train the generator; and (iii) that the sentiment polarity has no effect on the performance of detection classifiers.

Full text

Technological Forecasting & Social Change 189 (2023) 122380 Available online 4 February 2023 0040-1625/© 2023 The Author(s). Published by Elsevier Inc. This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/bync-nd/4.0/). Efficiency of automatic text generators for online review content generation A. Perez-Castro a , M.R. Martínez-Torres a , * , S.L. Toral b a Facultad de Ciencias Econ´ omicas y Empresariales, University of Seville (Spain), Av. de Ram´ on y Cajal, 1, 41018 Sevilla, Spain b E. T. S. Ingeniería, University of Seville (Spain), Avda. Camino de los Descubrimientos s/n, 41092 Seville, Spain ARTICLE INFO Keywords: Deceptive reviews generation Word-based encoding Context-based encoding Pretrained models Transfer learning ABSTRACT The evolution of Artificial Intelligence has led to the appearance of automatic text generators able to closely resemble human writing, endangering the development of e-commerce and the consumer confidence. Thus, it is critical to deeply understand how these text generators work to present the presence of deceptive reviews. This paper analyzes one of the most popular text generators, GPT2 (Generative Pre-trained Transformer 2), and studies its effectivity compared to human-generated reviews using previously published classifiers trained to distinguish between real and deceptive reviews. One parameter of the model is the so-called temperature, which determines how deterministic the model is. The temperature adjusts the probability distribution of the words in the model, so that a higher temperature translates into a higher degree of inventiveness in the generation of the texts. Findings reveal (i) that automatically-generated deceptive reviews worsen the accuracy of existing classifiers, this effect being accentuated by the degree of inventiveness; (ii) that their performance depends on the data used to train the generator; and (iii) that the sentiment polarity has no effect on the performance of detection classifiers. 1. Introduction Multiple studies have shown that online consumer reviews are a key source of information, affecting not only the purchasing decisions of potential consumers but also the reputation of products and services (Filieri et al., 2015; Petrescu et al., 2018; Zhou et al., 2021). While favorable reviews might result in financial rewards, unfavorable reviews can damage a reputation brand, causing financial loss (Zhu and Zhang, 2010). As a result, the proliferation of fake reviews is becoming more and more common every day. Many businesses have used this method to attract new customers or even to defeat their competitors with fake reviews (Wu et al., 2020). At this point, it is important to differentiate between two types of fake reviews: those created by humans and those created automatically by machines through bots or text generators. Initially, fake reviews could only be created manually by humans in order to be indistinguishable from a truthful review, but with advances in generative text models, it is now possible to do it artificially by training them with texts that belong to a specific domain type (K¨ obis and Mossink, 2021). These bots, generally based on language models, excel in the generation of fluent and coherent text, very similar to the human style, making the arduous task of differentiating between real and fake reviews even more difficult than those fake reviews created by humans. Hence, a new generation of fraudulent reviews has become a new challenge with significant consequences for e-commerce (Yao et al., 2017). Moreover, these language models are shared and pre-trained on the Internet, which exposes consumers to an even greater threat, as anyone with some knowledge in computer science can easily build their own fake reviews generator. Previous work has analyzed the social impact of artificial intelligence in the generation of fake news (Ahmad et al., 2022), the spread of malicious rumors (Meel and Vishwakarma, 2020) or the generation of false images or videos (Karnouskos, 2020) with the aim of devaluing the public image of people, governments or institutions. This impact translates into disinformation, the polarization of society and the dissemination of conspiracy theories without any evidence. These studies focus primarily on the impact, i.e. the consequences. However, it is equally important to understand the mechanisms underlying the generative algorithms of artificial intelligence in order to be able to define appropriate mitigation strategies for their effects. The aim of this paper is to characterize the efficiency of a fake review generator in terms of its ability to mislead different classifiers of fake reviews widely used in other studies. More specifically, this research will focus on studying the efficiency of one of the most famous text * Corresponding author. E-mail addresses: [email protected] (A. Perez-Castro), [email protected] (M.R. Martínez-Torres), [email protected] (S.L. Toral). Contents lists available at ScienceDirect Technological Forecasting & Social Change journal homepage: www.elsevier.com/locate/techfore https://doi.org/10.1016/j.techfore.2023.122380 Received 4 January 2022; Received in revised form 24 January 2023; Accepted 28 January 2023 Technological Forecasting & Social Change 189 (2023) 122380 2 generators: GPT2 (Generative Pre-trained Transformer 2), a language model based on the transformer architecture created by OpenAI (http s://openai.com/). Different experiments will be carried out to compare the performance of the classifiers when detecting automatically-generated deceptive reviews using GTP2 or humangenerated deceptive reviews. The aim of the proposed experiments is to evaluate how indistinguishable the automatic and human-generated reviews are. Furthermore, several characteristics of GPT2 will be studied, such as the generation of sentiment-preserving reviews and the possibility of modulating the degree of inventiveness. The main contributions of this study are: •The creation of a sentiment-preserving review generator, by modifying the GPT2-model, so that positive/negative reviews of varying length can be generated. •The analysis of the effectivity of GTP2 for the fake review generation task, considering the effect of sentiment and inventiveness on the final accuracy. •The study of the performance of classifiers dealing with human and automatically generated fake reviews. The remainder of the paper is structured as follows: Section 2 details the related work in the field of deceptive review detection and generation, focusing on the different techniques for the generation of fake reviews. Section 3 formulates the research framework, detailing the selected architectures for generation and classification. Section 4 describes the annotated datasets used as case studies, and the setup of the experiments. Section 5 provides the results and comparison of the selected approaches. Section 6 discusses the results and their implications. Finally, Section 7 summarizes the conclusions of this work. 2. Related work In this section, we review existing work related to the generation of false reviews in general (Section 2.1), and then focus on algorithmic text generation methods, also known as text generators (Section 2.2). This section initially introduces recurrent neural networks (RNN), which is the architecture commonly used for natural language processing, given its ability to find the temporal dependencies needed to generate syntactically and grammatically coherent text. Next, we introduce the three main deep-generative methods currently used and based on RNN that allow the training dataset to be modelled probabilistically. By sampling this probabilistic model, it is possible to generate new texts as well as to control various parameters related to the characteristics of the generated text. Finally, once the text has been generated, it is necessary to define how it will be mathematically represented and which classifiers will be used to discriminate between true and false reviews, and thus test the effectiveness of GPT2 as a generator of fake reviews. These aspects are reviewed in Section 2.3. 2.1. Fake review generation Fake opinions refer to all misleading opinions shared in a digital environment that do not reflect the genuine opinion of their author (Hunt, 2015). Some authors put the presence of these opinions in certain areas as high as 33 % (Salehi-Esfahani and Ozturk, 2018), which poses a risk to consumer trust and limits the development of e-commerce. Many of the fake reviews come from online sellers themselves, who post positive reviews of their products and negative reviews of competitors, or from review exchange platforms. Many cases have come to light in recent years, such as TripAdvisor in 2012, denounced by the UK Advertising Standards Authority for including unverified reviews; Samsung in 2013, condemned by the Taiwan Federal Trade Commission for posting false negative reviews against its competitor HTC; or Mafengwo.com in 2018, also for posting false reviews against competitors. However, many other cases still remain hidden. Currently, fraudulent reviews continue to grow rapidly, with a widespread presence in many areas of e-commerce. As a result, the identification of fraudulent reviews has become an emerging field of research (Wu et al., 2020). One of the most commonly used methods for the proliferation of online fake reviews on the Web is crowd-turfing (Rinta-Kahila and Soliman, 2017), in which companies pay in exchange for obtaining positive ratings written by workers. However, this method is not the most appropriate for large-scale attack systems, as it comes at a financial cost. An automated fake review generation system using deep learning techniques is a much more efficient method of performing massive attacks. Deep learning algorithms have provided huge advances in the field of natural language processing, so that it can be said that there is a competition between generators, always improving their capacity to resemble truthful reviews, and discriminators, also improving their capacity to detect fake reviews (Adelani et al., 2020; K¨ obis and Mossink, 2021). Generally, deep learning classifiers using CNN layers, LSTM layers, or a hybrid combination have achieved good accuracy results when applied to annotated datasets with human-generated fake reviews. However, the ability of automatic generators to resemble truthful reviews has improved so much that they represent a real threat to current discriminators. In the next sections, we detail different existing methods both for generators and classifiers. 2.2. Review of text generators The number of deep learning approaches for generative models has increased in recent years. Recurrent Neural Networks (RNN) were among the earliest generative models (Rumelhart et al., 2013). These networks include an internal memory (hidden states) so that they can recall previous outputs, which make them ideal for modelling sequences. However, there is an issue with this design when modelling long-term dependencies: the exploding/vanishing gradients. The problem of exploding/vanishing gradients is caused by the backpropagation algorithm that neural networks use during training. As the backpropagation algorithm moves from the output layer to the input layer, the gradients tend to become either smaller and smaller and closer to zero or larger and larger, leading to larger and larger weights. As a result, the gradient descent never converges to the optimum. Long Short-Term Memory (LSTM) networks, a RNN model variation, are composed of memory cells that can discover long-term dependencies, so they can learn to preserve only relevant information along sequences and avoid the problem of the exploding/vanishing gradients (Chen et al., 2016; Chung and Sohn, 2020). Several studies have shown how RNN and LSTM networks have been widely used for content generation in recent years (Pawade et al., 2018; Goodfellow et al., 2020). There are basically three main approaches for text generation: Generative Adversarial Networks (GANs), Variational AutoEncoders (VAE), and Transformer-based generative models (Selvarajah and Nawarathna, 2021). Fig. 1 illustrates a basic block diagram of the three approaches. GANs are made up of a generative component and a discriminative component that are trained simultaneously. Fig. 1(a) shows its basic scheme, consisting of a generator and a discriminator, both based on neural networks, competing against each other in a zero-sum game. The network converges to the Nash equilibrium point, which is the point at which neither the encoder nor the decoder has a chance to improve. Once the network is trained, the decoder is able to generate text from noisy input. This approach has been widely used for image generation; nonetheless, several GAN variations based on GAN sequences, such as SeqGAN or LeakGAN, have been proposed for text generation (Yu et al., 2017; Guo et al., 2018). The main limitation of GAN techniques is that the Nash equilibrium point is difficult to reach, because the encoder and decoder compete non-cooperatively. They also suffer from the A. Perez-Castro et al. Technological Forecasting & Social Change 189 (2023) 122380 3 generator-discriminator imbalance in the sense that the discriminator’s job is easier than the generator’s, so the discriminator tends to achieve very high accuracy at the cost of poor generation by the encoder (Karras et al., 2020). VAE have grown in popularity since these unsupervised models can operate with unlabeled data and may infer meaningful latent codes from texts. It is made up of an encoder and a decoder that encode input into latent variables with a probability distribution to preserve the integrity and continuity of the latent space (Kingma and Welling, 2014). Fig. 1(b) shows its basic scheme: The encoder generates a probability distribution of the latent variables from which the decoder regenerates the original input. Once the variational autoencoder has been trained, by sampling in the latent space, it is possible to generate a new text using the decoder. Skip-VAE has been proposed as one of the VAE models for text generation (Dieng et al., 2019). The main limitation of these methods lies in the difficulty of accurately generating the probability distribution of the latent space, which compromises the generation of high quality continuous sentences (Kim et al., 2018). Transformer-based text generation methods have proliferated in recent years, as this novel architecture provides a solution to the problems of gradient leakage when modelling long-term dependencies (Choi et al., 2022). As shown in Fig. 1(c), the transformer architecture incorporates a self-attention layer in both the encoder and the decoder, so that they can look at other words in sequence as it encodes/decodes a specific word. Based on self-attention processes, this architecture eliminates recurrence and convolutions, enabling their training on larger datasets. The most widely reviewed model for text generation based on this architecture is OpenAI’s Generative Pre-trained Transformers (GPT2) (Radford et al., 2019). GPT models are designed to pretrain onedirectional representations, and they are built using a decoder-only transformer-based architecture. The largest trained model includes 1.5 billion parameters and has outperformed state-of-the-art techniques on natural language processing challenges. As all these models are pretrained and publicly available, they represent a significant threat in the field of misleading reviews, as anyone can retrain the model on a specific field and use them for malicious purposes. GPT2 has been used extensively for text generation (Das and Verma, 2020) and review generation (Salminen et al., 2022). BERT (Bidirectional Encoding Representations of Transformers) is another transformer-based model that has been frequently utilized for language interpretation tasks, although some recent works have employed this model for text generation (Devlin et al., 2019). The primary distinction between these two models is that BERT uses transformer encoder blocks, while GPT-2 is built using transformer decoder blocks. The main problem with transformer-based models is that the attention mechanism adds more weights to the model and they are difficult to train because they require a very large input corpus (Li et al., 2020). Fortunately, it is possible to download pretrained versions of these models. In terms of controlled text generation, a disadvantage of GPT-2 is its lack of high-level semantic control in language generation. That means that this model does not have a parameter by which to begin generating text, so the first word could be any word. The prefix token and the truncation token are parameters that regulate the first and last words of the text, allowing for slight control over the text’s generation. GPT2 lacks this option, although a related model, GPT2-simple, available for installation from a Python library (https://pypi.org/project/gpt-2-simp le/) includes this possibility. A summary of all these techniques for text generation is show below in Table 1. Generator Discriminator Text Feedback Decoder Noise Text Encoder Decoder Decoder Sampling Text Fig. 1. Block diagram of the main approaches for text generation. Table 1 Summary of text generators. Main architecture Model Main characteristics Ref. RNN RNN Internal memory (vanishing gradient problem) (Rumelhart et al., 2013) LSTM Can discover long term dependencies (Chen et al., 2016) GAN GAN Adversarial training (Goodfellow et al., 2020) SeqGAN GAN sequences (Yu et al., 2017) LeakGAN Address the problem of long text generation (Guo et al., 2018) VAE VAE Can operate with unlabelled data (Kingma and Welling, 2014) Skip- VAE Address the “latent variable collapse” problem (Dieng et al., 2019) Transformers GPT2 Decoder block, onedirectional representations (Radford et al., 2019) BERT Encoder block, bidirectional representations (Devlin et al., 2019) A. Perez-Castro et al. Technological Forecasting & Social Change 189 (2023) 122380 4 2.3. Review of document representations and classifiers Many authors have studied various methods for detecting fake reviews over the years. Some of the techniques take into account the feelings and emotions depicted in the text (Melleng et al., 2019), or the relationships between reviews, reviewers, and reviewed stores (G. Wang et al., 2018; Z. Wang et al., 2018). However, the majority of the proposed techniques are concerned with extracting informative features from review content, the bag of words approach being the simplest. Basically, the bag of words approach represents documents as a feature vector where each feature is a word and the feature’s value if the number of occurrences of each word within the document. The main limitation of the bag-of-words approach is that it provides a sparse representation of documents, i.e., a vector with many zeros, which is incompatible with neural networks, which perform far better with denser representations (Grzeça et al., 2020). Word-based coding methods solve this problem by capturing syntactic and semantic similarity and relationships between words in an ndimensional vector. Negative sampling is used in Word2Vec to learn embedding weights by estimating words based on their context (Mikolov et al., 2013). It was one of the first notable word embeddings developed and has been widely employed in natural language processing applications (Yilmaz and Toklu, 2020). Global Vectors for Word Representation, or GloVe, is another major embedding approach (Pennington et al., 2014). Unlike Word2Vec, this methodology generates vectors by combining the local context window technique with global matrix factorization. Finally, FastText enables the model to learn embeddings for OOV (Out Of Vocabulary) words since each word is represented as a bag of n-character frames (sub-words) and is computationally less expensive (Joulin et al., 2017). Word embeddings are widely used in several research fields, including natural language processing tasks such as emotion analysis for text categorization or spam detection (Melleng et al., 2019). However, despite capturing the meaning and context of the word within the sentence, these techniques yield static representations of words. Unlike traditional word embeddings, neural language models may generate contextual word embeddings, which represent a word in a sentence with a particular vector dependent on its meaning. The Neural Network Language Model (NNLM) is a technique that simultaneously learns a distributed representation for each word as well as the probability function for word sequences (Bengio et al., 2003). Another example of this architecture is ELMo (Peters et al., 2018), which represents not only the dynamic features of word usage, but also how these qualities vary throughout linguistic context. Other models previously mentioned as text generators can also be used as classifiers. This is the case of BERT and OpenAI GPT2, previously discussed as text generators. Another noteworthy embedding approach is USE (Cer et al., 2018), a model also based on transformer architecture that can build sentence embeddings taking into account both word order and the identification of the remaining words in the sentence. Table 2 summarizes the document representation methods mentioned above. Word-based representations require a neural network to capture the semantic representation of texts and their sequential sequence. The aim of the neural network is to learn phrase and bigger text representations from dispersed word representations. Therefore, the majority of them are based on sequential models such as LSTMs or a mixture of CNNs and RNNs (Table 3). Several more sophisticated neural networks have been developed, including an RCNN employing Word2Vec embedding (Lai et al., 2015), or a bidirectional Gated Recurrent Neural Network (Bidirectional Average GRNN) (Ren and Ji, 2017). Garcia-Silva et al. (2019) propose a CNN for bot identification that has been tested using Word2Vec, GloVe, and FastText. Context-based encoding approaches, unlike word-based representations, do not require a convolutional or recurrent network since they acquire a representation of the complete document by themselves. As a result, a dense neural network (DNN) is sufficient for the classification task (Selvarajah and Nawarathna, 2021). It should be noted that most of the previous classifiers were trained with manually-generated deceptive datasets, but they have not been tested with bots. Although the above methods of document representation and classification have been used in many studies related to natural language processing, no study to date has used them to characterize text generators as false review generators. Classification work in this context has mainly focused on discriminating manually-generated fake reviews from real reviews. However, given the rise of new automatic generation tools, it is of vital importance to characterize the performance of automatic text generators and their implications for existing classification methods. 3. Research framework 3.1. Research design and hypotheses Previous studies have shown how the proliferation of fake reviews has been boosted by the development of automated text generators (K¨ obis and Mossink, 2021). Some of the most sophisticated models, such as GPT-2 or BERT, have achieved state-of-the-art performance on a wide range of tasks, including natural language understanding (NLU), sentence classification, named entity recognition, and question answering, transforming the natural language processing landscape. One property of these language models is the possibility of fine-tuning, i.e., retraining the models on a smaller corpus of text on a particular topic. In this way, text generators learn to generate more specialized opinions on that topic (Salminen et al., 2022). This ability of text generators to generate grammatically correct opinions coupled with their ability to specialize on certain topics may hinder the classification task. Another aspect to consider is that most false opinion classifiers have been trained on manually-generated fake opinions, which are those that are readily available in public databases. However, the logic used by automatic generators is not the same as that used by individuals writing Table 2 Summary of document representation models. Main architecture Model Main characteristics Ref. Word embedding Word2Vec Negative sampling (Mikolov et al., 2013) GloVe Global matrix factorization (global vectors) (Pennington et al., 2014) FastText Bag of n-character frames, includes OOV tokens (Joulin et al., 2017) Neural language models NNLM Contextual embeddings (Bengio et al., 2003) ELMO Complex characteristics of word & how these uses vary across linguistic contexts (Peters et al., 2018) Transformer architecture BERT Encoder block, bidirectional representations (Devlin et al., 2019) GPT2 Decoder block, one-directional representations (Radford et al., 2019) USE Word order & identification of the remaining words in the sentence (Cer et al., 2018) Table 3 Summary of NN architectures. Embedding method NN Reference Word-based encoding RCNN (Lai et al., 2015) Bi-directional average GRNN (Ren and Ji, 2017) CNN (Garcia-Silva et al., 2019) Context-based encoding DNN (Selvarajah and Nawarathna, 2021) A. Perez-Castro et al. Technological Forecasting & Social Change 189 (2023) 122380 5 false opinions, so it is to be expected that the classifier will behave worse to a style of reviews that has not been seen before. Hence, previous considerations lead to the following hypothesis: H1. Automatically-generated deceptive reviews worsen the performance of deceptive classifiers more than manually-generated deceptive reviews. These language models are pre-trained on vast volumes of raw or unlabeled textual information in order to create language models that can be quickly deployed to natural language-based applications with little or no fine-tuning (See et al., 2019). By using fine-tuning, the text created by these language models resembles its training data, making it nearly hard for the human eye to distinguish between genuine and false statements. When using a text generator to generate fake reviews, there are two possibilities: either generate them from real user reviews or generate them from fake reviews, also generated by users. From the perspective of a manipulating agent, it makes more sense to generate them from fake reviews that already impinge on negative characteristics of competing products. However, given the ability of text generators to mimic the body of text being fine-tuned, it is expected that false opinion classifiers will perform better when the generator is trained on false opinions than on true opinions. Hence, previous considerations lead to the following hypothesis: H2. The performance of the classifier is better when automaticallygenerated deceptive reviews are generated from original deceptive reviews than from original truthful reviews. As mentioned above, the GPT2-simple model that we will use for this study also has certain control parameters. Among them, temperature is a parameter that measures the randomness or inventiveness of the generated text in the range [0–1]. As the temperature drops, the generated text becomes predictable and repetitive, with fewer random completions; when it approaches zero, the model becomes deterministic and repetitive (Solaiman et al., 2019). Furthermore, prior studies have also shown too that a higher value for this hyperparameter (t >0.5) yields better outcomes, i.e., deceptive reviews more similar to the real ones (Das and Verma, 2020). In addition, an increase in the innovation of the review will result in an increment in the diversity of the reviews and their vocabulary, generating reviews of a wider scope and therefore worsening the performance of the classifier. Hence, previous considerations lead to the following hypothesis: H3. Increasing the inventiveness of automatically-generated reviews worsens the performance of the classifier. The credibility of a review is conditioned by several factors such as the length of the review, the use of certain adjectives, or the emotional bias of the point of view. Some authors present a study of review credibility as a function of the sentiment of the review, among other parameters (You et al., 2020). The study developed by Chung and Zeng (2020) also demonstrates how online opinions influence users in one way or another depending on the emotion expressed in the opinion. For example, it shows that fear and anger emotions have a greater influence on users. A second study, developed by Banerjee and Chua (2021), demonstrates that other parameters such as specificity or exaggeration are positively and negatively related, respectively, to the degree of authenticity with which users perceive the review. Other studies also show how the emotion of the review affects how these reviews influence users, concluding that emotions such as fear and anger (associated with negative reviews) tend to have more influence on users, appearing more truthful Chung and Zeng (2020). Therefore, the sentiment expressed in the review has an important influence on whether that review is identified as truthful or deceptive (Du et al., 2020). Hence, previous considerations lead to the following hypothesis: H4. Negative sentiment reviews tend to be more credible than positive sentiment reviews, which worsens the performance of the classifiers. 3.2. Methodology This study examines how indistinguishable automatic and manuallygenerated fake reviews are using a text-generator such as GPT2 and two classifiers of misleading reviews. The first classifier will be built using a word-encoding representation followed by a Bi-LSTM neural network, similar to the one proposed by Graves and Schmidhuber (2005). The word-embedding method used will be FastText, as this method also takes into account OOV tokens, unlike the other word embeddings. Unlike the previous one, the second classifier will be built using a context-based encoding method followed by a DNN (Selvarajah and Nawarathna, 2021). The context-based encoding method used will be the Universal Sentence Encoder, or USE, which is a model based on a transformer architecture that consider both the word order and the identification of the remaining words in the sentence. Three different datasets will be used to carry out the experiments, comparing the classifier results for both manually made and automatically-generated false reviews. As shown in Fig. 2, true reviews are always those captured in the three starting datasets, while fake reviews can come either from the datasets used or from those automatically-generated by GPT-2. The GPT2-simple model used includes the possibility of generating control tokens to guide text generation and control hyperparameters such as temperature. The temperature hyperparameter measures the degree of inventiveness or randomness of the text. This parameter can be modified in the range [0–1] and the higher the value, the more varied the reviews will be from each other. The control tokens indicate whether the generated review is positive or negative, and the end of the generated text. The initial tokens “〈positive〉” and “〈negative〉” are added at the beginning of the review depending on their sentiment. The sentiment of each review is known in advance because the selected databases include this information as part of the metadata. At the end of each review, the token 〈endoftext〉 is added to indicate that this is the end of the review. After finetuning, this model will be able to generate the desired number of fake reviews with a controlled sentiment polarity. The combination of pre-training and supervised finetuning has become the best practice for state-of-the-art results (Radford et al., 2019). 4. Datasets and experiments setup 4.1. Datasets The experiments will be carried out using three datasets from three different fields: restaurants, home appliances, and hotels, as indicated in Table 4. D1 refers to the “Deceptive Opinion Dataset” and was obtained through Kaggle (https://www.kaggle.com/rtatman/deceptive-opinion- spam-corpus, https://myleott.com/op-spam.html) and consists of 1600 reviews from TripAdvisor and Mechanical Turk from 20 different hotels in Chicago; it is divided into positive and negative evaluations, with the two classes balanced. D2, the home dataset, contains 2100 reviews on household products that have been collected from three separate departments of the “Amazon reviews dataset”: Home, Home Entertainment, and Home Improvement. It is also available on Kaggle (https://www.kaggle.com/lievgarcia/amazon-reviews). Finally, the YelpChi Restaurant dataset (http://odds.cs.stonybrook.edu/yelpchi-dat aset/) includes 31,000 reviews of Chicago restaurants. This dataset contains ratings, a date, and product and user information. Only 4000 reviews were chosen at random to maintain the dataset the same size as the others. All three datasets report on the polarity of the reviews. Fig. 3 shows some examples of truthful, deceptive and GPT2- generated deceptive reviews from the dataset D1 (Chicago hotels), one A. Perez-Castro et al. Technological Forecasting & Social Change 189 (2023) 122380 6 positive and one negative. The last two rows correspond to the fake reviews generated by GPT2. It should be noted that even though they are generated automatically, they are completely legible and understandable, preserving the logic of the sentence. Both reviews have been generated using a maximum review size of 800 words, with the temperature hyperparameter set at 0.7 and each with a different sentiment token (〈positive〉, 〈negative〉). 4.2. Experiment setup In this section, the setup experiments carried out for each of the four research hypotheses mentioned above will be defined. 4.2.1. Experiment 1 The aim of this first experiment is to test the first hypothesis, H1, i.e., whether automatically-generated deceptive reviews worsen the performance of classifiers with respect to manually-generated deceptive reviews. The initial stage will be to split each dataset into training and test datasets: “DX_train” and “DX_test” (80 % and 20 %, respectively, with X =0, 1, 2) and train the classifier. Once the classifier is trained, it will be tested with two different test datasets, the original manually-generated dataset “D_test”, and the automatically-generated dataset “D_test_GPT2”. The latter dataset contains the original true test reviews, but replaces the original fake reviews with fake reviews automatically-generated by GPT2 using the original true reviews. For both test data sets, the accuracy of each classifier will be compared. Note that, in terms of the number of true/misleading and positive/negative reviews, each data set is appropriately balanced. This procedure is shown in Fig. 4 and will be carried out for each of the three selected data sets. 4.2.2. Experiment 2 The objective of this second experiment is to find out how the classifier performance is affected by the fact that the misleading reviews generated by GPT2 were generated either from the misleading reviews of the original dataset or from the truthful reviews. For this purpose, two analogous sub-experiments have been carried out that differ only in how the fake reviews have been generated, as shown in Fig. 5. In case 2A, GPT2 has been fine-tuned with the fake reviews, so that the proposed fake review classifiers are trained and tested using the original true reviews and the fake reviews created by GPT2 using the original fake reviews. In case 2B, GPT2 is fine-tuned with the true reviews, and the classifiers are trained and tested with the fake reviews created by GPT2 from the original true reviews. Thus, the only thing that changes in both cases is the provenance of the reviews against which GPT2 is fine-tuned. Comparison of the results obtained will allow us to test hypothesis H2. 4.2.3. Experiment 3 The third experiment focuses on analyzing how a variation in the inventiveness of the reviews affects the performance of the classifiers. In this case, for each dataset, GPT2 will generate deceptive reviews by varying its temperature control parameter in the range of 0 to 1, in 0.1 intervals, until it obtains 10 sets of automatically generated fake reviews. As in previous experiments, the different generated datasets will be fully balanced and the performance of both classifiers will be tested for the three datasets for each temperature value. 4.2.4. Experiment 4: influence of sentiment on accuracy The last experiment focuses on demonstrating whether the sentiment of the review affects the perception of truthfulness or deception by online users, and whether reviews with negative sentiment are more credible than those with positive sentiment. In this case, the possibility of controlling the polarity of the opinion generated by the GPT2-simple model using the initial token 〈positive〉 or 〈negative〉 will be exploited, generating as a result a dataset of true and false positive opinions and another dataset of true and false negative opinions. Again, the classification task will be performed with both classifiers and the two datasets of positive and negative reviews, comparing the results obtained for each of them. 5. Results The results are presented in four tables, one for each of the experiments. All these results have been carried out using the Google Colab platform, running on the NVIDIA Tesla T4 GPU, equipped with approximately 15 GB of available memory. Tables 5, 6, 7 and 8 detail the results obtained for the four proposed experiments with two different classifier models and three datasets. More specifically, “D1”, “D2”, and “D3” refer to the “Hotels”, “Home”, and “Restaurants”. Table 5 reveals that, in the experiment associated with the first hypothesis, the automatically generated reviews do worsen the performance of the classifier, i.e., hypothesis H1 is confirmed. As an example, for dataset 1, the classification of manuallygenerated fake reviews obtained a result of 0.856 accuracy, while for the GPT2-generated fake reviews classification task this performance gets much worse, transforming the classifiers into almost a random classifier with results of 0.535 for USE and 0.501 for FastText. Similar results are observed in Table 5 for the other two datasets. Table 6 shows the results of Experiment 2. The first part of the table shows the performance of the text classifiers when GPT2 generates Datasets: 1/2/3 GPT2-simple Control tokens: <positive> <negative> <endoftext> Hyperparameter: temperature Automatically generated deceptive reviews Truthful reviews Manually generated deceptive reviews Deceptive reviews classifier Fast-Text + Bi-LSTM USE + DNN Fig. 2. General scheme. Table 4 Used datasets. Dataset name Content N◦reviews Source D1 Chicago hotels 1600 TripAdvisor, MTurk D2 Home appliances 2100 Amazon D3 Chicago restaurants 4000 Yelp A. Perez-Castro et al. Technological Forecasting & Social Change 189 (2023) 122380 7 deceptive reviews from the deceptive original reviews (Experiment 2A), while in the second part of the table, GPT2 generates deceptive reviews from the truthful original reviews (Experiment 2B). A value of 0.881 can be observed for the dataset D1 and the FastText classifier (Experiment 2A), versus a value of 0.649 with the same classifier and a different dataset when these deceptive reviews are generated from the truthful reviews (Experiment 2B). This comparison reveals that the GPT2-generated text tends to emulate the text it was fine-tuned with, which complicates the classification task quite a bit when the GPT2 deceptive reviews are quite similar to the original truthful reviews (Experiment 2B). Table 7 shows the results of the classification models against reviews with different degrees of inventiveness (generated at different temperature points). It can be seen that, as the temperature increases, the accuracy of the classifier decreases, as the text becomes more diverse, making the classification task more difficult and thus proving the confirmation of hypothesis H3: “Increasing the inventiveness of automatically-generated reviews worsens the performance of the classifier.” Finally, Table 8 shows the results of the last experiment, Experiment 4, in which positive and negative text classifications were conducted separately to demonstrate whether sentiment affects the performance of classifiers. Findings reveal that the positive sentiment of the review slightly hinders the classification task, obtaining slightly lower accuracy results than those with a negative sentiment (e.g. 0.718 vs. 0.731 for the case of dataset D1 and FastText classifier model). However, the difference in classifier performance is so small between the positive and negative reviews classification that hypothesis H4 is not supported. It is worth noting that the best classification results are always found in the D3 dataset since it is the largest. In contrast, the worst ones are for dataset D2, since, unlike the other two datasets, this one has a more diverse scope of reviews, making the classification task harder. This wider scope is due to the fact that, as mentioned above, this dataset was created by bringing together 3 different categories of reviews (Home, Home Entertainment and Home Improvement), all of them related to the main topic home but with a more diverse vocabulary. Overall, the results are quite similar for both classifiers, with FastText’s results slightly better. Figs. 6, 7, 8 and 9 show the evolution per epoch of the test accuracy during the training stage for each one of the four experiments detailed before. Fig. 7 shows that for Experiment 2 and dataset 3, both the Fig. 3. Corpus samples. A. Perez-Castro et al. Technological Forecasting & Social Change 189 (2023) 122380 8 reviews generated from deceptive reviews and the truthful reviews obtain great classification results, and this may be due to the size of the dataset. Being a large dataset, training on a large amount of text can ease the classification task, obtaining good classification results even when the fake reviews are generated to resemble the real ones. In terms of convergence, we also observe a more linear convergence for the USE classifier than for FastText. The findings yield four important conclusions: First, automaticallygenerated fake reviews are more difficult to detect than human- Datasets: 1/2/3 GPT2-simple Control tokens: <positive> <negative> <endoftext> Hyperparameter: temperature Truthful reviews Manually generated deceptive reviews Deceptive reviews classifier Fast-Text + Bi-LSTM USE + DNN 80% 80% Dx_train Training stage Test stage Truthful reviews Manually generated deceptive reviews 20% 20% Dx_test Truthful reviews GPT2 generated deceptive reviews 20% 20% Dx_Test_GPT2 Truthful reviews Trained classifier Fast-Text + Bi-LSTM USE + DNN Dx_Test_GPT2 accuracy Dx_test accuracy Fig. 4. Experiment 1 setup. Datasets: 1/2/3 GPT2-simple Control tokens: <positive> <negative> <endoftext> Hyperparameter: temperature Training stage Test stage Truthful reviews GPT2 generated deceptive reviews 80% 80% Dx_train Truthful reviews GPT2 generated deceptive reviews 20% 20% Dx_test_GPT2 Fast-Text + Bi-LSTM USE + DNN Dx_Test_GPT2 accuracy Dx_test accuracy Deceptive reviews classifier Exp. 2A: Deceptive reviews Exp. 2B: Truthful reviews Fig. 5. Experiment 2-setup. Table 5 Experiment 1 results: manually VS Automatic generated deceptive reviews. Experiment 1 D1 D2 D3 Manually-generated deceptive reviews FastText 0.856 0.697 0.735 USE 0.856 0.679 0.751 GPT2-generated deceptive reviews FastText 0.501 0.495 0.537 USE 0.535 0.487 0.541 Table 6 Experiment 2 results: deceptive reviews generated from truthful VS deceptive reviews. Experiment 2 D1 D2 D3 Generated from deceptive (2A) FastText 0.881 0.775 0.877 USE 0.872 0.796 0.862 Generated from truthful (2B) FastText 0.649 0.654 0.863 USE 0.649 0.671 0.810 A. Perez-Castro et al. Technological Forecasting & Social Change 189 (2023) 122380 9 generated ones; second, GPT2 generates text very similar to the text it is fine-tuned with; and third, the degree of inventiveness of the reviews affects the variety of the reviews and thus the classification performance, while the sentiment of the review does not influence to a large extent. It is concluded that these results support Hypotheses H1, H2, and H3; while hypothesis H4 is discarded. 6. Discussion and implications The identification and analysis of deceptive reviews on the Internet have attracted the attention of the research community over the years (Yao et al., 2017). The proliferation of fake reviews has grown with the development of new natural language processing techniques and new transformer-based text generation models. Thus, understanding how language generation models work and their internal characteristics and parameters is critical to know what threats will need to be addressed. This paper analyzes the different parameters of language generation models and the performance of one of the most cited text generation models: GPT2. In addition, it raises and answers four hypotheses of great current research interest, performing real experiments with two text classifiers previously proposed in the literature on false review identification. Specifically, we study whether parameters such as the degree of inventiveness or the sentiment of the generated deceptive reviews affect the veracity with which the reviews are perceived by a text classifier; as for the performance of GPT2, we study how it tends to mimic the training text and how these automatically-generated reviews present an even greater threat, as they are more difficult to identify as fake than manually-generated ones. 6.1. Theoretical implications Previous studies have tested the effectiveness of GPT2 as a text generator, but it has not been studied in the specific domain of fake reviews (Radford et al., 2019). Based on four quantitative analyses, this study contributes to academic research with a new approach to data analysis, providing new insights into the performance of the GPT2 text generator in relation to different hyperparameters. The theoretical contributions of this article are fourfold. In the first analysis, the ease with which GPT2-generated text can be passed off as truthful reviews has been studied. The results shown in Fig. 5 are very conclusive, with a detection phase accuracy of 0.5 for misleading reviews generated by GPT2 versus 0.85 for deceptive reviews generated manually in dataset 1, and with very similar results for the other datasets. These results demonstrate the threat posed by text generators when used for malicious purposes (Salminen et al., 2022) and support hypothesis H1. In the second analysis, one of the most significant behaviors of the generator, which is its ability to resemble the input text, has been demonstrated through two experiments (See et al., 2019). In this case, the difference in accuracy when generating false automatic reviews from true manual reviews or from false manual reviews has been obtained. The result obtained supports hypothesis H2 that GPT2 tricks the fake review detectors much more easily if it is tuned from true reviews. The drawback of using GPT2 in this way is that the generated reviews would not be used to defame competitors’ products, although they could be Table 7 Experiment 3 results: effect of inventiveness. Experiment 3: temperature 0.1 0.3 0.5 0.7 0.9 D1 FastText 0.975 0.856 0.760 0.691 0.643 USE 0.890 0.757 0.745 0.697 0.655 D2 FastText 0.971 0.895 0.870 0.850 0.725 USE 0.983 0.970 0.895 0.783 0.716 D3 FastText 0.993 0.980 0.954 0.864 0.690 USE 0.986 0.961 0.923 0.829 0.701 Table 8 Experiment 4 results: effect of sentiment. Experiment 4: polarity D1 D2 D3 Positive FastText 0.718 0.666 0.854 USE 0.668 0.666 0.820 Negative FastText 0.731 0.716 0.879 USE 0.681 0.691 0.853 Fig. 6. Experiment 1: results. Fig. 7. Experiment 2: results. A. Perez-Castro et al.