TL;DR
Large Language Models (LLMs) excel at extracting data from clinical notes but frequently generate logically conflicting information because they treat clinical variables as independent entities. This paper introduces "deep reflective reasoning," an agentic framework that enables LLMs to iteratively self-critique and revise their structured outputs against domain knowledge and internal consistency rules. Across three diverse oncology applications, this iterative loop significantly boosted data extraction accuracy and eliminated clinical contradictions.
What Problem Does This Paper Address?
Clinical notes contain vital medical insights trapped in unstructured free text. While LLMs are powerful tools for transforming this text into structured key-value pairs (such as synoptic pathology reports), they struggle when the variables to be extracted are deeply interdependent.
For instance, an LLM might extract that a tumor is present at a surgical margin while simultaneously stating that the distance to that same margin is 0.3 cm—a logical impossibility. Because standard LLM pipelines lack a mechanism to enforce these clinical and logical constraints, they often produce inconsistent, unreliable data. This paper tackles the challenge of enforcing variable interdependence constraints during information extraction without needing external human supervision or environment-based reinforcement learning.
Methods
The authors propose a multi-round iterative LLM agent framework called deep reflective reasoning. The workflow operates as follows:
- Baseline + RAG: The process begins with an initial prediction augmented by Retrieval-Augmented Generation (RAG). The RAG system pulls in structured medical guidelines (e.g., cancer reporting templates) formatted as markdown files.
- Self-Critique Loop: If the output variables do not align logically, a reasoning controller constructs a new prompt. This prompt contains the source text, the domain knowledge, and a history of the last p rounds of predictions (termed "back-views").
- Inconsistency Checking: The LLM agent evaluates its previous answers for two types of errors: Type 1 (inconsistencies with the source text facts) and Type 2 (logical contradictions between different extracted variables).
- Convergence: The agent revises its predictions and repeats the loop. The process stops when the output stabilizes (the new values match the previous round) or hits a maximum round limit. To ensure determinism, the LLM's temperature parameter is set to 0.
[Input Text + RAG] ➔ [Initial Extraction] ➔ [Self-Critique Loop (Check Type 1 & 2 Errors)] ➔ [Converged Output]
Datasets
The framework was evaluated across three distinct oncology applications:
- Colorectal Cancer (CRC): A dataset of 217 unstructured gross description pathology reports from the University of Texas Southwestern Medical Center (UTSW) spanning 2010–2020. The task was to extract 12 synoptic variables.
- Ewing Sarcoma: 200 randomly selected pathology reports curated by the Children’s Oncology Group (COG) over 19 years, focusing on identifying CD99 immunostaining patterns.
- Lung Cancer: 100 randomly selected cases from the TCGA Pan-Lung Cancer dataset used to estimate TNM tumor staging based on AJCC7 guidelines.
Key Insights and Ideas
- Statistical vs. Logical Reasoning: LLMs reason via autoregressive token probability (statistical intuition), which inherently lacks the strict backtracking capabilities of classic logic-based heuristic search. Providing historical "back-views" effectively acts as a pseudo-backtracking mechanism for the agent.
- Purely Internal Feedback: Unlike popular reflection frameworks (like Reflexion or CRITIC) that rely on external environment feedback or reinforcement learning, this method relies entirely on internal consistency and static domain knowledge.
- The "Attractor" Phenomenon: The authors observed that the reflection loop doesn't always settle on a single answer. In highly uncertain cases, the LLM enters a dynamic "attractor" state or ring, endlessly oscillating between two equally plausible standard values.
Key Results
- Colorectal Cancer: Using Llama 3.3-70B, reflective reasoning raised the average F1 score for categorical variables from 0.828 to 0.911, and boosted the numeric correct rate from 0.806 to 0.895.
- Ewing Sarcoma: Evaluating CD99 pattern identification using an advanced reasoning model (gpt-5.1), the framework improved accuracy from 0.8698 to 0.9271, fully converging by round 3.
- Lung Cancer Staging: Overall tumor stage accuracy jumped from 0.6795 to 0.8333. Specifically, primary tumor (pT) accuracy rose from 0.8421 to 0.8842, and regional lymph node (pN) accuracy climbed from 0.8854 to 0.9479.
Limitations and Future Work
- Spatial and Geometric Blindspots: The LLM still struggles with complex anatomical geometry and surgical orientation. For example, it occasionally misclassified adjacent colon boundaries (like the cecum vs. ascending colon) based on complex distance descriptions.
- Oscillation Issues: In the CRC dataset, 24 out of 217 cases failed to fully converge, getting stuck in infinite loops between two values.
- Future Directions: The authors plan to extend this work by refining knowledge engineering techniques, integrating multi-modal capabilities (such as image feature recognition from digital pathology slides), and expanding the system to handle diverse clinical inputs like encounter notes, CT, and MRI reports.
Summary updated