Patient-Trial Matching with Deep Embedding and Entailment Prediction

Xingyao Zhang, Cao Xiao, Lucas Glass, Jimeng Sun

Introduction

Clinical trial recruitment is a major bottleneck in drug development, often resulting in high costs and delayed life-saving treatments. The core technical challenge is a "data mismatch" between unstructured Trial Eligibility Criteria (EC) and structured Electronic Health Records (EHRs). Existing solutions usually rely on manual rule-setting, which is inflexible and fails to capture complex clinical nuances. Furthermore, standard machine learning models struggle with numerical reasoning—the ability to understand that "dosage > 50mg" is a strict logical constraint, not just a semantic concept.

DeepEnroll Architecture

DeepEnroll introduces an end-to-end architecture designed to bridge this gap by treating the matching task as a natural language entailment problem.

DeepEnroll Architecture Overview

The framework consists of several key components:

  • Cross-Modal Embeddings: The model uses pre-trained Clinical BERT to encode textual eligibility criteria and a hierarchical embedding model to represent patient EHRs, capturing relationships between demographics, visits, and medical codes.
  • Alignment Module: An attentive alignment mechanism "soft-aligns" specific EC statements with relevant parts of a patient's medical history, effectively focusing on the local sub-structures that matter most for a match.
  • Entailment Prediction: The task is cast as Natural Language Inference (NLI), where the model predicts if a patient is entailed (eligible), contradicted (ineligible), or neutral.
  • Numerical Information Representation (NIR): To handle numbers, DeepEnroll extracts (number, unit, concept) triplets and uses a pattern-based comparison algorithm to ensure numerical constraints are logically satisfied.

Datasets and Evaluation

The authors evaluated DeepEnroll on three distinct datasets:

  1. IQVIA Dataset: 561 trials and over 57,000 matched patients from real-world medical claims.
  2. Rare Disease Data: A subset focusing on conditions where recruitment is notoriously difficult.
  3. Synthetic Data: Generated using Synthea and Criteria2Query for reproducibility.

Key Insights and Results

DeepEnroll consistently outperformed all baselines, including the previous state-of-the-art hybrid system, Criteria2Query. On the real-world IQVIA dataset, DeepEnroll improved the average F1 score by 10.6% over the best baseline, with a 12.4% gain in the rare disease subset.

Visualization of matching results across different clinical trials

The shift from "similarity matching" to "logical entailment" is a core innovation. As shown in the attention heatmaps above, the model effectively identifies which specific patient records align with particular eligibility criteria. Furthermore, the NIR module proved essential; removing it led to a significant performance drop, confirming that explicit numerical modeling is crucial for clinical tasks.

Conclusion

DeepEnroll demonstrates that jointly embedding unstructured text and structured EHR data, combined with explicit numerical reasoning, significantly improves automated patient-trial matching. While challenges remain regarding ambiguous abbreviations, this cross-modal entailment approach offers a scalable solution to a critical bottleneck in clinical research.

Summary updated

Abstract

Clinical trials are essential for drug development but often suffer from expensive, inaccurate and insufficient patient recruitment. The core problem of patient-trial matching is to find qualified patients for a trial, where patient information is stored in electronic health records (EHR) while trial eligibility criteria (EC) are described in text documents available on the web. How to represent longitudinal patient EHR? How to extract complex logical rules from EC? Most existing works rely on manual rule-based extraction, which is time consuming and inflexible for complex inference. To address these challenges, we proposed a cross-modal inference learning model to jointly encode enrollment criteria (text) and patients records (tabular data) into a shared latent space for matching inference. pplies a pre-trained Bidirectional Encoder Representations from Transformers(BERT) model to encode clinical trial information into sentence embedding. And uses a hierarchical embedding model to represent patient longitudinal EHR. In addition, s augmented by a numerical information embedding and entailment module to reason over numerical information in both EC and EHR. These encoders are trained jointly to optimize patient-trial matching score. We evaluated n the trial-patient matching task with demonstrated on real world datasets. utperformed the best baseline by up to 12.4% in average F1.
BibTeX
@inproceedings{zhang2020patient,
  author = {Xingyao Zhang and Cao Xiao and Lucas Glass and Jimeng Sun},
  title = {{Patient-Trial Matching with Deep Embedding and Entailment Prediction}},
  booktitle = {The Web Conference},
  year = {2020},
  doi = {10.1145/3366423.3380181},
}
Figure