Attention-based Aspect Reasoning for Knowledge Base Question Answering on Clinical Notes

Ping Wang, Tian Shi, Khushbu Agarwal, Sutanay Choudhury, Chandan K. Reddy · DOI

Introduction

Electronic Health Records (EHRs) contain a wealth of information distributed between structured databases and unstructured narrative notes. Current Clinical Question Answering (QA) systems typically rely on Machine Reading Comprehension (MRC), which struggles with cross-document reasoning, or Text-to-SQL systems, which ignore qualitative details in narrative text. This paper introduces ClinicalKBQA, a framework that transforms unstructured notes into a structured Knowledge Base (KB) and employs a novel Attention-based Aspect Reasoning (AAR) model to enable complex, multi-hop reasoning across clinical documents.

Methodology: Attention-based Aspect Reasoning (AAR)

The AAR model represents candidate answers through four distinct "aspects":

  • Entity: The specific embedding of the candidate node.
  • Type: The category of the entity (e.g., Medication, Test).
  • Path: The sequence of relationships connecting the question's topic to the candidate.
  • Context: Information from the candidate's neighboring nodes.

The model utilizes a Bi-LSTM to encode the question and a cross-attention mechanism to weigh the relevance of specific query terms to each aspect. For instance, when a query asks for a "test," the attention mechanism focuses the "Type" aspect on that specific keyword. Candidates are ranked using a max-margin hinge loss to facilitate the identification of multiple correct answers.

Attention heatmap showing how different aspects of the model focus on specific keywords in a clinical question.

The ClinicalKBQA Dataset

The authors developed the ClinicalKBQA benchmark from the n2c2 clinical challenge data. It includes approximately 9,000 QA pairs across seven medical topics, such as medications, risk factors, and temporal information. Unlike previous datasets like emrQA or MIMICSQL, ClinicalKBQA requires reasoning over a graph of entities extracted directly from clinical narratives, providing a more comprehensive test of clinical reasoning capabilities.

Results and Discussion

The AAR model significantly outperformed baseline subgraph embedding methods, achieving a Precision of 0.8072 and a Macro-F1 of 0.7973. A key finding is the functional trade-off between different aspects. "Type" and "Path" aspects provide general information, leading to high recall but lower precision. Conversely, "Entity" and "Context" provide node-specific anchors that yield higher precision but lower recall.

Performance metrics (Precision, Recall, Micro-F1) across different aspect combinations, illustrating the trade-off between general and node-specific information.

Ablation studies identified the "Path" aspect as the most critical factor in model performance. Furthermore, the combination of "Type" and "Path" yielded the highest accuracy among partial models, confirming that structural relationships and entity categories are vital for effective clinical reasoning.

Conclusion and Future Work

While AAR demonstrates strong performance, it currently relies on a 3-hop subgraph search, limiting its ability to answer questions requiring deeper traversals. Additionally, the KB construction currently depends on expert annotations. Future work will focus on integrating automated Information Extraction (IE) pipelines to build KBs from raw notes and extending the model's capability for deep causal reasoning beyond attribute retrieval.

Summary updated

BibTeX
@inproceedings{wang2021attention,
  author = {Ping Wang and Tian Shi and Khushbu Agarwal and Sutanay Choudhury and Chandan K. Reddy},
  title = {{Attention-based Aspect Reasoning for Knowledge Base Question Answering on Clinical Notes}},
  booktitle = {BCB},
  year = {2021},
  doi = {10.1145/3535508.3545518},
}
Figure