Making the Most Out of the Limited Context Length: Predictive Power Varies with Clinical Note Type and Note Section

Hongyi Zheng, Tracy Yixin Zhu, Lavender Yao Jiang, Kyunghyun Cho, Eric Karl Oermann · DOI

TL;DR

This paper tackles the challenge of processing long clinical notes with limited context windows in LLMs. They propose a data-driven framework to identify which sections of which note types are most predictive for tasks like readmission prediction, finding that not all parts of a clinical note are equally informative. Their findings suggest that strategically sampling text can significantly improve model performance, especially when computational resources are constrained.

What Problem Does This Paper Address?

Large language models (LLMs) are increasingly being used to analyze the vast amount of text data in Electronic Health Records (EHRs), particularly clinical notes. However, clinical notes present a unique challenge: they are often very long (thousands of tokens) and span extended periods, making it computationally expensive or impossible to feed them entirely into LLMs with fixed context length limitations. Existing approaches often resort to simply truncating notes or relying on domain expertise to select specific note types (like discharge summaries). This paper addresses the question of how to best select relevant information from these long, complex documents when faced with context length constraints, aiming to maximize predictive power without requiring extensive manual feature engineering or domain knowledge.

Methods

The authors propose a framework to analyze the "predictive power" of different sections within various types of clinical notes. They formalize the problem as finding an optimal "sampling function" ($s_\theta(x)$) that selects a subset of tokens from the original clinical notes ($x$) to fit within the model's limited context length, thereby maximizing a performance metric ($m$) for a given prediction task.

Instead of learning this sampling function, they explore it empirically by systematically varying two parameters:

  1. Note Type: They consider discharge notes, nursing notes, and combinations thereof.
  2. Note Section: They use a sliding window approach to sample text from different parts of the notes. The window's position is controlled by a parameter $p \in [0, 1]$, representing the midpoint of the window. They test specific positions like the beginning ($p=0.0$), end ($p=1.0$), and a combination of beginning and end ($p=\text{both}$).

They finetune two LLMs, Clinical-BERT (512 token limit) and ClinicalLongformer (4096 token limit), on a readmission prediction task to evaluate the performance of different sampling strategies.

Datasets

The study uses the MIMIC-III database, specifically focusing on discharge notes and nursing notes. They filtered records to ensure the availability of both note types for each admission. The dataset was split into 75% for training, 12.5% for validation, and 12.5% for testing. Other note types like physician notes were excluded due to scarcity.

Key Insights and Ideas

  • Uneven Predictive Power: Clinical notes are not uniformly informative. Discharge notes, in particular, show a distinct pattern where the beginning and end sections hold significantly more predictive power for readmission than the middle sections.
  • Note Type Matters: Nursing notes, while less predictive individually than discharge notes, exhibit a more uniform distribution of predictive power across their sections. This suggests that any part of a nursing note might be somewhat useful.
  • Context Length is Crucial for Combining Notes: Combining information from different note types (e.g., nursing + discharge) can improve performance when the context window is large (ClinicalLongformer). However, for smaller context windows (Clinical-BERT), this combination can actually hurt performance, likely because it dilutes the signal from the most informative parts of the discharge notes.
  • "Beginning and End" Strategy: For discharge notes, sampling both the beginning and end sections (rather than just the beginning) can yield better results, effectively bypassing the less informative middle sections.

Key Results

  • Discharge Notes: The blue line in Figure 1 shows a clear peak in predictive power at $p=0.0$ (beginning) and $p=1.0$ (end) for ClinicalBERT, with a dip in between.
  • Nursing Notes: The orange and green lines in Figure 1 show relatively flat performance across different sections for ClinicalBERT, indicating uniform predictive power.
  • Combined Notes: Figure 3 demonstrates that for ClinicalLongformer (large context), combining nursing and discharge notes (e.g., $p_1=0.0, p_2=0.0$) outperforms using discharge notes alone (dashed red line). Conversely, for ClinicalBERT (small context), combined notes perform worse than discharge notes alone.
  • "Both" Strategy: For discharge notes, the "p = both" strategy (sampling the first and last halves) slightly outperformed using only the beginning ($p=0.0$) for both ClinicalBERT and ClinicalLongformer.

Limitations and Future Work

The authors acknowledge three limitations:

  1. Fixed Window Size: In their second experiment, they fixed the window size for sampling to be half the context length ($n/2$). A more comprehensive study could explore optimal window sizes.
  2. Limited Fragmented Configurations: They only explored one fragmented window configuration ($p=\text{both}$) due to resource constraints and did not investigate other combinations of fragmented sections.
  3. Limited Note Types: Their analysis was restricted to discharge and nursing notes due to their prevalence in MIMIC-III. They suggest that future work could investigate other note types (e.g., physician notes, ECG notes) as MIMIC-IV becomes available.

Future work directions include:

  • Investigating the exact relationship between context size and the optimal strategy for allocating tokens to different note types.
  • Exploring how the authorship of clinical notes (e.g., doctor vs. nurse) might influence predictive power patterns.

Summary updated

BibTeX
@misc{zheng2023making,
  author = {Hongyi Zheng and Tracy Yixin Zhu and Lavender Yao Jiang and Kyunghyun Cho and Eric Karl Oermann},
  title = {{Making the Most Out of the Limited Context Length: Predictive Power Varies with Clinical Note Type and Note Section}},
  year = {2023},
  eprint = {2307.07051},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.07051},
}
Figure