Unsupervised Domain Adaptation using Lexical Transformations and Label Injection for Twitter Data

Akshat Gupta, Xiaomo Liu, Sameena Shah

TL;DR

Instead of tweaking complex model architectures to handle the messy nature of social media, this paper takes a refreshing, data-centric approach to domain adaptation. By applying simple, rule-based lexical transformations (like adding emojis, abbreviations, and hashtags) to standard English training data, the authors boost unsupervised part-of-speech tagging accuracy on Twitter data close to supervised levels and set a new state-of-the-art via data augmentation.

What Problem Does This Paper Address?

Natural language processing (NLP) models trained on pristine, standard English (such as news articles or Wikipedia) notoriously fall apart when deployed on social media. This performance drop is caused by "domain shift." Tweets and text messages are filled with non-standard grammar, emojis, user mentions, and abbreviations that standard models have never encountered.

Traditional domain adaptation methods try to fix this on the model side—by altering loss functions, aligning feature spaces, or using complex pseudo-labeling routines. The authors of this paper address the root cause from a data-centric perspective: How can we synthetically transform standard English datasets to look like tweets while preserving or correctly injecting their linguistic labels?

Figure 1: The Anatomy of a Tweet - This figure shows lexical features of a tweet like hashtags, user-mentions, emojis, re-tweets.

Methods

The authors introduce GUM-T, a dataset generated by applying four types of rule-based lexical transformations and label injections to standard English text:

  1. Emoji Injection: Emojis are randomly selected and placed within sentences following a Gaussian distribution modeled from real tweets (since emojis tend to cluster at the end of sentences). These are assigned the SYM (symbol) part-of-speech (POS) tag.
  2. Inverse Lexical Normalization (ILN): Standard words are converted to their common "noisy" social media counterparts (e.g., "you" $\rightarrow$ "u", "that" $\rightarrow$ "dat") using a lookup dictionary derived from social media text. The original POS tag is preserved.
  3. PROPN to User-Mentions/Hashtags: Pre-existing proper nouns (PROPN) are randomly converted into user mentions (by adding @) or hashtags (by adding #), keeping their original syntactic label.
  4. Injecting Structural Twitter Elements as X: Retweets (RT), URLs, and specific hashtags are injected at structurally appropriate positions (e.g., RT at the start of a sentence, URLs at the end) and labeled with the under-utilized X (other) POS tag.
Figure 2: Examples of original sentences from GUM dataset and how they look like after different Lexical Transformations and Label Injections. Note the POS labels injected post transformations.

Datasets

The experiments rely on two main corpora, both annotated using the Universal Dependencies framework (sharing an identical set of 17 POS tags):

  • Source Domain (Standard English): The GUM (Georgetown University Multilayer Corpus) dataset, containing roughly 125,000 tokens from Wikinews, wikiHow, and travel guides.
  • Target Domain (Twitter): Tweebankv2 (TBv2), consisting of real-world tweets split into training, development, and test sets.
Figure 3: Sentence length distribution between GUM and Tweebankv2 (TBv2) dataset. We see that GUM has more longer and shorter sentences compared to TBv2.

Key Insights and Ideas

  • The Power of the X Tag: In standard English, the X (other) tag is rarely used. On Twitter, it represents crucial structural elements like URLs and retweets. Simply injecting these elements and labeling them as X yielded the single largest performance jump, proving that aligning the distribution of syntactic edge-cases is vital for domain adaptation.
  • Data-Centric > Model-Centric: Instead of designing complex domain-adversarial networks, simply changing the training text's surface form allows standard pre-trained language models (like BERT and RoBERTa) to generalize seamlessly to noisy text.
  • Location Matters: Randomly throwing emojis into a sentence actually hurts model performance. Modeling their position realistically using a Gaussian distribution is critical for effective adaptation.

Key Results

  • Unsupervised Domain Adaptation: Training on the transformed GUM-T dataset improved the zero-shot performance of a standard BERT-large model from 81.52% to 92.14% accuracy on the Tweebankv2 test set—without the model ever seeing a single real tweet during training.
  • Supervised Data Augmentation: When used to augment real Twitter training data (TBv2 + GUM-T), a specialized BERTweet model achieved a new state-of-the-art accuracy of 95.21%, outperforming previous architectures.

Limitations and Future Work

  • Purely Lexical Focus: The transformations only address surface-level text features (spelling, punctuation, symbols). They do not account for semantic domain shifts, such as Twitter-specific jargon, slang meanings, or topic distributions.
  • Task Specificity: The method was only validated on a token-level classification task (POS tagging). The authors note that sequence-level tasks (like sentiment analysis) or generative tasks (like summarization) might react differently to these transformations and require further study.
  • Platform Bias: The rules are highly tailored to Twitter's specific anatomy (RTs, @ handles) and would need re-tuning for other noisy domains like Reddit or Discord.

Summary updated

BibTeX
@inproceedings{gupta2023unsupervised,
  author = {Akshat Gupta and Xiaomo Liu and Sameena Shah},
  title = {{Unsupervised Domain Adaptation using Lexical Transformations and Label Injection for Twitter Data}},
  booktitle = {WASSA @ ACL},
  year = {2023},
  doi = {10.18653/v1/2023.wassa-1.17},
}
Figure