Summary
The attention mechanism is a smart option to help neural networks select the right information and focus to produce the correct output. It can be placed either directly on the inputs or the features (inputs processed by a few layers). Accuracies in the cases of translation, image annotation, and speech recognition, are increased, in particular when the dimension of the inputs is important.
Attention mechanism has led to new types of networks enhanced with external memory, working as an input/output, from which to read or to which to write. These networks have proved to be very powerful in question-answering challenges, into which most tasks in natural language processing can can be cast: tagging, classification, sequence-to-sequence, or question answering tasks.
In the next chapter, we'll see more advanced techniques and their application to the more general case of recurrent neural networks, to improve accuracy.