Abstract
Traditional word embedding models like Word2Vec and GloVe struggle with Out-Of-Vocabulary (OOV) words, which appear rarely in training corpora. This paper introduces the Hierarchical Context Encoder (HiCE), a novel framework that treats OOV embedding as a few-shot regression task. By leveraging hierarchical self-attention and Model-Agnostic Meta-Learning (MAML), HiCE generates high-quality representations from minimal context and sub-word information.
Introduction: The OOV Challenge
Standard NLP models rely on the distributional hypothesis, requiring hundreds of occurrences to learn stable word vectors. However, language is dynamic; new terms, slang, and technical jargon emerge constantly. Existing OOV solutions typically rely on morphology (sub-word units) or simple context averaging. Morphology fails for unique entities, while averaging often introduces noise. HiCE addresses this by learning to predict an "oracle" embedding—the representation a word would have if it were frequent—using only 2 to 6 context sentences.
Methods: Hierarchical Context Encoding
The authors frame OOV learning as a few-shot regression problem. The goal is to train a function that maps $K$ observations of a word to its pre-trained "oracle" vector.
The HiCE Architecture
The model employs a multi-level approach to capture both local and global semantics:
- Context Encoder: Processes individual sentences using position-wise and multi-head self-attention to identify the most relevant words surrounding the OOV term.
- Multi-Context Aggregator: A higher-level self-attention layer that weighs information across different sentences, prioritizing informative contexts over generic ones.
- Morphological Integration: A character-level CNN extracts sub-word features, providing a robust prior for words with recognizable roots or suffixes.
Meta-Learning with MAML
To ensure the model generalizes across different domains (e.g., from Wikipedia to Twitter), the researchers integrated Model-Agnostic Meta-Learning (MAML). Instead of optimizing for a single task, MAML optimizes the model's parameters so they can be rapidly adapted to new linguistic distributions with minimal fine-tuning. This prevents overfitting in small-data regimes and bridges the semantic gap between training and testing corpora.
Experimental Setup
The model was trained on WikiText-103, using frequent word embeddings as ground-truth labels. Evaluation was conducted across several benchmarks:
- Intrinsic: The Chimera benchmark (2, 4, and 6-shot settings).
- Extrinsic: Rare-NER (unusual entities), Bio-NER (technical terms), and Twitter POS tagging.
Key Results
HiCE demonstrated significant improvements over state-of-the-art baselines like à la carte and nonce2vec.
Quantitative Performance
On the Chimera intrinsic benchmark, the full HiCE model (including morphology and MAML) achieved a 9.3% improvement in Spearman correlation for the 6-shot setting compared to previous state-of-the-art methods.
Downstream Impact
In extrinsic tasks, the model's superior embeddings led to a 12.4% relative improvement in Rare-NER. This confirms that more accurate OOV representations directly enhance the performance of complex downstream applications like entity extraction and part-of-speech tagging.
Discussion and Insights
The primary innovation of HiCE lies in its use of hierarchical attention over simple averaging. By learning which sentences and words are most diagnostic of a word's meaning, the model produces "sharper" vectors. Furthermore, treating common word embeddings as "oracle" proxies allows for a supervised approach to what was previously an unsupervised problem.
Limitations
Despite its success, HiCE introduces higher computational overhead due to its attention mechanisms compared to linear models. Additionally, the model's performance is inherently bounded by the quality of the pre-trained oracle embeddings it seeks to emulate.
Conclusion
HiCE represents a significant step forward in handling the "long tail" of language. By combining hierarchical encoders with meta-learning, it provides a robust framework for learning meaningful representations of rare words from minimal data. Future work may involve integrating these hierarchical structures into large-scale contextualized models like BERT.
Summary updated