Which algorithm Doc2Vec uses?

Like Word2vec is not a single algorithm but combination of two, namely, CBOW and Skip-Gram model; is Doc2Vec also a combination of any such algorithms? Or is it an algorithm in itself?

Word2Vec is not a combination of two models, rather both are variants of word2vec. Similarly doc2vec has Distributed Memory(DM) model and Distributed Bag of words (DBOW) model. Based on the context words and the target word, these variants arised.

Note: the name of the model maybe confusing

• Distriubted Bag of words is similar to Skip-gram model
• Distributed Memory is similar to Continuous bag of words model

Documentation says:

Deep learning via the distributed memory and distributed bag of words models from [1], using either hierarchical softmax or negative sampling [2], [3].

• Those are algorithms used for approximation. and you could use hierarchical softmax or negative sampling in any models, CBOW or SG. – yazhi Jul 10 '17 at 11:43
• Are DM and DBOW deep learning? I have read CBOW and SG uses a shallow neural network to predict word/context. Shouldn't it be the same for Doc2Vec? – Kshitiz Jul 10 '17 at 19:28
• doc2vec uses the same algorithm as word2vec, except that it uses sentence labels. None of the models are deep learning to be specific. As deep learning model should have multiple hidden layers. Since, deep learning is mostly involved with big data and word2vec and doc2vec mostly works with big data, some term it as deep learning model. But actually it is not. – yazhi Jul 11 '17 at 7:29

Distributed Memory model preserves the word order in a document whereas Distributed Bag of words just uses the bag of words approach, which doesn't preserve any word order.

This has been explained in details in this research paper.

• No problem, and welcome to Data Science! – Stephen Rauch Mar 21 '18 at 4:24