Skip to main content
edited title
Source Link
amoeba
  • 107.3k
  • 36
  • 321
  • 347

How sampling works in Word2vec? Can someone please make me understand NCE anddoes negative sampling work in word2vec?

I have been trying hard to understand the concept of negative sampling some contextsin the context of word2vec. The main thing is I am unable to digest the idea of [negative] sampling. For example in Mikolov's papers,in Mikolov's papers the negative sampling expectation is formulated as : logσ(⟨w,c⟩)+k⋅𝔼cN∼PD[logσ(−⟨w,cN⟩)] I clearly

$$\log \sigma(\langle w,c\rangle ) + k \cdot \mathbb E_{c_N\sim PD}[\log\sigma(−\langle w,c_N\rangle)].$$

I understand the left term logσ(⟨w,c⟩)$\log \sigma(\langle w,c\rangle)$, but I can't understand the very idea of sampling negative word-context pairs.

How sampling works in Word2vec? Can someone please make me understand NCE and negative sampling?

I have been trying hard to understand the concept of sampling some contexts. The main thing is I am unable to digest the idea of sampling. For example in Mikolov's papers, the negative sampling expectation is formulated as : logσ(⟨w,c⟩)+k⋅𝔼cN∼PD[logσ(−⟨w,cN⟩)] I clearly understand the left term logσ(⟨w,c⟩), but I can't understand the very idea of sampling negative word-context pairs.

How does negative sampling work in word2vec?

I have been trying hard to understand the concept of negative sampling in the context of word2vec. I am unable to digest the idea of [negative] sampling. For example in Mikolov's papers the negative sampling expectation is formulated as

$$\log \sigma(\langle w,c\rangle ) + k \cdot \mathbb E_{c_N\sim PD}[\log\sigma(−\langle w,c_N\rangle)].$$

I understand the left term $\log \sigma(\langle w,c\rangle)$, but I can't understand the idea of sampling negative word-context pairs.

Source Link
Upendra Kumar
  • 383
  • 1
  • 3
  • 5

How sampling works in Word2vec? Can someone please make me understand NCE and negative sampling?

I have been trying hard to understand the concept of sampling some contexts. The main thing is I am unable to digest the idea of sampling. For example in Mikolov's papers, the negative sampling expectation is formulated as : logσ(⟨w,c⟩)+k⋅𝔼cN∼PD[logσ(−⟨w,cN⟩)] I clearly understand the left term logσ(⟨w,c⟩), but I can't understand the very idea of sampling negative word-context pairs.