<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Assessing Fake News Impact on Polish Political Attitudes Toward the Ukraine War</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Nataliia Dziubanovska</string-name>
          <email>n.dziubanovska@wunu.edu.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>ITTAP'2024: 4th International Workshop on Information Technologies: Theoretical and Applied Problems</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>In the contemporary information environment, fake news influences public opinion and political beliefs. This issue is particularly relevant during the war in Ukraine, where a significant amount of information pertains to both the events in Ukraine and Ukrainian migrants in the European Union. Poland, as a key partner of Ukraine, faces challenges related to disinformation, making the study of the impact of fake news on Polish political attitudes extremely important. This research employs advanced machine learning methods to detect fake news and analyze its impact on political attitudes. The developed model, based on a combination of text processing and classification methods, demonstrated high accuracy in distinguishing between fake and real news. The datasets used include news about the war in Ukraine and tweets from Polish users, allowing the investigation of sentiment changes in response to disinformation. The analysis revealed that fake news significantly affects political attitudes, particularly through negative emotional reactions to disinformation. The cubic spline interpolation method uncovered a nonlinear relationship between the volume of fake news and changes in political attitudes, indicating the complex nature of this influence. The research findings are significant for developing strategies to combat disinformation and enhancing public information literacy.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;cubic spline interpolation</kwd>
        <kwd>disinformation</kwd>
        <kwd>fake news</kwd>
        <kwd>information literacy</kwd>
        <kwd>machine learning</kwd>
        <kwd>news classification</kwd>
        <kwd>social media sentiment</kwd>
        <kwd>text analysis</kwd>
        <kwd>textblob</kwd>
        <kwd>political attitudes</kwd>
        <kwd>1</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        In the contemporary information environment, fake news has become an important factor
influencing public sentiments and political beliefs. During the war in Ukraine, the issue of the
impact of fake news on public opinion is particularly relevant, especially in European Union
countries, where a significant amount of information pertains to events in Ukraine and
Ukrainian migrants. As of June 2024, there were approximately 6.5 million refugees from
Ukraine [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], with the largest number of Ukrainians under temporary protection residing in
Germany – 1,347,525 people or 31.2% of the total number of Ukrainian refugees in the EU,
Poland – 965,775 people or 22.4%, and the Czech Republic – 360,775 people or 8.4% [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. In the
context of numerous disinformation campaigns and attempts to
manipulate
public
consciousness, it is crucial to understand how fake news shapes the political attitudes of citizens
in host countries and which methods effectively analyze their impact.
      </p>
      <p>Considering that Poland is a strategic partner of Ukraine in the European Union and has a
significant influence on regional politics, along with a large number of Ukrainian refugees in the
country and active information exchange amid the Russian-Ukrainian war, studying the impact
of fake news on Polish political attitudes is extremely relevant. Additionally, Poland is also
facing disinformation challenges, which allows for a detailed examination of the effects of fake
news on society. Advanced machine learning methods are applied to thoroughly investigate this
issue, enabling not only the automation of fake news detection but also the assessment of its
impact on public opinion. Through text analysis algorithms and sentiment modeling, it is
possible to track changes in the political views of Polish citizens in the context of disinformation
about the war in Ukraine.</p>
      <p>This article is dedicated to assessing the impact of fake news on political attitudes in Poland,
with a focus on using machine learning for analyzing and detecting fake news, as well as
determining correlations between information campaigns and changes in public opinion. The
results of this research can significantly aid in developing strategies to combat disinformation
and enhance public information literacy.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Literature review</title>
      <p>In the context of the modern information environment, where information spreads quite rapidly
and continuously, it is crucial to ensure an effective mechanism for detecting fake messages.
Special attention should be given to news that intentionally spreads disinformation with the aim
of manipulating public opinion, undermining trust in reliable information sources, or creating
social and political conflicts. Fake news can influence public sentiment, create false perceptions,
and incite negative emotions among the population. Specifically, disinformation can be used for
political purposes, economic gains, or to weaken social cohesion. Its effects can have long-term
consequences for society, making it important to detect and neutralize such messages as quickly
as possible.</p>
      <p>In this regard, the issue of detecting and combating disinformation has gained particular
relevance among researchers. Over the past few years, there has been a significant increase in
scientific papers studying various aspects of this problem, including methods for automated
detection of fake news, techniques for social media analysis, and effective strategies for
combating disinformation. Researchers from various fields, from information technology to
social sciences, are actively working on developing new approaches to detecting and
eliminating false messages, highlighting the importance of this topic for modern society.</p>
      <p>
        For instance, in their work, Julio C. S. Reis; André Correia; Fabrício Murai; Adriano Veloso;
Fabrício Benevenuto (2019) [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] proposed a new set of features at the time and evaluated the
effectiveness of existing methods and features for automatic detection of fake news. The results
revealed important patterns regarding the utility and significance of various features in the
process of detecting false information. The authors also provided practical recommendations for
applying fake news detection methods, highlighting the challenges and opportunities in this
field.
      </p>
      <p>
        Xichen Zhang, Ali A. Ghorbani (2020) [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] investigated the negative impact of fake news on
the Internet and the existing methods for its detection at that time, many of which were focused
on user identification, content analysis, and context that indicated disinformation. The authors
also reviewed established datasets used for classifying fake news and outlined promising
directions for further research in the field of online fake news analysis.
      </p>
      <p>
        Barbara Probierz, Piotr Stefański, Jan Kozak (2021) [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] proposed a method for classifying
news based on headlines, without the need to analyze the full text. They used natural language
processing (NLP) methods to analyze headlines and news texts, as well as complex classifiers,
including classical ensemble methods, to achieve high classification accuracy.
      </p>
      <p>
        Medeswara Rao Kondamudi, Somya Ranjan Sahoo, Lokesh Chouhan, Nandakishor Yadav
(2023) [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] discussed fundamental theories of fake news, explored various approaches to its
analysis, and examined the spread of disinformation. The authors also devoted a significant
portion of their research to analyzing fake information and the methods proposed for its
detection.
      </p>
      <p>
        Abdullah Marish Ali, Fuad A. Ghaleb, Mohammed Sultan Mohammed, Fawaz Jaber Alsolami,
and Asif Irshad Khan (2023) [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] examined numerous approaches for automating the detection
and prevention of the spread of fake news. The authors proposed a model for detecting
disinformation news that uses information from web sources and is based on a multilayer
convolutional neural network and a deep autoencoder ICNN-AEN-DM. Additional information
is collected from reliable online sources to confirm or refute claims presented in news content.
The model uses convolutional layers along with a deep autoencoder to train a probabilistic
classifier based on deep learning. The probabilistic outputs of these layers are then used to train
a decision-making system by integrating a multilayer perceptron (MLP) with these outputs.
Large-scale experiments using different datasets demonstrate that the proposed model
outperforms other similar methods.
      </p>
      <p>In addition to scientific works focusing on the use of machine learning for detecting
disinformation, it is also important to consider studies dedicated to sentiment analysis of social
media users and its impact on shaping public opinion. These are important as they help
understand how changes in user sentiment may be related to the spread of fake news and
disinformation. Additionally, public sentiment analysis provides the opportunity to identify
potential threats to social stability arising from manipulations in the information space. Such
research complements our understanding of the complex impact of disinformation on various
aspects of public life.</p>
      <p>
        For example, Nikhil Yadav, Omkar Kudale, Aditi Rao, Srishti Gupta &amp; Ajitkumar Shitole
(2021) [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] utilized a publicly available labeled dataset hosted on the Kaggle platform, detailing
preprocessing steps that enhance the suitability of tweets for natural language processing
methods. Each record in the dataset consisted of a pair of tweets and corresponding sentiments,
allowing the authors to apply supervised machine learning methods. For sentiment analysis, the
researchers proposed models based on a naive Bayes classifier, logistic regression, and support
vector machines, aiming to accurately determine the emotional tone of tweets. During the
analysis, tweets were classified as positive or negative, enabling the use of these classifiers in
various domains, including business, politics, and analytics. By employing machine learning
methods, tweets were accurately classified without the need for lexicon-based approaches,
making these strategies more efficient and faster for sentiment analysis.
      </p>
      <p>
        Yuxing Qi &amp; Zahratu Shabrina (2023) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] analyzed tweets about COVID-19 from major cities
in England. The data underwent several cleaning stages, after which unsupervised lexicon-based
approaches were applied for sentiment classification. Supervised machine learning methods
were also used, including SVC, multinomial naive Bayes classifier, and random forest. The
analysis revealed changes in public sentiment regarding the pandemic, with an initial increase
in positive sentiments followed by a decline, while negative sentiments grew over time. The
authors concluded that although the use of SVC with BoW and TF–IDF features yielded the best
results with an accuracy of 71%, data limitations affected prediction accuracy. Moreover, the
study demonstrates the potential of machine learning for precise sentiment analysis, although
further research with larger and more diverse datasets could improve results.
      </p>
      <p>Staphord Bengesi, Timothy Oladunni, Ruth Olusegun, and Halima Audu (2023) [10]
investigated social media sentiment to track discussions, views, opinions, and emotions
regarding the monkeypox outbreak, which affected over 73 countries. To better understand
public perception of this disease, they analyzed over 500,000 multilingual tweets, categorizing
them into positive, negative, and neutral using VADER and TextBlob. The study developed and
evaluated 56 classification models using various algorithms such as K-Nearest Neighbor (KNN),
Support Vector Machine (SVM), Random Forest, and others. The best results, with an accuracy
of approximately 0.9348, were achieved using a combination of TextBlob, lemmatization,
CountVectorizer, and SVM.</p>
      <p>Neelakandan, S., Paulraj, D., Ezhumalai, P., and Prakash, M. (2024) [11] proposed an effective
sentiment analysis technique for Twitter data that involves preprocessing steps including
tokenization and stop-word removal, as well as using the Hadoop distributed file system to
reduce word redundancy through the MapReduce technique. Emojis and other symbols are
included as features for further analysis. A modified deep learning neural network (DLMNN) is
then used for sentiment classification. Experimental results indicate that this model
demonstrates higher performance, achieving an accuracy of 95.78% and an F-score of 95.87%,
compared to other conventional methods.</p>
      <p>Sufficient attention has been given within the scientific community to the application of
machine learning methods for detecting fake news based on sentiment analysis of the public.
The development of such models becomes an important part of the strategy to combat
disinformation and ensure the credibility of information in the media space. These studies help
better understand how fakes are related to people’s emotional states and thoughts, as well as
how they can alter public sentiment and perceptions of events.</p>
      <p>Suhaib Kh. Hamed, Mohd Juzaiddin Ab Aziz, and Mohd Ridzwan Yaakub (2023) [12]
proposed a new approach to detecting fake news, which includes sentiment analysis in news
and comments. Using the Fakeddit dataset, which contains news headlines and comments, a
bidirectional long short-term memory (Bi-LSTM) model was developed. The results showed a
fake news detection accuracy of 96.77% area under the ROC curve, which is significantly higher
than many contemporary methods. This confirms the effectiveness of using sentiment analysis
of news and emotional comments to enhance model accuracy.</p>
      <p>Sarita V Balshetwar, Abilash RS, and Dani Jermisha R (2023) [13] proposed a new approach to
detecting fake news that uses sentiment analysis as a key feature to improve accuracy. The
solution was implemented using two datasets (ISOT and LIAR) and includes feature
development based on lexicon-based sentiment analysis. The study also applies multiple
imputation strategy (MICE) to handle missing variables and uses TF-IDF to identify important
features. Naive Bayes, passive-aggressive classifier, and deep neural network (DNN) are used for
data classification. The results show a 99.8% accuracy in detecting fake news, surpassing the
effectiveness of existing methods.</p>
      <p>It is also worth highlighting the work of Ganesh Kumar Wadhwani, Pankaj Kumar Varshney,
Anjali Gupta, and Shrawan Kumar (2023) [14], which focuses on analyzing public perception of
the Russian-Ukrainian war through social media. Using 11,250 tweets about the war, the study
applies natural language processing methods for sentiment analysis and text polarity. Machine
learning models, including TF-IDF, BoW, and n-gram, were evaluated for accuracy, recall, and
F1 score. The results showed that the Extra Trees Classifier (ETC) model achieved the highest
accuracy of 0.84, indicating its effectiveness in classifying emotions in texts.</p>
      <p>Unlike existing studies, which often focus on general methods for detecting fake news and
their impact on public sentiment, our research aims to analyze in greater detail the frequency of
fake news appearances related to the Russian-Ukrainian war, using available datasets. Our task
is to analyze data from various sources to assess how frequently fake news on this topic appears
in the media space. Additionally, we will investigate changes in sentiment in tweets from Polish
users regarding Ukrainians to understand how disinformation about Ukraine affects their
emotions and thoughts. Special attention will be given to analyzing the relationship between the
appearance of fake news and changes in sentiment on social media. This will help identify
possible correlations between disinformation and public sentiment, which could assist in
developing more effective strategies to combat fake news.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Methodology</title>
      <p>At the initial stage, a machine learning model was developed for detecting fake news based
on a combination of text processing and classification methods. Initially, we used text
vectorization with TF-IDF (Term Frequency-Inverse Document Frequency) to transform text
data into numerical features that reflect the importance of words in a document compared to
other documents in the dataset. This method reduces the weight of frequently occurring words
and increases the significance of rare words that may be more informative for classification.</p>
      <p>After text vectorization, the numerical features were passed to Multinomial Naive Bayes
(MNB), a statistical classifier that estimates the probability that a news item is fake or real based
on statistical models. MNB is well-suited for text classification tasks as it effectively handles
frequency data and provides a high level of accuracy in cases where text features are important.</p>
      <p>Combining these methods allowed for the creation of an effective fake news detector capable
of recognizing and classifying news based on its content.</p>
      <p>For model development, three publicly available datasets from Kaggle were used, containing
thousands of news items labeled as “Fake” or “Real.” These included the Fake News Detection
Dataset [15], Fake or Real News [16], and Fake News Detection Data [17]. To enhance model
effectiveness, these datasets were merged into a single integrated database, creating a more
representative and diverse training dataset. After data integration, preprocessing was
performed, including text cleaning, noise removal, and text normalization. The combination of
different datasets provided the model with a large number of examples, improving its
generalization ability and accuracy in detecting fake news. Training results of the model (Table
1) on this integrated dataset achieved high accuracy in classifying news as fake or real
(Accuracy: 0.98272).</p>
      <p>From Table 1, we see that the model has high accuracy in classifying news as fake (98%) and
real (96%). The model correctly identifies 95% of fake news out of all actual fake news and 94% of
real news out of all actual real news. The F1-Score for both fake (0.91) and real news (0.94) is
high, indicating a well-balanced model performance. The Macro Average across all classes (Fake
and Real) without considering class frequencies is 0.98, with an average recall across all classes
of 0.97 and an average F1-Score across all classes of 0.98. The Weighted Average, considering
class frequencies, is 0.97, with an average recall considering class frequencies of 0.92 and an
average F1-Score considering class frequencies of 0.96. Overall, the model demonstrates high
results in both accuracy and recall for classifying fake and real news, as well as good overall
performance, indicating its effectiveness in detecting fake news.</p>
      <p>In the next stage, we used the pre-trained model to detect fake news using two available
datasets from Kaggle: BBC News Articles [18], which contains 35,860 rows and 5 columns,
covering the period from March 7, 2022, to July 3, 2024, and the Ukraine/Russia Conflict Dataset
[19], which contains information on the ongoing conflict between Ukraine and Russia since
2014. The latter dataset includes two CSV files: one with data from 2014 to 2021 (2,990 news
items) and another with data from 2018 to 2023 (96,082 news items).</p>
      <p>For further analysis, data from these sources were integrated into a single database. From the
first dataset, BBC News Articles, all news related to Ukraine and the war with Russia were
selected. From the second dataset, Ukraine/Russia Conflict Dataset, the file containing data from
2018 to 2023 was used and further filtered by date starting from March 2022 to ensure relevance
for analysis. Thus, the combined database enabled a detailed analysis of news content aimed at
detecting fake news, considering the specifics of the war in Ukraine. Additionally, text fields
were cleaned of unwanted characters, HTML tags, and stop words, and all text data were
lowercased and lemmatized to bring all words to their base forms. This step is crucial for
reducing the dimensionality of the text data before feeding it into the model.</p>
      <p>For analyzing Polish political sentiments, we used the publicly available dataset Ukraine
Conflict Twitter Dataset [20] on Kaggle, which includes a large number of posts related to
Ukraine and the war, collected from various Twitter accounts. The collected tweets cover
different aspects of the war, including political, social, and humanitarian issues, providing a
current overview of public sentiments and reactions on social media. The dataset includes daily
tweet records with publication dates, full text of each tweet, user data, and possibly metadata
such as the number of retweets, likes, and replies. The data cover the period from February 27,
2022, to June 14, 2023, allowing tracking of sentiment and reactions in response to key events.</p>
      <p>We used this database to analyze the political sentiments of Polish social media users
regarding the Ukraine-Russia conflict. In relation to the appearance of fake news in the media,
this allowed us to explore how different events and messages impact the sentiments and
emotional state of the Polish public. Before conducting the analysis, tweets were cleaned of
unstructured data and non-standard symbols and combined into a single DataFrame.
Additionally, the data were filtered to include only tweets from Polish users, providing a more
accurate tracking of specific sentiments and reactions in the context of the Polish audience.
Thus, we obtained a database with 582,507 Polish tweets. For text normalization, lemmatization
was applied, which facilitates accurate sentiment analysis and identification of themes and
trends.</p>
      <p>Political sentiment analysis of Polish citizens was carried out using the TextBlob library,
which provides a convenient interface for performing basic natural language processing tasks
such as tokenization, lemmatization, part-of-speech tagging, and sentiment analysis.
Specifically, TextBlob uses polarity and subjectivity methods to determine positive, negative,
and neutral sentiments in texts, which is critical for our study. Its integration with WordNet for
lemmatization and easy integration with other libraries makes TextBlob an ideal choice for
processing large volumes of text data and ensures high efficiency in conducting sociological and
communication research.</p>
      <p>To investigate the dependency of political sentiment changes on the frequency of fake news
appearances, interpolation analysis and cubic spline interpolation methods were used. Initially,
the data were divided into intervals, where each interval represents a specific range of fake news
frequency. For each interval, a cubic spline was constructed to model the relationship between
sentiment changes (ordinates) and the number of fake news items (abscissas). All splines are
continuous and twice-differentiable in each interval, allowing for the construction of a smooth
curve for analyzing political sentiment behavior in response to changes in the number of fake
news items. This model adequately reflects the nonlinear nature of the relationship and provides
more accurate predictions of potential sentiment changes under different conditions.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Results</title>
      <p>With the integrated news database on the Russia-Ukraine conflict, and using the model trained
on the training datasets, we identified 110 fake news items out of 43,811 news articles and
determined their dates of appearance in the media (Figure 1).</p>
      <p>The constructed graph clearly demonstrates the periods during which there was an increase
in the number of fake news items, often coinciding with significant events related to the war in
Ukraine and migration flows. These peak moments may indicate targeted information
campaigns aimed at manipulating public opinion.</p>
      <p>The identified time intervals with increased dissemination of fake information became
crucial for further analyzing their impact on the political attitudes of the Polish population. This
approach allows for a more detailed investigation of how fake news can influence public
sentiment and lead to changes in public opinion, which is critical for understanding the
consequences of information warfare in contemporary digital society.</p>
      <p>Public sentiment is reflected not only in comments under news articles but also is actively
shaped and expressed on social media. Platforms like Twitter and Facebook serve as important
venues for exchanging opinions and reacting to events in real-time. Due to the large number of
users and the rapid spread of information, social networks provide a more comprehensive view
of public sentiment. An important feature is that these platforms allow tracking not only
changes in sentiment but also the impact of information campaigns on public opinion. Thus,
analyzing data from social networks is key to a comprehensive study of public sentiment.</p>
      <p>Therefore, the next step in our research was to identify and assess the political sentiments
among the Polish population in relation to events in Ukraine and the migration of Ukrainians to
Poland.</p>
      <p>As previously mentioned, we selected only tweets published by Polish users from the
publicly available Ukraine Conflict Twitter Dataset on Kaggle. The main method of filtering data
involved applying a conditional selection based on the values in the ‘language’ column of the
DataFrame. This allowed us to use a simple condition to isolate only those rows where the value
in the language column equals ‘pl,’ thereby highlighting tweets written in Polish and focusing
exclusively on Polish users. Figure 2 illustrates their monthly distribution, showing trends and
fluctuations in activity throughout the study period.</p>
      <p>Periods of high activity may indicate significant events or information campaigns. For
example, the maximum number of tweets was recorded at the beginning of Russia's full-scale
invasion of Ukraine, and an increase in user interest was noted on the anniversary of the war’s
start. This preliminary analysis forms the basis for further sentiment analysis, as the next task is
to evaluate the emotional tone of tweets during these periods to understand how fluctuations in
activity might reflect changes in sentiment or emotional state of users.</p>
      <p>After integrating all processed data into a single DataFrame, we added a column indicating
the month of each tweet’s publication for convenience in further analysis. The next step was
sentiment analysis using the TextBlob algorithm to assess the emotional tone of the texts. Each
tweet was classified as positive, negative, or neutral based on its polarity. The data were grouped
by month and sentiment categories, and proportions of each sentiment type were calculated.
This allowed us to create a graph (Figure 3) that reflects changes in users’ emotional sentiments
over time.</p>
      <p>The visualization in the graph illustrates how the proportion of positive, negative, and
neutral sentiments changes month by month, allowing us to trace sentiment trends based on
Twitter activity.</p>
      <p>Additionally, we also created a WordCloud for positive and negative sentiments, using
unique words that do not overlap between categories (Figure 4). This helps highlight key
expressions that are most strongly associated with each type of sentiment.</p>
      <p>a)
b)</p>
      <p>After a detailed analysis of the sentiments in tweets from Polish users, we proceed to
evaluate the impact of fake news on changes in sentiment. Given that our data covers the period
from February 27, 2022, to June 13, 2023, we will also focus on news published during the same
timeframe. This will allow us to better understand whether disinformation influenced the
sentiments of Poles during the specified period.</p>
      <p>Thus, for each month, we calculated the total number of positive, negative, and neutral
tweets. We then computed the average sentiment score (S) as a weighted average of positive,
negative, and neutral sentiments, considering their proportions in the overall dataset:
(1)
(2)</p>
      <p>P− N
S= ,</p>
      <p>T</p>
      <p>SCt=St−St−1 ,
where P is the number of positive tweets,</p>
      <p>N is the number of negative tweets, and</p>
      <p>T is the total number of tweets in the month.</p>
      <p>We calculated the sentiment changes (SC) as the difference between the average sentiment
scores for the current and previous months:
where St is the average sentiment score for the current month t,</p>
      <sec id="sec-4-1">
        <title>St−1 is the average sentiment score for the previous month t−1.</title>
        <p>Thus, a positive sentiment change value indicates that the average sentiment in the current
month is higher than in the previous month, a negative value indicates a decrease in average
sentiment, and a zero value means that the average sentiment remained stable compared to the
previous month.</p>
        <p>These changes in average sentiment among Polish users and the number of fake news items
for each month can be visually represented in a graph (Figure 5).</p>
        <p>From Figure 5, we can see that during the period from February 2022 to June 2023, the
sentiment change indicators show an overall positive trend with fluctuations. The highest
values are observed in June 2023 (0.091), which may indicate positive sentiment during this
period and is accompanied by a decrease in the number of fake news compared to the previous
month. Specific months, such as June 2022 (0.078) and March 2023 (0.064), also have high values,
suggesting periods of improved sentiment, which are also associated with a reduction in
misinformation in the media. In contrast, May 2023 shows a negative sentiment change (-0.036),
indicating a temporary deterioration. Sentiment change indicators may correlate with
significant socio-political events, such as news, economic or political changes, or the appearance
of fake news. To better understand the reasons for these changes, it is important to analyze the
events that occurred during these months.</p>
        <p>Additionally, we calculated the changes in positive and negative sentiments using a similar
approach:
where Pt is the number of positive tweets in month t,</p>
      </sec>
      <sec id="sec-4-2">
        <title>Pt−1 is the number of positive tweets in month t−1,</title>
        <p>PCt= Pt− Pt−1 ,
NCt= N t− N t−1 ,
(3)
(4)
where N t is the number of negative tweets in month t,</p>
      </sec>
      <sec id="sec-4-3">
        <title>N t−1 is the number of negative tweets in month t−1.</title>
        <p>These changes in relation to the number of fake news articles per month are illustrated in
Figure 6.</p>
        <p>Months with the largest changes in both positive and negative sentiments often coincide
with high numbers of fake news articles. For example, in March 2022, there is a sharp increase in
both positive and negative sentiment changes, which corresponds with the highest number of
fake news articles during this period (6 articles). Similarly, in April 2023, there was a significant
rise in both positive and negative sentiments, while the number of fake news articles was at a
moderate level. In some months, such as May 2022, when the number of fake news articles
increased, there was a noticeable decline in positive sentiments and an increase in negative
ones. This may indicate that misinformation has an impact on deteriorating sentiments among
the population. Throughout the study period, there are significant fluctuations in sentiments
that may be related to various social and political events. For instance, positive sentiments
sharply increased in January 2023, while in May of the same year, there was the largest drop in
positive sentiments and an increase in negative ones. Despite a decrease in the number of fake
news articles in the second half of 2022 and the first half of 2023, sentiment changes remain
unstable. This may suggest the influence of other factors, apart from fake news, on the
formation of public sentiment. Thus, the data indicate a complex dynamic of the impact of fake
news on public sentiments, which is important for economists and social analysts when
assessing socio-economic conditions during periods of political and informational instability.</p>
        <p>The graph showing the relationship between sentiment changes and the number of fake
news articles (Figure 7) demonstrates that increases or decreases in the number of fake news
articles do not always lead to proportional changes in public sentiments.</p>
        <p>The scatter plot in Figure 7 indicates a non-linear relationship between these indicators. This
complexity in the relationships suggests the need for non-linear modeling methods for a more
accurate analysis of these processes.</p>
        <p>We selected interpolation analysis and cubic spline interpolation methods for this
investigation due to their ability to provide high accuracy in modeling non-linear dependencies.
Interpolation allows for the construction of functions that pass through specified points, while
cubic splines, in particular, ensure smoothness of the curve while maintaining continuity of the
first and second derivatives. This is especially important when dealing with data where
sentiment changes may be abrupt or exhibit complex behavior. Cubic spline interpolation helps
avoid overfitting, which can occur with high-degree polynomials, and ensures a natural
transition between different intervals. These properties make this approach effective for
analyzing complex socio-economic relationships, such as the impact of fake news on sentiment
changes.</p>
        <p>To build the cubic spline based on the number of fake news articles and sentiment changes,
we converted monthly periods into numerical values and ensured a strictly increasing order of
the data. Any duplicates or incorrect order were addressed by sorting the data.</p>
        <p>The cubic spline plot (Figure 8) demonstrates a smooth, continuous curve resulting from
interpolation between data points.</p>
        <p>Visually, it shows how the spline smoothly transitions through each control point, providing
an accurate representation of changes in the data.</p>
        <p>The graph is divided into several intervals, each using its own cubic equation. This allows the
spline to accurately reflect different trends in the data within each interval, ensuring both
precision and smoothness. Additionally, we can clearly observe the transition points between
intervals. The spline provides a smooth transition between these points, which is crucial for
maintaining the continuity of the first and second derivatives of the function, a key property of
cubic splines. The model quality assessment is presented in Table 2.</p>
        <p>y ( x )=0.0031 x3−0.0103 x2+0.0107 x ,</p>
        <p>On this interval, the cubic spline models the relationship with small varying coefficients. The
model shows minor fluctuations in the values of y(x), corresponding to a smooth transition
between the points.</p>
        <p>Interval [1, 2):
y ( x )=0.0031 ( x−1)3−0.0011 ( x−1)2−0.0007 ( x−1)+0.0034 ,
(5)
(6)</p>
        <p>A reduction in the influence of cubic and quadratic terms is observed, reflecting smaller
fluctuations in the modeling of mood changes.</p>
        <p>Interval [2, 3):</p>
        <p>y ( x )=−0.0104 ( x−2)3+0.0082 ( x−2)2+0.0064 ( x−2)+0.0047 ,</p>
        <p>On this interval, the function shows a reverse effect with a negative cubic term, which may
indicate a change in trend or a decrease in the influence of fake news on mood.</p>
        <p>Interval [3, 4):</p>
        <p>y ( x )=0.0064 ( x−3)3−0.0229 ( x−3)2−0.0084 ( x−3)+0.0089 ,</p>
        <p>Here, the function has a positive cubic term, reflecting an increasing effect on mood changes
with the rise in the number of fake news.</p>
        <p>Interval [4, 6):</p>
        <p>y ( x )=0.0067 ( x−4 )3−0.0036 ( x−4 )2−0.0350 ( x−4 )−0.0160 ,</p>
        <p>This interval shows a decrease in positive effects, which may indicate a reduction in the
impact of fake news on mood.</p>
        <p>Interval [6, 7):
(7)
(8)
(9)
(10)
y ( x )=−0.0247 ( x−6 )3+0.0367 ( x−6 )2+0.0312 ( x−6 )−0.0467 ,</p>
        <p>We observe significant fluctuations with a negative cubic term, which may indicate changes
in the dynamics of the impact of fake news.</p>
        <p>Interval [7, 8):
y ( x )=−0.0247 ( x−7 )3−0.0373 ( x−7 )2+0.0306 ( x−7 )−0.0034 ,
(11)</p>
        <p>In the final interval, the function has a negative cubic term, reflecting a gradual decline in the
impact of fake news on mood changes.</p>
        <p>The results show that modeling with cubic splines allows for a detailed analysis of the
dynamics of the impact of fake news on public mood changes over time.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusions</title>
      <p>In the context of the rapid development of information technologies and the growing influence
of disinformation on public attitudes, our research focuses on analyzing the impact of fake news
on the political beliefs of Polish citizens in the context of the war in Ukraine. We have developed
and implemented a comprehensive approach to studying this issue, integrating advanced
machine learning methods for detecting fake news and a detailed analysis of their impact on
public opinion, particularly through social media.</p>
      <p>We combined multiple data sources (news and tweets) to create a unified model that assesses
not only the accuracy of fake news detection but also their real impact on citizens’ moods. The
use of hybrid machine learning models for news classification, such as Multinomial Naive Bayes
combined with TF-IDF, achieves high accuracy and reliability in detecting fake news. The use of
TextBlob for sentiment analysis ensures accuracy and efficiency in processing large volumes of
textual data, which is crucial for understanding social reactions to fake news.</p>
      <p>Our research highlights the importance of a comprehensive approach to analyzing the
impact of fake news. Combining different data processing and machine learning methods
provides a detailed and holistic view of the impact of disinformation on society. Future research
could focus on expanding our model to include other languages and cultural contexts, as well as
integrating additional data sources to improve the accuracy and universality of the analysis.
Additionally, understanding the mechanisms through which fake news affects political attitudes
can aid in educational campaigns aimed at combating disinformation. This includes developing
educational programs and tools to enhance critical thinking among citizens.
[10] S. Bengesi, T. Oladunni, R. Olusegun and H. Audu, “A Machine Learning-Sentiment
Analysis on Monkeypox Outbreak: An Extensive Dataset to Show the Polarity of Public
Opinion From Twitter Tweets,” in IEEE Access, vol. 11, pp. 11811-11826, 2023, doi:
10.1109/ACCESS.2023.3242290.
[11] S, N., Paulraj, D., Ezhumalai, P., and Prakash, M., “A Deep Learning Modified Neural
Network(DLMNN) based proficient sentiment analysis technique on Twitter data”. Journal
of Experimental &amp; Theoretical Artificial Intelligence, vol. 36, no. 3, pp. 415–434, 2024.
doi:10.1080/0952813X.2022.2093405.
[12] Hamed, S.K.; Ab Aziz, M.J.; Yaakub, M.R. Fake News Detection Model on Social Media by
Leveraging Sentiment Analysis of News Content and Emotion Analysis of Users’
Comments. Sensors 2023, 23, 1748. https://doi.org/10.3390/s23041748.
[13] Balshetwar, S.V., RS, A. &amp; R, D.J. Fake news detection in social media based on sentiment
analysis using classifier techniques. Multimed Tools Appl 82, 35781–35811 (2023).
https://doi.org/10.1007/s11042-023-14883-3.
[14] Wadhwani, G.K., Varshney, P.K., Gupta, A. et al. Sentiment Analysis and Comprehensive
Evaluation of Supervised Machine Learning Models Using Twitter Data on Russia–Ukraine
War. SN COMPUT. SCI. 4, 346 (2023). https://doi.org/10.1007/s42979-023-01790-5.
[15] Fake News Detection Dataset. The Battle Against Misinformation: A Text Classification
Dataset. Available :
https://www.kaggle.com/datasets/vishakhdapat/fake-newsdetection/data.
[16] Fake or Real News. Real Or Fake News Dataset. Available :
https://www.kaggle.com/datasets/jillanisofttech/fake-or-real-news.
[17] Fake news Detection data. Available :
https://www.kaggle.com/datasets/athirakaladharan/fake-news-detection-data.
[18] BBC News Articles. Comprehensive Collection of BBC News Articles. Available :
https://www.kaggle.com/datasets/bhavikjikadara/bbc-news-articles.
[19] Ukraine/Russia Conflict Dataset. Available :
https://www.kaggle.com/datasets/kylegraupe/ukrainerussia-conflict-dataset.
[20] Ukraine Conflict Twitter Dataset. Daily datasets of tweets about the ongoing Ukraine
Russia Conflict. Available :
https://www.kaggle.com/datasets/bwandowando/ukrainerussian-crisis-twitter-dataset-1-2-m-rows/versions/508?
resource=download&amp;select=20230614_UkraineCombinedTweetsDeduped.csv.gzip.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>A.</given-names>
            <surname>Honcharenko</surname>
          </string-name>
          . “
          <article-title>Ukrainians are moving abroad en masse: the NBU named the reason</article-title>
          .
          <source>” TSN.ua. Application date: August</source>
          <volume>22</volume>
          .
          <year>2024</year>
          . [Online]. Available at : https://tsn.ua/ukrayina/ukrayinci-masovo
          <article-title>-viyizhdzhayut-za-kordon-v-nbu-nazvaliprichinu-2615472</article-title>
          .html.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <article-title>[2] “Refugees from Ukraine to the EU: data for June 2024”</article-title>
          . How much,
          <source>how much? Application date: August</source>
          <volume>22</volume>
          .
          <year>2024</year>
          . [Online]. Available at : https://skilky-skilky.
          <article-title>info/za-cherven-kilkistukrainskykh-bizhentsiv-v-yes-zrosla-</article-title>
          <string-name>
            <surname>na-</surname>
          </string-name>
          52-5-tysiachi/.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J. C. S.</given-names>
            <surname>Reis</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Correia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Murai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Veloso</surname>
          </string-name>
          and
          <string-name>
            <given-names>F.</given-names>
            <surname>Benevenuto</surname>
          </string-name>
          , “
          <article-title>Supervised Learning for Fake News Detection,” in IEEE Intelligent Systems</article-title>
          , vol.
          <volume>34</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>76</fpage>
          -
          <lpage>81</lpage>
          , March-April
          <year>2019</year>
          , doi: 10.1109/MIS.
          <year>2019</year>
          .
          <volume>2899143</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Xichen</given-names>
            <surname>Zhang</surname>
          </string-name>
          , Ali A.
          <string-name>
            <surname>Ghorbani</surname>
          </string-name>
          .
          <article-title>An overview of online fake news: Characterization, detection, and discussion</article-title>
          .
          <source>Information Processing &amp; Management</source>
          , Volume
          <volume>57</volume>
          ,
          <string-name>
            <surname>Issue</surname>
            <given-names>2</given-names>
          </string-name>
          ,
          <year>2020</year>
          . https://doi.org/10.1016/j.ipm.
          <year>2019</year>
          .
          <volume>03</volume>
          .004.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>B.</given-names>
            <surname>Probierz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Stefański</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Kozak</surname>
          </string-name>
          .
          <article-title>Rapid detection of fake news based on machine learning methods</article-title>
          .
          <source>Proc. Comput. Sci.</source>
          ,
          <volume>192</volume>
          (
          <year>2021</year>
          ), pp.
          <fpage>2893</fpage>
          -
          <lpage>2902</lpage>
          , doi: 10.1016/j.procs.
          <year>2021</year>
          .
          <volume>09</volume>
          .060.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Kondamudia</surname>
            ,
            <given-names>Medeswara</given-names>
          </string-name>
          &amp; Sahoob, Somya &amp; Chouhanc, Lokesh &amp; Yadav,
          <string-name>
            <surname>Nandakishor.</surname>
          </string-name>
          (
          <year>2023</year>
          ).
          <article-title>A Comprehensive survey of Fake news in Social Networks: Attributes, Features, and Detection Approaches.</article-title>
          .
          <source>Journal of King</source>
          Saud University - Computer and Information Sciences.
          <volume>35</volume>
          . 101571. 10.1016/j.jksuci.
          <year>2023</year>
          .
          <volume>101571</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Ali</surname>
            ,
            <given-names>A.M.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Ghaleb</surname>
            ,
            <given-names>F.A.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Mohammed</surname>
            ,
            <given-names>M.S.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Alsolami</surname>
            ,
            <given-names>F.J.</given-names>
          </string-name>
          ;
          <string-name>
            <surname>Khan</surname>
            ,
            <given-names>A.I.</given-names>
          </string-name>
          <string-name>
            <surname>Web-InformedAugmented Fake News</surname>
          </string-name>
          <article-title>Detection Model Using Stacked Layers of Convolutional Neural Network and Deep Autoencoder</article-title>
          .
          <source>Mathematics</source>
          <year>2023</year>
          ,
          <volume>11</volume>
          ,
          <year>1992</year>
          . https://doi.org/10.3390/math11091992.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Yadav</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kudale</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rao</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gupta</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shitole</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          (
          <year>2021</year>
          ).
          <article-title>Twitter Sentiment Analysis Using Supervised Machine Learning</article-title>
          . In: Hemanth,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Bestak</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.IZ</surname>
          </string-name>
          . (eds) Intelligent
          <source>Data Communication Technologies and Internet of Things. Lecture Notes on Data Engineering and Communications Technologies</source>
          , vol
          <volume>57</volume>
          . Springer, Singapore. https://doi.org/10.1007/
          <fpage>978</fpage>
          -981-15-9509-7_
          <fpage>51</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Qi</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shabrina</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          <article-title>Sentiment analysis using Twitter data: a comparative application of lexicon- and machine-learning-based approach</article-title>
          .
          <source>Soc. Netw. Anal. Min</source>
          .
          <volume>13</volume>
          ,
          <issue>31</issue>
          (
          <year>2023</year>
          ). https://doi.org/10.1007/s13278-023-01030-x.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>