TL;DR
DocTag2Vec is a novel approach for document tagging that extends the popular Word2Vec and Doc2Vec models to learn joint embeddings for words, documents, and tags simultaneously. By mapping everything into a shared vector space, it can predict relevant tags for new documents using a simple $k$-nearest neighbor search, eliminating the need for manual feature engineering and supporting incremental updates as new data arrives.
What Problem Does This Paper Address?
Document tagging—assigning relevant labels to news articles or blog posts—is a classic Multi-Label Learning (MLL) problem. However, traditional MLL methods face several hurdles in modern web environments:
- Feature Engineering: Most algorithms require pre-extracted feature vectors (like TF-IDF), which can be cumbersome to maintain.
- Dynamic Tag Sets: In social media contexts (like Tumblr), users constantly invent new tags. Many models struggle to incorporate these without retraining from scratch.
- Freshness: News and blogs are time-sensitive. Systems need to adapt incrementally to new data to stay relevant.
- Scalability: As the number of candidate tags grows into the thousands or millions, prediction speed often degrades.
The authors propose DocTag2Vec to address these challenges by treating tagging as an embedding problem rather than a pure classification task.
Methods
DocTag2Vec builds upon the Distributed Memory (DM) Doc2Vec architecture. In standard Doc2Vec, a document vector is trained to help predict words within that document. DocTag2Vec adds a new component: the document vector is also trained to predict the tags associated with it.
The model uses a joint objective function:
- Hierarchical Softmax is used to predict words, which is efficient for large vocabularies.
- Negative Sampling is used to learn tag embeddings. This forces the document vector to be close to its actual tags in the vector space and far from randomly sampled "negative" tags.
For prediction, a new document is first "projected" into the learned vector space (fixing the word and tag embeddings and only optimizing the new document's vector). Once the document is positioned, the system simply looks for the $k$ closest tag embeddings using cosine similarity. To improve robustness, the authors also employ bootstrap aggregation (bagging), training multiple learners on different subsets of data and averaging their predictions.
Datasets
The authors evaluated the model on a mix of public and proprietary datasets to test its versatility:
- Wiki10: English Wikipedia articles with tags from the social bookmarking site Delicious.
- WikiNER: Wikipedia articles where tags are automatically detected named entities.
- Relevance Modeling (RM): Financial news in Chinese and Korean, tagged with company ticker symbols.
- News Content Taxonomy (NCT): A collection of news articles annotated by editors using a hierarchical topical taxonomy.
Key Insights and Ideas
- Joint Vector Space: By placing words, documents, and tags in the same space, the model captures semantic relationships that traditional binary-vector MLL methods miss. For example, a tag embedding carries "meaning" based on the words and documents it frequently appears with.
- Raw Text as Input: Unlike many state-of-the-art MLL models (like SLEEC), DocTag2Vec works directly with raw text. It learns its own features, making it much easier to deploy in production pipelines.
- Incremental Learning: Because the model is trained via Stochastic Gradient Descent (SGD), it can be updated with new documents and tags without a full retrain.
- Tag Discovery: The $k$-NN approach makes it trivial to incorporate new tags; you simply learn an embedding for the new tag and add it to the search index.
Key Results
The researchers compared DocTag2Vec against SLEEC (a state-of-the-art MLL baseline) and a standard Doc2Vec baseline.
- Performance: On large datasets like Wiki10 and WikiNER, DocTag2Vec achieved precision scores comparable to SLEEC. On the NCT dataset, it actually outperformed SLEEC in several categories (see Figure 4).
- Data Efficiency: The model struggled slightly on the RM dataset, which has very small training sets. This suggests that embedding-based approaches require a certain "critical mass" of data to learn high-quality representations.
- Qualitative Superiority: A case study on the NCT dataset revealed that DocTag2Vec sometimes predicted better or more specific tags than the human editors. For instance, it correctly identified "Basketball" for an article the editor had mistakenly tagged as "Baseball."
Limitations and Future Work
While DocTag2Vec is powerful, the authors note a few areas for improvement:
- Small Data Sensitivity: As seen in the RM results, the model's performance drops when training data is sparse.
- Semi-Supervised Learning: The authors suggest extending the model to incorporate large amounts of unlabeled text to further refine the word and document embeddings.
- Social Context: Future iterations could incorporate graph embeddings to account for user-tag interactions or social network structures, potentially improving personalization.
Summary updated