GastroAGI Logo
OverviewBlogsAbout
Trending TopicsConference
Topics/Artificial Intelligence /Evaluation of NLP Algorithms for Identifying IBD from Clinical Records

Evaluation of NLP Algorithms for Identifying IBD from Clinical Records

Clinical knowledge base curated and reviewed by GastroAGI TeamLast updated October 1, 2025

Quick Answer

The study conducted a comprehensive evaluation of 15 natural language processing (NLP) algorithms to identify patients with inflammatory bowel disease (IBD) from free-text secondary care clinical records. Here are the detailed findings related to the evaluation: ### 1.


The study conducted a comprehensive evaluation of 15 natural language processing (NLP) algorithms to identify patients with inflammatory bowel disease (IBD) from free-text secondary care clinical records. Here are the detailed findings related to the evaluation:

### 1. **Study Objectives**

The primary goal was to compare the performance of various NLP algorithms spanning 50 years of evolution, ranging from traditional rule-based models to advanced transformer-based and large language models (LLMs). The evaluation focused on multiple aspects, including accuracy, fairness, cost-efficiency, explainability, and environmental impact.

---

### 2. **Dataset**

The study utilized a robust dataset of 9311 labeled clinical documents from 1612 patients. This dataset ensured high diversity and statistical power, allowing for reliable model comparisons.

---

### 3. **Algorithm Scope**

The algorithms evaluated included:

  • **Traditional NLP models**: Rule-based regex, TF-IDF, and Bag-of-Words (BoW).
  • **Transformer-based models**: BERT, DistilBERT, sBERT.
  • **Large language models (LLMs)**: DeepSeek, Mistral, Qwen.

---

### 4. **Performance Results**

#### **Top Performer**

  • **DistilBERT_IBD**: Achieved the highest accuracy with a micro F1 score of 93.54%, closely followed by sBERT with a score of 93.05%. However, both models exhibited moderate specificity limitations.

#### **LLM Performance**

  • LLMs like Mistral, Qwen, and DeepSeek performed well without exposure to training data, achieving micro F1 scores between 86.47% and 92.20%. However, they required longer runtimes and higher computational resources.

#### **Traditional Models**

  • Regex and spaCy negation models were fast and cost-effective but had poor specificity, making them unsuitable for precise patient identification.
  • TF-IDF and BoW demonstrated solid baseline performance (~92% F1) but lacked contextual understanding for complex medical text.

#### **Document vs Patient-Level Accuracy**

  • Document-level accuracy was higher compared to patient-level accuracy due to misalignment between document predictions and overall patient diagnoses, which reduced recall and calibration.

---

### 5. **Fairness Findings**

  • All models exhibited biases, particularly against women, wealthier individuals, and patients of African ethnicity.
  • LLMs were more balanced in terms of gender bias but displayed mild age-related bias, overpredicting IBD in older age groups.

---

### 6. **Economic and Environmental Analysis**

#### **Cost Efficiency**

  • Simple models like regex and TF-IDF were the fastest and cheapest, with processing times under 2 minutes and carbon emissions below 2g CO₂.
  • In contrast, the 70B parameter LLM consumed over 33,000g CO₂, highlighting sustainability concerns for large-scale deployment.

#### **Energy Consumption**

  • Transformer-based and LLM models required significantly more energy (up to 163 kWh) compared to traditional machine learning methods.

---

### 7. **Explainability**

  • Explainability tools such as SHAP and LIME were used to analyze model decision-making patterns and detect overfitting.
  • LLMs posed unique challenges for interpretability, requiring the development of new frameworks beyond traditional feature attribution methods.

---

### 8. **Calibration**

  • sBERT-Base demonstrated the best calibration with the lowest Brier scores, indicating reliable probability predictions compared to other models.

---

### 9. **Document Contribution**

  • Clinic letters were found to be the most predictive of IBD, with higher odds ratios (22.69–23.38) compared to endoscopy or pathology reports, reflecting their richer contextual information.

---

### 10. **Clinical Implications**

The study’s findings have significant implications for healthcare:

  • **Transformer-based models** like BERT and DistilBERT offer the best trade-off between accuracy, efficiency, and interpretability, making them ideal for clinical NLP deployment.
  • Open-source availability on platforms like Hugging Face and GitHub allows healthcare institutions to replicate or fine-tune models for their local electronic health record (EHR) systems.

---

### 11. **Future Outlook**

The study predicts that once issues related to cost, performance, and bias are addressed, LLMs will become the standard for clinical data retrieval and patient identification within the next decade.

---

### 12. **Study Strengths**

The study is notable for its:

  • Transparency and open-source code.
  • Multi-metric evaluation encompassing accuracy, fairness, cost, energy consumption, and explainability.
  • Robust dataset and diverse algorithm comparison, making it a benchmark for clinical NLP validation.

---

In summary, the evaluation highlighted the strengths and limitations of different NLP algorithms in identifying IBD from clinical records. While transformer-based models like DistilBERT and sBERT emerged as top performers, challenges such as fairness, environmental impact, and interpretability remain critical areas for improvement.

Related Q&A

AI and U.S. Healthcare Costs: NEJM Catalyst | July 2026

Introduction: Artificial intelligence is rapidly transforming healthcare through drug discovery, clinical decision support, remote monitoring, and administrative automation. While AI is widely expected to reduce healthcare costs, this perspective argues that current payment models and...

Large AI Models and Healthcare: Nature Medicine | June 2026

Introduction: Large frontier AI models such as GPT-5 and Gemini have achieved impressive results across numerous healthcare benchmarks. However, high benchmark scores alone may not reflect real-world clinical reliability. This study systematically evaluated the robustness...

AI Ethics From Silicon Valley to the Vatican: JAMA | July 2026

Introduction: Artificial intelligence is rapidly transforming medicine, but its influence extends far beyond healthcare. This JAMA AI Conversations article explores how AI ethics has become a global societal issue, engaging technology leaders, policymakers, healthcare professionals,...

Physician-Complementing AI in Oncology: The ASCO Post | June 2026

Introduction: Artificial intelligence is rapidly transforming oncology, evolving from image interpretation and pathology analysis to supporting complex clinical decision-making. This perspective argues that AI should enhance the capabilities of oncologists rather than replace their expertise....

AI-Based Clinical Trial End Points: A New Era in Drug Development: NEJM AI | July 2026

Introduction Clinical trial endpoints have traditionally relied on expert human interpretation, particularly for pathology-based outcomes. However, variability between observers, cost, and time remain important limitations. This NEJM AI perspective discusses how artificial intelligence is beginning...

Medical AI Assistant: Publication or Medical Device?: NEJM AI | July 2026

Introduction: As artificial intelligence becomes increasingly integrated into clinical practice, an important question arises: should AI assistants be regulated as medical devices or viewed as evidence-based clinical methodologies? This NEJM AI perspective proposes a new...

GastroAGI Logo

We are pioneers in clinical intelligence, dedicated to helping gastroenterologists harness the power of artificial intelligence to drive precision, efficiency, and patient growth.

For You

For StudentsFor CliniciansFor ResearchersSoonFor Patients

Core Tools

MELD-Na ScoreChild-PughFIB-4 IndexGlasgow-BlatchfordBISAP Score

Explore

OverviewAboutCalculators
Trending Topics
Conference Briefings
Blog Insights
©GastroAGI 2026
Privacy PolicyTerms of UseMedical Disclaimer