0
$\begingroup$

CBOW: We are trying to predict the next word based on the context (defined as a certain window of words around the target word)

RNN can also be used for predicting the next word in a sequence, where each time the input is the present input and the recent past (i.e. output of the previous step)

I am not able to understand how the RNN's approach is somehow better, because I could define a very large window for CBOW, and then it would also predict words based on previous information. Why do we say RNN will be better at predicting because it has memory? If we supply everything to CBOW at the same time, which is given to RNN in steps, why is one better than the other? Is it only because we save on computation in the latter case?

$\endgroup$

1 Answer 1

0
$\begingroup$

RNNs can use the hidden state to store relevant history in its hidden state and use it to make a prediction of what word can follow. This makes RNNs potentially very good language models, i.e., models of distributions over sentences.

CBOW only considers a window of few surrounding words regardless of their ordering, which is, however, crucial information for language modeling. CBOW is, therefore, a pretty bad language model, but language modeling is not what the model was designed for. Although it is a pretty poor language model, it provides a similarly good training signal for word embeddings. Because it is much faster than RNN, the embeddings can be trained on much larger data. Also, the model design allows further optimization for large vocabulary sized.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.