mlsanityData to 14 Oct 2026

Token Masking Improves Transformer-Based Text Classification

arXiv 2505.11746 ↗First posted 16 May 2025cs.CL cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

While transformer-based models achieve strong performance on text classification, we explore whether masking input tokens can further enhance their effectiveness. We propose token masking regularization, a simple yet theoretically motivated method that randomly replaces input tokens with a special [MASK] token at probability p. This introduces stochastic perturbations during training, leading to implicit gradient averaging that encourages the model to capture deeper inter-token dependencies. Experiments on language identification and sentiment analysis -- across diverse models (mBERT, Qwen2.5-0.5B, TinyLlama-1.1B) -- show consistent improvements over standard regularization techniques. We identify task-specific optimal masking rates, with p = 0.1 as a strong general default. We attribute the gains to two key effects: (1) input perturbation reduces overfitting, and (2) gradient-level smoothing acts as implicit ensembling.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 6 of its 12 references that are in the map. First posted on arXiv 16 May 2025.

Builds on

6 of 12 references.

References · 6

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2019How multilingual is Multilingual BERT?cited by 645
  3. 2024TinyLlama: An Open-Source Small Language Modelcited by 618
  4. 2020LinCE: A Centralized Benchmark for Linguistic Code-switching Evaluationcited by 93
  5. 2019Overview for the Second Shared Task on Language Identification in Code-Switched Datacited by 33
  6. 2024MaskLID: Code-Switching Language Identification through Iterative Maskingcited by 11

Built on by

Not cited yet.