Skip to main content
QUICK REVIEW

[Paper Review] Leveraging GPT-2 for Classifying Spam Reviews with Limited Labeled Data via Adversarial Training

Athirai A. Irissappane, Hanfei Yu|arXiv (Cornell University)|Dec 24, 2020
Spam and Phishing DetectionComputer Science7 citations
TL;DR

This paper proposes spamGAN-GPT2, a semi-supervised text classification framework that leverages GPT-2's pre-trained language representation within a generative adversarial network (GAN) framework to detect opinion spam with limited labeled data. By combining adversarial training with reinforcement learning for sequence generation and fine-tuning via teacher-forcing and top-p sampling, the model achieves a 7%+ accuracy gain over state-of-the-art methods on TripAdvisor and YelpZip datasets, while generating high-quality synthetic reviews with low perplexity.

ABSTRACT

Online reviews are a vital source of information when purchasing a service or a product. Opinion spammers manipulate these reviews, deliberately altering the overall perception of the service. Though there exists a corpus of online reviews, only a few have been labeled as spam or non-spam, making it difficult to train spam detection models. We propose an adversarial training mechanism leveraging the capabilities of Generative Pre-Training 2 (GPT-2) for classifying opinion spam with limited labeled data and a large set of unlabeled data. Experiments on TripAdvisor and YelpZip datasets show that the proposed model outperforms state-of-the-art techniques by at least 7% in terms of accuracy when labeled data is limited. The proposed model can also generate synthetic spam/non-spam reviews with reasonable perplexity, thereby, providing additional labeled data during training.

Motivation & Objective

  • To address the challenge of limited labeled data in opinion spam detection, where manual annotation is costly and time-consuming.
  • To improve classification accuracy in text-based spam detection by leveraging large-scale unlabeled online reviews.
  • To generate high-quality synthetic spam and non-spam reviews using a GAN-based framework to augment training data.
  • To overcome the limitations of standard GANs in text generation—such as sparse rewards and discrete token generation—through a reinforcement learning approach.
  • To integrate a pre-trained GPT-2 model into a multi-component adversarial architecture for improved semantic understanding and generation of longer, coherent reviews.

Proposed method

  • The model employs a three-component adversarial framework: a generator, a discriminator, and a classifier, all built on the transformer architecture and fine-tuned from pre-trained GPT-2.
  • The generator is trained via reinforcement learning using an actor-critic method, where the discriminator and classifier provide reward signals to guide the generation of class-conditioned, realistic reviews.
  • To mitigate the sparse reward problem in text generation, the generator uses a sequential decision-making process with long-term rewards, modeling sentence generation as a policy optimization task.
  • The generator applies top-p sampling and teacher-forcing during inference to reduce exposure bias and improve the quality of auto-regressive text generation.
  • The model is trained jointly on a small set of labeled reviews and a large pool of unlabeled reviews, enabling semi-supervised learning that improves generalization.
  • The classifier component is jointly optimized with the generator and discriminator to enhance spam detection performance, with the generator learning to produce distinguishable spam-like samples.

Experimental results

Research questions

  • RQ1Can a GAN-based framework leveraging pre-trained GPT-2 improve spam review classification accuracy when only limited labeled data is available?
  • RQ2How effective is the integration of reinforcement learning with adversarial training in generating high-quality, class-conditioned synthetic reviews for data augmentation?
  • RQ3Does the use of unlabeled data significantly improve model performance in semi-supervised opinion spam detection, especially when labeled data is scarce?
  • RQ4How does the perplexity of generated reviews compare between the proposed spamGAN-GPT2 and baseline GAN models, and what does this indicate about generation quality?
  • RQ5Can the proposed framework be generalized to other text classification tasks beyond opinion spam detection?

Key findings

  • On the TripAdvisor dataset, spamGAN-GPT2 outperforms state-of-the-art methods by at least 7% in accuracy when labeled data is limited, achieving a macro F1-score of 0.654 ± 0.013 with 10% labeled data.
  • On the larger YelpZip dataset, spamGAN-GPT2-100 achieves the highest accuracy and F1-score, with a macro F1 of 0.652 ± 0.001 using 100% labeled data, significantly outperforming DRI-RCNN and RCNN baselines.
  • The model generates synthetic reviews with a perplexity of 4.506 on YelpZip when all data is labeled, representing an 82.46% improvement over the baseline spamGAN-100 (perplexity 21.89).
  • The performance of spamGAN-GPT2 improves with increasing amounts of unlabeled data on YelpZip, indicating effective utilization of unlabeled data for better class discrimination.
  • The model achieves a 7%+ accuracy gain over existing semi-supervised and supervised baselines, demonstrating strong generalization under low-data regimes.
  • Training time for spamGAN-GPT2 on YelpZip using AWS g4dn.2xlarge instances was 200 hours per model, reflecting higher computational cost but justified by superior performance and generation quality.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.