[Paper Review] Text Data Augmentation: Towards better detection of spear-phishing emails
This paper proposes a corpus- and task-agnostic text data augmentation framework for improving detection of spear-phishing emails, combining BERT-based word replacement, multi-step back-translation, and heuristic filtering. The framework enhances model generalization on low-resource text classification tasks, including Business Email Compromise detection, by generating diverse, semantically valid augmented texts that preserve label compatibility.
Text data augmentation, i.e., the creation of new textual data from an existing text, is challenging. Indeed, augmentation transformations should take into account language complexity while being relevant to the target Natural Language Processing (NLP) task (e.g., Machine Translation, Text Classification). Initially motivated by an application of Business Email Compromise (BEC) detection, we propose a corpus and task agnostic augmentation framework used as a service to augment English texts within our company. Our proposal combines different methods, utilizing BERT language model, multi-step back-translation and heuristics. We show that our augmentation framework improves performances on several text classification tasks using publicly available models and corpora as well as on a BEC detection task. We also provide a comprehensive argumentation about the limitations of our augmentation framework.
Motivation & Objective
- Address the challenge of limited annotated data in Business Email Compromise (BEC) detection, where BEC instances are rare and hard to collect.
- Develop a general-purpose text augmentation framework applicable across diverse NLP tasks without requiring task-specific training or fine-tuning.
- Improve model generalization in low-data regimes by generating diverse, grammatically correct, and label-compatible augmented texts.
- Ensure augmented texts preserve semantic meaning and are valid paraphrases of originals to prevent data poisoning and maintain task relevance.
- Provide a modular, reusable framework that can be adapted to different NLP applications such as sentiment analysis and question classification.
Proposed method
- Leverage BERT embeddings to identify semantically similar word replacements while applying a cosine similarity threshold to ensure relevance.
- Apply multi-step back-translation using intermediate languages to generate paraphrased variations, increasing diversity while preserving meaning.
- Integrate heuristic rules to preserve parts-of-speech (POS) tags and avoid syntactic inconsistencies in augmented texts.
- Implement a final validation module that filters out near-duplicates and ensures augmented texts are paraphrases of original inputs using paraphrase detection.
- Combine all methods in a pipeline that processes each input text independently, enabling corpus-agnostic application.
- Use no task-specific fine-tuning or training; the framework operates as a service on pre-trained language models.
Experimental results
Research questions
- RQ1Can a corpus-agnostic text augmentation framework improve model generalization in low-resource NLP tasks such as BEC detection?
- RQ2To what extent does combining BERT-based replacement, back-translation, and heuristics enhance the diversity and validity of augmented texts?
- RQ3How effective is the validation module in preserving label compatibility and preventing data poisoning in augmented data?
- RQ4In what ways does the framework’s modularity allow adaptation to different NLP tasks, including those sensitive to stylistic features like authorship attribution?
- RQ5What are the limitations of current augmentation methods in preserving semantic integrity and syntactic correctness in discrete text spaces?
Key findings
- The proposed augmentation framework significantly improves model performance on multiple text classification tasks, including BEC detection, using publicly available models and datasets.
- Experiments on SST-2 and TREC-6 demonstrate that the framework enhances model generalization even in non-phishing contexts, confirming its broad applicability.
- The t-SNE visualization shows that augmented texts remain semantically close to original samples, indicating controlled diversity within meaningful neighborhoods in embedding space.
- The validation module effectively reduces near-duplicate generation and ensures augmented texts are paraphrases, though it may fail on lexical-overlap, meaning-difference cases.
- The framework’s modularity allows exclusion of back-translation in sensitive tasks like authorship attribution, where style preservation is critical.
- Despite its effectiveness, the framework faces limitations in generating highly diverse texts and maintaining perfect semantic fidelity, especially under complex syntactic or semantic shifts.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.