Abstract
In recent years, the machine learning community has introduced numerous NLP models based on the Transformer architecture. These models have demonstrated exceptional performance on benchmark datasets, often surpassing previous state-of-the-art results. Consequently, industry practitioners are actively fine-tuning these models for real-world applications. However, industrial datasets rarely guarantee the absence of noise. While Transformer-based models excel at transfer learning, their sensitivity to noisy text remains a critical concern. This paper explores the impact of common noise—specifically spelling mistakes and typos—on popular models like BERT, RoBERTa, ALBERT, XLNet, T5, and BART. Our experimental results reveal that performance degrades significantly across tasks such as text classification, textual similarity, Named Entity Recognition (NER), question answering, and summarization as noise levels increase.
Introduction: The Reality of Messy Data
In academic research, NLP models are typically evaluated on pristine, well-curated datasets. However, in industrial environments—such as chatbots, social media monitoring, or customer call transcriptions—text is inherently messy. It is often riddled with "fat-finger" typos, spelling mistakes, and OCR errors. While models like BERT are celebrated for their performance on clean benchmarks, their robustness in the face of real-world noise is less understood. This study addresses this gap by quantifying how performance degrades when these models are fine-tuned and evaluated on increasingly garbled text.
Methodology
To simulate real-world noise, we employed a synthetic noise approach based on keyboard proximity. For a given noise level ($k\%$), we randomly selected $k\%$ of the characters in a dataset and replaced them with adjacent keys on a QWERTY keyboard (e.g., replacing 'd' with 's', 'e', or 'x'). We benchmarked six architectures—BERT, BART, RoBERTa, ALBERT, XLNet, and T5—across noise increments of 0%, 5%, 10%, 15%, 20%, and 25%.
Evaluation was conducted across several standard benchmarks:
- Sentiment Analysis: IMDB and SST-2.
- Textual Similarity: STS-B.
- Question Answering: SQuAD 2.0.
- Named Entity Recognition (NER): CoNLL-2003.
- Text Summarization: BillSum.
Key Results and Performance Degradation
The quantitative degradation was significant across all tasks. As noise increased, the models' ability to maintain accuracy plummeted, particularly in reasoning-heavy tasks.
Catastrophic Failure in Question Answering
In the SQuAD 2.0 benchmark, the margin for error is slim because the model must locate specific answer spans. As shown in the table below, BERT’s F1 score dropped from 71.8 at 0% noise to a mere 33.0 at 25% noise. While RoBERTa started with a higher baseline of 82.36, it still experienced a substantial decline to 48.16.
Impact on Generative Summarization
Generative tasks like summarization also suffered. For the BillSum dataset, the T5-base model's performance (ROUGE1-F1) dropped from 60.82 to 49.98 as noise reached 25%. Interestingly, BART-base showed slightly more resilience at higher noise levels compared to the T5 variants, maintaining an F1 of 51.41 at the 25% mark.
Discussion: Why Transformers Struggle
The Fragility of Subword Tokenization
Transformers rely on breaking words into subword units. A single typo can fundamentally alter how a word is tokenized, transforming a recognizable word into a sequence of "unknown" or nonsensical tokens. This breaks the model's ability to leverage its pre-trained semantic knowledge.
RoBERTa’s Relative Resilience
Across almost every task, RoBERTa consistently maintained higher performance than its peers at equivalent noise levels. This suggests that its specific pre-training recipe—which includes larger datasets, dynamic masking, and the removal of next-sentence prediction—may result in more robust internal language representations.
Task Complexity and Failure Rates
Simple classification tasks (like IMDB sentiment analysis) showed a steady, linear decline. In contrast, "reasoning-heavy" tasks like Question Answering (SQuAD) saw much sharper, almost catastrophic failures. This indicates that the more a task relies on precise character-level matching or complex logical inference, the more vulnerable it is to input noise.
Conclusion
Our findings serve as a critical warning for industry practitioners: simply applying state-of-the-art Transformer models is insufficient if the input data is noisy. To build reliable applications, one must either invest heavily in denoising and preprocessing or explore architectural modifications, such as character-level embeddings, to make models inherently noise-aware. Future work should expand this investigation to natural noise, such as phonetic misspellings and ASR artifacts, to further bridge the gap between benchmarks and reality.
Summary updated