Demystifying Transformer: A Case Study on Graph-Based Interpretability and Attention Layer Dynamics
摘要
While transformer’s ability to generate human-like text has transformed applications like content creation and question answering, their inner working remains a black-box. This theoretical study aims to deep dive into the working of the attention mechanism that plays a key role in storing the information learned during training. Through various visualization techniques we explore how these attention layers learn for the machine translation tasks. We present a case study on interpretability and explaining how a transformer learns across layers using existing visualization techniques such as heat maps, graphs, and clustering methods to prove the intended observations. We also show how transformer network implements parallelism making them a better choice than sequential networks.