Bilingual triage risk classifier (Indonesian / English)

Rates a free-text description of a patient's complaint as LOW_RISK, MEDIUM_RISK or HIGH_RISK, in Indonesian or English. It is the model behind the Smart Triage & Hospital Dispatch demo (https://github.com/Maesticc/optimization-healthcare-ai).

Not a medical device. This is a research and portfolio project. It has not been validated clinically and must not be used to make care decisions. Always have a qualified clinician confirm the risk level.

Labels

Label Meaning ESI / KTAS level
HIGH_RISK could be life-threatening now or within the hour 1-2
MEDIUM_RISK needs urgent care within hours, stable now 3
LOW_RISK can safely wait or be seen in primary care 4-5

How it is meant to be used

The model is one part of a system. In the app, a rule-based safety layer runs on top of it: emergency phrases (chest pain, not breathing, stroke signs, anaphylaxis, ...) always give HIGH_RISK, and the case is also raised to HIGH_RISK when the model gives that label at least the probability stored in triage_settings.json (high_alert_threshold, 0.21 for this model). That threshold was chosen on a development split only, as the highest value that still rates at least 90% of emergencies HIGH_RISK in each language.

from transformers import AutoModelForSequenceClassification, AutoTokenizer

repo = "maestic/triage-e5-small-bilingual"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSequenceClassification.from_pretrained(repo)
inputs = tokenizer("Dada saya sakit dan keringat dingin", return_tensors="pt")
probabilities = model(**inputs).logits.softmax(-1)[0]
print({model.config.id2label[i]: round(float(p), 3) for i, p in enumerate(probabilities)})

Training

  • Base model: intfloat/multilingual-e5-small (MIT), fine-tuned for 2 epochs with frozen word embeddings, to keep Indonesian and English aligned.
  • Yale emergency-department visits (Hong et al. 2018): 24,000 visits, 8,000 per risk level, turned from chief-complaint categories into Indonesian and English sentences with the same templates at every level. The raw data is not redistributed here.
  • 300 hand-written stories: 100 complaints, each told as a mild, an urgent and an emergency case in both languages, so the model learns that duration and severity matter and not only the complaint name. Their labels are the author's drafts and have not been reviewed by a clinician.

Evaluation

Bilingual test sets that were never used for training. Numbers are for the model alone / the model with the app's safety rules.

Test set Cases Emergencies rated HIGH (ID / EN) Mild cases rated HIGH (ID / EN)
KTAS test, real ED complaints with expert levels 739 31% / 75% alone, 87% / 90% with rules -
Symptom2Disease test, mild conditions 140 - 12% / 9% alone, 23% / 13% with rules
Hand-written vignettes (draft labels) 60 85% / 90% alone, 100% / 100% with rules -

Same risk level in both languages, KTAS test: 89% with rules. The previous IndoBERT model caught 56% of the KTAS test emergencies with the same rules and rated 29% (Indonesian) and 93% (English) of the mild cases HIGH_RISK.

Limitations

  • The model alone misses many short Indonesian emergency complaints (31% on the KTAS test); it relies on the threshold and the safety rules.
  • KTAS experts also saw vital signs, which the text does not contain, so no text-only model can match their levels exactly.
  • The Indonesian text in the evaluation sets is machine-translated and not yet reviewed; the vignette and story labels are drafts.
  • It rates more urgent cases too low than the previous model in Indonesian: 53 of 180 urgent (KTAS 3) development cases were rated LOW_RISK, against 11 before, while missed emergencies fell from 49 to 11.

Data sources and citation

  • Hong WS, Haimovich AD, Taylor RA (2018). Predicting hospital admission at emergency department triage using machine learning. PLOS ONE 13(7): e0201016. https://doi.org/10.1371/journal.pone.0201016
  • Moon SH, Shim JL, Park KS, Park CS (2019). Triage accuracy and causes of mistriage using the Korean Triage and Acuity Scale. PLOS ONE 14(9): e0216972 (CC BY 4.0), used for evaluation only.
  • Symptom2Disease, Niyar R Barman, Kaggle (CC0), used for evaluation only.
Downloads last month
15
Safetensors
Model size
0.1B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for maestic/triage-e5-small-bilingual

Finetuned
(240)
this model