Skip to main content
QUICK REVIEW

[Paper Review] Spanish Pre-trained BERT Model and Evaluation Data

José Cañete, Gabriel Chaperon|arXiv (Cornell University)|Aug 6, 2023
Natural Language Processing TechniquesComputer Science336 citations
TL;DR

The paper presents a Spanish-language BERT model trained only on Spanish data and a GLUE-style Spanish benchmark (GLUES), showing competitive or state-of-the-art results compared to multilingual BERT baselines on several tasks. The authors also release the model, training data, and benchmarks publicly.

ABSTRACT

The Spanish language is one of the top 5 spoken languages in the world. Nevertheless, finding resources to train or evaluate Spanish language models is not an easy task. In this paper we help bridge this gap by presenting a BERT-based language model pre-trained exclusively on Spanish data. As a second contribution, we also compiled several tasks specifically for the Spanish language in a single repository much in the spirit of the GLUE benchmark. By fine-tuning our pre-trained Spanish model, we obtain better results compared to other BERT-based models pre-trained on multilingual corpora for most of the tasks, even achieving a new state-of-the-art on some of them. We have publicly released our model, the pre-training data, and the compilation of the Spanish benchmarks.

Motivation & Objective

  • Provide a Spanish-language BERT pre-trained model accessible to researchers.
  • Compile a GLUE-style suite of Spanish NLP tasks to standardize evaluation.
  • Demonstrate that Spanish-only BERT fine-tuned on Spanish data can outperform multilingual BERT baselines on many tasks.
  • Release pre-training data and benchmarks to the community.

Proposed method

  • Train a BERT-base-sized model (12 layers, 12 heads, 768 hidden) on ~3B Spanish words from Wikipedia and OPUS sources, creating cased and uncased versions.
  • Use a 32K vocabulary (31K subwords plus 1K placeholders) with SentencePiece and dynamic masking (10x) plus whole-word masking.
  • Two-phase pre-training: 900k steps at 2048 batch size/128 max length, then remaining steps at 256 batch size/512 max length; warm-up for 10000 steps; training on TPU v3-8.
  • Construct GLUES, a Spanish GLUE-like benchmark including XNLI, PAWS-X, CoNLL NER, UD POS, MLDoc, UD2.2 Dependency Parsing, and QA datasets (MLQA, XQuAD, TAR).
  • Fine-tune on task-specific outputs using standard BERT fine-tuning with Adam, 10% warm-up, and sliding window for long sequences; evaluate with task-appropriate metrics.

Experimental results

Research questions

  • RQ1Does a Spanish-only BERT model fine-tuned on Spanish data outperform multilingual BERT baselines on Spanish NLP tasks?
  • RQ2Can a GLUE-style Spanish benchmark (GLUES) standardize evaluation and promote Spanish NLP progress?
  • RQ3What are the relative strengths and limitations of Spanish-only BERT versus multilingual models on QA, NER, POS, and other tasks?

Key findings

  • Spanish BERT uncased and cased outperformed best multilingual BERT on XNLI, PAWS-X, NER, POS, and MLDoc in several settings; XNLI showed one of the largest gains.
  • New state-of-the-art results were achieved on POS and MLDoc tasks.
  • QA results were competitive but some gaps remained vs multilingual models, possibly due to machine-translation quality in MLQA and cross-language characteristics.
  • For some tasks, multilingual models trained on multilingual data (e.g., XLM-RoBERTa) still achieved higher scores when trained on broader multilingual data.
  • GLUES provides a Spanish-focused benchmark that enables standardized evaluation and fair comparison across Spanish NLP models.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.