Abstract
This study provides a systematic investigation into how different definitions of "context"—specifically linear windows versus dependency-based syntax—and their representations ("bound" vs. "unbound") affect the performance of word embeddings. We demonstrate that the choice of context representation often matters more than the context type itself. Our findings reveal that the optimal embedding configuration is highly dependent on the nature of the downstream task, specifically whether it requires functional similarity, topical relatedness, or structural information.
Introduction
Most popular word embedding models, such as word2vec and GloVe, rely on the Distributional Hypothesis, which posits that words appearing in similar contexts share similar meanings. Traditionally, "context" is defined as a simple linear sliding window of words surrounding a target. However, researchers have long suspected that this linear approach is a blunt instrument. While dependency-based (syntactic) contexts have been proposed as an alternative, a rigorous comparison across different architectures (Skip-Gram, CBOW, and GloVe) and representation methods has been missing. This paper addresses this gap by evaluating how specific syntactic relationships and word positions impact performance across various NLP tasks.
Methodology
We generalized three major models—Continuous Skip-Gram (CSG), Continuous Bag-of-Words (CBOW), and GloVe—to accept arbitrary context types using the word2vecPM toolkit. Our investigation focused on two primary variables:
- Context Type:
- Linear: Words within a fixed distance (window) of the target.
- DEPS (Dependency-based): Words connected to the target in a dependency parse tree.
- Context Representation:
- Unbound: The context is the word itself (e.g., "scientist").
- Bound: The context word is "bound" to its relative position or syntactic role (e.g., "scientist/-1" or "scientist/nsubj").
Models were trained on an English Wikipedia corpus and evaluated across a suite of intrinsic (similarity/analogy) and extrinsic (sequence labeling/classification) tasks.
Key Insights and Results
Our results highlight significant performance differences based on context configuration.
Functional vs. Topical Similarity
A key insight is the distinction between topical relatedness and functional similarity. Linear contexts tend to capture topical associations (e.g., tiger and jungle). Conversely, DEPS contexts excel at capturing functional similarity (e.g., tiger and cat), but this advantage is only realized when using "bound" representations.
As illustrated in Figure 4, bound DEPS representations generally yield the highest scores for functional similarity. For example, on the WordSim353 (Similarity) task, Skip-Gram with bound DEPS reached a correlation of 0.792, compared to 0.757 for the standard unbound linear context.
Sequence Labeling and Classification
For sequence labeling tasks such as Named Entity Recognition (NER), bound representations are essential. The inclusion of structural information allows models to better capture syntactic patterns; for instance, GloVe's NER performance improved from 70.8 (unbound linear) to 74.8 (bound linear). However, for general text classification, the simplest model—unbound linear context—remains the most effective, as syntactic complexity can act as noise in broader semantic tasks.
Conclusion
This research demonstrates that there is no "one-size-fits-all" word embedding. While syntactic information and bound representations improve performance in functional and structural tasks, they introduce computational overhead and data sparsity. The choice of context definition should be carefully aligned with the specific requirements of the target NLP application.
Summary updated