Understanding Stability of Medical Concept Embeddings: Analysis and Prediction

Grace E. Lee, Aixin SunarXiv 2019 · arXiv

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:

  1. cui2vec: Incorporates both medical concepts and standard words.
  2. 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.

Stability vs. Frequency for all concepts (ρ=0.189).

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.

Stability comparisons across models and concept subsets.

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

Abstract

Frequency is one of the major factors for training quality word embeddings. Several work has recently discussed the stability of word embeddings in general domain and suggested factors influencing the stability. In this work, we conduct a detailed analysis on the stability of concept embeddings in medical domain, particularly the relation with concept frequency. The analysis reveals the surprising high stability of low-frequency concepts: low-frequency (<100) concepts have the same high stability as high-frequency (>1000) concepts. To develop a deeper understanding of this finding, we propose a new factor, the noisiness of context words, which influences the stability of medical concept embeddings, regardless of frequency. We evaluate the proposed factor by showing the linear correlation with the stability of medical concept embeddings. The correlations are clear and consistent with various groups of medical concepts. Based on the linear relations, we make suggestions on ways to adjust the noisiness of context words for the improvement of stability. Finally, we demonstrate that the proposed factor extends to the word embedding stability in general domain.
BibTeX
@misc{lee2019understanding,
  author = {Grace E. Lee and Aixin Sun},
  title = {{Understanding Stability of Medical Concept Embeddings: Analysis and Prediction}},
  year = {2019},
  eprint = {1904.09552},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1904.09552},
}
Figure