Back to blog
Punto Medio Team

How We Built a Spanish Fake News Classifier

At Punto Medio, we believe that fighting misinformation requires more than editorial judgment — it requires robust technical infrastructure. One of the core components of our analysis pipeline is the ability to automatically detect fake news in Spanish. In this post, we share the research we published on that problem and the results we achieved.

The Problem

Detecting fake news in English is hard. In Spanish, it's harder. The reasons are layered: there is far less high-quality annotated data available, linguistic diversity across Spanish-speaking regions is substantial, and most existing models were designed for short texts — headlines, tweets, fragments — not full-length journalistic articles.

That last point is critical for us. In production, the content we analyze consists of full articles. A model that performs well on 280 characters but breaks down at 800 words is not a model we can rely on.

Our Hypothesis

We proposed a Sequential Fine-Tuning approach: rather than training the model directly on long articles — where labeled data is scarce — we first adapt it on a large corpus of short articles, and only then fine-tune it on the target dataset of long-form texts.

The underlying logic is straightforward. Linguistic patterns associated with misinformation — certain rhetorical structures, argumentative patterns, language choices — are broadly shared between short and long content. If the model learns those patterns in the first stage, the second stage can focus on adapting to the structural and semantic complexity of longer texts.

The Data

We worked with two datasets:

Short dataset (~57,000 articles): assembled by combining two public sources — a thesis project from the University of Vigo and a Kaggle dataset — with articles of similar length across both.

Long dataset (~2,000 articles): built from the Spanish Fake and Real News Dataset (Polytechnic University of Madrid) and the Fake News Corpus Spanish (GitHub), which includes articles from Argentina, Peru, Uruguay, and Venezuela.

A critical issue we identified during analysis: merging both datasets directly would introduce a length bias. The model could learn to associate "short text = fake, long text = real" (or the reverse) rather than capturing genuine semantic patterns. Keeping them separate and processing them sequentially eliminates that risk.

The Base Model

We used dccuchile/bert-base-spanish-wwm-cased, a BETO variant trained with Whole Word Masking on an extensive Spanish corpus (Wikipedia, news sources, digital content). We chose this over multilingual alternatives because its Spanish-specific pretraining provides a far richer foundation of contextual representations for this task.

Two-Stage Training

Stage 1: Pre-Fine-Tuning on Short Texts

We trained the model for 3 epochs on the ~57,000 short-article dataset, freezing the majority of its parameters and leaving trainable only the last 3 encoder layers, the pooler layer, and the classifier head. This amounts to roughly 14.7 million trainable parameters out of ~110 million total.

Results at the end of this stage were strong:

Epoch Accuracy Precision Recall F1
1 0.9288 0.9311 0.9475 0.9392
2 0.9374 0.9498 0.9419 0.9458
3 0.9435 0.9447 0.9588 0.9517

Stage 2: Fine-Tuning on Long Texts

Starting from the weights learned in Stage 1, we trained for 4 epochs on the long-article dataset. Here we froze even more of the model, leaving trainable only the last two transformer layers, the pooler, and the classifier (~7.7 million parameters). We conducted a hyperparameter search for this stage and found the optimal configuration: learning rate of 9.9 × 10⁻⁵, batch size 32, weight decay 0.01, and warmup ratio 0.1.

Epoch Accuracy Precision Recall F1
1 0.7336 0.8182 0.6372 0.7164
2 0.7804 0.7619 0.8496 0.8033
3 0.8037 0.7710 0.8938 0.8279
4 0.8084 0.7769 0.8938 0.8313

Final Results

Evaluation on the held-out test set produced the following:

Metric Value
Accuracy 0.8205
Precision 0.7835
Recall 0.8702
F1 0.8246

Recall is particularly strong, which is exactly what we aimed for: in fake news detection, failing to flag a false article is a more costly error than flagging a real one.

We also verified that the model behaves consistently across articles of different lengths, confirming that the sequential approach effectively mitigates length-based misclassification.

Why This Matters for Punto Medio

Our pipeline processes hundreds of articles per day. The ability to automatically identify potentially false content — before it reaches the user — is a fundamental integrity layer in our architecture. This classifier does not replace human judgment or editorial verification, but it allows us to prioritize resources and surface content that warrants additional scrutiny.

We continue to develop and improve this system: expanding the training corpus, experimenting with alternative truncation strategies like head-tail encoding, and evaluating model behavior across sources from different Spanish-speaking regions.


The full paper is available on OpenReview.