title: Rethinking Attention: Exploring Shallow Feed-Forward Neural Networks as
    an Alternative to Attention Layers in Transformers
summary: This work presents an analysis of the effectiveness of using standard shallow
  feed-forward networks to mimic the behavior of the attention mechanism in the
  original Transformer model, a state-of-the-art architecture for
  sequence-to-sequence tasks. We substitute key elements of the attention
  mechanism in the Transformer with simple feed-forward networks, trained using
  the original components via knowledge distillation. Our experiments, conducted
  on the IWSLT2017 dataset, reveal the capacity of these "attentionless
  Transformers" to rival the performance of the original architecture. Through
  rigorous ablation studies, and experimenting with various replacement network
  types and sizes, we offer insights that support the viability of our approach.
  This not only sheds light on the adaptability of shallow feed-forward networks
  in emulating attention mechanisms but also underscores their potential to
  streamline complex architectures for sequence-to-sequence tasks.
paper_authors._id: 655ac5b92790287702738334
paper_authors.name: Vukasin Bozic
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2023-11-20T13:42:43.019Z
paper_authors._id: 655a45a327902877025f0567
paper_authors.avatarUrl: /avatars/a1d6f16af65b712f3668ef58e9408d34.svg
paper_authors.fullname: Bozic
paper_authors.type: user
paper_authors.user: Vukasin
paper_authors._id: 655ac5b92790287702738335
paper_authors.name: Danilo Dordervic
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2023-11-20T13:42:45.564Z
paper_authors._id: 655b5fdac619b485319e353b
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/655b5fdac619b485319e353b/_ZQvyTdhG6qiKrSJMcIj1.jpeg
paper_authors.fullname: Danilo Dordevic
paper_authors.type: user
paper_authors.user: danilodjor
paper_authors._id: 655ac5b92790287702738336
paper_authors.name: Daniele Coppola
paper_authors._id: 655ac5b92790287702738337
paper_authors.name: Joseph Thommes
paper_title: Rethinking Attention: Exploring Shallow Feed-Forward Neural Networks as
    an Alternative to Attention Layers in Transformers
paper_summary: This work presents an analysis of the effectiveness of using standard shallow
  feed-forward networks to mimic the behavior of the attention mechanism in the
  original Transformer model, a state-of-the-art architecture for
  sequence-to-sequence tasks. We substitute key elements of the attention
  mechanism in the Transformer with simple feed-forward networks, trained using
  the original components via knowledge distillation. Our experiments, conducted
  on the IWSLT2017 dataset, reveal the capacity of these "attentionless
  Transformers" to rival the performance of the original architecture. Through
  rigorous ablation studies, and experimenting with various replacement network
  types and sizes, we offer insights that support the viability of our approach.
  This not only sheds light on the adaptability of shallow feed-forward networks
  in emulating attention mechanisms but also underscores their potential to
  streamline complex architectures for sequence-to-sequence tasks.
paper_ai_keywords: Transformer sequence-to-sequence tasks attention mechanism knowledge distillation "attentionless Transformers" IWSLT2017 dataset ablation studies