Abstract
Word embeddings are foundational to medical Natural Language Processing (NLP) but suffer from instability—nearest neighbors can change across training runs due to stochastic initialization. This study investigates the drivers of stability, challenging the assumption that frequency is the primary factor. We find that context noisiness, measured via normalized entropy, is a significantly stronger predictor of embedding stability than raw frequency.
Introduction
In medical NLP, word embeddings serve as mathematical representations of semantic meaning. However, these representations often suffer from instability: training the same model on the same data with different random seeds can result in different "nearest neighbors" for a given term. In medical applications—where embeddings assist in document filtering and clinical diagnosis—this inconsistency poses a significant reliability risk.
Methodology
The study evaluates the stability of Skip-gram with Negative Sampling (SGNS) embeddings using two medical variants:
- cui2vec: Incorporates both medical concepts and standard words.
- NLM (Neural Language Model): Trains exclusively on sequences of medical concepts.
Stability is quantified as the percentage of overlapping top-10 nearest neighbors across three independent training runs. To investigate the causes of instability, the authors introduce Normalized Entropy to measure "context noisiness." This metric assesses whether a concept appears in consistent contexts (low entropy) or a broad, random array of neighbors (high entropy), independent of raw frequency.
The Frequency Fallacy
A common assumption in NLP is that higher frequency leads to more stable embeddings. However, medical data follows a "long-tail" distribution where most concepts are rare.
As shown in the analysis of all concepts in Figure 2, the Pearson correlation between frequency and stability is remarkably low (ρ ≈ 0.189). This indicates that frequency alone does not guarantee stability. For instance, the concept Anaesthesia procedure (frequency: 10,377) and Knee joint operation (frequency: 32) both exhibit high stability scores (0.8), despite the vast difference in data volume.
Context Noisiness as a Predictor
The research identifies "context noisiness" as a much stronger predictor of stability. The proposed entropy metric showed a strong negative correlation with stability (ρ = -0.593 for cui2vec). When a concept's context is "clean" and coherent, the embedding vector is pulled in a consistent direction during training, leading to high stability even for rare terms.
Comparative analysis in Figure 6 across different model architectures and concept subsets confirms that while low-frequency concepts show slightly higher correlations with frequency than the full set, the overall relationship remains weak. Coherence of usage consistently outweighs raw quantity in determining embedding reliability.
Conclusion
This paper demonstrates that embedding stability is driven more by the consistency of a concept's context than by its frequency. These findings suggest that future efforts to stabilize medical embeddings should focus on "smoothing" context through hierarchical knowledge bases (like UMLS) or document clustering rather than simply seeking more data. While this study focused on static embeddings, the principles of context noisiness likely extend to modern contextual models like BioBERT.
Summary updated