Skip to main content
QUICK REVIEW

[Paper Review] Textual Data Distributions: Kullback Leibler Textual Distributions Contrasts on GPT-2 Generated Texts, with Supervised, Unsupervised Learning on Vaccine & Market Topics & Sentiment

Jim Samuel, Ratnakar Palle|arXiv (Cornell University)|Jun 15, 2021
Topic ModelingComputer Science2 citations
TL;DR

This paper proposes KL-Textual Distributions Contrasts (KL-TDC), a novel Kullback-Leibler divergence-based method to evaluate alignment between machine-generated and real-world textual data distributions by topic and sentiment. Using fine-tuned GPT-2 for text generation and supervised/unsupervised learning on vaccine and market Twitter data, the study demonstrates that KL-TDC effectively quantifies distributional similarity, enabling controlled, high-fidelity synthetic data generation for NLP research and applications.

ABSTRACT

Efficient textual data distributions (TDD) alignment and generation are open research problems in textual analytics and NLP. It is presently difficult to parsimoniously and methodologically confirm that two or more natural language datasets belong to similar distributions, and to identify the extent to which textual data possess alignment. This study focuses on addressing a segment of the broader problem described above by applying multiple supervised and unsupervised machine learning (ML) methods to explore the behavior of TDD by (i) topical alignment, and (ii) by sentiment alignment. Furthermore we use multiple text generation methods including fine-tuned GPT-2, to generate text by topic and by sentiment. Finally we develop a unique process driven variation of Kullback-Leibler divergence (KLD) application to TDD, named KL Textual Distributions Contrasts(KL-TDC) to identify the alignment of machine generated textual corpora with naturally occurring textual corpora. This study thus identifies a unique approach for generating and validating TDD by topic and sentiment, which can be used to help address sparse data problems and other research, practice and classroom situations in need of artificially generated topic or sentiment aligned textual data.

Motivation & Objective

  • To address the open challenge of validating whether machine-generated text aligns with real-world textual data distributions by topic and sentiment.
  • To develop a systematic method for generating synthetic textual data with controlled topical and sentiment distributions.
  • To propose and evaluate a novel metric, KL-Textual Distributions Contrasts (KL-TDC), for measuring distributional alignment between real and generated text.
  • To demonstrate the utility of this approach in addressing data scarcity and supporting NLP research, education, and behavioral finance applications.

Proposed method

  • Fine-tuned GPT-2 is used to generate synthetic text aligned with specified topics (vaccine, market) and sentiments (positive, negative, neutral).
  • Supervised and unsupervised machine learning models are trained on preprocessed Twitter data to classify topics and sentiments.
  • A modified form of Kullback-Leibler divergence (KLD) is applied to compare the probability distributions of word or token frequencies between real and generated corpora.
  • The KL-TDC metric quantifies the divergence between the distribution of real textual data and generated data, serving as a validation score for alignment.
  • Three levels of text generation are employed: direct probabilistic modeling, RNN/LSTM-based semi-structured generation, and GPT-2-based structured generation.
  • The method uses a priori knowledge of topic and sentiment distributions to guide and evaluate the generation process.

Experimental results

Research questions

  • RQ1To what extent can GPT-2 generate text that matches the distributional characteristics of real-world Twitter data in terms of topic and sentiment?
  • RQ2How effective is the proposed KL-TDC metric in quantifying the alignment between real and generated textual data distributions?
  • RQ3Can supervised and unsupervised learning models accurately classify and reflect the underlying topic and sentiment distributions in the training data?
  • RQ4How does the inclusion or exclusion of keywords affect the performance of classification and generation models?
  • RQ5Can the KL-TDC framework be generalized to other topics and linguistic contexts beyond vaccine and market discussions?

Key findings

  • The KL-TDC metric successfully quantified distributional alignment between real and generated text, providing a reliable validation mechanism for synthetic data quality.
  • Fine-tuned GPT-2 generated text demonstrated strong alignment with real-world distributions in both topic and sentiment, as confirmed by low KL-TDC scores.
  • Supervised learning methods achieved higher classification accuracy than unsupervised methods when keywords were included, indicating improved model performance with explicit supervision.
  • Unsupervised methods showed moderate performance in capturing topic and sentiment distributions, suggesting limitations in identifying subtle semantic patterns without labeled data.
  • The study confirmed that controlled, distributionally aligned text generation is feasible using GPT-2 and KL-TDC, offering a scalable solution for data augmentation in NLP.
  • The framework supports the creation of synthetic data for sparse domains and educational use, reducing reliance on large-scale real-world datasets.

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.