Abstract
Traditional distributional semantic models (DSMs) like Word2Vec and GloVe require hundreds of occurrences of a word to learn stable vector representations. This data-hungry nature makes them unsuitable for representing rare words or learning new vocabulary from limited context—a task humans perform effortlessly through "fast mapping." We introduce Mem2Vec, a memory-augmented neural network that utilizes a long-term memory of semantic prototypes to enable few-shot word representation learning. Mem2Vec operates in two phases: knowledge accumulation from a large corpus and fast adaptation to novel words. Our experiments on the Nonce Definition and Chimera tasks, as well as downstream applications in medical NER and sentiment analysis, show that Mem2Vec significantly outperforms traditional models in low-data regimes.
Introduction
The "long tail" of language, described by Zipf’s Law, ensures that the majority of words in any natural language corpus appear infrequently. Standard DSMs fail to accurately represent these rare words, leading to poor performance in specialized domains or when encountering novel terminology. In contrast, humans can infer the meaning of a word from a single informative sentence. This cognitive ability is often explained by Hypothesis Constraint (HC) theory, which posits that prior knowledge narrows the search space for a new word's meaning.
Methodology: The Mem2Vec Architecture
Mem2Vec implements a memory-based approach to mimic this human capability. The model consists of two primary stages:
1. Knowledge Accumulation
During this phase, the model is trained on a large-scale general corpus (e.g., Wikipedia). It populates a non-parametric key-value memory $M$. The keys ($K$) represent context embeddings, while the values ($V$) store target word embeddings. By clustering similar contexts into memory slots, the model builds a library of "semantic situations" or prototypes.
2. Fast Adaptation
When a novel word is encountered in a sparse context, Mem2Vec does not attempt to learn a representation from scratch. Instead, it uses the new context to query the long-term memory. It retrieves the most relevant prototypes (Top-k) and performs a weighted average, blending them with the current context to form a high-quality "educated guess" for the target embedding.
Experimental Evaluation
The authors evaluated Mem2Vec on several challenging few-shot tasks designed to test its ability to learn from minimal data.
Intrinsic Tasks
- Nonce Definition Task: The model must learn a word's meaning from a single Wikipedia-style definition.
- Chimera Task: The model learns a word from a small set (2, 4, or 6) of casual sentences.
Extrinsic Tasks
To test real-world utility, Mem2Vec was applied to:
- Domain-Specific NER: Named Entity Recognition in medical datasets (BioNLP11, AnatEM, NCBI-disease) where entities are frequently rare.
- Cross-Domain Sentiment Classification: Testing robustness to domain shifts using the Amazon Review dataset.
Results and Discussion
Mem2Vec demonstrated a dramatic improvement over frequency-based baselines. On the Nonce Definition task, it achieved a Median Rank of 518 out of over 210,000 candidates, whereas Word2Vec and GloVe failed completely (median ranks > 100,000).
Key findings include:
- Memory as a Prior: The memory effectively acts as a constraint, preventing the model from making wild guesses in the absence of data.
- Softmax Temperature: Higher temperatures during retrieval allowed for a "softer" attention over prototypes, improving the blending of related semantic concepts.
- Robustness to Domain Shift: By transferring general-domain knowledge via prototypes, Mem2Vec outperformed baselines in 10 out of 12 cross-domain sentiment pairs.
Conclusion
Mem2Vec provides a cognitively-inspired framework for addressing the data-sparsity problem in word representation learning. By treating memory as a prior, the model bridges the gap between large-scale distributional learning and few-shot adaptation. Future work will focus on more sophisticated prototype compression and integrating this approach into a unified architecture for both frequent and rare words.
Summary updated