Swiss-Chocolate: Sentiment Detection using Sparse SVMs and Part-Of-Speech n-Grams

Martin Jaggi, Fatih Uzdilli, Mark Cieliebak

TL;DR

This paper presents "Swiss-Chocolate," a sentiment analysis system for Twitter that leverages sparse SVMs and a novel "part-of-speech n-gram" feature representation. By focusing on sparsity and a more nuanced feature set, the system achieved a strong 8th place in the SemEval-2014 competition, demonstrating the effectiveness of these techniques for short-text sentiment classification.

What Problem Does This Paper Address?

The proliferation of user-generated content on social media, particularly Twitter, has fueled a growing interest in automatically understanding public opinion and sentiment. However, the brevity and informal nature of tweets (short text) present unique challenges for traditional Natural Language Processing (NLP) techniques. Accurately classifying the sentiment of these messages into positive, negative, or neutral categories is crucial for various applications, from market research to social trend analysis. This paper tackles the challenge of building a robust and efficient sentiment classifier specifically for Twitter data, aiming to improve upon existing methods.

Methods

The core of the "Swiss-Chocolate" system is a linear Support Vector Machine (SVM) classifier. What sets it apart is the use of sparse linear classifiers, specifically an l1-regularized SVM, as opposed to the more common l2-regularization. This choice leads to a highly sparse model, meaning only a small subset of features are used for classification, which significantly speeds up evaluation.

A key innovation is the introduction of part-of-speech (POS) n-grams. Instead of using standard n-grams (sequences of words), they replace some tokens in the n-gram with their corresponding POS tags (e.g., noun, verb). This allows for capturing syntactic structure while being more robust to variations in specific words. For instance, a POS n-gram might look like "NOUN VERB NOUN," representing the grammatical structure of a phrase. They explored POS n-grams of lengths 3 to 6, keeping up to two original tokens.

Additionally, the authors incorporated new sentiment lexicons that provide scores for positive, negative, and neutral sentiment, moving beyond the typical binary (positive/negative) scoring. They also experimented with weighted substring features and used a sigmoid transformation for lexicon scores.

Datasets

The system was trained and evaluated on data from the SemEval-2014 Task 9B: Sentiment Analysis in Twitter. This included:

  • Training and Development Data: Provided as tweet IDs, with a portion of tweets no longer available on Twitter.
  • Testing Data: Included datasets from previous years (Twitter-2013, SMS-2013) and new domains like LiveJournal-2014 and Twitter Sarcasm.
  • Lexicon Building Data:
    • Sentiment140 corpus (Go et al., 2009) for positive/negative tweets.
  • Arbitrary (neutral) tweets from the thinknook.com dataset.
  • Movie reviews from a Kaggle competition (Rotten Tomatoes) for balanced 3-class data.

Key Insights and Ideas

  • Sparsity is Powerful: Using l1-regularization for SVMs resulted in a remarkably sparse classifier. This not only made the model computationally efficient for prediction but also potentially more interpretable, as it relies on a smaller, more focused set of features.
  • POS N-grams Offer Robustness: Replacing words with their POS tags in n-grams proved to be a valuable feature. It allowed the model to generalize better by focusing on the grammatical structure rather than specific word choices, which is particularly useful in the noisy domain of Twitter.
  • Three-Class Lexicons Improve Discrimination: Introducing lexicons that score for neutral sentiment, in addition to positive and negative, is a crucial step towards more accurate classification, especially for tweets that don't express a strong positive or negative opinion.
  • Reproducibility Challenges: The authors highlight that reproducing previous results can be difficult due to factors like the availability of training data (tweets disappearing from Twitter) and subtle differences in classifier implementation or feature weighting.

Key Results

The "Swiss-Chocolate" system achieved an F1-score of 67.54 on the Twitter-2014 test set, ranking 8th out of 50 participating submissions in the SemEval-2014 competition. This was a significant improvement over their baseline replica of the previous year's winning system, which achieved an F1-score of 63.25. The authors note that their system improved the baseline by 1.56 points in F1-score by incorporating their new features and techniques. The final classifier was extremely sparse, using only 1985 non-zero features.

Limitations and Future Work

The authors acknowledge that their replica of the NRC Canada 2013 system performed significantly worse than the original, attributing this partly to the unavailability of the exact same training sets and potential differences in SVM implementation or class weighting. They also note that some tweets were no longer available on Twitter, impacting the comparability of results.

For future work, they suggest incorporating their improvements into newer versions of similar systems to see how much further performance gains can be achieved. They also mention the potential for further exploration of POS n-grams and the development of more sophisticated multi-class sentiment lexicons.

Summary updated

BibTeX
@inproceedings{jaggi2014swiss,
  author = {Martin Jaggi and Fatih Uzdilli and Mark Cieliebak},
  title = {{Swiss-Chocolate: Sentiment Detection using Sparse SVMs and Part-Of-Speech n-Grams}},
  booktitle = {SemEval @ COLING},
  year = {2014},
  doi = {10.3115/v1/s14-2105},
}
Figure