# Why columns of W1 matrix correpond to the words at the correspoding index in V(vocabulary)

In one the lectures the professor says, that the weights at column i of W1 correspond to the embeddings of the words at the ith row in the vocabulary.

I want to ask why is this so, is it only because the of the dimensions like W1 has shape (N, V) so each column must correspond to a word, but how can we say that it will only belong to the corresponding word at the corresponding index in the vocabulary and not to any other word in the vocab, is there any intuitive explanation for this?

The intuitive explanation could be that the word is associated with some number and this pairing never changes. For example, the word â€ścatâ€ť can be represented by number â€ś23â€ť and this would never change. Whenever we encounter the word â€ścatâ€ť we know that it is number 23, and whenever we deal with the number 23, we know that itâ€™s a â€ścatâ€ť.

The weight matrix also never changes its dimensions, so whenever the prediction is right or wrong, we modify only the words that are present in a sentence (we backprop to â€ścatâ€ť only when the 23th line was involved in the calculations).

Cheers

like do you mean to say that y_true=â€ścatâ€ť and we made a wrong prediction say y_pred=â€śdogâ€ť, then during backprop only the column belonging to the â€ścatâ€ť i.e columns at index 23 would have their parameters modified.

Iâ€™m not sure you could phrase it this way. What I mean, that itâ€™s not about prediction, itâ€™s more about the way the input is constructed.

If you predicted â€ścatâ€ť or â€śdogâ€ť correctly it changes whether you increase or decrease weights involved in calculations.