arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2211.03495cs.CLcs.LG

How Much Does Attention Actually Attend? Questioning the Importance of Attention in Pretrained Transformers

Hebrew University of Jerusalem(耶路撒冷希伯来大学);University of Washington(华盛顿大学);Apple, Inc.(苹果公司);Allen Institute for Artificial Intelligence(艾伦人工智能研究所)

Michael Hassid, Hao Peng, Daniel Rotem, Jungo Kasai, Ivan Montero, Noah A. Smith, Roy Schwartz

英文摘要:

The attention mechanism is considered the backbone of the widely-used Transformer architecture. It contextualizes the input by computing input-specific attention matrices. We find that this mechanism, while powerful and elegant, is not as important as typically thought for pretrained language models. We introduce PAPA, a new probing method that replaces the input-dependent attention matrices with constant ones -- the average attention weights over multiple inputs. We use PAPA to analyze several established pretrained Transformers on six downstream tasks. We find that without any input-dependent attention, all models achieve competitive performance -- an average relative drop of only 8% from the probing baseline. Further, little or no performance drop is observed when replacing half of the input-dependent attention matrices with constant (input-independent) ones. Interestingly, we show that better-performing models lose more from applying our method than weaker models, suggesting that the utilization of the input-dependent attention mechanism might be a factor in their success. Our results motivate research on simpler alternatives to input-dependent attention, as well as on methods for better utilization of this mechanism in the Transformer architecture.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑