Black-Box Segmentation of Electronic Medical Records

Hongyi Yuan, Sheng YuarXiv 2024 · DOI

Introduction

Electronic Medical Records (EMRs) represent a critical resource for healthcare informatics, yet their unstructured nature poses significant challenges for automated processing. Clinical notes often contain vital functional sections—such as "Family History," "Allergies," or "Chief Complaint"—but the formatting of these sections varies substantially across different healthcare institutions. Traditional rule-based segmentation systems are brittle and require extensive manual customization for each new data source. This paper presents a lightweight, "black-box" deep learning architecture designed to segment messy EMRs into functional sections with high accuracy and universal adaptivity.

Methodology

The proposed model utilizes a two-stage architecture for sequential sentence classification, prioritizing computational efficiency and the capture of clinical logic.

Sentence Embedding (SIF)

Rather than employing resource-intensive transformer models, the researchers utilize Smooth Inverse Frequency (SIF). SIF is an unsupervised method that generates sentence vectors by calculating a weighted average of word embeddings—down-weighting frequent "stop words"—and subsequently removing the first principal component to eliminate redundant semantic information.

Sequential Classification (BiLSTM + CRF)

The embedding layer is followed by a Bidirectional Long Short-Term Memory (BiLSTM) network to capture intra-sentence semantic patterns. Crucially, a Conditional Random Field (CRF) layer is added to model the transition probabilities between sections. Since clinical notes typically follow a predictable logical progression (e.g., "Social History" usually precedes "Family History"), the CRF layer ensures that the predicted sequence of sections adheres to the "logic of the doctor."

Data and Experimental Setup

The study leveraged the MIMIC-III database, focusing on over 50,000 discharge summaries.

Labeling and Synthetic Variations

Notes were mapped to 25 preset functional labels based on physician input and rule-based heuristics.

Table of the 25 preset functional labels used for EMR segmentation.

To test "universal adaptivity," the researchers generated four synthetic variations of the dataset:

  • Type 1: No section headings.
  • Type 2: Original headings preserved.
  • Type 3: Headings replaced with preset labels.
  • Type 4: XML-formatted headings.

Results and Discussion

The proposed SIF+BiLSTM+CRF model demonstrated superior performance compared to several benchmarks, including various BERT configurations.

Performance on Mixed Training

The most robust results were achieved when the model was trained on a "mixed" corpus containing all four heading types. This approach forced the model to learn underlying semantic transition signals rather than relying on specific header strings.

Performance comparison of various methods across four sample types when trained on a mixed corpus.

As shown in the results, the SIF-based model achieved accuracies between 98.23% and 99.53% across all testing formats. Notably, even when headings were entirely removed (Type 1), the model maintained an accuracy of 98.23%, proving its ability to understand section content independently of titles.

Comparison with BERT

While BERT-based models are powerful, they struggled with the long-form nature of EMRs. BERT's 512-token limit necessitates segmenting notes, which often results in a loss of context at segment boundaries. In the mixed training scenario, BERT-based architectures using [SEP] tokens hovered between 92% and 98% accuracy, while [CLS] token methods performed significantly worse (approx. 44-49%).

Conclusion

The SIF+BiLSTM+CRF architecture provides a highly accurate and computationally efficient solution for EMR segmentation. By modeling both the semantic content of sentences and the logical transitions between clinical sections, the "black-box" model achieves state-of-the-art performance that is robust to variations in formatting. Future work will explore semi-supervised learning to reduce the dependency on large labeled datasets.

Summary updated

BibTeX
@misc{yuan2024black,
  author = {Hongyi Yuan and Sheng Yu},
  title = {{Black-Box Segmentation of Electronic Medical Records}},
  year = {2024},
  eprint = {2409.19796},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.19796},
}
Figure