[Paper Review] Vector of Locally-Aggregated Word Embeddings (VLAWE): A Novel Document-level Representation
This paper proposes Vector of Locally-Aggregated Word Embeddings (VLAWE), a novel unsupervised document-level representation inspired by VLAD in computer vision. It clusters word embeddings via k-means, then computes document representations as residuals between each word embedding and its nearest cluster centroid, achieving a 93.3% accuracy on the Movie Review dataset—10 percentage points above the prior state of the art.
In this paper, we propose a novel representation for text documents based on aggregating word embedding vectors into document embeddings. Our approach is inspired by the Vector of Locally-Aggregated Descriptors used for image representation, and it works as follows. First, the word embeddings gathered from a collection of documents are clustered by k-means in order to learn a codebook of semnatically-related word embeddings. Each word embedding is then associated to its nearest cluster centroid (codeword). The Vector of Locally-Aggregated Word Embeddings (VLAWE) representation of a document is then computed by accumulating the differences between each codeword vector and each word vector (from the document) associated to the respective codeword. We plug the VLAWE representation, which is learned in an unsupervised manner, into a classifier and show that it is useful for a diverse set of text classification tasks. We compare our approach with a broad range of recent state-of-the-art methods, demonstrating the effectiveness of our approach. Furthermore, we obtain a considerable improvement on the Movie Review data set, reporting an accuracy of 93.3%, which represents an absolute gain of 10% over the state-of-the-art approach. Our code is available at https://github.com/raduionescu/vlawe-boswe/.
Motivation & Objective
- To develop a robust, unsupervised document-level representation that improves text classification beyond mean/sum pooling of word embeddings.
- To adapt the VLAD framework from computer vision to natural language processing for better semantic aggregation of word embeddings.
- To address vocabulary distribution gaps between training and test data by enabling out-of-vocabulary word handling via nearest-neighbor cluster assignment.
- To demonstrate state-of-the-art performance across diverse text classification benchmarks, especially on low-resource or domain-shifted settings.
Proposed method
- Pre-train word embeddings (e.g., GloVe) on a large corpus and use them as input for clustering.
- Apply k-means clustering to the word embedding vectors to learn a codebook of semantically related word embedding centroids.
- For each document, assign every word embedding to its nearest cluster centroid (codeword), forming a set of word-codeword associations.
- Construct the VLAWE representation by computing the sum of residuals (differences) between each codeword and all word embeddings assigned to it in the document.
- Use the resulting high-dimensional vector as input to a classifier (e.g., SVM) without fine-tuning.
- Enable out-of-vocabulary robustness by assigning unseen words to the nearest codeword during inference.
Experimental results
Research questions
- RQ1Can the VLAD framework from computer vision be effectively adapted to learn document-level representations from word embeddings in NLP?
- RQ2Does aggregating word embeddings via cluster residuals (VLAWE) yield better performance than simple averaging or summing in text classification tasks?
- RQ3How does VLAWE handle out-of-vocabulary words compared to traditional bag-of-words or embedding averaging methods?
- RQ4Can VLAWE achieve state-of-the-art performance across diverse text classification benchmarks, including low-resource or domain-shifted settings?
- RQ5What is the impact of hyperparameters like the number of clusters (k) on VLAWE’s performance and robustness?
Key findings
- VLAWE achieves a 93.3% accuracy on the Movie Review dataset, representing a 10% absolute improvement over the prior state-of-the-art method.
- On the RT-2k dataset, VLAWE achieves 94.1% accuracy, which surpasses all previously reported results in the literature.
- On the Subj dataset, VLAWE reaches 95.0% accuracy, ranking second-best among all methods tested, just 1% below the best-performing method.
- On the TREC dataset, VLAWE achieves the third-highest accuracy, with a 2% gap from the state-of-the-art 96.1% result.
- Compact versions of VLAWE—using k=2 or PCA to reduce dimensionality—achieve 93.0% and 93.2% accuracy respectively, showing minimal performance drop while significantly reducing feature size.
- VLAWE consistently outperforms both the average word embedding baseline and the standard bag-of-words baseline across all five benchmark datasets, with improvements exceeding 5% in most cases.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.