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.
Experiment contract: One record enters and ranked identifiers leave
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
| Model | Encoder | MeSH representation | Comparison |
|---|---|---|---|
| A | MiniLM | Descriptor text | Lightweight baseline |
| B | SapBERT | Descriptor text | Biomedical synonyms |
| C | PubMedBERT | Descriptor text | Larger biomedical model |
| D | MiniLM | Learned ID vectors | Identifier memory |
| E | SapBERT | Learned ID vectors | Synonyms 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
| Model | Training representation | Production index | Cost |
|---|---|---|---|
| MiniLM | Shared 384-dimensional normalized vectors | Precomputed descriptor vectors | Lightest transformer baseline |
| SapBERT | Shared biomedical synonym vectors | Precomputed SapBERT descriptor vectors | Biomedical specialization |
| PubMedBERT | Pooled 768-dimensional token states | Precomputed descriptor vectors | Higher 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
| Measure | Contract |
|---|---|
| Exact top-one | First identifier matches any held-out label |
| Recall at five | Held-out labels recovered in the first five |
| Reciprocal rank | Position of the first correct identifier |
| Latency and size | Production cost per record and stored model |
| GPU training time | Resource cost for each independent experiment |