Abstract
Traditional N-gram features for document representation often lead to the "curse of dimensionality," creating sparse vectors that fail to capture semantic relationships. This paper proposes SVM-WE, a sentiment classification method based on word embeddings and Support Vector Machines (SVM). By representing documents as dense, low-dimensional vectors derived from word embeddings, the method significantly reduces computational complexity while improving classification accuracy. Experiments across multiple benchmarks demonstrate that SVM-WE outperforms traditional unigram and bigram models.
Introduction
Sentiment analysis is a critical task in natural language processing, yet traditional feature extraction methods like N-grams face significant hurdles. In a large corpus, the vocabulary size can reach hundreds of thousands, resulting in massive, sparse vectors where most entries are zero. Furthermore, N-grams treat words as independent entities, failing to recognize that semantically similar words like "excellent" and "wonderful" should occupy similar spaces in a model. The authors propose a framework that leverages the semantic richness of word embeddings to create compact, meaningful document representations.
Methodology
The proposed SVM-WE (Support Vector Machine based on Word Embedding) framework consists of three primary stages:
- Word Embedding Training: The authors utilize the
word2vectoolkit to train word vectors. They specifically compare two architectures: Continuous Bag-of-Words (CBOW), which predicts a target word from its context, and Skip-gram, which predicts the context from a target word.
- Document Representation: To transform individual word vectors into a single document vector, the authors employ vector addition. For a document containing $n$ words, the document vector $D$ is calculated as the sum of the individual word vectors $v_i$. This creates a "centroid" representing the document's overall sentiment.
- Classification: These dense document vectors are then used as input for an SVM classifier, chosen for its effectiveness in high-stakes text categorization tasks.
Additionally, the study explored various weighting schemes—including TF-IDF, TFC, and ITC—to determine if assigning higher importance to specific words during the summation process would enhance performance.
Experimental Results and Discussion
The authors evaluated SVM-WE on four sentiment analysis benchmarks: RT-s (short reviews), CR (customer reviews), RT-2k (full movie reviews), and IMDB (large-scale movie reviews). These datasets range in average document length from 20 to nearly 800 words.
Skip-gram vs. CBOW
A key finding was the clear superiority of the Skip-gram architecture for sentiment tasks. While CBOW is often effective at capturing syntactic (grammatical) relationships, Skip-gram excels at capturing semantic information. Since sentiment is inherently tied to meaning rather than grammar, Skip-gram provides a more robust foundation for classification.
Dimensionality and Performance
As shown in the experimental results, accuracy increases as the embedding dimension grows, typically plateauing between 100 and 300 dimensions. Beyond this range, the model experiences diminishing returns. This suggests that a relatively small number of dimensions is sufficient to capture the "sentiment space" of a document, providing a massive reduction in complexity compared to the tens of thousands of dimensions required for N-gram models.
The Weighting Paradox
Interestingly, applying statistical weights like TF-IDF to the word vectors did not yield performance gains. The authors suggest that the word embedding training process itself inherently captures word importance, making additional statistical weighting redundant.
Conclusion
The SVM-WE method demonstrates that low-dimensional word embeddings can effectively replace high-dimensional N-gram features. On the RT-2k dataset, the method achieved 90.5% accuracy, significantly outperforming the bigram baseline of 87.4%. Future work will focus on incorporating sentiment dictionaries to weight "sentiment-carrying" words more heavily, potentially further refining the document representation.
Summary updated