Introduction
While the English Natural Language Processing (NLP) landscape has long benefited from a diverse array of pre-trained models, the Spanish language has primarily seen the development of encoder-only (e.g., BERT) or decoder-only (e.g., GPT) architectures. Encoder-only models excel at discriminative tasks like classification, while decoder-only models are optimized for open-ended generation. However, many critical NLP tasks—such as summarization, translation, and generative question answering—are best addressed by sequence-to-sequence (seq2seq) architectures that utilize an encoder-decoder framework.
To bridge this gap, this research introduces BARTO and T5S, the first high-performance, encoder-decoder language models pre-trained exclusively on massive Spanish corpora. These models aim to provide the Spanish-speaking community with dedicated tools that outperform general multilingual models like mBART and mT5 on generative tasks.
Methodology
The researchers developed two primary architectures based on established seq2seq frameworks:
- BARTO: Based on the BART-base architecture, this model was pre-trained using a denoising objective. It learns to reconstruct original text from versions corrupted by text infilling and sentence shuffling.
- T5S: Based on the T5.1.1-base architecture, it utilizes a span-filling objective, where the model predicts missing chunks of text within a sequence.
Pre-training was conducted on a massive, cleaned dataset exceeding 120GB of uncompressed Spanish text. This data was aggregated from the OSCAR corpus, mC4-es, and Wikipedia. A rigorous four-step preprocessing pipeline—including document-level formatting, strict filtering, deduplication, and encoding correction—was employed to ensure high data quality.
Experimental Evaluation
The models were evaluated across a comprehensive suite of Spanish benchmarks to test various generative capabilities:
- Summarization: MLSUM and WikiLingua (standard), and XL-Sum and EUR-Lex-Sum (long-form/legal).
- Generative Question Answering: MLQA and SQAC.
- Dialogue: The Spanish partition of the MIAM dataset.
- Machine Translation: Fapesp-v2 (Portuguese ↔ Spanish) and WMT13 (English ↔ Spanish).
- Simplification: BiSECT.
Key Results and Discussion
Summarization and Generative QA
BARTO and T5S demonstrated superior performance across nearly all generative benchmarks. In standard summarization tasks, T5S emerged as the leader, achieving high ROUGE scores that surpassed both multilingual models and encoder-decoder baselines constructed from BERT-style models (BERT2BERT).
In Generative Question Answering, the dedicated Spanish models showed a significant leap in performance. T5S reached an average of 67.92 ROUGE, markedly outperforming the BERT2BERT baselines and proving highly competitive against larger multilingual models. This suggests that monolingual specialization allows the model to better capture the nuances of Spanish reading comprehension.
Machine Translation and Long-form Content
Despite being pre-trained only on Spanish text, BARTO and T5S handled translation tasks remarkably well, likely due to the presence of cross-lingual data in the large-scale web-crawled training sets. Furthermore, the models showed a clear advantage over "glued" encoder-decoder pairs in maintaining global coherence for long sequences. For extremely long documents, the authors also introduced LEDO, a Longformer-based version of BARTO capable of processing up to 16,000 tokens.
Conclusion
The introduction of BARTO and T5S marks a significant milestone for Spanish NLP, demonstrating that dedicated monolingual seq2seq models can frequently outperform much larger multilingual counterparts. While these base-sized models are highly effective, they are still subject to typical generative limitations such as occasional hallucinations. Future work will focus on scaling these architectures to larger parameter counts and exploring more diverse abstractive datasets to further refine their generative precision.
Summary updated