scieee AI-readable full text Open interactive document viewer

Detection and classification of fake news from social media Perspective of End Consumer Behaviour

Janková, Zuzana; Páleš, Michal; Potrykus, Marcin; Buics, László

Abstract

The tremendous rise of artificial intelligence and the use of ChatGPT enables the unprecedented rapid spread of various messages. The fundamental problem at present is the spread of false, unverified news and information known as fake news. This great challenge of the modern world causes deliberate manipulation of public opinion, can contribute to the loss of value in the stock market and poses many risks on a global level. For the detection of fake news, a dataset containing text messages from the social platform X is used. Within the framework of natural language processing (NLP), a text analysis was performed including traditional pre-processing steps, such as tokenization, removal of traces of words, excessive punctuation, etc. Subsequently the Bag of Words transformation was used, the text is coded into word vectors through the word embedding method and Word2Vec vectorization. Based on previous research and impressive practical performance, the Support Vector Machine (SVM) technique is chosen for fake news classification, which is a highly robust and effective machine learning algorithm.nThe issue of detection and classification of information disseminated on online platforms is difficult, and so far, no unambiguous approach has been provided that would provide satisfactory results. To fill the research gaps, this paper is focused on the detection of fake news from messages published on a social network using Machine Learning (ML) methods, specifically, the SVM algorithm is chosen.nPreprocessing the text data reduced the dimensionality of the dataset by almost 50 %, as many news headlines contained a large number of meaningless tokens or excessive punctuation. The importance of this step has been proven, especially when using unstructured data from social platforms. The accuracy of fake news classification is almost 75 % using SVM. Due to the fact that unstructured data and individual pre-processing steps can distort certain elements revealing fake news from legitimate news, it is advisable to focus in more detail on individual pre-processing steps in future research. In particular, excessive punctuation or frequent use of stop words can provide additional elements that can help separate fake news from real news.

Full text

81 TRENDY EKONOMIKY A MANAGEMENTU TRENDS ECONOMICS AND MANAGEMENT ISSN 1802-8527 (Print) / ISSN 2336-6508 (Online) 2024 42(1): 81–94 DOI: http://dx.doi.org/10.13164/trends.2024.42.81 Detection of Fake News Using a Machine Learning Approach Zuzana Janková, Michal Páleš, Marcin Potrykus, László Buics Abstract Purpose of the article: The tremendous rise of artificial intelligence and the use of ChatGPT enables the unprecedented rapid spread of various messages. The fundamental issue at present consists in the spread of false, unverified news and information known as fake news. This great challenge of the modern world causes deliberate manipulation of public opinion, can contribute to the loss of value in the stock market and poses many risks on a global level. Methodology/methods: For the detection of fake news, a dataset containing text messages from the social platform X is used. Within the framework of natural language processing (NLP), a text analysis was performed including traditional pre-processing steps, such as tokenization, removal of traces of words, excessive punctuation, etc. Subsequently the Bag of Words transformation was used, the text is coded into word vectors through the word embedding method and Word2Vec vectorization. Based on previous research and impressive practical performance, the Support Vector Machine (SVM) technique is chosen for fake news classification, which is a highly robust and effective machine learning algorithm. Scientific aim: The issue of detection and classification of information disseminated on online platforms is difficult, and so far, no unambiguous approach has been provided that would provide satisfactory results. To fill the research gaps, this paper is focused on the detection of fake news from messages published on a social network using Machine Learning (ML) methods, specifically, the SVM algorithm is chosen. Findings: Preprocessing the text data reduced the dimensionality of the dataset by almost 50%, as many news headlines contained a large number of meaningless tokens or excessive punctuation. The importance of this step has been proven, especially when using unstructured data from social platforms. The accuracy of fake news classification is almost 75% using SVM. The contribution lies in expanding the current literature on approaches to fake news detection, particularly through tuning the SVM model by searching for hyperparameters that minimize cross-validation loss. Conclusions: Due to the fact that unstructured data and individual pre-processing steps can distort certain elements revealing fake news from legitimate news, it is advisable to focus in more detail on individual pre-processing steps in future research. In particular, excessive punctuation or frequent use of stop words can provide additional elements that can help separate fake news from real news. Keywords: fake news, false information, financial market, stock market, social media, SVM, ML JEL Classification: C45, G11, G12 Zuzana Janková, Michal Páleš, Marcin Potrykus, László Buics: Detection of Fake News Using a Machine Learning Approach 82 Introduction The rapid growth of online platforms and community activity has accelerated the spread of unverified, false information and hoaxes referred to as “fake news”, which not only plagues society in general, but can have serious political but also economic consequences and social impacts on the public and private sectors. Especially in the financial market, combating fake news in the era of social media is a major issue and represents a serious threat to investors. Above all, social media such as X or Meta are criticized for promoting articles that later turned out to be false. One can come across many definitions of fake news. McGonale (2017) refers to fake news as news articles that are intended to deceive or misinform others. According to Allcott and Gentzkow (2017), this is intentionally and verifiably false information that is created to mislead the reader. According to Egelhofer and Lecheler (2019), news with low authenticity published by conventional media is also labelled as fake news. According to Clarke et al. (2021), the reach of such reports is astounding, as Vosoughi et al. (2018), fake news is 70% more likely to be retweeted than legitimate news. Moreover, the real impact on the financial market is not fully understood. In practice, one can come across promotional companies that deliberately create bullish articles, or conversely news that deliberately try to damage the good name or brand of a competing company. Hong et al. (2023a) draw attention to the fundamental importance of verifying the validity and authenticity of published information, especially in times of crisis. In these situations, rumours and fake news spread very easily and the public does not realize or verify the truth of the information. Uncertainty caused by misinformation is essentially ex post uncertainty and can have significant economic consequences. All these motivations forced the European Commission to promulgate a “Code of Practice on Disinformation”. According to Lee et al. (2024), the Code’s guidelines are increasingly adopted by operators of online social platforms. With the progress of artificial intelligence (AI), another threat arises, namely, the increasing activity of social bots on social platforms (Hajli et al., 2022). These are autonomous actors controlled by algorithms and software that publish content on these platforms. It is striking that more than a third of tweets come from social bots. Recent research by Shi et al. (2019) shows that this malicious type of bot spreads false information and misinformation and manipulates the stock market. According to the principles of the efficient market hypothesis, fake news should not affect market prices, as this false information should be rejected by rationally thinking subjects in an efficient market (Fama, 1970). This means that the market should not react to false information, as its impact on the markets is irrational (Fong, 2021). Despite the significant discrepancy between empirical evidence and economic theory, there is no relevant model providing an explanation for the persistence of fake news in financial markets. This great challenge of the modern world causes deliberate manipulation of public opinion, can contribute to the loss of value in the stock market, and poses many risks on a global level. The process of detecting fake news is time- and labour-intensive and represents a major challenge in the current world of digital transformation (Lee et al., 2024). Despite the growing importance of detecting fake news published mainly on social networks, this area has received a minority of academic research attention, probably due to lack of data and identification problems, as added by Wang and Ye (2023), especially in the context of financial markets, which are an inherent part of the economic system of countries, this issue is insufficiently covered. To fill the research gaps, this paper is focused on detecting fake news from messages published on a social network using Machine Zuzana Janková, Michal Páleš, Marcin Potrykus, László Buics: Detection of Fake News Using a Machine Learning Approach 83 Learning (ML) methods. The growing progress of Industry 4.0, the development of artificial intelligence could bring tools that can automatically identify and reveal such information using linguistic characteristics. 1. Literature review At the beginning, it is appropriate to state that information can be characterized using two elements “strength” and “weight” according to Antoniou et al. (2017). The first element represents the tone of the message and the extremity of the information. The second element represents the quality of information. Investors weight these two elements differently, mainly depending on the external environment. According to Wu et al. (2022) the stronger the intensity of monitoring of news publishing, the more resistant investors are to false information. In other words, they rely more on “weight” than “strength” information. Hong et al. (2023a) confirms this idea that publicity surveillance significantly reduces the impact of misinformation. On the contrary, in the case of a favourable situation in the development of financial markets, investors are less vigilant and look more at the “strength” of information. As it was already mentioned in the introductory part, the fact that the amount of available research on the impact of false information on financial markets is limited also testifies to the insufficient research of the issue in question. According to Fong (2021), the vast majority of research published so far focuses on the political and social consequences of the spread of disinformation, which are relatively separated from the fight against this information and the methods of its detection. According to a search in the Web of Science after entering the sequence of keywords (“false new*” OR “fake new*” OR “disinformation” OR “misinformation” OR “false information”) AND (“stock market” OR “financial market”) only 35 articles were generated and through the PRISMA methodology shown in Figure 1, the relevant articles dropped to 20. It is evident that, although the literature on the effect of fake news on financial market movements remains limited, it has yielded some interesting insights. Wang and Ye (2023) investigated the effect of fake news extracted from social networks on post-earnings announcement drift (PEAD). PEAD reflects how stock prices and investors interpret and react to unexpected earnings news. According to the authors’ output, companies can play an active role in improving information efficiency and in the fight against fake news on the stock market. Clarifications of fake news by companies help to improve the information environment. Similar results can be found in a study by Xu (2021), who reports that if firms immediately respond and counter fake news, they reduce the probability of future attacks by 19% and significantly reduce the negative cumulative impact on stock returns. Clarke et al. (2021) confirm that fake news attracts investors’ attention more than legitimate news. Moreover, they found that neither the commentators nor the editors are able to detect such messages. The authors focused on the website Seeking Alpha, which is one of the largest social platforms for financial markets. Drainage learning algorithms represent a powerful tool to successfully identify fake news. Hong et al. (2023a) focused on the period of the pandemic situation of COVID-19 and investigated the relationship between fake news and the occurrence of extreme risks in the stock markets of selected developed and developing countries. According to the authors’ output, interest in fake news is greater in developed countries compared to developing countries. After the thunder of legitimate information, the volatility of stock markets decreases. Clarke et al. (2021) observed abnormal trading volume at the time of fake news publication. Hong et al. (2023a) and Clarke et al. (2021) agreed that when legitimate information Zuzana Janková, Michal Páleš, Marcin Potrykus, László Buics: Detection of Fake News Using a Machine Learning Approach 84 is included, the volatility of stock markets decreases. In their research, Chen and Chen (2024) focused on the potential impact of misinformation published online on stock returns. Li et al. (2018) found that institutional investors can profit from fake news detection. Fong (2021) confirms that prolonged fake news can suppress appropriate investor responses to subsequent legitimate information. Lee et al. (2024) use Long Short-Term Memory (LSTM) deep learning techniques to improve the accuracy of misinformation detection and further investigate the relationship between the emotions evoked by messages and the veracity of such messages. Moreover, the authors demonstrate that news from the US media has an impact on stock markets with important implications for investors from emerging economies. Chung et al. (2023) apply a novel deep learning approach (TRNN) to the detection of false information. TRNN is deep learning with augmentation based on psychological and social theories to detect misinformation. Hong et al. (2023b) focused on the Chinese stock market and investigated the influence of “black mouth”, a form of manipulation through misinformation. According to the authors, this phenomenon leads to abnormal investor attention and triggers abnormal stock returns. Kogan et al. (2023) state that in a situation where the cost of information is high and the ability to take corrective action is limited, the setup of financial markets can encourage the wider impact of misinformation. Additionally, they found that social media messages are associated with retail price fluctuations and trading activity, as retail investors are the primary participants in these social platforms. 2. Methodology Fake news detection may be divided into two broad categories, i.e. (i) manual (ii) automa- Figure. 1. PRISMA diagram of literature review. Source: own research. Zuzana Janková, Michal Páleš, Marcin Potrykus, László Buics: Detection of Fake News Using a Machine Learning Approach 85 ted (Taher et al., 2022). The first category is based on comparing unverified reports with truly legitimate information. The second category uses automated systems to detect false information, such as a combination of natural language processing (NLP) and artificial intelligence (AI), which can include machine learning (ML) and deep learning (DL) algorithms. Natural Language Processing (NLP) 1) Text pre-processing Pre-processing unstructured text data is one of the most important steps in NLP. Text messages posted on social networks consist of a variety of content, are raw and noisy. For that reason, the text needs to be thoroughly cleaned and pre-processed, as it contains meaningless information such as various tags or links (Özöğür Akyüz et al., 2024). As part of this first step of natural language processing, the text is tokenized, then the text is converted to lowercase letters, stop words such as conjunctions, prepositions, articles, etc., but also numbers and punctuation marks, last but not least, web links and special characters are removed. which are difficult to understand and often contain ignored words that lack meaning and unnecessarily increase the size of the text (Janková, 2023). 2) Bag of Words Bag of Words (BoW) is an approach to the representation of documents whose tokens are characterized as tokens that are assigned a weight corresponding to the value of a character, or presence of words in the document through the term frequency approach. The higher the weight assigned, the more important that token is compared to a token with a lower weight (Khan et al., 2020). 3) Text encoding Text pre-processing is followed by encoding, which generates a set of vector elements that represent individual words in an unstructured data set. 4) Word2Vec Word2Vec is a more advanced form of word representation, providing word embeddings that take into account aspects such as linguistic similarities – and thus provide better classification results, see (Fazlija, Harder, 2022). Basically, it is a two-layer neural network for processing natural language and representing words as a set of vectors. After preprocessing, the text is fed into Word2vec to encode and transform the text into word vectors (Liu et al., 2022). Support Vector Machine (SVM) Machine Learning (ML) and Artificial Neural Networks (ANN) methods are widely used to classify unstructured data. The review article by Janková (2023) shows the most common use of methods for classifying text data in the context of stock markets. Her article shows that more than 75% of the research analysed applies the Support Vector Machine (SVM) method to classification. Within ML techniques, it is necessary to (i) split the data set into a training and a test set; (ii) select a classifier model and train it on the training dataset; (iii) classifying the new text using a well-trained classifier on the test dataset. Specifically, for the purposes of this paper, the SVM technique, which is a highly robust and efficient machine learning algorithm, is chosen, even according to previous research and impressive practical performance. SVM has demonstrated excellent performance across a range of domains including financial markets. SVM can be used for both classification and regression tasks. According to Dahal et al. (2024) SVM classifies each xi do class input in the range 1 to p by identifying the hyperplane that separates the different data types. A hyperplane represents a flat hyperspace of dimension p – 1 in the case of a p-dimensional space. If we consider an input matrix X, which is structured as an nxp matrix, where n indicates the number Zuzana Janková, Michal Páleš, Marcin Potrykus, László Buics: Detection of Fake News Using a Machine Learning Approach 86 of observations in the data set, p indicates the number of features. The resulting vector is labeled as Y and falls into one of the classes (–1, 1). The hyperlane by which the SVM predicts the class is described by the equation: b 0 + b1X1 + b2X2 + … + bpXp = 0 (1) where b = (b0, b2, … , bp)T represents a vector of parameters that can be estimated through an optimization method with the following property: (i) if y = 1, then (b0 + b1X1 + b2X2 + … + bpXp > 0; (ii) if y = –1, then (b0 + b1X1 + b2X2 + … + bpXp < 0. The SVM technique offers different types of kernels (linear, polynomial, and radial) and hyperparameters (gamma and cost), which work together to improve the performance of this technique and are the builders of accurate output. According to Dahal et al. (2024), the tuning of these parameters is essential for the performance of SVM, as incorrect setting and balancing of parameters can cause overfitting or underfitting (Wang et al., 2018). Classifier Evaluation Evaluation of classification accuracy also represents a necessary element of the classification process. The confusion matrix is the most commonly used tool to measure the performance of machine learning classifiers. First, it is necessary to present the individual metrics that are determined from the confusion matrix (Sangsavate et al., 2019). ●True positive (TP) positive tuples that are correctly classified. ● True negative (TN) refers to negative tuples that are correctly assigned to a class. ●False positive (FP) represents positive tuples that are not correctly labelled through the assigned class. ● False negative (FN) is a negative tuple that is not correctly labelled via a classification category. Table 1 shows the confusion matrix. The individual columns represent the prediction classes, while the rows correspond to the current class. Various metrics can be calculated from the confusion matrix. For the purposes of this paper, accuracy is most important. The count is defined as the sum of the number of true positive (TP) and true negative (TN) divided by the sum of the number of true negative (TN), true positive (TP), false negative (FN), and false positive (FP): Accuracy . TP TN TP TN FP FN + = +++ (2) 3. Proposed model The processing procedure is shown in the diagram (Figure 2). First, the data is obtained, followed by their pre-processing according to NLP procedures and the division of the data set into training and test sets. On the training set, the SVM model is trained, tuned and then verified on the test data set. Finally, a confusion matrix evaluating the accuracy of the model for classifying fake news is compiled. Table. 1. Confusion matrix. Predication/ Actual class Negative Positive False False Negative (FN) False Positive (FP) True True Negative (TN) True Positive (TP) Source: own research. Zuzana Janková, Michal Páleš, Marcin Potrykus, László Buics: Detection of Fake News Using a Machine Learning Approach 87 Textual data The unstructured text dataset is obtained from the Kaggle database. This is the Golovin (2022) fake news dataset, which comes from the FakeNewsNet portal. The text data includes the title of the article, the url of the article, the source web domain on which the article was posted, the number of retweets and the class designation: 1 indicates legitimate news, 0 indicates fake news. A sample of eight articles is shown in Figure 3. The unstructured data is divided into two data sets in the ratio of 70% training set, 30% test set. In total, the dataset contains almost 22,000 unique messages. Figure 4 shows the number of distribution of headlines in the entire data set within the breakdown into legitimate and fake news. It can be seen from the figure that a large part, almost 18,000 messages from the dataset contain legitimate information, while less than 6,000 are detected as fake news. Text processing All calculations are performed in MATLAB R2021a software. Text preprocessing is done in several steps. First, tokenization is performed as a basic building block of NLP through the tokenizedDocument command. Then the traditional and absolutely necessary steps are taken to clean up the text and reduce its dimensionality, such as removing stop words removeStopWords, removing excessive punctuation erasePunctuation, Figure. 2. Workflow of classification fake news with supervised learning. Source: own research. Figure. 3. A sample text dataset. Source: own research. Zuzana Janková, Michal Páleš, Marcin Potrykus, László Buics: Detection of Fake News Using a Machine Learning Approach 88 normalizing normalizeWords, or morphological markers can be added to tokens addPartOfSpeechDetails. The next step is to shorten the documents. For best results, the target length should be short without removing large amounts of data. Therefore, the histogram (Figure 5) of the lengths of the training document is shown. Most training titles have around 10 to 15 tokens. After preprocessing, the number of words was counted, or modified text and raw text tokens. By dividing them and subtracting them from one, the reduction percentage was Figure. 4. Distribution of fake news and legitimate news in the dataset. Source: own research. Figure. 5. Document length histogram of the training dataset. Source: own research. Zuzana Janková, Michal Páleš, Marcin Potrykus, László Buics: Detection of Fake News Using a Machine Learning Approach 89 created. As part of the pre-processing, the text was reduced by almost 0.4940, in other words, almost half of the text was reduced, as it mainly contained a large number of stop words and punctuation. After the text has been pre-processed, it is subsequently transformed into a numerical form using bagOfWords, and then the text is encoded by encode. Through the Text Analytics Toolbox and the fastText English, 16 Billion Token Word Embedding support package installed. The word embedding package is one of the popular representations of vocabulary, in the case of the MATLAB package it contains 16 trillion tokens. Owing to this package, it is possible to capture the context of the words in the document, its syntactic and semantic similarity, including its relationship to other words in the document. The package installation verification can be performed with emb = fastTextWordEmbedding. Using the word to embedding vector word2vec mapping technique, a shallow neural network is trained to embed words. Support Vector Machine Due to the fact that the data set contains two classes – legitimate news and fake news, the fitcsvm command can be used for classification, which is applied for binary classification through the support vector machine. This command supports data mapping through kernel functions. For the thinning process, the SVM classifier is set to gaussian basis kernel “KernelFunction”,“gaussian”, the software is left to find the scale value for the kernel function “Standardize”, true, and the predictors are standardized to “KernelScale”,“auto”. Figure 6 and Figure 7 contain the outputs of setting the SVM classifier. Through automatic optimization of hyperparameters, hyperparameters minimizing cross-validation loss are sought. Figure. 6. SVM function evaluations. Source: own research.