Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (13 sloc) 2.71 KB

Sentiment Summarization of Amazon Reviews

Team Members: Jane Zhang, Matthew Bayer, Peter Husisian, Arnav Ghosh, Wes Gurnee

Evaluating potential purchases online is often made easier by reviews provided by other customers. However, sifting through hundreds of reviews to create a holistic view of the sentiment the product evokes can be time-consuming. Consequently, we propose a model that can provide a comprehensive summary of all the reviews on a product. Our task is a specific instantiation of the problem of summarizing the sentiments and opinions of a large group of people into a few key topics, and to summarize them in one generated review.

We take two approaches to the problem: an extractive technique, where the review is generated from important sentences sampled from the corpus, and an abstractive technique, where we generate new text using an autoencoder that summarizes the original reviews.

Specifically, our project is divided up into 3 components:

  1. Content Representation/Encoding: We encode reviews into content vectors. For the abstractive approach, we use an autoencoder trained on specific product categories (electronics, sports, etc.) to vectorize each sentence in each review. In the extractive case, we call the indico featurization API to use a more heavy duty mass language model for embeddings.

  2. Generate Candidate Sentences for Artificial Review: We cluster similar sentences together and sample salient sentences from the clusters using a specialized approach with DBSCAN: We choose a very selective density hyparameter and very small minimum samples hyperparameter for DBSCAN. In the extractive case, we then sample sentences that are close to the mean of each cluster, but are not necessarily in the cluster generated by DBSCAN. In the abstractive approach, we use our autoencoder to decode the mean of each group of candidate sentences.

  3. Generate Artificial Review: We take subsets of our group of candidate sentences and concatenate them to form multiple candidate reviews. We finetune a BERT model to predict review helpfulness, and use a genetic algorithm to optimize these candidate reviews to be the most helpful. TODO: Explain Siamese/Triplet Loss

  4. Evaluation: We use ROUGE and cosine similarity against a gold-standard most helpful review from the corpus to evaluate summarization quality. We recognize that summarization is inherently subjective and multimodal, and thus evaluation is difficult, so frequent human evalulation is also included.

Related fields: natural language processing, sentiment analysis, abstractive summarization, deep learning, natural language generation

Getting Started

  1. pip install -r requirements.txt
  2. python -m spacy download en_core_web_lg
You can’t perform that action at this time.