We use a few cookies

Essential cookies keep the library working. With your permission, we'd also like to use analytics to see what's useful and improve the experience. Read our Privacy Policy or Cookie Policy.

Skip to main content
Home/e-Resources/Artificial Intelligence & Machine Learning/A Multiscale Visualization of Attention in the Transformer Model
Conference ProceedingsArtificial Intelligence & Machine Learning

A Multiscale Visualization of Attention in the Transformer Model

Checking your access to this record.

Abstract & Overview

The Transformer is a sequence model that forgoes traditional recurrent architectures in favor of a fully attention-based approach.Besides improving performance, an advantage of using attention is that it can also help to interpret a model by showing how the model assigns weight to different input elements.However, the multi-layer, multi-head attention mechanism in the Transformer model can be difficult to decipher.To make the model more accessible, we introduce an open-source tool that visualizes attention at multiple scales, each of which provides a unique perspective on the attention mechanism.We demonstrate the tool on BERT and OpenAI GPT-2 and present three example use cases: detecting model bias, locating relevant attention heads, and linking neurons to model behavior.

Cite this record

Jesse Vig (2019). A Multiscale Visualization of Attention in the Transformer Model. Annual Meeting of the Association for Computational Linguistics: System Demonstrations (ACL Demo). https://doi.org/10.18653/v1/p19-3007

Copy in another style

Vig, J. (2019). A Multiscale Visualization of Attention in the Transformer Model. Annual Meeting of the Association for Computational Linguistics: System Demonstrations (ACL Demo). https://doi.org/10.18653/v1/p19-3007
Author names are used as deposited, so check their order before you submit.

Metadata is harvested from open-access indexes and can be incomplete. Check a citation against the published version before relying on it — see our open access & attribution policy.