Skip to main content
QUICK REVIEW

[Paper Review] Sentiment Analysis of Yelp Reviews: A Comparison of Techniques and Models

Siqi Liu|arXiv (Cornell University)|Apr 15, 2020
Topic ModelingComputer Science12 references16 citations
TL;DR

This study evaluates text preprocessing and machine learning/deep learning models for sentiment analysis on 362,554 Yelp reviews, comparing performance across 5,000 restaurants in Toronto. Using macro F1 score as the metric, it finds that simpler models like Logistic Regression and SVM outperform complex models such as BERT and LSTM, despite deep learning techniques improving with pre-trained embeddings and sequence length capping.

ABSTRACT

We use over 350,000 Yelp reviews on 5,000 restaurants to perform an ablation study on text preprocessing techniques. We also compare the effectiveness of several machine learning and deep learning models on predicting user sentiment (negative, neutral, or positive). For machine learning models, we find that using binary bag-of-word representation, adding bi-grams, imposing minimum frequency constraints and normalizing texts have positive effects on model performance. For deep learning models, we find that using pre-trained word embeddings and capping maximum length often boost model performance. Finally, using macro F1 score as our comparison metric, we find simpler models such as Logistic Regression and Support Vector Machine to be more effective at predicting sentiments than more complex models such as Gradient Boosting, LSTM and BERT.

Motivation & Objective

  • To guide practitioners in selecting effective text preprocessing and model selection strategies for sentiment analysis.
  • To evaluate the impact of various text preprocessing techniques—such as stop word removal, normalization, and n-gram addition—on model performance.
  • To compare the effectiveness of traditional machine learning models (e.g., Logistic Regression, SVM) and deep learning models (e.g., LSTM, BERT) in predicting sentiment from Yelp reviews.
  • To assess the trade-offs between model complexity, performance, and interpretability in multi-class sentiment classification.
  • To provide empirical insights into hyperparameter choices, such as sequence length capping and vocabulary size, for deep learning models.

Proposed method

  • An ablation study on text preprocessing using a multinomial Naive Bayes baseline to evaluate individual techniques.
  • Training and comparing multiple models: Logistic Regression, SVM, Gradient Boosting, LSTM, and BERT on preprocessed Yelp reviews.
  • Using binary bag-of-words with added bigrams, minimum frequency constraints, and text normalization to improve machine learning model performance.
  • Employing pre-trained GloVe embeddings and capping maximum sequence length at 200 tokens to enhance deep learning model generalization.
  • Applying early stopping and dropout layers in the LSTM architecture to reduce overfitting.
  • Evaluating all models using macro F1 score, computed as the unweighted average of F1 scores per class, to handle class imbalance.

Experimental results

Research questions

  • RQ1How do different text preprocessing techniques (e.g., stop word removal, normalization) affect sentiment classification performance?
  • RQ2Which machine learning model—Logistic Regression, SVM, or Gradient Boosting—performs best on Yelp review sentiment classification?
  • RQ3How do deep learning models like LSTM and BERT compare to traditional models in terms of macro F1 score and training efficiency?
  • RQ4What hyperparameter choices (e.g., sequence length cap, vocabulary size) most significantly improve deep learning model performance?
  • RQ5Does model complexity correlate with performance, or do simpler models with better interpretability outperform complex ones?

Key findings

  • Simpler models such as Logistic Regression and Support Vector Machines achieved higher macro F1 scores than more complex models like Gradient Boosting, LSTM, and BERT.
  • Text normalization, minimum frequency constraints, and bigram feature addition improved performance in traditional machine learning models.
  • For deep learning models, using pre-trained GloVe embeddings and capping sequence length at 200 tokens significantly improved generalization and reduced overfitting.
  • Capping the vocabulary size to 5,000 words improved performance when using pre-trained embeddings, while larger vocabularies led to worse results.
  • The LSTM model exhibited high error rates in classifying positive sentiments (34% misclassified as neutral), primarily due to shorter review lengths and sequence length constraints.
  • Despite higher computational cost, BERT and LSTM models did not outperform simpler models in terms of macro F1, and their lack of interpretability necessitates additional tools like LIME for analysis.

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.