[Paper Review] Knowledge Graph-based Question Answering with Electronic Health Records
This paper proposes a knowledge graph-based approach to Question Answering (QA) on Electronic Health Records (EHR), converting natural language queries into SPARQL instead of SQL. Using a modified version of the MIMICSQL dataset, the authors demonstrate that graph-based QA achieves up to 34% higher accuracy than table-based QA without model changes, validating the hypothesis that knowledge graphs better capture clinical relations than relational tables.
Question Answering (QA) is a widely-used framework for developing and evaluating an intelligent machine. In this light, QA on Electronic Health Records (EHR), namely EHR QA, can work as a crucial milestone towards developing an intelligent agent in healthcare. EHR data are typically stored in a relational database, which can also be converted to a directed acyclic graph, allowing two approaches for EHR QA: Table-based QA and Knowledge Graph-based QA. We hypothesize that the graph-based approach is more suitable for EHR QA as graphs can represent relations between entities and values more naturally compared to tables, which essentially require JOIN operations. In this paper, we propose a graph-based EHR QA where natural language queries are converted to SPARQL instead of SQL. To validate our hypothesis, we create four EHR QA datasets (graph-based VS table-based, and simplified database schema VS original database schema), based on a table-based dataset MIMICSQL. We test both a simple Seq2Seq model and a state-of-the-art EHR QA model on all datasets where the graph-based datasets facilitated up to 34% higher accuracy than the table-based dataset without any modification to the model architectures. Finally, all datasets are open-sourced to encourage further EHR QA research in both directions.
Motivation & Objective
- To investigate whether knowledge graph-based EHR QA outperforms traditional table-based QA using relational databases.
- To address the challenge of complex schema and JOIN operations in EHR data by leveraging graph structures for more natural relation modeling.
- To create and release a new benchmark dataset pair (MIMICSQL* and MIMIC-SPARQL*) for EHR QA research in both table-based and graph-based directions.
- To empirically compare NLQ-to-SQL and NLQ-to-SPARQL models in terms of accuracy, query length, and robustness to schema complexity.
- To analyze the structural differences between SQL and SPARQL queries in relation to natural language questions and their impact on model performance.
Proposed method
- The authors convert the original MIMICSQL dataset into a knowledge graph representation, preserving entity and relation semantics from the MIMIC-III relational schema.
- They generate SPARQL queries from natural language questions, treating the task as NLQ-to-SPARQL, rather than NLQ-to-SQL.
- A knowledge graph is constructed where entities (e.g., patients, medications) are nodes and clinical relations (e.g., prescribed-to, diagnosed-with) are typed edges.
- The model architecture is kept consistent across both table-based (SQL) and graph-based (SPARQL) settings to ensure fair comparison.
- The performance of a state-of-the-art EHR QA model (TREQS) is evaluated on both MIMICSQL* (table-based) and MIMIC-SPARQL* (graph-based) datasets.
- The authors analyze query length trends and structural complexity, comparing SQL and SPARQL under increasing schema complexity and question depth.
Experimental results
Research questions
- RQ1Does knowledge graph-based EHR QA outperform table-based QA in terms of accuracy and robustness to schema complexity?
- RQ2How do the structural characteristics of SPARQL and SQL queries compare to natural language questions in terms of length and syntactic similarity?
- RQ3To what extent does the number of JOIN operations in SQL affect model performance compared to SPARQL’s edge-based traversal?
- RQ4Can a single model architecture achieve better performance when fine-tuned on SPARQL-based queries compared to SQL-based queries?
- RQ5What is the impact of out-of-vocabulary (OOV) terms on query generation in NLQ-to-SQL versus NLQ-to-SPARQL models?
Key findings
- The graph-based approach achieved up to 34% higher accuracy than the table-based approach without any modification to the model architecture.
- The TREQS model showed a 5.1% improvement in predicting correct entity relations and a 3.6% improvement in answer prediction when trained on the graph-based MIMIC-SPARQL* dataset.
- SPARQL query length increased significantly less than SQL query length with rising question complexity, indicating SPARQL's structural similarity to natural language.
- The number of correct SQL queries decreased with increasing JOIN operations, while SPARQL performance remained stable, suggesting better scalability for complex schemas.
- SPARQL queries were found to be closer in structure to natural language questions than SQL queries, especially for complex, multi-entity queries.
- The OOV problem affected Seq2seq models more severely in SQL generation, while SPARQL models preserved correct logical structure even when condition values were incorrectly copied.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.