English

Visualizing attention zones in machine reading comprehension models

Computation and Language 2024-10-29 v1

Abstract

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.

Keywords

Cite

@article{arxiv.2410.20652,
  title  = {Visualizing attention zones in machine reading comprehension models},
  author = {Yiming Cui and Wei-Nan Zhang and Ting Liu},
  journal= {arXiv preprint arXiv:2410.20652},
  year   = {2024}
}

Comments

17 pages, published in STAR Protocols

R2 v1 2026-06-28T19:37:28.653Z