1
$\begingroup$

I am recently learning word embedding myself. When learning skip-gram from the paper https://arxiv.org/pdf/1310.4546.pdf[Distributed Representations of Words and Phrases and their Compositionality], I am stuck in understanding the loss function. $$ -\frac{1}{T}\sum_{t=1}^{T}\sum_{-c\le j\le c}\log p(w_{t+j}|w_t) $$ It is so-called conditional likelihood or something, a little bit like cross entropy, but it is not. In the first forward propagation, we feed the word pairs to the neural network. For example, input $w_1$ as the focus word and $w_2$ as the context word. However, I cannot see how $w_2$ works in the loss.

Traditionally, the loss function for a supervised learning should contain label and the predicted value, but here $p(w_{t+j}|w_t)$ is just a predicted value calculated by applying softmax function on the output layer. If there is no label in the loss function, how can we reduce the loss by backward propagation.

$\endgroup$

1 Answer 1

0
$\begingroup$

Skip-gram is self supervised, the model uses the current word to predict the surrounding window of context words.

The skip-gram loss function is the negative log likelihood of the observed context words given the target word. The goal of training is minimize that loss so the model makes better predictions of context words.

$\endgroup$

Your Answer

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

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