[Paper Review] Enhancing the LexVec Distributed Word Representation Model Using Positional Contexts and External Memory
This paper enhances the LexVec word embedding model by integrating positional contexts to improve syntactic analogy performance and using external memory to eliminate the need to store the PPMI matrix in main memory. The proposed method achieves state-of-the-art results on syntactic analogy tasks and effectively approximates standard training using external memory, enabling scalable training on large corpora.
In this paper we take a state-of-the-art model for distributed word representation that explicitly factorizes the positive pointwise mutual information (PPMI) matrix using window sampling and negative sampling and address two of its shortcomings. We improve syntactic performance by using positional contexts, and solve the need to store the PPMI matrix in memory by working on aggregate data in external memory. The effectiveness of both modifications is shown using word similarity and analogy tasks.
Motivation & Objective
- Improve LexVec's performance on syntactic analogy tasks by incorporating positional contexts that capture word order relative to targets.
- Address the memory bottleneck in LexVec by enabling training using external memory instead of main memory.
- Demonstrate that external memory implementations can closely approximate standard LexVec training while supporting web-scale corpus processing.
- Evaluate the enhanced model on standard word similarity and analogy benchmarks to validate improvements.
- Enable future training on large-scale corpora by decoupling PPMI matrix access from main memory through aggregate data processing.
Proposed method
- Introduce positional contexts by extending the context representation to include word position relative to the target word, increasing context embedding dimensions to $2 \times \text{win} \times |V| \times d$.
- Modify negative sampling to draw from a distribution based on context frequency $P_n(c^i) \propto M_{*c^i}^\alpha$, where $\alpha = 0.75$, to maintain consistency with the original WSNS objective.
- Aggregate context vectors into a single positional context embedding $\tilde{W}^{\text{pos}}$ for each word to enable compatibility with word embeddings $W$.
- Implement two variants of external memory: SI (streaming order) and MI (manually shuffled order), to approximate window sampling and negative sampling without random access to the PPMI matrix.
- Use stochastic gradient descent to minimize the combined loss function $L = \sum_{(w,c)} \#(w,c)L_{wc} + \sum_w \#(w)L_w$, where $L_{wc}$ and $L_w$ are defined using PPMI and negative sampling.
- Apply context distribution smoothing by exponentiating context frequencies to the power 0.75, as recommended in prior work, to improve stability and performance.
Experimental results
Research questions
- RQ1Can incorporating positional contexts into LexVec significantly improve performance on syntactic analogy tasks?
- RQ2Does using external memory to store aggregate data instead of the full PPMI matrix provide a viable approximation to standard LexVec training?
- RQ3How does the ordering of word-context pairs in external memory implementations affect model performance compared to standard training?
- RQ4Can the enhanced LexVec model achieve state-of-the-art performance on both word similarity and syntactic analogy benchmarks?
- RQ5To what extent does the SI variant of external memory preserve the training dynamics of standard LexVec?
Key findings
- The use of positional contexts significantly improved LexVec’s performance on syntactic analogy tasks, achieving the highest accuracy on the Google Syntactic (GSyn) dataset.
- LexVec with positional contexts outperformed both GloVe and SGNS on the GSyn benchmark, demonstrating state-of-the-art performance for syntactic analogies.
- The SI variant of the external memory implementation closely approximated standard LexVec training, with minimal performance gap, indicating effective loss function approximation.
- The MI variant showed a larger performance gap than SI, suggesting that preserving the corpus’s natural ordering during training is crucial for optimal performance.
- In word similarity tasks, combining word and context embeddings ($W + \tilde{W}^{\text{pos}}$) yielded marginally better results than using $W$ alone, though $W$ alone performed best on syntactic analogies.
- The results confirm that positional contexts are effective for capturing syntactic dependencies, and that external memory enables scalable training without sacrificing model quality.
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.