Abstract
We present Tweet2Vec, a novel method for generating general-purpose vector representation of tweets. The model learns tweet embeddings using character-level CNN-LSTM encoder-decoder. We trained our model on 3 million, randomly selected English-language tweets. The model was evaluated using two methods: tweet semantic similarity and tweet sentiment categorization, outperforming the previous state-of-the-art in both tasks. The evaluations demonstrate the power of the tweet embeddings generated by our model for various tweet categorization tasks. The vector representations generated by our model are generic, and hence can be applied to a variety of tasks. Though the model presented in this paper is trained on English-language tweets, the method presented can be used to learn tweet embeddings for different languages.
Introduction
Standard Natural Language Processing (NLP) tools often struggle with the idiosyncratic nature of Twitter. Tweets are restricted in length, highly informal, and filled with "noise" such as abbreviations, creative misspellings, and non-standard grammar. Traditional approaches like Word2Vec or ParagraphVec operate at the word level, which leads to issues with out-of-vocabulary tokens when encountering typos or rare slang. To address this, Tweet2Vec proposes a character-level model that generates generic tweet embeddings suitable for various classification tasks without manual feature engineering.
Methodology
The Tweet2Vec architecture employs a CNN-LSTM Encoder-Decoder framework that treats a tweet as a sequence of characters rather than words.
The Encoder
The encoder consists of two primary components:
- Convolutional Layers: The input tweet, represented as a one-hot encoded matrix of characters, passes through four 1D convolutional layers. These layers act as feature extractors, identifying "character n-grams" or local patterns of letters.
- LSTM Layer: The output of the CNN is fed into a Long Short-Term Memory (LSTM) network. This layer captures long-term dependencies across the tweet, eventually compressing the entire message into a single 256-dimensional vector.
The Decoder
To train the model in an unsupervised manner, the authors use a reconstruction task. Two LSTM layers take the 256-dimensional embedding and attempt to predict the original tweet character by character.
Data Augmentation
To enhance robustness, the model was trained using synthetic variations of tweets. By replacing words with synonyms from WordNet, the model is forced to learn underlying semantic meaning rather than just memorizing specific character strings.
Evaluation and Results
The model was trained on 3 million English tweets and evaluated on two key tasks:
- Semantic Relatedness: Using the SemEval 2015-Task 1 dataset (18,000 training pairs, 1,000 test pairs), the model determines if two tweets share the same meaning.
- Sentiment Classification: Using the SemEval 2015-Task 10B dataset (roughly 12,000 labeled tweets), the model categorizes tweets as positive, negative, or neutral.
Key Results
Tweet2Vec demonstrated superior performance over several high-performing models, including ParagraphVec and top SemEval entries. It achieved state-of-the-art results without any task-specific feature engineering.
- Semantic Similarity: Tweet2Vec achieved an F1-score of 0.677, outperforming the previous best model (svckernel at 0.674) and significantly beating ParagraphVec (0.620).
- Sentiment Analysis: The model reached an F1-score of 0.656, surpassing the next best competitor (Webis at 0.648).
Discussion
The success of Tweet2Vec highlights several key insights:
- Character-level Modeling: By operating at the character level, the model effectively handles social media noise. It can recognize that "loooove" and "love" are semantically related, whereas word-level models might treat them as entirely different entities.
- Versatility: The embeddings are "general-purpose." They can be plugged into simple, off-the-shelf classifiers like Logistic Regression to achieve top-tier results without manual tuning.
- Unsupervised Learning: The encoder-decoder structure allows the model to learn the "language of Twitter" from unlabeled data simply by trying to recreate it.
Limitations and Future Work
Future research will focus on scaling the training dataset beyond 3 million tweets and addressing sensitivity to word order through more advanced data augmentation. Additionally, the authors plan to explore attention mechanisms to help the model focus on the most important parts of a tweet during the encoding and decoding process.
Summary updated