Skip to main content
QUICK REVIEW

[论文解读] Text-to-SQL Generation for Question Answering on Electronic Medical Records

Ping Wang, Tian Shi|arXiv (Cornell University)|Jul 28, 2019
Topic Modeling参考文献 49被引用 8
一句话总结

本文提出 TREQS,一种用于电子病历(EMR)中端到端问题到 SQL 生成的深度学习模型,采用序列到序列框架,并通过注意力复制机制和特定任务的查找表增强,以提高在处理医学缩写、拼写错误和复杂条件时的准确性。主要贡献是构建了 MIMICSQL,一个大规模、公开可用的问题-SQL 数据集,源自 MIMIC-III 数据库,可实现稳健的训练与评估,从而在条件值预测任务上达到最先进性能,并对噪声输入具有鲁棒性。

ABSTRACT

Electronic medical records (EMR) contain comprehensive patient information and are typically stored in a relational database with multiple tables. Effective and efficient patient information retrieval from EMR data is a challenging task for medical experts. Question-to-SQL generation methods tackle this problem by first predicting the SQL query for a given question about a database, and then, executing the query on the database. However, most of the existing approaches have not been adapted to the healthcare domain due to a lack of healthcare Question-to-SQL dataset for learning models specific to this domain. In addition, wide use of the abbreviation of terminologies and possible typos in questions introduce additional challenges for accurately generating the corresponding SQL queries. In this paper, we tackle these challenges by developing a deep learning based TRanslate-Edit Model for Question-to-SQL (TREQS) generation, which adapts the widely used sequence-to-sequence model to directly generate the SQL query for a given question, and further performs the required edits using an attentive-copying mechanism and task-specific look-up tables. Based on the widely used publicly available electronic medical database, we create a new large-scale Question-SQL pair dataset, named MIMICSQL, in order to perform the Question-to-SQL generation task in healthcare domain. An extensive set of experiments are conducted to evaluate the performance of our proposed model on MIMICSQL. Both quantitative and qualitative experimental results indicate the flexibility and efficiency of our proposed method in predicting condition values and its robustness to random questions with abbreviations and typos.

研究动机与目标

  • 为解决电子病历中临床数据检索效率低下且缺乏灵活性的问题,此类问题通常需要专家知识和复杂的基于规则的系统。
  • 克服医疗领域用于训练问题到 SQL 模型的专用数据集匮乏的问题,特别是针对电子病历数据。
  • 提升临床环境中从自然语言到 SQL 生成的鲁棒性,因为问题中常包含缩写、拼写错误或模糊术语。
  • 开发一种可直接从自然语言问题生成可执行 SQL 查询的模型,而无需依赖预定义模板或复杂解析流程。
  • 在真实临床查询中评估模型在条件值预测和对未登录词或噪声输入的泛化能力方面的表现。

提出的方法

  • 提出 TREQS,一种基于编码器-解码器架构的序列到序列模型,经微调后用于医学问题到 SQL 生成。
  • 集成注意力复制机制,使模型能够将输入问题中的相关关键词直接复制到 SQL 查询中,从而提高条件值生成的准确性。
  • 使用特定任务的查找表存储和检索常见医学术语(例如疾病名称、检验值、手术编码),以减少未登录词问题。
  • 在生成后应用 recover 技术,通过将预测值与查找表中的已知条目匹配,纠正错误的条件值。
  • 在 MIMICSQL 上进行模型训练与评估,该数据集是新构建的大规模人类标注的问题-SQL 对数据集,源自 MIMIC-III 电子病历数据库。
  • 利用注意力可视化分析模型行为,验证模型是否正确地将问题关键词与对应 SQL 成分对齐。

实验结果

研究问题

  • RQ1具有注意力复制和查找表的序列到序列模型是否能在生成临床问题的准确 SQL 查询方面优于现有方法?
  • RQ2所提出的 TREQS 模型在处理临床问题中常见的医学缩写、拼写错误和术语模糊性等现实挑战方面效果如何?
  • RQ3MIMICSQL 数据集在多大程度上提升了问题到 SQL 模型在医疗领域的泛化能力和鲁棒性?
  • RQ4集成 recover 技术是否显著提升了生成 SQL 查询中条件值预测的准确性?
  • RQ5当输入问题缺少或包含错误关键词时,模型是否仍能生成可执行且语义正确的 SQL 查询?

主要发现

  • TREQS 在 MIMICSQL 基准测试中达到最先进性能,无论在精确匹配还是部分匹配指标上,均优于现有模型如 Seq2seq、Ptr-Net 和 Coarse-to-Fine。
  • 该模型对噪声输入表现出强大鲁棒性,即使问题中存在拼写错误或缩写,也能正确生成 SQL 查询,这得益于注意力复制和查找表机制。
  • 定性分析表明,TREQS 能够成功识别并将其关键临床术语(如“冠状动脉疾病”、“铁蛋白”)从问题中复制到正确的 SQL 条件中。
  • 注意力可视化证实,模型正确地将问题关键词与对应数据库列和条件值对齐,增强了可解释性。
  • recover 技术显著提升了条件值预测的准确性,尤其对那些无法正确预测列名或值的基线模型效果明显。
  • M-SQLNET 等基线模型常因无法生成正确的条件列而导致查询不可执行,而 TREQS 在许多情况下无需依赖恢复机制即可生成完全可执行且正确的查询。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。