辽宁石油化工大学学报 ›› 2025, Vol. 45 ›› Issue (6): 82-90.DOI: 10.12422/j.issn.1672-6952.2025.06.011

• 信息与控制工程 • 上一篇    下一篇

基于改进BiDAF模型的机器阅读理解

张云飞(), 王福威(), 李东, 商月阳, 檀文彬   

  1. 辽宁石油化工大学 人工智能与软件学院,辽宁 抚顺 113001
  • 收稿日期:2024-01-20 修回日期:2024-04-07 出版日期:2025-12-25 发布日期:2025-12-07
  • 通讯作者: 王福威
  • 作者简介:张云飞(1997⁃),男,硕士研究生,从事自然语言处理方面的研究;E⁃mail:1402372637@qq.com
  • 基金资助:
    国家杰出青年科学基金项目(61702247)

Machine Reading Comprehension Based on Improved BiDAF Model

Yunfei ZHANG(), Fuwei WANG(), Dong LI, Yueyang SHANG, Wenbin TAN   

  1. School of Artificial Intelligence & Software,Liaoning Petrochemical University,Fushun Liaoning 113001,China
  • Received:2024-01-20 Revised:2024-04-07 Published:2025-12-25 Online:2025-12-07
  • Contact: Fuwei WANG

摘要:

机器阅读理解旨在使机器能够自行推理并提取信息回答问题。将基于BiDAF模型进行改进以提高问答系统的准确性与效率。首先,BiDAF模型在建模时对文本长度存在限制,针对长文本容易被截断的问题,引入了滑动窗口机制以记录同一文本中过长的信息;其次,由于模型使用的长短时记忆网络(LSTM)难以捕捉较远时间步信息,导致模型存在长期依赖问题,且难以实现并行化计算,为此使用基于自注意力机制的编码器(Encoder)模型提取文本信息;针对原模型文本长度限定导致的位置信息缺失问题,设计了组内匹配、组外排序的方法以获取模型训练的位置信息。采用改进后的BiDAF模型在公开数据集SQuAD上进行测试的结果表明,F1值、精确匹配率(EM)较传统BiDAF模型分别提升了2.48个百分点、11.86个百分点。

关键词: 机器阅读理解, 滑动窗口, 自注意力机制, BiDAF模型

Abstract:

Machine Reading Comprehension(MRC) aims to enable machines to independently reason and extract information and answer questions. This study proposes improvements based on the Bidirectional Attention Flow(BiDAF) model to enhance the accuracy and efficiency of the question-answering system.Firstly, the BiDAF model imposes constraints on text length during modeling, which may lead to the loss of answers when processing long texts. To address this issue, a sliding window mechanism is introduced to retain excessive information within the same text. Secondly, due to the use of Long Short Term Memory (LSTM) in the model, it is difficult for the model to capture distant time step information, resulting in long-term dependence issues and poor parallelization capability; Based on this, an Encoder model based on self-attention mechanism is used to extract text information. Finally, for the limited length, the method of matching within the group and external sorting outside the group is designed to obtain the position information of model training. Test results of the improved BiDAF model on the public dataset SQuAD show that the F1 score and Exact Match (EM) rate have increased by 2.48 percentage points and 11.86 percentage points respectively compared with the traditional BiDAF model.

Key words: Machine reading comprehension, Sliding window, Self?attention mechanism, BiDAF model

中图分类号: 

引用本文

张云飞, 王福威, 李东, 商月阳, 檀文彬. 基于改进BiDAF模型的机器阅读理解[J]. 辽宁石油化工大学学报, 2025, 45(6): 82-90.

Yunfei ZHANG, Fuwei WANG, Dong LI, Yueyang SHANG, Wenbin TAN. Machine Reading Comprehension Based on Improved BiDAF Model[J]. Journal of Liaoning Petrochemical University, 2025, 45(6): 82-90.

使用本文

0
    /   /   推荐

导出引用管理器 EndNote|Ris|BibTeX

链接本文: https://journal.lnpu.edu.cn/CN/10.12422/j.issn.1672-6952.2025.06.011

               https://journal.lnpu.edu.cn/CN/Y2025/V45/I6/82