NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Language Model Trained on Uruguayan Spanish News Text

Juan Pablo Filevich, Gonzalo Marco, Santiago Castro, Luis Chiruzzo, Aiala RosáCOLING 2024

TL;DR

Researchers have developed a new language model, ROUBERTa, specifically trained on Uruguayan Spanish news text. This domain-specific model, despite being smaller and trained with fewer resources than general Spanish models, achieves competitive or superior performance on key NLP tasks, demonstrating the value of tailored training data for low-resource languages and regions.

What Problem Does This Paper Address?

The field of Natural Language Processing (NLP) has seen tremendous progress, largely driven by large pre-trained language models. However, most of these models are trained on massive, general-purpose datasets, often dominated by high-resource languages like English, or by major Spanish-speaking countries (e.g., Mexico, Spain). This leaves regional linguistic variations and cultural nuances of Spanish underrepresented. Uruguayan Spanish, for instance, has unique characteristics that are not adequately captured by models trained on broader Spanish corpora. Furthermore, training these large models requires significant computational resources, making them inaccessible for many researchers, especially in the Global South. This paper addresses the need for a language model that specifically understands Uruguayan Spanish and is also computationally feasible to train and use.

Methods

The core of this work involves training a language model from scratch using a custom-built corpus of Uruguayan news text. The authors chose the RoBERTa-base architecture but opted for a version with fewer parameters than standard RoBERTa models to reduce computational demands. They trained this model for 30 days on a single Nvidia P100 GPU. The training objective was Masked Language Modeling (MLM), a standard technique where the model learns to predict masked tokens in a sentence. A key methodological decision was to train the model from scratch rather than fine-tuning an existing, larger model. This approach allows for better control over model size and resource requirements, making it suitable for limited-resource settings. They also experimented with both cased and uncased variants of the model.

Datasets

The primary dataset introduced in this paper is the UY22 corpus, consisting of approximately 6 GiB of uncompressed text from four major Uruguayan news outlets (El Observador, El País, Montevideo Portal, and La Diaria). This corpus was meticulously filtered and cleaned, containing around 900,000 documents and 400 million tokens, spanning from the early 2000s to December 2022.

For evaluation, the authors used two in-domain tasks:

  • Sentiment Analysis: A dataset of short text spans with opinionated content and sentiment polarity (positive, negative, neutral).
  • Question Answering: The Quales dataset, which features questions from Uruguayan news articles related to the COVID-19 pandemic. This dataset is significantly smaller than general QA benchmarks like SQuAD.

Key Insights and Ideas

  • Domain-Specific Training Matters: Training a language model on a domain-specific corpus (Uruguayan news) significantly improves performance, even when the model is smaller and trained with less data than general models.
  • Resource Efficiency is Achievable: It's possible to achieve competitive NLP performance with smaller models, smaller datasets, and less computational power, which is crucial for researchers in resource-constrained environments.
  • Uruguayan Spanish Nuances Captured: The ROUBERTa model demonstrates an ability to capture country-specific information, including proper nouns, cultural references (like "Carnival" and "murga"), and regional verb forms, which general Spanish models struggle with.
  • "From Scratch" Training Advantage: Training a model from scratch, rather than fine-tuning a larger pre-trained model, can be more effective for creating specialized, resource-efficient models.

Key Results

  • Sentiment Analysis: The ROUBERTa-cased model achieved the highest accuracy (75.0%) compared to BETO (74.6%) and XLM-ROBERTa (73.4%).
  • Question Answering: ROUBERTa-cased outperformed BETO in both Exact Match (28.1% vs. 24.6%) and F1 score (32.3% vs. 29.4%). It also outperformed XLM-RoBERTa in Exact Match (28.1% vs. 26.8%).
  • Word-Masking Task: ROUBERTa achieved a top-1 accuracy of 42% in predicting masked words from unseen Uruguayan texts, significantly outperforming BETO (27%) and XLM-RoBERTa (27%).
  • Case Sensitivity: The cased variant of ROUBERTa generally performed better than the uncased variant.
  • Training Data Impact: A model trained on the smaller UY22 corpus (4 GiB) outperformed a model trained on the much larger BETO corpus (20 GiB) on the Sentiment Analysis task.

Limitations and Future Work

  • Training Loss Spike: The authors noted a loss spike during training that requires further analysis to understand its cause.
  • Whole-Word Masking: The paper found that whole-word masking, which is standard for BERT, was not superior for their specific model and dataset, which is inconsistent with some prior work but consistent with others. This warrants further investigation.
  • Future Work: The authors hope their work will encourage similar efforts for other Spanish language varieties. They also suggest further analysis of the model's impact and carbon footprint. The dataset and pre-trained models are publicly available to facilitate further research.

Summary updated

BibTeX
@inproceedings{filevich2024language,
  author = {Juan Pablo Filevich and Gonzalo Marco and Santiago Castro and Luis Chiruzzo and Aiala Rosá},
  title = {{A Language Model Trained on Uruguayan Spanish News Text}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2024},
}
Figure