>[!citation] >Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017). Attention is all you need. *Advances in Neural Information Processing Systems*. https://huggingface.co/pt-sk/transformer_eng-it/resolve/44e2815fd0b90102f8456a71be2d6f8df3fd104d/Reference/Attention%20Is%20All%20You%20Need.pdf >[!abstract] >The dominant sequence transduction models are based on complex recurrent or convolutional neural networks that include an encoder and a decoder. The best performing models also connect the encoder and decoder through an attention mechanism. We propose a new simple network architecture, the Transformer, based solely on attention mechanisms, dispensing with recurrence and convolutions entirely. Experiments on two machine translation tasks show these models to be superior in quality while being more parallelizable and requiring significantly less time to train. Our model achieves 28.4 BLEU on the WMT 2014 Englishto-German translation task, improving over the existing best results, including ensembles, by over 2 BLEU. On the WMT 2014 English-to-French translation task, our model establishes a new single-model state-of-the-art BLEU score of 41.8 after training for 3.5 days on eight GPUs, a small fraction of the training costs of the best models from the literature. We show that the Transformer generalizes well to other tasks by applying it successfully to English constituency parsing both with large and limited training data. ([[Vaswani et al., 2017]]). >[!tip] Significance >This seminal paper presents the Transformer model, a deep learning architecture designed to improve natural language processing (NLP) tasks by relying entirely on self-attention mechanisms, eliminating the need for recurrence (as seen in recurrent neural network (RNNs) and long short-term memory (LSTMs)). Key contributions: > >- Self-Attention Mechanism – Instead of processing sequences step by step like RNNs, the Transformer computes relationships between all words in a sequence simultaneously, allowing for greater parallelization and efficiency. >- Multi-Head Attention – The model employs multiple attention heads to capture different types of word relationships simultaneously. >- Positional Encoding – Since Transformers lack recurrence, they use sinusoidal positional encodings to retain word order information. >- Encoder-Decoder Structure – The architecture consists of an encoder that processes input sequences and a decoder that generates outputs, both composed of stacked layers featuring self-attention and feedforward networks. >- Superior Performance – The Transformer achieves state-of-the-art results in machine translation (on WMT 2014 English-German and English-French datasets) while being significantly faster than previous RNN-based models. > >The introduction of the Transformer has since revolutionized NLP, leading to models like BERT and GPT. Its efficiency and scalability make it foundational for modern AI applications.