ViSoBERT: A Pre-Trained Language Model for Vietnamese Social Media Text Processing

Quoc-Nam Nguyen, Chau-Thang Phan, Duc-Vu Nguyen, Kiet Van Nguyen · DOI

TL;DR

This paper introduces ViSoBERT, the first pre-trained language model specifically designed for Vietnamese social media text. ViSoBERT achieves state-of-the-art performance on several key Vietnamese social media NLP tasks, outperforming existing models by effectively capturing the unique linguistic characteristics of this domain.

What Problem Does This Paper Address?

Natural Language Processing (NLP) has seen tremendous advancements with the development of transformer-based language models like BERT and its successors. While these models have excelled in resource-rich languages like English and Chinese, their effectiveness in languages with less readily available data, such as Vietnamese, is still evolving. Furthermore, existing pre-trained models for Vietnamese, while performing well on general NLP tasks, often struggle with the nuances of social media text. This informal language, characterized by slang, emojis, non-standard vocabulary, and missing diacritics, presents a significant challenge for models trained on formal text. The authors aim to bridge this gap by creating a specialized model for Vietnamese social media.

Methods

The core contribution of this paper is the development of ViSoBERT, a pre-trained language model built upon the XLM-R architecture. The key novelty lies in its training data and a custom tokenizer.

  • Architecture: ViSoBERT utilizes the XLM-R architecture, known for its strong cross-lingual capabilities, but applies it to a monolingual task.
  • Pre-training Data: The model is pre-trained on a large-scale, high-quality, and diverse corpus of Vietnamese social media posts and comments scraped from popular platforms like Facebook, TikTok, and YouTube. This dataset was carefully pre-processed to remove non-canonical texts, links, and repetitive comments, while retaining emojis.
  • Custom Tokenizer: A significant innovation is the development of a custom tokenizer specifically for Vietnamese social media text. This tokenizer, built using SentencePiece, is designed to effectively handle emojis and "teencode" (Vietnamese slang/abbreviations), which are crucial for capturing the semantic meaning and context of social media communication. This contrasts with standard tokenizers that might treat these elements as unknown tokens.
  • Pre-training Objective: ViSoBERT is trained using a masked language modeling objective, similar to XLM-R.

Datasets

The paper utilizes several datasets for training and evaluation:

  • Training Data: A custom dataset of Vietnamese social media posts and comments collected from Facebook, TikTok, and YouTube. This dataset, after preprocessing, amounts to 1GB of uncompressed text.
  • Evaluation Datasets: Five established Vietnamese social media datasets were used for downstream task evaluation:
  • UIT-VSMEC: Emotion Recognition
    • UIT-ViHSD: Hate Speech Detection
    • SA-VLSP2016: Sentiment Analysis (though noted to be primarily technical article reviews with some social media data)
    • ViSpamReviews: Spam Reviews Detection
    • UIT-VIHOS: Hate Speech Spans Detection

Key Insights and Ideas

  • Social Media Demands a Specialized Approach: The study strongly suggests that general-purpose language models, even those trained on large Vietnamese corpora, are insufficient for effectively processing social media text. The unique linguistic features of this domain require dedicated models.
  • Custom Tokenization is Crucial: The development of a custom tokenizer that can accurately handle emojis and teencode is a key factor in ViSoBERT's success. This allows the model to understand nuances that standard tokenizers miss.
  • Optimal Masking Rate Varies: The optimal masking rate for pre-training is not a fixed value. While 15% is common, experiments showed that 30% yielded the highest performance for ViSoBERT across multiple tasks, with 50% being optimal for hate speech detection specifically.
  • Emojis and Diacritics Matter: The presence of emojis and diacritics significantly impacts model performance. ViSoBERT shows robustness to missing diacritics, indicating its adaptability, while the impact of emojis is substantial, highlighting the need for models that can interpret them.
  • Social Media Data Enhances Embeddings: Using embeddings generated from ViSoBERT (trained on social media data) as input features for downstream models like BiLSTM and BiGRU leads to faster convergence and better performance compared to embeddings from models trained on general text.

Key Results

ViSoBERT demonstrates state-of-the-art (SOTA) performance on multiple Vietnamese social media downstream tasks, often with fewer parameters than some baseline models.

  • Emotion Recognition: ViSoBERT achieved significantly higher Acc, WF1, and MF1 scores compared to PhoBERT and TwHIN-BERT.
  • Hate Speech Detection: ViSoBERT showed significant improvements, achieving SOTA performance.
  • Sentiment Analysis: While XLM-R previously held SOTA, ViSoBERT showed comparable or slightly better performance, indicating its effectiveness even on a dataset less representative of social media.
  • Spam Reviews Detection: ViSoBERT outperformed top baseline models like PhoBERT and TwHIN-BERT.
  • Hate Speech Spans Detection: ViSoBERT achieved high scores, demonstrating its ability to capture nuanced information.

The paper also highlights that ViSoBERT consistently outperforms multilingual models like XLM-T, TwHIN-BERT, and Bernice, which were trained on Twitter data, suggesting that a dedicated Vietnamese social media corpus is more beneficial for this specific domain.

Limitations and Future Work

  • Model Size: The authors chose a base-size transformer for ViSoBERT due to computational accessibility, acknowledging that larger variants might yield even better results. They also note that comparing ViSoBERT (base) to larger versions of baseline models (like PhoBERT Large) is not a perfectly fair comparison.
  • Dataset Expansion: The authors suggest that continuous updates and expansions of the pre-training data are essential to keep pace with the rapidly evolving nature of social media language.
  • Further Analysis: More in-depth analyses are needed to fully understand which aspects of ViSoBERT contribute most to its success and what specific nuances of Vietnamese social media it captures.
  • Broader Task Coverage: Future work could explore a wider range of Vietnamese social media downstream tasks.
  • Generalizability: While ViSoBERT is tailored for Vietnamese social media, exploring its adaptability to other low-resource languages could be a valuable direction.

Summary updated

BibTeX
@inproceedings{nguyen2023visobert,
  author = {Quoc-Nam Nguyen and Chau-Thang Phan and Duc-Vu Nguyen and Kiet Van Nguyen},
  title = {{ViSoBERT: A Pre-Trained Language Model for Vietnamese Social Media Text Processing}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=gqkg54QNDY},
}
Figure