Learning Word Representations with Regularization from Prior Knowledge

Yan Song, Chia-Jung Lee, Fei Xia2017

Abstract

Conventional word embeddings are trained with specific criteria (e.g., based on language modeling or co-occurrence) inside a single information source, disregarding the opportunity for further calibration using external knowledge. This paper presents a unified framework that leverages pre-learned or external priors, in the form of a regularizer, for enhancing conventional language model-based embedding learning. We consider two types of regularizers: those derived from topic distribution (LDA) on unlabeled data, and those based on human-annotated dictionaries. To effectively learn with these regularizers, we propose a novel data structure, Trajectory Softmax. Experimental results show that our learning framework improves embedding quality across multiple datasets, including word similarity and sentiment classification tasks.

Introduction

Standard word embedding models, such as Word2Vec (CBOW/Skip-gram) and GloVe, are typically "self-contained." They derive semantic meaning exclusively from local context windows or global co-occurrence statistics within a single training corpus. While effective, these models often ignore valuable "prior knowledge" curated by humans, such as synonym databases (WordNet) or global topical distributions (Latent Dirichlet Allocation).

Integrating this external knowledge presents a significant challenge. Previous methods like "retrofitting" adjust embeddings after training, but often require explicit word-to-word maps. More importantly, when external knowledge is high-dimensional (e.g., a word's distribution across 50 topics), standard neural network output layers like Hierarchical Softmax become computationally intractable, as their memory requirements grow exponentially with the dimension of the knowledge vector.

The Joint Learning Framework

We propose a unified framework where the model optimizes two simultaneous objectives:

  1. Context Learning: Predicting a target word based on its neighbors (the standard CBOW or Skip-gram approach).
  2. Regularization: Predicting the "prior knowledge vector" associated with that word.
The proposed joint learning framework combining context learning and prior knowledge regularization.

By incorporating the prior knowledge as a regularizer during the training phase (joint learning), the model can calibrate its internal representations to align with external semantic or topical structures.

Trajectory Softmax: Scaling to High Dimensions

The primary innovation of this work is Trajectory Softmax, a data structure designed to handle high-dimensional regularization vectors.

In a traditional Hierarchical Softmax setup, a $D$-dimensional binary vector would require a tree with $2^D - 1$ nodes. For a 50-dimensional topic vector, this is mathematically impossible to compute. Trajectory Softmax solves this by replacing the tree with a grid structure. Each dimension of the prior knowledge vector is treated as a step on a path, or a "trajectory."

Comparison between traditional Hierarchical Softmax (left) and the proposed Trajectory Softmax (right).

This shift reduces space complexity from $O(2^D)$ to a linear $O(2 \cdot D)$. This efficiency allows our model to incorporate complex, multi-dimensional external data—such as 50-dimensional LDA topic vectors—that were previously unusable in a joint learning context.

Experimental Evaluation

We evaluated our framework on a variety of benchmarks using an 8-billion-word corpus for training. We utilized both unannotated priors (LDA topic distributions) and annotated priors (PPDB, WordNet, and SentiWordNet).

Word Similarity

On word similarity benchmarks like MEN-3k, SimLex-999, and WordSim-353, the inclusion of LDA as a "soft" guide significantly boosted performance. For instance, adding LDA knowledge to a Skip-gram model raised the correlation score on the MEN-3k dataset from 64.79 to 70.83. This suggests that LDA captures global co-occurrence patterns that local context windows (typically 5-10 words) fail to perceive.

Sentiment Analysis

In sentiment classification using the IMDB movie review dataset, our joint learning approach (CBOW + regularizer) achieved 92.09% accuracy. This outperformed the baseline CBOW (91.29%) and established a new benchmark over previous state-of-the-art methods. The results indicate that integrating sentiment lexicons during training is more effective than post-hoc retrofitting.

Conclusion

This paper demonstrates that injecting prior knowledge into the word embedding learning process via regularization yields superior representations for both semantic and sentiment-based tasks. By introducing Trajectory Softmax, we provide a computationally efficient path for models to leverage high-dimensional external data, moving beyond the limitations of local-context-only learning.

Summary updated

BibTeX
@misc{song2017learning,
  author = {Yan Song and Chia-Jung Lee and Fei Xia},
  title = {{Learning Word Representations with Regularization from Prior Knowledge}},
  year = {2017},
  doi = {10.18653/v1/k17-1016},
}
Figure