Towards User Friendly Medication Mapping Using Entity-Boosted Two-Tower Neural Network

Shaoqing Yuan, Parminder Bhatia, Busra Celikkaya, Haiyang Liu, Kyunghwan ChoiarXiv 2020 · arXiv

Introduction: Bridging the Linguistic Gap in Telemedicine

In the rapidly evolving landscape of telemedicine and voice-activated health assistants, a significant barrier remains: the linguistic disconnect between patients and clinical terminology. Patients often struggle to recall or pronounce complex generic medication names like "Mycophenolate Mofetil Hydrochloride." Instead, they rely on descriptive medication phrases (DMPs) based on the drug's purpose (e.g., "my immune system meds") or physical characteristics.

Standard Medical Concept Normalization (MCN) typically maps mentions to vast, static ontologies. However, for chronic patients managing a specific set of prescriptions, the challenge is more localized: Medication Name Inference. The goal is to accurately rank a patient's known medications based on a noisy, free-form description.

Figure 1: Conversational AI interaction illustrating the mapping of layperson descriptions to standardized medication names.

The Medication Inference Model (MIM) Architecture

To address this, researchers at Amazon developed the Medication Inference Model (MIM). MIM utilizes a Two-Tower Neural Network architecture, a design frequently employed in recommendation systems to compare the similarity of two distinct inputs.

Dual-Tower Encoding

The model consists of two separate Convolutional Neural Network (CNN) encoders. One "tower" processes the user's Descriptive Medication Phrase (DMP), while the second processes the Standardized Medication Name (SMN). By using unshared weights, the model can independently learn the distinct linguistic features of colloquial speech versus formal clinical nomenclature.

Entity-Boosted Hard Attention

A critical innovation in MIM is the integration of AWS Comprehend Medical for entity extraction. Human speech is often verbose and "noisy." Rather than processing the entire raw string, the model uses entity extraction to identify clinically relevant terms—such as diagnoses or organ systems. This acts as a "hard attention" mechanism, filtering out linguistic fluff and forcing the encoders to focus on the most informative tokens.

Figure 2: The MIM architecture featuring two-tower CNNs and entity-boosted attention via AWS Comprehend Medical.

Similarity and Ranking

The model calculates the cosine distance between the resulting vector embeddings of the DMP and SMN. It is trained using a hinge loss function, ensuring that the correct medication match is positioned significantly closer in the latent vector space than incorrect candidates.

Datasets and Evaluation

The study evaluated MIM using two primary data sources:

  1. Synthetic Data: Over 680,000 training instances were generated using 2,683 medication descriptions from the First DataBank (FDB) Patient Education Module.
  2. Real-World Data: To test robustness, the researchers used 251 prescriptions from the i2b2 dataset (de-identified discharge summaries). Human annotators created realistic, messy DMPs for these medications to simulate actual patient interactions.

Key Results: Accuracy and Efficiency

MIM demonstrated superior performance over heavy-weight Transformer-based models like BioBERT and ClinicalBERT, which are often considered the gold standard for medical NLP.

  • Accuracy Gains: MIM achieved a 7% to 9% improvement in top-1 accuracy over BioBERT baselines. On synthetic tests with five candidates, the entity-boosted version reached 76.9% accuracy, a massive jump from the 49.7% achieved without entity filtering.
  • Latency for Real-Time AI: For conversational agents like Alexa, response time is critical. MIM achieved an inference latency of just 10ms, nearly 9x faster than BioBERT's 89ms. This efficiency makes it highly suitable for production-scale, real-time applications.
  • Latent Clustering: Beyond direct mapping, silhouette analysis of the model's latent outputs identified 31 distinct clusters. The model successfully grouped medications by symptoms (e.g., cough/cold) and drug types (e.g., antibiotics) without being explicitly trained on these categories.

Discussion and Future Work

The success of the "hard attention" approach suggests that in specialized domains like medicine, knowing what to ignore is as vital as knowing what to process. By filtering for medical entities, the model overcomes the noise inherent in patient descriptions.

Future research will focus on closing the gap between synthetic and real-world data by validating the model on larger sets of patient-generated speech. Additionally, the team plans to address "one-to-many" mappings, where a single phrase like "my blood pressure meds" might refer to multiple prescriptions in a patient's list.

Summary updated

BibTeX
@misc{yuan2020towards,
  author = {Shaoqing Yuan and Parminder Bhatia and Busra Celikkaya and Haiyang Liu and Kyunghwan Choi},
  title = {{Towards User Friendly Medication Mapping Using Entity-Boosted Two-Tower Neural Network}},
  year = {2020},
  eprint = {2007.00492},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2007.00492},
}
Figure