Style Transfer as Data Augmentation: A Case Study on Named Entity Recognition

Shuguang Chen, Leonardo Neves, Thamar Solorio

Abstract

Named Entity Recognition (NER) performance often degrades significantly when models trained on formal text are applied to informal domains like social media. This paper presents a novel data augmentation framework that leverages style transfer to bridge this domain gap. By transforming high-resource formal datasets into low-resource informal styles using adversarial learning and cycle-consistent reconstruction, the proposed method generates high-quality synthetic training data. A key innovation is a prefix tree-based constrained decoding algorithm that ensures entity label integrity during generation. Experimental results demonstrate substantial F1 score improvements in few-shot and low-resource settings, outperforming existing state-of-the-art augmentation techniques.

Introduction

Named Entity Recognition (NER) is a fundamental task in Natural Language Processing, yet its efficacy is highly sensitive to domain shifts. While models achieve high accuracy on structured news data, they struggle with the linguistic variability of social media, characterized by slang, abbreviations, and non-standard syntax. The primary obstacles are data scarcity—due to the high cost of manual labeling in niche domains—and the inherent distribution shift between formal and informal English.

Overview of Style Transfer and NER tasks

To address these issues, this research explores whether abundant labeled data from formal domains can be "translated" into the style of target low-resource domains while preserving underlying entity information.

Methodology

The proposed framework utilizes an adversarial learning approach based on the T5 pre-trained language model, structured into two main components: Paraphrase Generation and Cycle-Consistent Reconstruction.

Architecture of Paraphrase Generation and Cycle-consistent Reconstruction

Paraphrase Generation (PG)

The PG module is trained on parallel style transfer datasets (e.g., formal vs. informal pairs). It learns to rephrase source sentences into the target style while maintaining semantic equivalence.

Cycle-Consistent Reconstruction (CR)

To mitigate the lack of parallel NER-labeled data, a cycle-consistency loss is introduced. The model transforms a source sentence to the target style and then reconstructs it back to the source. This "round-trip" ensures that the generated text remains faithful to the original meaning and entity structure.

Constrained Decoding and Data Selection

A critical challenge in generative augmentation is "hallucination," where the model might alter entity names or produce invalid label sequences. The authors implement a prefix tree-based constrained decoding algorithm to enforce the BIO (Beginning, Inside, Outside) labeling schema. This ensures that generated tokens adhere to valid entity spans. Furthermore, a data selection filter ranks synthetic sentences based on consistency, adequacy, fluency, and diversity to ensure only high-quality data is used for training.

Experimental Setup

The framework was evaluated using several benchmark datasets:

  • Style Transfer: The GYAFC corpus (Yahoo Answers) provided formal/informal pairs.
  • Source NER: Five domains from OntoNotes 5.0 (e.g., Newswire, Magazine).
  • Target NER: The Temporal Twitter Corpus, representing the informal social media domain.

Results and Discussion

The method was tested across five domain pairs under few-shot, low-resource, and full-set regimes. Key findings include:

  • Performance Gains: The approach yielded an average F1 score increase of 4.7% in few-shot and 10.1% in low-resource settings.
  • Superiority over Baselines: It consistently outperformed existing methods like Adaptive Data Augmentation (ADA) and Cross-domain Data Augmentation (CDA).
  • Ablation Analysis: Cycle-consistency proved essential; removing the CR component led to F1 drops of up to 40%, highlighting its role in maintaining data integrity.

Conclusion

This study demonstrates that style transfer is a powerful tool for cross-domain NER data augmentation. By treating domain adaptation as a translation problem and enforcing structural constraints during generation, the framework effectively bridges the gap between formal and informal text. Future work will investigate cross-lingual applications and strategies to handle schema mismatches between different NER datasets.

Summary updated

BibTeX
@inproceedings{chen2022style,
  author = {Shuguang Chen and Leonardo Neves and Thamar Solorio},
  title = {{Style Transfer as Data Augmentation: A Case Study on Named Entity Recognition}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-main.120},
}
Figure