The Question 10 in Quiz of Module 2 is “Without positional encodings, how would a transformer process the phrase ‘The mouse sat on the elephant’ compared to ‘The elephant sat on the mouse’?”
Out of the given options, the correct answer is “It would treat them as identical, since both contain the same set of tokens.”. The explanation given is “The core self-attention mechanism is permutation-invariant. Positional encodings are required to inject sequence order.”
Other options are clearly wrong, however I have not completely understood the explanation for this answer.
Causal masking is not a type of positional encoding. It simply means not showing future to the model. So, even if positional encoding is not used, causal masking should still be used. Due to this reason, in first sentence, ‘mouse’ will attend only to [the]. In second sentence, ‘mouse’ will attend to [the, elephant, san, on, the].
Hence, both the sentences would not be treated as identical.
Please let me know if I am missing anything. Thanks!