基于注意力和字嵌入的中文医疗问答匹配方法
2019-08-27陈志豪余翔刘子辰邱大伟顾本刚
陈志豪 余翔 刘子辰 邱大伟 顾本刚



摘 要:针对当前的分词工具在中文医疗领域无法有效切分出所有医学术语,且特征工程需消耗大量人力成本的问题,提出了一种基于注意力机制和字嵌入的多尺度卷积神经网络建模方法。该方法使用字嵌入结合多尺度卷积神经网络用以提取问题句子和答案句子不同尺度的上下文信息,并引入注意力机制来强调问题和答案句子之间的相互影响,该方法能有效学习问题句子和正确答案句子之间的语义关系。由于中文医疗领域问答匹配任务没有标准的评测数据集,因此使用公开可用的中文医疗问答数据集(cMedQA)进行评测,实验结果表明该方法优于词匹配、字匹配和双向长短时记忆神经网络(BiLSTM)建模方法,并且Top-1准确率为65.43%。
关键词:自然语言处理;问答对匹配;卷积神经网络;字嵌入;注意力机制
中图分类号: TP183人工神经网络与计算
文献标志码:A
Abstract: Aiming at the problems that the current word segmentation tool can not effectively distinguish all medical terms in Chinese medical field, and feature engineering has high labor cost, a multi-scale Convolutional Neural Network (CNN) modeling method based on attention mechanism and character embedding was proposed. In the proposed method, character embedding was combined with multi-scale CNN to extract context information at different scales of question and answer sentences, and attention mechanism was introduced to emphasize the interaction between question sentences and answer sentences, meanwhile the semantic relationship between the question sentence and the correct answer sentence was able to be effectively learned. Since the question and answer matching task in Chinese medical field does not have a standard evaluation dataset, the proposed method was evaluated using the publicly available Chinese Medical Question and Answer dataset (cMedQA). The experimental results show that the proposed method is superior to word matching, character matching and Bi-directional Long Short-Term Memory network (BiLSTM) modeling method, and the Top-1 accuracy is 65.43 %.
Key words: natural language processing; question answer matching; Convolutional Neural Network (CNN); character embedding; attention mechanism
0 引言
随着互联网的快速发展,愈来愈多的人倾向于在健康医疗网站上提问来寻求健康帮助,例如中國的寻医问药网、39健康网和丁香园等。此类网站为患者和医生提供了一个在线交流的平台,便于用户随时随地获取高质量的医疗健康推荐。患者只需描述其自身的症状并发布问题,就能得到指定的医生或任意医生的回复和建议。然而,大多数情况下,许多用户提出的问题都相似,这一方面给医生专家带来了巨大的回复负担,另一方面延长了患者等待回复的时间。……
