Clinical Text to Exact MeSH: Five Independent Embedding Models

Five complete models map identical clinical records to ranked exact MeSH identifiers.

RI.MV.004·Maintained reference·Revised 2026-08-06

Five independent experiments map clinical record text to ranked exact MeSH identifiers. Each model performs the complete task alone. Every experiment uses the same records, labels, candidates, and unseen evaluation set.

5 independent models
1 shared evaluation set
384 MiniLM dimensions

Experiment contract: One record enters and ranked identifiers leave

title + abstract or study description → one complete model → candidate similarities → ranked exact MeSH identifiers

Each model uses an encoder, a program that turns text into a list of numbers so that similar meanings sit close together. MiniLM is a small general-purpose encoder. SapBERT and PubMedBERT are larger encoders trained on biomedical text, so they recognize medical synonyms and terms more reliably.

Model register: Shared encoders and learned identifier vectors

ModelEncoderMeSH representationComparison
AMiniLMDescriptor textLightweight baseline
BSapBERTDescriptor textBiomedical synonyms
CPubMedBERTDescriptor textLarger biomedical model
DMiniLMLearned ID vectorsIdentifier memory
ESapBERTLearned ID vectorsSynonyms plus ID memory

Comparison rule: Change one model and preserve the evaluation

  • Use identical train, validation, and test splits.
  • Measure exact top-one accuracy and ranked recall at identical cutoffs.
  • Report model size, inference time, and vocabulary retrieval cost.
  • Treat models as separate experiments, not sequential pipeline stages.

Shared encoders: Clinical and vocabulary text use comparable vectors

ModelTraining representationProduction indexCost
MiniLMShared 384-dimensional normalized vectorsPrecomputed descriptor vectorsLightest transformer baseline
SapBERTShared biomedical synonym vectorsPrecomputed SapBERT descriptor vectorsBiomedical specialization
PubMedBERTPooled 768-dimensional token statesPrecomputed descriptor vectorsHigher memory and context capacity

Clinical text uses the title and abstract, summary, or study description. Vocabulary text uses the preferred name, synonyms, and scope note. Correct pairs move together while hard negatives move apart.

Learned identifier tables: Exact IDs own trainable vectors

Training signals: Multi-positive labels and difficult negatives

  • Every assigned identifier is a positive for its record.
  • Shared encoders use multi-positive contrastive training.
  • Identifier tables use sampled-softmax or equivalent multi-label loss.
  • High-ranking incorrect candidates supply difficult negatives.

Evaluation: Full vocabulary and fixed candidate reranking

MeasureContract
Exact top-oneFirst identifier matches any held-out label
Recall at fiveHeld-out labels recovered in the first five
Reciprocal rankPosition of the first correct identifier
Latency and sizeProduction cost per record and stored model
GPU training timeResource cost for each independent experiment