Skip to main content
QUICK REVIEW

[Paper Review] T-BERT -- Model for Sentiment Analysis of Micro-blogs Integrating Topic Model and BERT

Sarojadevi Palani, Prabhu Rajagopal|arXiv (Cornell University)|Jun 2, 2021
Sentiment Analysis and Opinion MiningComputer Science34 references10 citations
TL;DR

This paper proposes T-BERT, a novel framework that integrates BERT's contextual embeddings with LDA-based topic modeling to improve sentiment analysis on raw microblog data. By fusing contextual topics via an autoencoder and fine-tuning BERT on sentiment classification, the model achieves 90.81% accuracy, demonstrating that topic-aware contextual representation enhances sentiment classification performance on unsupervised, short-text social media data.

ABSTRACT

Sentiment analysis (SA) has become an extensive research area in recent years impacting diverse fields including ecommerce, consumer business, and politics, driven by increasing adoption and usage of social media platforms. It is challenging to extract topics and sentiments from unsupervised short texts emerging in such contexts, as they may contain figurative words, strident data, and co-existence of many possible meanings for a single word or phrase, all contributing to obtaining incorrect topics. Most prior research is based on a specific theme/rhetoric/focused-content on a clean dataset. In the work reported here, the effectiveness of BERT(Bidirectional Encoder Representations from Transformers) in sentiment classification tasks from a raw live dataset taken from a popular microblogging platform is demonstrated. A novel T-BERT framework is proposed to show the enhanced performance obtainable by combining latent topics with contextual BERT embeddings. Numerical experiments were conducted on an ensemble with about 42000 datasets using NimbleBox.ai platform with a hardware configuration consisting of Nvidia Tesla K80(CUDA), 4 core CPU, 15GB RAM running on an isolated Google Cloud Platform instance. The empirical results show that the model improves in performance while adding topics to BERT and an accuracy rate of 90.81% on sentiment classification using BERT with the proposed approach.

Motivation & Objective

  • To develop a framework that enhances sentiment analysis on raw, unsupervised microblog data by integrating latent topic modeling with contextual BERT embeddings.
  • To improve the interpretability and semantic relevance of topics in short-text social media by combining BERT's contextual understanding with LDA's topic discovery.
  • To demonstrate that merging topic information with BERT embeddings leads to measurable gains in sentiment classification accuracy.
  • To evaluate the effectiveness of using autoencoders to align and fuse BERT contextual sentence embeddings with LDA-derived topics.
  • To provide a flexible, generalizable approach applicable to real-time sentiment analysis in domains such as market research, brand monitoring, and social network analysis.

Proposed method

  • The framework employs BERT-base-uncased to generate contextual sentence embeddings from raw microblog texts.
  • Latent Dirichlet Allocation (LDA) is applied to extract topic distributions from the same text corpus, identifying underlying themes.
  • An autoencoder is trained to fuse BERT embeddings with LDA topics by learning a shared latent representation, using ReLU activation and L1 regularization to prevent overfitting.
  • The fused representation is fed into a fine-tuned BERT classifier with a final dense layer for sentiment prediction (positive, negative, neutral).
  • Hyperparameters are optimized using Adam optimizer with a dropout rate of 0.01 and L1 regularization (10e-4) to enhance generalization.
  • Model training is conducted on a Google Cloud Platform instance with a Tesla K80 GPU, using a batch size of 128 and 50 training epochs.

Experimental results

Research questions

  • RQ1Can combining BERT’s contextual embeddings with LDA-derived topics improve sentiment classification accuracy on raw microblog data?
  • RQ2How does the fusion of topic modeling and contextual embeddings affect the coherence and interpretability of discovered topics?
  • RQ3What is the optimal number of topics (k) that maximizes topic coherence and sentiment classification performance in the T-BERT framework?
  • RQ4Does the use of an autoencoder to align BERT and LDA representations lead to better clustering and semantic grouping of topics compared to standalone LDA or BERT clustering?
  • RQ5To what extent does the T-BERT framework outperform standard BERT and LDA-only models in sentiment classification on a real-world, unsupervised microblog dataset?

Key findings

  • The T-BERT model achieved a sentiment classification accuracy of 90.81% on the test set, significantly outperforming baseline models.
  • The LDA+BERT fusion model achieved a coherence score of 0.56, surpassing LDA (0.501) and BERT clustering (0.521), indicating improved topic quality.
  • The silhouette score for the LDA+BERT model reached 0.46, indicating well-separated and meaningful topic clusters, compared to 0.044 for BERT-only clustering.
  • The word cloud visualizations for k=8 topics confirmed that high-frequency, contextually relevant words were grouped together, enhancing topic interpretability.
  • The model showed class-wise accuracy of 96% for positive, 78% for negative, and 69% for neutral sentiments, indicating strong performance on positive sentiment detection.
  • The autoencoder with L1 regularization and dropout (0.01) effectively reduced overfitting, and the training/validation loss curves showed stable convergence.

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.