All words at onceTous les mots à la fois

TRA6008 S2 · in classS2 · en classe

Attention is all you need

The 2017 paper that changed the field has its thesis in its title: “Attention Is All You Need” (Vaswani et al., 2017). The architecture it introduced, the transformer, drops reading order entirely. All the words of the input are processed at the same time, and each word can draw information directly from any other, whatever the distance between them. The first word of a long sentence no longer has to survive a relay to reach the last: the two are one connection apart.

This seminal paper, arguably among the most important ones to trigger the AI evolution we are currently experiencing, was actually about machine translation machine translation (MT)traduction automatique (TA) translationtraduction The use of a computer system to produce content in a target language that conveys content expressed in a source language.Utilisation d'un système informatique pour produire, dans une langue cible, un contenu qui rend un contenu exprimé dans une langue source. ! The architecture was introduced, trained and measured as a translation model, on English to German and English to French, where it beat everything before it (Vaswani et al., 2017) (see also the impact on machine translation page) (voir aussi la page L'incidence sur la traduction automatique).

A timeline arrow with four points, each naming the work it comes from: word2vec (Mikolov et al., 2013a), tagged one vector per word; the transformer (Vaswani et al., 2017), tagged all words at once; ELMo (Peters et al., 2018), tagged in order, twice; and BERT (Devlin et al., 2019), tagged at once, both sides.
Figure 2. The order they arrived in. ELMo came after the transformer without using it; BERT is built on it, which is how it reads a whole sentence at once.

What about word order?

Dropping sequence creates an obvious problem. If nothing is processed “first”, how does the model know that the dog follows Jean differs from Jean follows the dog? The words alone no longer say.

The transformer’s answer is to make position part of each word’s representation. Before processing starts, every word’s vector is combined with a numerical encoding of where in the text it sits, like page numbers on a manuscript that has been taken apart: the pages can then be handled in any order without the original arrangement being lost.

Click the drawing, or a line below, to build it up stage by stage. Cliquez sur le dessin, ou sur une ligne ci-dessous, pour le construire étape par étape.

Figure 3. The sentence arrives in order, each word is given its position, and from then on the arrangement no longer keeps that order: only the positional encoding remembers it, while the words are processed all at once, each connected to every other.
Written in English. The French version was automatically generated and I have not revised it. Rédigé en anglais. La version française a été générée automatiquement et je ne l'ai pas révisée. Updated 9 September 2026

Attention is all you need

L’article de 2017 qui a changé le domaine annonce sa thèse dans son titre : « Attention Is All You Need » (Vaswani et al., 2017). L’architecture qu’il présente, le transformeur, abandonne complètement l’ordre de lecture. Tous les mots de l’entrée sont traités en même temps, et chaque mot peut puiser de l’information directement dans n’importe quel autre, quelle que soit la distance. Le premier mot d’une longue phrase n’a plus à survivre à une course de relais pour atteindre le dernier : les deux sont à une seule connexion l’un de l’autre.

Cet article fondateur, sans doute l’un des plus importants pour déclencher l’évolution de l’IA que nous vivons actuellement, portait en fait sur la traduction automatique machine translation (MT)traduction automatique (TA) translationtraduction The use of a computer system to produce content in a target language that conveys content expressed in a source language.Utilisation d'un système informatique pour produire, dans une langue cible, un contenu qui rend un contenu exprimé dans une langue source.  ! L’architecture a été présentée, entraînée et mesurée comme un modèle de traduction, de l’anglais vers l’allemand et de l’anglais vers le français, où elle a battu tout ce qui la précédait (Vaswani et al., 2017) (see also the impact on machine translation page) (voir aussi la page L'incidence sur la traduction automatique).

Une flèche chronologique avec quatre points, chacun nommant le travail dont il provient : word2vec (Mikolov et al., 2013a), marqué un vecteur par mot ; le transformeur (Vaswani et al., 2017), marqué tous les mots à la fois ; ELMo (Peters et al., 2018), marqué dans l'ordre, deux fois ; et BERT (Devlin et al., 2019), marqué à la fois, deux côtés.
Figure 2. L'ordre dans lequel ils sont arrivés. ELMo vient après le transformeur sans s'en servir ; BERT est construit sur lui, et c'est ainsi qu'il lit une phrase entière d'un coup.

Et l’ordre des mots ?

Abandonner la séquence crée un problème évident. Si rien n’est traité « en premier », comment le modèle sait-il que le chien suit Jean diffère de Jean suit le chien ? Les mots seuls ne le disent plus.

La réponse du transformeur est de faire de la position une partie de la représentation de chaque mot. Avant que le traitement commence, le vecteur de chaque mot est combiné à un encodage numérique de sa place dans le texte, comme des numéros de page sur un manuscrit qu’on a défait : les pages peuvent ensuite être manipulées dans n’importe quel ordre sans que l’agencement d’origine soit perdu.

Click the drawing, or a line below, to build it up stage by stage. Cliquez sur le dessin, ou sur une ligne ci-dessous, pour le construire étape par étape.

Figure 3. La phrase arrive dans l'ordre, chaque mot reçoit sa position, et à partir de là l'agencement ne conserve plus cet ordre : seul l'encodage positionnel s'en souvient, tandis que les mots sont traités tous à la fois, chacun relié à tous les autres.
Written in English. The French version was automatically generated and I have not revised it. Rédigé en anglais. La version française a été générée automatiquement et je ne l'ai pas révisée. Mise à jour 9 septembre 2026

Sources

  • Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers). https://doi.org/10.18653/v1/N19-1423
  • Mikolov, T., Chen, K., Corrado, G., & Dean, J. (2013a). Efficient Estimation of Word Representations in Vector Space. arXiv preprint arXiv:1301.3781 (ICLR 2013 Workshop Track). https://arxiv.org/abs/1301.3781
  • Peters, M. E., Neumann, M., Iyyer, M., Gardner, M., Clark, C., Lee, K., et al. (2018). Deep Contextualized Word Representations. Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers). https://doi.org/10.18653/v1/N18-1202
  • Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., et al. (2017). Attention Is All You Need. Advances in Neural Information Processing Systems 30 (NIPS 2017). https://papers.nips.cc/paper_files/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html

Sources

  • Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers). https://doi.org/10.18653/v1/N19-1423
  • Mikolov, T., Chen, K., Corrado, G., & Dean, J. (2013a). Efficient Estimation of Word Representations in Vector Space. arXiv preprint arXiv:1301.3781 (ICLR 2013 Workshop Track). https://arxiv.org/abs/1301.3781
  • Peters, M. E., Neumann, M., Iyyer, M., Gardner, M., Clark, C., Lee, K., et al. (2018). Deep Contextualized Word Representations. Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers). https://doi.org/10.18653/v1/N18-1202
  • Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., et al. (2017). Attention Is All You Need. Advances in Neural Information Processing Systems 30 (NIPS 2017). https://papers.nips.cc/paper_files/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html

Spotted an error? Une erreur ?

Language, content, a broken link: e-mail me what you saw and I will fix it. Langue, contenu, lien brisé : écrivez-moi ce que vous avez vu et je corrige.

ayla.rigouts.terryn@umontreal.ca

Please mention the page: Mentionnez la page :