THIRAWAT-BioLORD / README.md
na399's picture
Update README.md
3e2176a verified
|
Raw History Blame Contribute Delete
8.08 kB
---
base_model: FremyCompany/BioLORD-2023
pipeline_tag: sentence-similarity
---
# THIRAWAT-BioLORD
**THIRAWAT-BioLORD** is a fine-tuned ColBERTv1-style late-interaction reranker for drug terminology mapping to standardized OMOP Drug concepts, especially RxNorm and RxNorm Extension.
THIRAWAT stands for **Terminology Harmonization using Late-Interaction Reranker With Alignment-tuned Transformers**. This model is designed to rerank candidate drug concepts generated by a first-stage retriever, not to perform full terminology mapping by itself.
This checkpoint is initialized from **BioLORD-2023**, a biomedical sentence embedding model trained to produce semantic representations for clinical sentences and biomedical concepts using definitions, biomedical knowledge graph information, and LLM-generated clinical terminology definitions.
It is best used through **THIRAWAT Mapper**:
https://github.com/sidataplus/THIRAWAT-mapper
## Evaluation Summary
THIRAWAT-BioLORD was evaluated as part of the full **THIRAWAT Mapper** pipeline. In plain terms:
* **Hits@1** means the correct mapping was ranked **first**.
* **Hits@3** means the correct mapping appeared in the **top 3 suggestions**, which is useful for human review.
Across the evaluated datasets, the full BioLORD-based pipeline ranked the correct drug concept first in **82.0%–85.8%** of cases, and placed it within the top 3 in **87.1%–93.4%** of cases.
The table below compares the full SapBERT-based and BioLORD-based THIRAWAT Mapper pipelines using reranking plus deterministic tie-breaking.
| Dataset | Pipeline / Reranker | Correct at #1 | Correct in top 3 | Difference vs THIRAWAT-SapBERT at #1 | Difference vs THIRAWAT-SapBERT top 3 |
| -------------------------- | ------------------- | ------------: | ---------------: | -----------------------------------: | -----------------------------------: |
| Branded Drugs | THIRAWAT-SapBERT | 94.2% | 96.4% | baseline | baseline |
| Branded Drugs | THIRAWAT-BioLORD | 82.0% | 87.1% | -12.2 pp | -9.3 pp |
| Clinical Drugs | THIRAWAT-SapBERT | 85.9% | 93.0% | baseline | baseline |
| Clinical Drugs | THIRAWAT-BioLORD | 85.2% | 92.3% | -0.7 pp | -0.7 pp |
| Thai Medicines Terminology | THIRAWAT-SapBERT | 86.8% | 95.4% | baseline | baseline |
| Thai Medicines Terminology | THIRAWAT-BioLORD | 85.8% | 93.4% | -1.0 pp | -2.0 pp |
These are **full-pipeline results**, not standalone checkpoint-only results. The BioLORD-based pipeline used BioLORD-2023 retrieval, THIRAWAT-BioLORD reranking with BiMaxSim, and deterministic tie-breaking. The deterministic tie-breaker is implemented in THIRAWAT Mapper, not inside this Hugging Face model checkpoint.
In this evaluation, THIRAWAT-SapBERT was stronger overall, especially for Branded Drugs. THIRAWAT-BioLORD remained competitive on Clinical Drugs and Thai Medicines Terminology, where the gap at Hits@1 was approximately 1 percentage point or less.
## Paper
This model is described in:
**Efficient Drug Terminology Mapping with Bidirectional Late-Interaction Reranking and Deterministic Reordering**
Healthcare Informatics Research, 2026;32(2):156–165
DOI: https://doi.org/10.4258/hir.2026.32.2.156
Please cite the paper if you use this model or THIRAWAT Mapper.
## Intended Use
Use this model for reranking candidate OMOP/RxNorm drug concepts in medication terminology mapping workflows.
Typical pipeline:
1. Retrieve candidate concepts with BioLORD-2023 or another biomedical retriever.
2. Rerank candidates with THIRAWAT-BioLORD.
3. Score late-interaction matches with inference-time **BiMaxSim**.
4. Apply deterministic tie-breaking for near-ties using drug-specific cues such as strength, dosage form/route, release characteristics, and brand annotations.
5. Review the final mappings before production use.
This model is intended for terminology mapping and mapping assistance. It is not a prescribing tool, medication safety checker, or standalone clinical decision support model.
## Example: THIRAWAT Mapper CLI
```bash
pip install thirawat-mapper
```
Interactive query:
```bash
thirawat infer query \
--db data/lancedb/db \
--table concepts_drug \
--device auto \
--reranker-id sidataplus/THIRAWAT-BioLORD
```
Bulk mapping:
```bash
thirawat infer bulk \
--db data/lancedb/db \
--table concepts_drug \
--input data/usagi.csv \
--out runs/mapping \
--candidate-topk 200 \
--n-limit 20 \
--device auto \
--reranker-id sidataplus/THIRAWAT-BioLORD
```
## Model Details
* **Base model:** `FremyCompany/BioLORD-2023`
* **Architecture:** ColBERTv1-style late-interaction reranker
* **Model type:** PyLate ColBERT model
* **Training objective:** one-sided MaxSim
* **Recommended inference scoring:** BiMaxSim
* **Projection dimension:** 128
* **Max query length:** 96 tokens
* **Max candidate length:** 96 tokens
* **Primary domain:** OMOP Drug mapping to RxNorm / RxNorm Extension
## Relationship to THIRAWAT-SapBERT
THIRAWAT-BioLORD and THIRAWAT-SapBERT use the same THIRAWAT late-interaction reranking approach, but start from different biomedical encoders.
* **THIRAWAT-SapBERT** is initialized from SapBERT-XLMR, which is optimized for biomedical entity linking and synonym alignment.
* **THIRAWAT-BioLORD** is initialized from BioLORD-2023, which emphasizes biomedical semantic similarity grounded in definitions and knowledge graph descriptions.
In the reported drug-mapping evaluation, THIRAWAT-SapBERT achieved the strongest overall full-pipeline results. THIRAWAT-BioLORD is provided as an alternative checkpoint with a different biomedical representation bias and may be useful for comparison, ablation, or deployment settings where BioLORD-style semantic representations are preferred.
## Limitations
* Evaluated primarily for drug terminology mapping.
* Not yet validated for other OMOP domains such as Condition, Procedure, Measurement, or Observation.
* Performance depends on the target vocabulary and ATHENA/RxNorm coverage.
* BioLORD-based retrieval showed lower retriever-only performance than SapBERT-XLMR in the reported drug-mapping setting, although reranking and deterministic tie-breaking substantially narrowed the gap.
* Local brands may be mapped to generic ingredient-strength-form concepts when no corresponding branded target exists.
* Remaining errors often involve clinically close candidates, such as strength, form, release, combination-product, or brand-coverage mismatches.
* Automated mappings should be reviewed before use in production OMOP ETL or research workflows.
## Citation
```bibtex
@article{adulyanukosol2026thirawat,
title = {Efficient Drug Terminology Mapping with Bidirectional Late-Interaction Reranking and Deterministic Reordering},
author = {Adulyanukosol, Natthawut and Chaisutyakorn, Krittaphas and Sombutjaroan, Saknarong and Kanjanapong, Suchanan and Suriyaphol, Prapat},
journal = {Healthcare Informatics Research},
year = {2026},
volume = {32},
number = {2},
pages = {156--165},
doi = {10.4258/hir.2026.32.2.156}
}
```
If you use the BioLORD-2023 base model directly, please also cite the original BioLORD-2023 paper.
```bibtex
@article{remy2024biolord,
title = {BioLORD-2023: semantic textual representations fusing large language models and clinical knowledge graph insights},
author = {Remy, François and Demuynck, Kris and Demeester, Thomas},
journal = {Journal of the American Medical Informatics Association},
year = {2024},
volume = {31},
number = {9},
pages = {1844--1855},
doi = {10.1093/jamia/ocae029}
}
```