3. Methodology
The purpose of this research is to comparatively evaluate the performance of several automated fake news detection pipelines, developed with the support of artificial intelligence systems and applied to Romanian journalistic content. The study aims to analyze the extent to which algorithms trained on international datasets can be transferred and used effectively to classify news articles in the Romanian media space. Therefore, the research is not just limited to evaluating the performance of individual algorithms but also investigates a broader process: generating code with the help of artificial intelligence, implementing it in Google Colab, training models on international databases, and then testing them on a Romanian news corpus.
Specific objectives
The research specifically pursues the following objectives:
Development of an AI-assisted experimental framework for generating, deploying, and testing multiple fake news classification pipelines.
Implementation in Google Colab of classic machine learning models and advanced natural language processing models.
Training algorithms on international datasets used in disinformation detection research.
Testing models on a corpus of Romanian articles that is culturally and contextually different from the data used in the training stage.
Comparative evaluation of model performance through standard classification indicators: accuracy, precision, recall, and F1-score.
Analysis of the robustness of models in conditions where training and test data differ in geographic origin, journalistic convention, and political context, specifically by evaluating models trained on internationally sourced English datasets and on English translations of Romanian journalistic content.
Identification of the types of errors produced by each model by analyzing the real items classified as fake and fake items classified as real.
Research hypotheses
The research starts from the following hypotheses:
H1. Advanced natural language processing models, such as BERT and TextGCN, will outperform classical algorithms due to their ability to analyze contextual relationships between words.
H2. The performance of all models will be affected by the gap between the internationally sourced training data and the Romanian-sourced test content, as the training corpus does not fully reflect the thematic, political, and journalistic particularities of the Romanian media space, even when that content is evaluated in English translations.
H3. Classic machine learning models can achieve competitive results in situations where the difference between fake and real news is reflected mainly at the lexical level through the frequency and distribution of words.
H4. Most classification errors will occur in the case of articles in which legitimate journalistic language overlaps with the language of disinformation, especially in political, institutional, satirical, or alarmist texts.
Scope and methodological limitations
Although the study was designed to meet methodological and academic standards, the present study has several limitations that should be acknowledged. The first limitation concerns the gap between the training and test corpora. Although the Romanian test articles were translated into English prior to evaluation—meaning the models operated within the same language throughout—the internationally sourced training data do not reflect the journalistic style, political context, or thematic specificity of the Romanian media space. Additionally, the translation step itself may introduce semantic shifts that affect classification outcomes. The second limitation concerns the size of the Romanian test corpus. Although the set of 100 articles is balanced, it cannot cover the entire diversity of the Romanian media ecosystem. The third limitation concerns the dependence of the pipelines on AI-generated or AI-assisted code. Even though this code allows for rapid prototyping, it requires validation, adjustment, and methodological verification to avoid implementation or interpretation errors. Nevertheless, human validation remained essential throughout the use of AI-assisted forms. The fourth limitation is that the models evaluated do not verify the factual accuracy of the statements in the articles and only classify texts based on the patterns learned from the data. Therefore, an article can be classified as real, not because the information is verified, but because its language resembles that of authentic articles in the training data.
Research design and experimental framework
The study has an experimental, comparative, and mixed-methods design oriented toward evaluating the performance of several automated fake news detection pipelines. The models were developed with the support of the Google Gemini artificial intelligence systems, Gemini version 3.1 Pro, which assisted with the generation and adaptation of the source code. The resulting code was then implemented and run in Google Colab. 2026. This environment allowed rapid prototyping, standardization of experimental conditions, and comparison of algorithms under similar conditions. The comparative component consisted of testing several models, from classic machine learning algorithms to advanced transformer- and graph-based architectures, on the same corpus of Romanian articles. The mixed component combined quantitative evaluation, performed through metrics such as accuracy, precision, recall, and F1-score, with qualitative analysis of classification errors.
Six models were evaluated in the study that were selected to cover several algorithmic families:
Naive Bayes—A probabilistic model frequently used in the classification of texts, based on the distribution and frequency of terms.
K-Nearest Neighbors—KNN, a model based on the similarity between texts, which classifies documents according to their proximity to other labeled documents.
Random Forest—An assembly-type model, consisting of several decision trees, capable of combining multiple classification rules.
XGBoost—A boosting model based on successively built decision trees, with each stage seeking to correct the errors of the previous one.
BERT—A transformer model, capable of analyzing words according to the context in which they appear.
TextGCN—A model based on graphical networks, which analyzes the relationships between words and documents by means of a structure of nodes and connections.
Data used
The research used two levels of data: training data and test data. The training data consisted of international datasets used in research on the detection of fake news. Thus, three international databases were selected, totaling 195,701 news items, both real and fake. The sources used were as follows:
(a) WELFake Dataset—An aggregated dataset, constructed by combining four distinct news sources, containing articles labeled as either real or fake, and intended for textual classification tasks [
46]. Available at:
https://doi.org/10.5281/zenodo.4561253.
To ensure optimal performance of the detection models, the three databases were subjected to a systematic preprocessing pipeline prior to training. The datasets were merged into a single centralized corpus, with article titles and full-body texts. A standardization and cleaning procedure was then applied, in which special characters, web links, and redundant whitespaces were removed. In the next step, deduplication and class balancing were performed; duplicate entries were identified and removed, and the corpus was balanced to an equal number of real and fake news articles, resulting in 124,580 unique articles. All preprocessing steps were implemented in Python and are provided in
Appendix A.1—“Database processing code”. All three datasets are exclusively in English, and no translation was applied to the training corpus. The models were therefore trained entirely in English. Training and testing were performed on entirely separate datasets: the models were trained on the international corpus and tested on the independent Romanian corpus.
The test data were represented by a corpus of Romanian articles. The test set was balanced and included 100 items, of which 50 were labeled as false and 50 as true. The labels assigned to the fake articles in the corpus were drawn from fact-checking websites. Articles classified as authentic were selected from news sources with editorial credibility and were individually reviewed by the authors to verify their consistency with the factual context. Since the models were trained in English, it was necessary to translate the Romanian test texts into English prior to evaluation. The test articles were preprocessed using the same cleaning pipeline applied to the training corpus. The translation was performed using Google Translate, followed by a manual review by the authors to correct errors. The detailed description of the articles included in the test corpus, accompanied by the titles, sources and tags related to each article, is presented in
Appendix A.2—“Training test database”.
The articles were selected from content published or circulated during the last three months prior to data collection and were included only if they were related to Romania or to topics directly relevant to the Romanian information space. Real articles were selected from Romanian mainstream online media sources, whereas fake articles were selected sequentially from fact-checking websites. Items that did not match the article-based design of the study, such as social media posts, video-only materials, or deepfake video cases, were excluded. The corpus was intended not to be statistically representative of the Romanian media ecosystem but to provide a pilot external test set for observing how models trained on international datasets behave when applied to Romanian-sourced news content.
Experimental procedure
The present study reports an external evaluation of the trained models on the Romanian test corpus. Although the models were trained using international benchmark datasets, the manuscript does not include a separate evaluation of model performance on those international datasets. Consequently, the study does not quantify a direct transfer-performance gap between international and Romanian data. Instead, it provides an exploratory assessment of how the tested pipelines behaved when applied to English translations of Romanian news content.
In the first stage, the models to be compared were selected. In the second stage, classification pipelines were generated or adapted with the support of artificial intelligence systems. The resulting code was organized and run in Google Colab, which provided approximately 12 GB of RAM and access to a shared T4 GPU. Standard CPU resources were used for classical and ensemble models, while the T4 GPU accelerator was used for BERT and TextGCN. The implementation was developed in Python 3.10, using the libraries: pandas, scikit-learn, XGBoost, transformers (Hugging Face), and torch (PyTorch). For BERT, the BERT-base-uncased variant was used, which is a model for English text. The complete hyperparameter configuration for all six models, including all relevant parameter values, is provided in
Table A4.
Given the resource constraints of the cloud environment, the source code initially generated by the AI was reviewed and adapted before execution. The primary category of adaptations concerned memory management: for all classical and ensemble models (Naive Bayes, KNN, Random Forest, XGBoost), the maximum vocabulary size used by the TF-IDF vectorizer was explicitly limited, ranging from 10,000 to 50,000 of the most frequent terms, depending on the requirements of each algorithm. For transformer-based and neural models (BERT, TextGCN), additional constraints were applied to the tokenizer’s maximum sequence length and to the training batch size, with the number of training epochs reduced accordingly. For all models involving random processes, the random seed was set to 42. These adjustments were necessary to prevent session crashes due to RAM exhaustion and are provided in
Table A3.
The code generated by the AI system served as a functional starting point for each pipeline. Where the generated code executed without errors on the target dataset and environment, it was accepted with only minor adaptations, specifically with file path references. When runtime errors occurred, most frequently due to memory exhaustion, the error output was diagnosed and the parameter was adjusted manually until successful execution was achieved. The prompt submitted to the AI for this stage was:
“Write complete Python code for Google Colab that: (1) mounts Google Drive; (2) loads a CSV training file with columns text and label; (3) cleans nulls from those columns; (4) vectorizes the text using TF-IDF; (5) creates and trains the classifier; (6) saves the trained model and vectorizer as .pkl files to Google Drive. Print a progress message before each step.”
In the second stage, the trained models were applied to the Romanian test corpus of 100 news items. For each item, the algorithm generated a binary prediction: “fake” or “real”. The prompt submitted to the AI system for this stage was:
“Write complete Python code for Google Colab that: (1) mounts Google Drive; (2) loads the saved model and vectorizer; (3) loads the CSV test file; (4) preprocesses the text using the same cleaning procedure applied during training; (5) generates a prediction for each article; (6) saves the results to a CSV file. Print a progress message before each step.”
In the third stage, the predictions were compared with the ground-truth labels. Based on this comparison, performance metrics were calculated and confusion matrices were constructed. Subsequently, the classification errors were qualitatively analyzed to identify the linguistic and thematic patterns that influenced the performance of the models. The prompt submitted to the AI system for this stage was:
“Write Python code that: (1) loads the ground truth file and the predictions file; (2) aligns the two columns for comparison; (3) computes a full classification report including accuracy, precision, recall, F1-score, macro-F1 and weighted-F1; (4) plots a confusion matrix heatmap with axis labels and a title specifying the model and the test set”.
The quantitative assessment was based on standard indicators used in the automatic classification:
Accuracy measures the total proportion of correct classifications.
Precision indicates the proportion of correct predictions out of the total predictions made for a given class.
Recall measures the model’s ability to identify all examples belonging to a class.
F1-score represents the harmonic mean between precision and recall, and is useful for assessing the balance between the two.
Macro-F1 computes the unweighted mean of per-class F1-scores, treating each class with equal importance.
Weighted-F1 computes the same mean weighted by the number of instances per class. Since the test set is perfectly balanced (50 fake and 50 real articles), both metrics produce identical values across all models.
In addition to these metrics, the analysis included the values in the confusion matrix: true positives, true negatives, false positives, and false negatives.
In this study, the term “AI-generated” refers strictly to the use of artificial intelligence tools as implementation support for drafting, adapting, and debugging the source code of experimental pipelines. It does not imply that the AI-assisted coding process itself is evaluated as an independent research variable, nor that the study compares AI-generated code with human-written code; rather, the scientific focus remains on the comparative performance of the resulting fake news detection models under the same experimental conditions.
4. Results
This section presents the results obtained by testing the six pipelines for the automatic detection of fake news on a balanced Romanian corpus, consisting of 100 articles: 50 articles labeled as fake, and 50 articles labeled as real. Results are reported using standard classifications of accuracy, precision, recall, and F1-score and by the distribution of errors in the confusion matrix. In order to avoid terminological ambiguities generated by the different use of TP, TN, FP, and FN indicators depending on which class is treated as positive, the confusion matrices are presented below in descriptive format and directly report the combinations of actual labels and model prediction.
The analysis pursues two complementary levels. The first level is comparative and highlights the relative performance of the six models. The second level is interpretative and follows the types of articles that have generated classification errors, especially situations in which the vocabulary of legitimate journalism overlaps with the vocabulary of disinformation, satire, political discourse, or institutional communication.
4.2. Analysis of Results by Model
4.2.3. Random Forest
Random Forest achieved the best overall performance in the experiment, with an accuracy of 77% and 23 errors. The model correctly identified 42 of the 50 fake items and 35 of the 50 real items. It produced eight fake → real errors and 15 real → fake errors, indicating a relatively balanced distribution compared to KNN and XGBoost.
The ranking report shows an F1-score of 0.79 for the fake class and 0.75 for the real class. The precision for the real class is the highest of all models with 0.81, which indicates that when Random Forest assigns the real label, the prediction is generally reliable. At the same time, the 0.84 recall for the fake class shows a good ability to detect fake content.
Some of the real articles misclassified by Random Forest coincide with those misclassified by Naive Bayes, especially articles about surveys, unusual events, situations with sensationalist features, or cultural–historical themes. This overlap suggests the existence of difficult lexical areas for several types of models and not just for a single algorithm. In the case of Random Forest, the difficulty arises when the decision trees encounter combinations of characteristics associated in the training data with disinformation, even though the analyzed text is authentic journalism.
Three confounding factors were particularly noticeable (
Table 4). The first is the length of the article. Very short texts offer few features for stable splits, whereas very long texts increase the likelihood of signal words associated with fake news. The second factor is represented by cultural or historical topics, where the vocabulary about legends, curses, spirits, deposits, or narrative stories can resemble the rhetoric of conspiracy texts. The third factor is the articles on regulations and legal provisions, where the institutional and procedural vocabulary can be confused with the language of theories about abuse of power or social control.
In the case of fake articles classified as real, Random Forest was especially vulnerable to misinformation built on seemingly plausible legislative, political, or institutional events. The names of public figures, references to institutions, geopolitical mentions, and narrative structures close to political journalism created a lexical profile that the model associated with real articles. The manipulation takes place here at the semantic and pragmatic level, not just at the lexical level, and the model cannot factually verify the statements.
Despite these limitations, Random Forest offered the best balance between detecting fake content and recognizing authentic journalism. Compared to the other models, its result suggests that a classical assembly-type architecture can remain competitive under cross-lingual conditions, especially when the classification task depends on lexical distributions and recurrent combinations of features.
4.2.4. XGBoost
XGBoost achieved 57% accuracy, with 43 articles misclassified. The model correctly identified 44 of the 50 fake items, but it correctly classified only 13 of the 50 real items. It generated 81 fake predictions and only 19 real predictions, which indicates a strong trend of overlabeling articles as fake.
This distribution is reflected in the high recall for the fake class with 0.88 and the very low recall for the real class with 0.26. The precision for the fake class is 0.54, which means that almost half of the fake predictions are actually real articles mislabeled. For the real class, the precision of 0.68 suggests that the model may be relatively correct when assigning this label, but it does so too rarely to be considered balanced.
The 37 real items classified as fake indicate a major transfer and calibration problem. Among these errors are articles that have caused difficulties for the other models as well: surveys, articles with analytical language, materials with cultural or historical topics, texts with large volumes, or formulations with sensationalist potential. This suggests that XGBoost has internalized certain patterns associated with disinformation too strongly and applied them excessively to the Romanian corpus.
Other problematic cases involved articles (
Table 5) with metaphors, legislative language, or alarmist tones, including expressions such as “radical law”, “phasing out”, “ban”, “crisis”, or “chaos”. In these situations, the model interpreted the political, economic, and institutional vocabulary as a signal of disinformation, even though some texts were real articles.
The fake articles classified as real used either names, institutions, too apparently precise procedures, or technical and journalistic language that masked the fabricated nature of the information. In addition, the model had difficulty identifying subtle satire, as phrases such as ‘prime minister’ or ‘hunger strike’ can function as legitimate signals if analyzed without access to the pragmatic level of the text.
XGBoost’s performance is mostly relevant as a negative result. Although the model generally performs well in many classification tasks, it did not bring an advantage over Random Forest in this experiment. The result suggests either insufficient parameter calibration or high sensitivity to the distribution of the drive data, which led to an excessive orientation towards the fake class. In the form tested, XGBoost is less useful in an operational context in which it is also necessary to protect authentic journalism from misclassification.
4.2.6. TextGCN
TextGCN achieved 72% accuracy, with 28 articles misclassified. The model correctly identified 42 of the 50 fake items and 30 of the 50 real items. It generated 62 fake predictions and 38 real predictions, which indicates a moderate trend of favoring the fake class.
The performance indicators show an F1-score of 0.75 for the fake class and 0.68 for the real class. The 0.84 recall for the fake class indicates good misinformation detection capability, but the 0.60 recall for the real class shows that 40% of authentic items were misclassified as fake. The precision for the real class of 0.79 is still high, which means that real predictions are relatively reliable, but they occur less often than would be necessary in a balanced system.
The main explanation for the errors comes from the architecture of the model. TextGCN constructs a graph in which documents and words are represented as nodes, and the links reflect co-occurrence or association relationships. The classification decision depends not only on the internal vocabulary of an article but also on how its terms are connected to other nodes in the network. Therefore, a real article that uses terms commonly found in disinformation may receive negative signals through the propagation of the information within the graph.
This logic explains the relatively high number of real articles classified as fake. Terms such as “crisis”, “European”, “Romania”, “war”, “government”, or “energy” can appear in both categories. If these words are strongly connected to fake articles, they can transfer a negative lexical signal to the real articles. Thus, the advantage of the model, its ability to capitalize on the relationships between documents and words also becomes, in this context, its main vulnerability.
In the case of fake articles classified as real, TextGCN struggled with satire and disinformation built on real political events. Absurd combinations, such as “biodegradable microphones”, very large vouchers for cherries, or global corn prices allegedly being influenced by popcorn orders, cannot be evaluated by simply analyzing the relationships between the nodes. Each word may have a coherent position in the graph, but the pragmatic combination of terms remains absurd. Detecting these nuances requires a real-world plausibility assessment that the TextGCN architecture does not provide.
The result of TextGCN is close to that of BERT, but the causes of errors are different. If BERT is limited by incomplete contextual processing of long texts and the difficulty of interpreting satire, TextGCN is mostly affected by lexical contamination by propagation of signals in the graph. This is relevant for the use of the model in media ecosystems where the same political or institutional terms circulate in both legitimate journalism and disinformation.
4.3. Comparative Synthesis and Typology of Errors
The comparative analysis shows that the results do not fully confirm the expectation that advanced deep learning models would automatically outperform classical models. Random Forest achieved the best overall performance, followed by BERT, TextGCN, and Naive Bayes. XGBoost and KNN produced unbalanced results, especially by over labeling articles as fake.
The results allow the identification of five recurrent types of errors. The first type consists of real articles with sensationalist or alarmist vocabulary. These include news about unusual events, very large values, controversial surveys, economic crises, or local situations with an emotional impact. Models tend to associate these elements with disinformation even though they can also appear in authentic journalism.
The second type also involves authentic articles misclassified as fake, but the triggering mechanism is different. These articles cover political events, electoral dynamics, party disputes, coalitions, or geopolitical affairs using the vocabulary of political journalism: party names, names of public figures, references to institutional crises, elections, or governmental decisions. This register overlaps substantially with the vocabulary of political disinformation, making the two categories difficult to distinguish.
The third type of error is represented by fake articles that use institutional, political, or technical vocabulary. References to governments, NATO, legislative procedures, energy infrastructure, elections, or public policies increased the likelihood that some false texts will be interpreted as real. This category is particularly important, because contemporary disinformation does not always appear in the form of obviously absurd texts and can mimic a legitimate journalistic style.
The fourth type consists of fake articles. To the human reader, the satirical character may be obvious, but models have difficulty interpreting non-literal intent. BERT and TextGCN, although more architecturally advanced, classified several satirical articles as real because they were grammatically or lexically coherent.
The fifth type of error is related to the effects of cross-lingual transfer. The models were trained on international datasets and tested on Romanian articles, which implies differences in language, journalistic style, political themes, and cultural registers. The results suggest that these differences affect both classical and advanced models but through different mechanisms: some models overreact to lexical frequencies, whereas others to graph structures or limited contextual fragments.
Table 7 reports, for each of the six models, the total number of misclassifications and the number of errors falling into each of the four categories, which are strictly related to the nature of the articles. Categories “1. Sensationalist vocabulary in authentic journalism” and “2. Political register overlap in authentic journalism” represents real news predicted as fake. Categories “3. Institutional vocabulary in fabricated content” and “4. Failure to identify satirical content” represent fake news predicted as real. The fifth type of error, related to cross-cultural transfer, is not represented as a separate column in the table because it constitutes a background condition rather than a classifiable feature of the articles themselves.
The four categories presented reflect the editorial classification that already existed in the source publications and fact-checking platforms from which the corpus was assembled.
For authentic news articles that were misclassified as fake, the categorization follows the topic of the article, as can be inferred directly from the title and source. Articles covering political events, electoral dynamics, party disputes, or institutional decisions were distinguished from articles covering non-political topics with sensationalist vocabulary. This distinction reflects the observable thematic content of each article.
The qualitative explanations of the misclassifications are interpretative and based on the observed linguistic and thematic characteristics of the misclassified articles. They should not be understood as definitive causal proof but as plausible error patterns that require further validation on a larger corpus and through additional statistical testing.
5. Conclusions
Section 4 shows that the performance of fake news detection models depends not only on algorithmic complexity but also on the compatibility between the training data, the test corpus, and the type of content analyzed. Random Forest obtained the highest observed performance within the limited Romanian test corpus used in this study, but this result should be interpreted descriptively and cautiously and not as evidence of operational robustness.
Naive Bayes demonstrated moderate performance but with significant vulnerabilities in detecting sophisticated fake items. KNN and XGBoost highlighted important limits of calibration and transfer.
A comparison of the results with the research hypotheses shows that the hypotheses are confirmed to different degrees. H1 is only partially confirmed, as the advanced BERT and TextGCN models achieved competitive results but did not outperform Random Forest, which had the best overall performance. H2 is confirmed, as all models were affected by the gap between the internationally sourced training data and the Romanian-sourced test corpus, with performance limited by differences in journalistic convention, political context, and topic distribution rather than language itself. H3 is confirmed because classical models, especially Random Forest and Naive Bayes, achieved competitive results, demonstrating that lexical distributions can remain relevant in the classification of fake news. However, this confirmation needs to be qualified, given the poor performance of KNN and XGBoost. H4 is confirmed because the analysis of errors has shown that the main difficulties arise when legitimate journalistic language overlaps with the language of disinformation, especially in political, institutional, satirical, or alarmist articles.
Overall, the results support the idea that automatic detection of disinformation in the Romanian media space requires locally adapted models, representative training sets, and assessments that combine quantitative indicators with qualitative error analysis. Without these elements, models risk confusing authentic journalism with disinformation or allowing false articles to pass that effectively mimic the style of legitimate media.
In this context, a relevant direction for future research aims to develop and validate a “gold standard” data universe on a larger scale, designed exclusively for the Romanian media ecosystem. The expansion of the volume of data would also allow for the training of LLMs (large language models) that are optimized for the needs and specificity of local language and culture. Also, the proper integration of new automated verification mechanisms is an essential step in improving the accuracy of detecting hard-to-detect disinformation, which is increasingly taking ultra-sophisticated forms. Through the integration of real-time fact-checking features, future iterations could serve as foundational components for assisting fact-checkers in analyzing text structures rather than just automated tools for blocking content, and could assess not only how a message is written but also whether or not the central claims in that message are supported by verified, truthful, and factual data. The continued development of abusive disinformation systems presents a real danger, which requires increased attention and adaptability to keep up and prevent new models used for misinformation, contributing to the broader academic development of automated media literacy frameworks.
A further limitation concerns the absence of a direct comparison between the models’ performance on the international benchmark datasets and their performance on the English translation of the Romanian test corpus. As a result, the study cannot precisely quantify the transfer-performance gap between international and Romanian data. Future research should address this limitation by reporting model performance on both international and Romanian datasets, comparing the results statistically, and evaluating whether performance decreases when models are transferred to the Romanian media context.
The Romanian test corpus includes only 100 articles and cannot be considered representative of the full Romanian media ecosystem. Therefore, the observed performance of Random Forest, although the highest among the tested models, does not justify recommending the model for real-world operational deployment. Any operational use would require validation on substantially larger, more diverse, and continuously updated Romanian news datasets, including different media sources, topics, genres, and forms of misinformation.
Practical Recommendations
Based on the exploratory results, automatic fake news detection models should be used only as preliminary screening tools and not as autonomous decision-making systems. Even the best-performing model in this study, Random Forest, produced errors, while BERT and TextGCN also showed limitations in cases involving satire, political language, institutional discourse, and alarmist vocabulary.
For public security, strategic communication, and institutional monitoring, these models may help prioritize content for human review, especially during elections, crises, or periods of intensified disinformation. However, any practical use should involve expert verification, contextual analysis, and fact-checking. Before institutional deployment, the models must be validated on larger, more diverse, and representative Romanian datasets.