I've been working on a NN-based classification system that accepts document vectors as input. I can't really talk about what I'm specifically training the neural net on, so i'm hoping for a more general answer.

Up to now, the word vectors I've been using (specifically, the gloVe function from the text2vec package for R) have been target vectors. Up to now I wasn't aware that the word2vec training produced context vectors, and quite frankly I'm not sure what exactly they represent. (It's not part of the main question, but if anybody could point me to resources on what context vectors are for and what they do, that would be greatly appreciated)

My question is, how useful are these context word vectors in any kind of classification scheme? Am I missing out on useful information to feed into the neuralnet?

How would, qualitatively speaking, these four schemes fare?

  1. Target word vectors only.
  2. Context word vectors only.
  3. Averaged target and context vectors.
  4. Concatenated vectors (i.e. a 100-vector word2vec model ends up with a length of 200)
  • $\begingroup$ Thank you for your question, before I give an answer, could you clarify what you mean by how word2vec would fair on the schemes? Do you mean how “well” will they represent the above, for example? $\endgroup$ – shepan6 Jul 21 '20 at 6:20
  • $\begingroup$ I don't really have the words to accurately explain what I mean... I guess how well they would pave the way for a NN to discriminate meaningfully between different classes of text. Keep in mind I don't really know what the context vectors are for in the first place. A qualitative handwavey explanation will suffice. $\endgroup$ – Ingolifs Jul 21 '20 at 6:54

So, from what I understand from the question, you want to get an idea of how word2vec works so you can assess how well the resulting context vectors from this model will help discriminate between words by their meaning.

Word2vec works on the premise of the distributional hypothesis which essentially states that words which appear in soimikar contexts will have similar meanings (e.g. the dog ate the food/ the cat ate the food : both dog and cat appear in the same context so they are semantically close to each other)

So word2vec formulates this by a CBOW model which effectively is a feedforward neural network, which takes in the surrounding context of the target word as a series of one hot encoded vectors and aims to predict the target word (there is an assumption made of course where the contexts are treated as a bag of words and therefore assumes that a word’s meaning is not related to the word ordering of its context).

After training this, the models weights are then used to dorm the word embeddings, which represents a words meaning in semantic space. (For further reference)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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