Lune

NeurIPS2021Top-tier venue

Understanding How Encoder-Decoder Architectures Attend

Kyle Aitken, Vinay V. Ramasesh, Yuan Cao, Niru Maheswaranathan

Abstract

Encoder-decoder networks with attention have proven to be a powerful way to solve many sequence-to-sequence tasks. In these networks, attention aligns encoder and decoder states and is often used for visualizing network behavior. However, the mechanisms used by networks to generate appropriate attention matrices are still mysterious. Moreover, how these mechanisms vary depending on the particular architecture used for the encoder and decoder (recurrent, feed-forward, etc.) are also not well understood. In this work, we investigate how encoder-decoder networks solve different sequence-to-sequence tasks. We introduce a way of decomposing hidden states over a sequence into temporal (independent of input) and input-driven (independent of sequence position) components. This reveals how attention matrices are formed: depending on the task requirements, networks rely more heavily on either the temporal or input-driven components. These findings hold across both recurrent and feed-forward architectures despite their differences in forming the temporal components. Overall, our results provide new insight into the inner workings of attention-based encoder-decoder networks.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • The geometry of integration in text classification RNNs cites How recurrent networks implement contextual processing in sentiment analysis
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on4

  1. ParaCrawl: Web-Scale Acquisition of Parallel CorporaMarta Bañón, Pinzhen Chen, Barry Haddow, Kenneth Heafield et al.ACL 2020 · 132 citations
  2. How recurrent networks implement contextual processing in sentiment analysisNiru Maheswaranathan, David SussilloICML 2020 · 25 citations
  3. The geometry of integration in text classification RNNsKyle Aitken, Vinay Venkatesh Ramasesh, Ankush Garg, Yuan Cao et al.ICLR 2021 · 4 citations
  4. Transformer Interpretability Beyond Attention VisualizationHila Chefer, Shir Gur, Lior WolfCVPR 2021

Related papers

  1. On the approximation properties of recurrent encoder-decoder architecturesZhong Li, Haotian Jiang, Qianxiao LiICLR 2022 · 8 citations
  2. Attention Weights in Transformer NMT Fail Aligning Words Between Sequences but Largely Explain Model PredictionsJavier Ferrando, Marta R. Costa-jussàEMNLP Findings 2021 · 14 citations
  3. Location Attention for Extrapolation to Longer SequencesYann Dubois, Gautier Dagan, Dieuwke Hupkes, Elia BruniACL 2020 · 2 citations
  4. Not All Attention Is Needed: Gated Attention Network for Sequence DataLanqing Xue, Xiaopeng Li, Nevin L. ZhangAAAI 2020 · 47 citations
  5. WHEN: A Wavelet-DTW Hybrid Attention Network for Heterogeneous Time Series AnalysisJingyuan Wang, Chen Yang, Xiaohan Jiang, Junjie WuKDD 2023 · 28 citations
Dusk over the sea between two cliffs drawn in fine vertical lines