NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Task-oriented Word Embedding for Text Classification

Qian Liu, Heyan Huang, Yang Gao, Xiaochi Wei, Yuxin Tian, Luyang Liu

Introduction

Traditional word embedding techniques, such as Word2Vec and GloVe, have revolutionized natural language processing by mapping words into a continuous vector space based on their linguistic contexts. However, these methods often fall into what can be termed the "Context-Similarity Trap." Because they rely on the distributional hypothesis—that words appearing in similar contexts should have similar meanings—they frequently group words together that are semantically related but functionally distinct for specific downstream tasks like text classification.

Figure 1: Comparison between standard word embeddings and the proposed task-oriented distribution, highlighting how salient words like 'learning' and 'educational' are separated to improve classification boundaries.

As illustrated in Figure 1, words like "learning" (often associated with AI) and "educational" (often associated with Sociology) may appear in nearly identical linguistic structures. A standard model would place them close together in the embedding space. For a classifier, however, these are salient markers of different domains. To improve classification accuracy, these embeddings must capture not only semantic context but also "functional features" that reflect their utility for the specific task.

Methodology: The ToWE Framework

This paper introduces ToWE (Task-oriented Word Embedding), a joint learning framework designed to inject category-specific information directly into the embedding space. The model consists of two primary components:

  1. Context-aware Component: This utilizes standard Word2Vec architectures (Skip-gram or CBOW) to learn general semantic relationships from unlabeled corpora, ensuring the model retains basic linguistic knowledge.
  2. Function-aware Component: This novel addition identifies "salient words" for each category. Salience is determined by a custom score that rewards high frequency within a specific category and low variance across others.

To refine the embedding space, the model employs a Margin-based Ranking Loss. This constraint forces salient words from the same category to cluster together (positive pairs) while pushing words from different categories further apart (negative pairs). The final objective function is a weighted combination of these two losses, controlled by a hyperparameter ($\lambda$), allowing the model to "sculpt" the vector space for maximum linear separability.

Experimental Results

The authors evaluated ToWE against several benchmarks, including Bag-of-Words (BOW), GloVe, and standard Word2Vec, across five datasets. A notable addition is the 5AbstractsGroup dataset, introduced by the authors, which contains academic abstracts from Business, AI, Sociology, Transport, and Law.

Figure 3: Accuracy comparison of ToWE-SG and ToWE-CBOW across different numbers of salient words (N). ToWE-SG consistently achieves higher accuracy, peaking at N=100.

As shown in Figure 3, the Skip-gram version of the model (ToWE-SG) consistently outperformed the CBOW version. On the 20NewsGroup dataset, ToWE-SG achieved 86.0% accuracy, a significant improvement over the 76.7% achieved by standard Skip-gram. On the 5AbstractsGroup dataset, accuracy reached 87.2%, demonstrating the model's effectiveness in distinguishing between closely related academic domains.

Discussion and Hyperparameter Sensitivity

The success of ToWE hinges on the balance between semantic and functional features. The researchers found that a $\lambda$ value between 0.3 and 0.4—slightly favoring the function-aware component—yielded the best results.

However, the model is sensitive to the number of salient words ($N$). If $N$ is too high, non-discriminative or "noisy" words are included in the regularization process, which can blur the classification boundaries and degrade performance. Conversely, if $N$ is too low, the model lacks sufficient task-specific information to effectively reorganize the embedding space.

Conclusion

ToWE demonstrates that embedding spaces can be significantly improved for classification by explicitly modeling task-specific functional salience. By forcing category-relevant words into distinct clusters, the model enables simple linear classifiers to achieve state-of-the-art results without the need for complex, computationally expensive deep learning architectures. Future work will focus on automating the discovery of salient words and exploring the transferability of these task-oriented embeddings to related domains.

Summary updated

BibTeX
@inproceedings{liu2018task,
  author = {Qian Liu and Heyan Huang and Yang Gao and Xiaochi Wei and Yuxin Tian and Luyang Liu},
  title = {{Task-oriented Word Embedding for Text Classification}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2018},
}
Figure