Research Center for Social Computing and Information Retrieval (SCIR), Harbin Institute of Technology, Harbin 150001, China; State Key Laboratory of Cognitive Intelligence, iFLYTEK Research, Beijing 100083, China.
Research Center for Social Computing and Information Retrieval (SCIR), Harbin Institute of Technology, Harbin 150001, China.
STAR Protoc. 2022 Jun 16;3(3):101481. doi: 10.1016/j.xpro.2022.101481. eCollection 2022 Sep 16.
The attention mechanism plays an important role in the machine reading comprehension (MRC) model. Here, we describe a pipeline for building an MRC model with a pretrained language model and visualizing the effect of each attention zone in different layers, which can indicate the explainability of the model. With the presented protocol and accompanying code, researchers can easily visualize the relevance of each attention zone in the MRC model. This approach can be generalized to other pretrained language models. For complete details on the use and execution of this protocol, please refer to Cui et al. (2022).
注意力机制在机器阅读理解 (MRC) 模型中起着重要作用。在这里,我们描述了一个使用预先训练的语言模型构建 MRC 模型的流程,并可视化了不同层中每个注意力区域的效果,这可以表明模型的可解释性。有了本文提出的协议和相关代码,研究人员可以轻松地可视化 MRC 模型中每个注意力区域的相关性。这种方法可以推广到其他预先训练的语言模型。有关此协议的使用和执行的完整详细信息,请参阅 Cui 等人 (2022)。