Medical Specialty Prediction from Bangla Patient Narratives: A Comparative Study of ML, DL, Transformers, and LLMs

Tasnin Tabassum Ali, Faisal Ahmed, Muhammad Anwarul AzimarXiv 2026

TL;DR

In the race to automate medical triage for Bangla-speaking patients, bigger isn't always significantly better. While Large Language Models (LLMs) like Gemini take the crown for raw accuracy, this study reveals that a well-tuned, "old-school" Support Vector Machine (SVM) is statistically indistinguishable from state-of-the-art Transformers, offering a high-performance, low-cost alternative for resource-constrained healthcare settings.

What Problem Does This Paper Address?

Imagine you’re feeling unwell in rural Bangladesh. You don’t describe your symptoms using clinical terms like "dyspepsia" or "dermatitis"; you use colloquial, informal Bangla. Because the healthcare system is often bottlenecked at the reception desk, patients frequently end up in the wrong specialist's queue, wasting precious clinical time.

The authors tackle this "triage gap" by testing how well different generations of Natural Language Processing (NLP) can predict the correct medical specialty (e.g., Pediatrics vs. Gastroenterology) from these informal patient narratives. The real question isn't just "who wins?" but "does the added complexity of modern models actually pay off in a low-resource language like Bangla?"

Methods

The researchers set up a four-way "Battle of the Generations," testing 19 different models on the exact same data:

  1. Classical Machine Learning (ML): Six models (like SVM and Random Forest) using TF-IDF, a method that looks at word and character frequencies.
  2. Deep Learning (DL): Four recurrent models (like Bi-LSTM and Bi-GRU) using Word2Vec embeddings—essentially teaching the model the "meaning" of words based on their neighbors in the text.
  3. Transformers: Four heavy hitters (like BanglaBERT and XLM-RoBERTa) that were fine-tuned specifically on this task. These models use "attention" to understand long-range context in a sentence.
  4. Large Language Models (LLMs): Five models (including ChatGPT, Gemini, and Claude) evaluated zero-shot. This means the models were given the symptoms and a list of specialties and asked to choose, without any specific training on this dataset.

The workflow is neatly summarized in their experimental pipeline:

Figure 1. Overall workflow of Bangla medical specialty prediction; all models are then evaluated with accuracy, macro-F1, 95% CIs, and Holm-corrected McNemar tests.

Datasets

The study used a corpus of 3,798 Bangla patient narratives collected from field interviews and online forums. To ensure the models had enough data to learn, they focused on the five most common specialties:

  • Medicine
  • Gynecology
  • Dermatology
  • Pediatrics
  • Gastroenterology

This left them with 2,730 records, split 80/20 into a training set and a "frozen" test set of 546 records used to benchmark every single model.

Key Insights and Ideas

  • The "Accuracy Trap": If you just look at the leaderboard, LLMs win. But the authors performed Holm-corrected McNemar tests—a rigorous way to see if the difference in errors between two models is actually meaningful or just luck.
  • The Scrappy Underdog: A tuned SVM (Classical ML) performed so well (84.98% accuracy) that it was statistically tied with the best Transformer (86.26%). For a developer, this is huge: an SVM runs on a potato, while a Transformer needs a GPU.
  • Medicine is the "Catch-all": The "Medicine" specialty was the hardest to predict. Why? Because it acts as a linguistic bucket for non-specific complaints that overlap with other specialties.
  • LLMs are Surprisingly Robust: Even without seeing a single training example from this specific Bangla dataset, LLMs outperformed models that were explicitly trained on it. This suggests their internal "understanding" of medical concepts transcends language barriers.

Key Results

The raw numbers show a clear hierarchy in performance, but a much tighter race in reality:

  • Top Performer: Gemini (LLM) hit 90.29% accuracy.
  • Best Transformer: XLM-RoBERTa reached 86.26%.
  • Best Classical ML: SVM achieved 84.98%.
  • Best Deep Learning: Bi-GRU trailed at 80.77%.

You can see the full breakdown of the "leaderboard" here:

Table 2. Full results for all 19 models on the 546 test rows (values in %; Acc. = accuracy, Prec. = macro

The most critical finding, however, is in the statistical significance testing. As shown below, while SVM significantly beat the older Bi-LSTM, the gaps between SVM, Transformers, and even some LLMs were not statistically significant after adjusting for multiple comparisons.

Table 3. Paired McNemar's test on key model pairs (n = 546). a = rows only model 1 classifies correctly;

Limitations and Future Work

The authors are refreshingly honest about the hurdles:

  • Data Scope: The study only covers five specialties from one region. Real-world triage is much messier.
  • Ethics: The narratives were de-identified, but the authors note that formal institutional ethics approval wasn't obtained for the original data collection—a common challenge in secondary research.
  • LLM Volatility: Since LLMs are updated behind the scenes by providers (like Google or OpenAI), these results are a "snapshot in time" and might change as the models evolve.

Future work aims to expand the specialty list and use k-fold cross-validation to ensure these results hold up across different slices of the data. For now, the takeaway is clear: in the world of Bangla medical NLP, you don't always need a sledgehammer to crack a nut.

Summary updated

Abstract

Timely access to appropriate medical specialists remains a bottleneck in Bangladesh's healthcare system, as patients describe symptoms in informal Bangla rather than clinical terms, leading to ineffective referrals. This paper compares four model families for predicting medical specialties from Bangla patient narratives: six machine learning (ML) models using hybrid TF-IDF features, four deep learning (DL) models using Word2Vec embeddings trained on the corpus, four fine-tuned transformers, and five large language models (LLMs) evaluated zero-shot. From a corpus of 3798 patient records covering 20 specialties, we retained the five with the most records (Medicine, Gynecology, Dermatology, Pediatrics, Gastroenterology) and split the resulting 2730 records 80:20 into training and test sets shared by all families. The best transformer was XLM-RoBERTa (86.26% accuracy, 86.21% macro-F1), the best ML model was SVM (84.98%, 84.92%), the best DL model was Bidirectional GRU (80.77%, 80.83%), and the best LLM was Gemini (90.29%, 90.15%). Holm-corrected paired McNemar tests show SVM significantly outperforming Bi-LSTM (adjusted p = 0.004), whereas the Gemini-versus-Grok gap does not survive correction (adjusted p = 0.104), and neither the strongest transformer versus the weakest LLM (Grok) nor SVM versus the strongest transformer reaches significance. A tuned classical model is thus statistically indistinguishable from the strongest transformer, so accuracy rankings alone should not be read as evidence of one family's superiority. The findings provide a comparative baseline for Bangla medical text classification.
BibTeX
@misc{ali2026medical,
  author = {Tasnin Tabassum Ali and Faisal Ahmed and Muhammad Anwarul Azim},
  title = {{Medical Specialty Prediction from Bangla Patient Narratives: A Comparative Study of ML, DL, Transformers, and LLMs}},
  year = {2026},
  eprint = {2611.29151},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.29151},
}
Figure