NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Interpretable Medical Diagnostics with Structured Data Extraction by Large Language Models

Aleksa Bisercic, Mladen Nikolic, Mihaela van der Schaar, Boris Delibasic, Pietro Liò, Andrija PetrovicarXiv 2023

Abstract

Tabular data is often hidden in text, particularly in medical diagnostic reports. Traditional machine learning (ML) models designed to work with tabular data, cannot effectively process information in such form. On the other hand, large language models (LLMs) which excel at textual tasks, are probably not the best tool for modeling tabular data. Therefore, we propose a novel, simple, and effective methodology for extracting structured tabular data from textual medical reports, called TEMED-LLM. Drawing upon the reasoning capabilities of LLMs, TEMED-LLM goes beyond traditional extraction techniques, accurately inferring tabular features, even when their names are not explicitly mentioned in the text. This is achieved by combining domain-specific reasoning guidelines with a proposed data validation and reasoning correction feedback loop. By applying interpretable ML models such as decision trees and logistic regression over the extracted and validated data, we obtain end-to-end interpretable predictions. We demonstrate that our approach significantly outperforms state-of-the-art text classification models in medical diagnostics. Given its predictive performance, simplicity, and interpretability, TEMED-LLM underscores the potential of leveraging LLMs to improve the performance and trustworthiness of ML models in medical applications.

Introduction

In clinical settings, critical patient information is frequently recorded in unstructured formats such as physician notes, discharge summaries, and diagnostic reports. While Large Language Models (LLMs) have demonstrated remarkable capabilities in processing natural language, their "black-box" nature often limits their direct application in high-stakes medical decision-making where transparency is paramount. Conversely, traditional machine learning models like Decision Trees and Logistic Regression offer high interpretability but require structured tabular data, which is not readily available from raw text. This paper introduces TEMED-LLM, a framework designed to bridge this gap by using LLMs to extract high-quality structured data for use in interpretable diagnostic models.

The TEMED-LLM Framework

The proposed methodology, TEMED-LLM (Tabular Extraction for Enhanced Medical Diagnostics), consists of three integrated components designed to ensure accurate and verifiable data extraction:

  1. RExtract (Reasoning and Extraction): This module leverages the reasoning capabilities of LLMs. Instead of simple keyword matching, it uses domain-specific instructions and Chain-of-Thought reasoning to infer clinical features. For instance, it can identify "Exercise Angina" by interpreting a patient's description of chest discomfort during physical exertion.
  2. VORC (Validation Of Result and Reasoning Correction): To handle potential hallucinations or formatting errors, VORC introduces a feedback loop. A rule-based agent validates the LLM's output against a predefined schema. If discrepancies are found, the agent generates a correction prompt, allowing the LLM to refine its output.
  3. ML Analysis: The validated tabular data is then processed by interpretable ML models. This ensures that the final diagnostic output is not just a prediction, but a result of a transparent, rule-based process.
The TEMED-LLM architecture overview, illustrating the flow from domain knowledge to interpretable ML analysis.

Enhancing Extraction Quality

A key innovation of TEMED-LLM is the combination of reasoning and validation. Traditional extraction methods often fail when clinical terms are not explicitly mentioned or when data requires unit conversion. For example, a standard extractor might miss an age if it is described metaphorically or in unusual units. The RExtract + VORC approach significantly improves reliability by correcting errors that simpler methods miss, such as out-of-range values or implicit feature identification.

Comparison of extraction strategies demonstrating how RExtract + VORC corrects errors in value ranges and missing data compared to simpler methods.

Experimental Evaluation

The framework was evaluated on five diverse datasets, including heart disease, hepatitis, and stroke prediction. TEMED-LLM, utilizing XGBoost on extracted features, achieved near-perfect performance with AUC scores of 0.998 on Heart Disease and 0.997 on Hepatitis datasets. Crucially, it outperformed state-of-the-art text-based models like BioBERT and RoBERTa.

Furthermore, the extraction accuracy reached up to 0.99 when the VORC feedback loop was employed, demonstrating the robustness of the structured extraction process. The researchers also found that Decision Trees trained on extracted data were nearly identical to those trained on ground-truth tabular data (R² > 0.92), confirming that the extraction process preserves the underlying clinical logic and maintains model interpretability.

Conclusion

TEMED-LLM demonstrates that the bottleneck in medical AI is often data structuring rather than classification logic. By using LLMs as an intelligent extraction layer, clinicians can leverage the power of modern AI while maintaining the transparency and trust provided by interpretable tabular models. This approach paves the way for more reliable and explainable AI systems in healthcare.

Summary updated

BibTeX
@misc{bisercic2023interpretable,
  author = {Aleksa Bisercic and Mladen Nikolic and Mihaela van der Schaar and Boris Delibasic and Pietro Liò and Andrija Petrovic},
  title = {{Interpretable Medical Diagnostics with Structured Data Extraction by Large Language Models}},
  year = {2023},
  eprint = {2306.05052},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.05052},
}
Figure