Incognition logo
Home
Learn
Practice
Leaderboard
0
VisualizationsSequences, Language & Attention

Attention vs Recurrence

Slide how far apart two words are. In an RNN, information must pass through every step between them; with attention it is always one step.

RNN steps
12
attention steps
1
distance 12

This is the decisive difference. In an RNN, information between two words travels through every step between them. With attention the path is always one step, however far apart they are.

A one-step path means no repeated multiplication — so no vanishing gradient.

Customize