liveBook · Manning

Attention

As explained in Transfer Learning for Natural Language Processing

Attention is a neural-network technique that assigns focus to selected parts of an input when computing an output.

Attention helps sequence-to-sequence models handle long inputs by focusing on the parts most relevant to each output. It improved machine translation, where an encoder represents the input and a decoder generates the translation. Transformer models extend this idea with self-attention in both encoder and decoder. section 1.3.1

Machine translation

When translating a source sentence, attention lets the model focus on the input parts most relevant to the output it is producing. section 1.3.1

How Transfer Learning for Natural Language Processing covers it

How deep it goes
Explains attention’s role and historical impact, but stops short of implementation or formal mechanics.
Examples
Uses translating a source sentence into a target sentence to illustrate attention’s focus on relevant input parts.
What you can do after
Understand how attention helps translation models focus on relevant input parts and how transformers extend the approach.
How it connects
Connects attention to recurrent neural networks, sequence-to-sequence models, encoder-decoder architectures, transformers, and self-attention.

Also explained in

Compare how 29 books explain attention →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Transfer Learning for Natural Language Processing. The section links point to the parts of the book it draws on.