Practical Text Classification With Large Pre-Trained Language Models

Neel Kant, Raul Puri, Nikolai Yakovenko, Bryan CatanzaroarXiv 2018

Abstract

This study explores the efficacy of pre-training large-scale language models, specifically Transformers and multiplicative LSTMs (mLSTMs), on massive unlabeled datasets for practical text classification. By fine-tuning these models on domain-specific data, such as video game-related social media posts, the authors demonstrate significant performance gains over general-purpose commercial sentiment APIs. The research highlights the importance of multihead decoders, active learning, and optimal thresholding in handling label scarcity and domain-specific nuances.

Introduction

While academic NLP research often utilizes clean, curated benchmarks, real-world text classification presents unique challenges. These include domain-specific context (where words change meaning based on the industry), extreme label scarcity and imbalance, and high human subjectivity in emotional labeling. General-purpose commercial APIs often fail to capture these nuances. This paper proposes a framework to overcome these hurdles using large-scale pre-training followed by targeted fine-tuning.

Methodology

The proposed pipeline consists of two primary stages:

  1. Unsupervised Pre-training: Models (Transformer and mLSTM) are trained on 40GB of Amazon reviews, chosen for their high density of emotional and evaluative language.
  2. Supervised Fine-tuning: A task-specific decoder is added to the pre-trained base. The entire network is then fine-tuned on labeled data.

Key innovations include:

  • Multihead Decoders: Predicting multiple emotions simultaneously to share features across common and rare categories.
  • Active Learning (Bootstrapping): Using initial model iterations to identify and label rare emotion samples, balancing the training set.
  • Optimal Thresholding: Customizing probability cutoffs for each emotion based on validation performance.

Experimental Setup and Datasets

The study evaluates performance across several datasets:

  • Amazon Reviews: Used for unsupervised pre-training.
  • SST (Stanford Sentiment Treebank): For binary sentiment benchmarking.
  • SemEval-2018 Task 1:E-c: A multi-label dataset based on Plutchik’s wheel of emotions.
  • Company Tweet Dataset: A custom dataset of ~13,000 tweets regarding video games and stocks, representing "messy" real-world data.

Results and Discussion

The Transformer architecture generally outperformed the mLSTM, particularly on complex tasks. On the "Company Tweet" dataset, the fine-tuned Transformer achieved 81.2% accuracy, significantly outperforming IBM Watson (56.7%) and Google Sentiment (62.5%).

Performance metrics across different dataset sizes and emotion categories.

Analysis of F1 scores reveals that Macro F1 is highly sensitive to dataset size, emphasizing the need for more labeled data in rare categories. The multihead approach proved beneficial, especially when training data was limited, by leveraging shared features across related emotional states. As shown in the comparative analysis, the multihead model maintains higher performance on "Easy" tasks like Anger but struggles more than single-head models on "Hard" tasks like Trust when data is extremely scarce.

Conclusion

Large-scale pre-training followed by domain-specific fine-tuning offers a robust solution for practical text classification. While performance on rare emotions like "Surprise" remains a challenge, techniques like active learning and multihead architectures provide clear paths forward. Future work should explore pre-training on social-media-specific data to better capture informal language features like emojis and hashtags.

Summary updated

BibTeX
@misc{kant2018practical,
  author = {Neel Kant and Raul Puri and Nikolai Yakovenko and Bryan Catanzaro},
  title = {{Practical Text Classification With Large Pre-Trained Language Models}},
  year = {2018},
  eprint = {1812.01207},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1812.01207},
}
Figure