atlas

Research map / Architectures and efficiency / Attention and transformers

Rethinking Attention: Exploring Shallow Feed-Forward Neural Networks as an Alternative to Attention Layers in Transformers (Student Abstract)

AAAI 2024 · Architectures and efficiency › Attention and transformers · approach: Attention head and block redesign · 17 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Replaces Transformer attention blocks on IWSLT2017 with shallow one-hidden-layer feed-forward networks trained via knowledge distillation from a vanilla Transformer, finding self-attention replaceable but cross-attention not.

Problem

Whether standard shallow feed-forward networks can mimic the behavior of Transformer attention modules in sequence-to-sequence translation, and how much performance is retained.

Approach

Substitute encoder and decoder attention sub-blocks (ALR, ALRR, ASLR, ELR variants) with shallow one-hidden-layer feed-forward networks trained by distilling intermediate activations of a teacher Transformer, with sentences padded to length 50 and masked.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace encoder self-attention with ALR feed-forward networksTransformer · IWSLT2017, four translation directionsBLEU: 0.257 -> 0.252; 0.324 -> 0.327; 0.276 -> 0.276; 0.292 -> 0.288No clear effect
Replace decoder self-attention with ALR feed-forward networksTransformer · IWSLT2017, four translation directionsBLEU: 0.257 -> 0.253; 0.324 -> 0.323; 0.276 -> 0.273; 0.292 -> 0.291No clear effect
Replace decoder cross-attention with ALR feed-forward networks (ablation)Transformer · IWSLT2017, four translation directionsBLEU: 0.257 -> 0.115; 0.324 -> 0.130; 0.276 -> 0.109; 0.292 -> 0.115Hurt
Replace all attention modules, including decoder cross-attention, with ALR feed-forward networks (ablation)Transformer · IWSLT2017, four translation directionsBLEU: 0.257 -> 0.105; 0.324 -> 0.134; 0.276 -> 0.117; 0.292 -> 0.116Hurt
Replace attention plus the residual connection (ALRR), rather than attention alone (ALR) (ablation)Transformer encoder self-attention · IWSLT2017, four translation directionsBLEU: ALR L vs ALRR L: 0.252 vs 0.243; 0.327 vs 0.315; 0.276 vs 0.263; 0.288 vs 0.276Hurt
Replace each attention head with a separate FF network (ASLR), rather than one network for the attention layer (ALR) (ablation)Transformer encoder self-attention · IWSLT2017, four translation directionsBLEU: ALR L vs ASLR L: 0.252 vs 0.252; 0.327 vs 0.326; 0.276 vs 0.271; 0.288 vs 0.290Mixed
Replace the entire encoder layer (ELR), rather than only attention (ALR) (ablation)Transformer encoder · IWSLT2017, four translation directionsBLEU: ALR L vs ELR L: 0.252 vs 0.194; 0.327 vs 0.248; 0.276 vs 0.225; 0.288 vs 0.219Hurt
Increase ALR encoder FF network size from XS to L (ablation)Transformer encoder self-attention · IWSLT2017, four translation directionsBLEU: 0.180 -> 0.252; 0.235 -> 0.327; 0.226 -> 0.276; 0.218 -> 0.288Helped
Increase ALR decoder cross-attention FF network size from XS to L (ablation)Transformer decoder cross-attention · IWSLT2017, four translation directionsBLEU: 0.035 -> 0.115; 0.036 -> 0.130; 0.035 -> 0.109; 0.039 -> 0.115Helped
Scale replacement networks beyond the reported sizes (ablation)Proposed FF replacement networks · IWSLT2017BLEUNo clear effect

Surprising findings

Limitations

Experimental setup

Datasets: IWSLT2017

Benchmarks: IWSLT2017 E2G IWSLT2017 G2E IWSLT2017 E2F IWSLT2017 F2E

Metrics: BLEU relative BLEU vs baseline

Baselines: Transformer (vanilla, embedding size 128)

Builds on: Transformer knowledge distillation

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy