TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Word vectors are awesome but you don’t need a neural network to find them

276 pointsby blopeurover 7 years ago

24 comments

tensorover 7 years ago
After reading this I&#x27;m left wondering why anyone should stop using word2vec. The article makes the point that you can produce word vectors using other techniques, in this case by computing probabilities of unigrams and skip-grams and running SVD.<p>This is all well and good, but from an industry practitioner standpoint this doesn&#x27;t explain why one would avoid using, or actually stop using word2vec.<p>1. Several known good word2vec implementations exist, the complexity of the technique doesn&#x27;t really matter as you can just pick one of these and use it.<p>2. Pretrained word vectors produced from word2vec and newer algorithms exist for many languages.<p>Why should someone stop using these and instead spend time implementing a simpler method that produces <i>maybe good enough</i> vectors? Being a simpler method isn&#x27;t a reason in of itself.
评论 #15506010 未加载
评论 #15505215 未加载
评论 #15504874 未加载
jdonaldsonover 7 years ago
One other benefit of using word2vec-stle training is that you can also control the learning rate, and gracefully handle new training data.<p>SVD must be done at-once, and you need to use sparse matrix abstractions for raw word vectors. The implementation and abstractions you use actually make it <i>more</i> complex than word2vec imho.<p>Word2vec can train off pretty much any type of sequence. You can adjust the learning rate on the fly (to emphasize earlier&#x2F;later events), stop or start incremental training, and with Doc2Vec you can train embeddings for more abstract tokens in a much more straightforward manner (doc ids, user ids, etc.)<p>While word2vec embeddings are not always reproducible, it is much more stable with the addition of new training data. This is key if you want some stability in a production system over time.<p>Also, somebody edited the title of the article, thanks! The original title of &quot;Stop using word2vec&quot; is click-bait FUD rubbish. I think in this case we&#x27;re trying too hard to wring a good discussion out of a bad article.
staredover 7 years ago
Well, the thing that word2vec can (and should) be understood in terms of word coincidences (and pointwise mutual information) is important, but hardly new. I tried to explain it here: <a href="http:&#x2F;&#x2F;p.migdal.pl&#x2F;2017&#x2F;01&#x2F;06&#x2F;king-man-woman-queen-why.html" rel="nofollow">http:&#x2F;&#x2F;p.migdal.pl&#x2F;2017&#x2F;01&#x2F;06&#x2F;king-man-woman-queen-why.html</a>.<p>There is a temptation to use just the word pair counts, skipping SVD, but it won&#x27;t yield in the best results. Creating vectors not only compresses data, but also finds general patterns. This compression is super important for less frequent words (otherwise we get a lot of overfitting). See &quot;Why do low dimensional embeddings work better than high-dimensional ones?&quot; from <a href="http:&#x2F;&#x2F;www.offconvex.org&#x2F;2016&#x2F;02&#x2F;14&#x2F;word-embeddings-2&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.offconvex.org&#x2F;2016&#x2F;02&#x2F;14&#x2F;word-embeddings-2&#x2F;</a>.
评论 #15504799 未加载
arrmnover 7 years ago
Word embeddings are not just useful for text, they can be applied whenever you have relation between &quot;tokens&quot;. You can use them to identifying nodes in graphs that belong to the same group[0]. Another, in my opinion, really interesting idea is to apply them to relational databases[1], you can simply ask for similar rows.<p>It&#x27;s a interesting article but the author didn&#x27;t really provide good arguments why I should stop using w2v.<p>[0] <a href="http:&#x2F;&#x2F;www.kdd.org&#x2F;kdd2017&#x2F;papers&#x2F;view&#x2F;struc2vec-learning-node-representations-from-structural-identity" rel="nofollow">http:&#x2F;&#x2F;www.kdd.org&#x2F;kdd2017&#x2F;papers&#x2F;view&#x2F;struc2vec-learning-no...</a> [1] <a href="https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;1603.07185" rel="nofollow">https:&#x2F;&#x2F;arxiv.org&#x2F;abs&#x2F;1603.07185</a>
评论 #15510336 未加载
评论 #15505306 未加载
oh-kumudoover 7 years ago
&gt; Word vectors are awesome but you don’t need a neural network – and definitely don’t need deep learning – to find them<p>Word2vec is not deep learning (the skip-gram algorithm is basically a one matrix multiplication followed by softmax, there isn&#x27;t even place for activation function, why is this deep learning?), and it is simple and efficient. And most of all, there is no overhead using word2vec, just a difference between pre-trained vectors or trained ones.<p>I don&#x27;t understand what this article tries to say.
评论 #15506451 未加载
make3over 7 years ago
<a href="https:&#x2F;&#x2F;github.com&#x2F;facebookresearch&#x2F;fastText" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;facebookresearch&#x2F;fastText</a> this is Facebook&#x27;s super efficient word2vec like implemention. i thought ppl might find it interesting
kuschkuover 7 years ago
So, where do I get premade versions of this included all words of the 28 largest languages? This is one of the most valuable properties of word2vec and co: Prebuilt versions for many languages, with every word of the dictionary in them.<p>Once you have that, we can talk about actually replacing word2vec and similar solutions.
评论 #15504014 未加载
serveboyover 7 years ago
word2vec yields better representations than PMI-SVD. If you want a better explicit PMI matrix factorization, have a look at <a href="https:&#x2F;&#x2F;github.com&#x2F;alexandres&#x2F;lexvec" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;alexandres&#x2F;lexvec</a> and the original paper. Explains why SVD performs poorly.<p>If you are looking for word embedding for production use, checkout fasttext, lexvec, glove, or word2vec. Don&#x27;t use the approach described in this article.
评论 #15504538 未加载
fnlover 7 years ago
SVD scales with the number of items cubed, w2v scales linearly. Typical real world vocabularies are 1-10M, not 10-100k. This article is FUD and best, and IMO, just plain BS.
评论 #15506263 未加载
评论 #15505929 未加载
rpedelaover 7 years ago
This is a great, simple explanation of word vectors. However I think the argument would have been stronger if there were numbers showing that this simplified method and word2vec are similarly accurate like the author claims.
kirillkhover 7 years ago
Asking as someone who barely has any clue in this field: is there a way to use this for full-text search, e.g. Lucene? I know from experience that for some languages (e.g. Herew) there are no good stemmers available out of the box, so can you easily build a stemmer&#x2F;lemmatizer (or even something more powerful? [1]) on top of word2vec or fastText?<p>[1] E.g., for each word in a document or a search string, it would generate not just its base form, but also a list of top 3 base forms that are different, but similar in meaning to this word&#x27;s base form (where the meaning is inferred based on context).
评论 #15507008 未加载
hellrichover 7 years ago
One argument for SVD is the low reliability (as in results fluctuate with repeated experiments) of word2vec embeddings, which hampers (qualitative) interpretation of the resulting embedding spaces, see: <a href="http:&#x2F;&#x2F;www.aclweb.org&#x2F;anthology&#x2F;C&#x2F;C16&#x2F;C16-1262.pdf" rel="nofollow">http:&#x2F;&#x2F;www.aclweb.org&#x2F;anthology&#x2F;C&#x2F;C16&#x2F;C16-1262.pdf</a>
Piezoidover 7 years ago
Random projections methods are cheaper alternatives to SVD. For example you can bin contexts with a hash function and count collocations between word and binned contexts the same way this article does. Then apply weighting and SVD if you really want the top n principal components.<p>What&#x27;s nice with counting methods is that you can simply add matrices from different collections of documents.
Radimover 7 years ago
Article explaining this relationship between matrix factorizations (SVD) and word2vec [2014]:<p><a href="https:&#x2F;&#x2F;rare-technologies.com&#x2F;making-sense-of-word2vec&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rare-technologies.com&#x2F;making-sense-of-word2vec&#x2F;</a><p>(also contains benchmark experiments with concrete numbers and Github code -- author here)
kevinalbertover 7 years ago
I must be missing something here - in step 3, PMI for x, y is calculated as:<p>log( P(x|y) &#x2F; ( P(x)P(y) ) )<p>Because the skipgram probabilities are sparse, P(x|y) is often going to be zero, so taking the log yields negative infinity. The result is a dense PMI matrix filled (mostly) with -Inf.<p>Should we be adding 1 before taking the log?
wodenokotoover 7 years ago
I thought w2v didn&#x27;t have any hidden layers or non-linear activation function, making it essentially a linear regression.<p>Do I need to reread some papers?
make3over 7 years ago
also, word2vec are super fast and work great. the text has no convincing argument on why not to use them, unless you don&#x27;t want to learn basic neutral nets. even then, just use Facebook fast text : <a href="https:&#x2F;&#x2F;github.com&#x2F;facebookresearch&#x2F;fastText" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;facebookresearch&#x2F;fastText</a>
justwantaccountover 7 years ago
I thought this article was going to talk about GloVe, which actually performs better than Google&#x27;s word2vec without a neural network according to its paper, but I guess not.
anentropicover 7 years ago
one of the tables in the article mentions something called &quot;word2tensor&quot; but google doesn&#x27;t throw up anything<p>except this tweet which seems to be from a conference <a href="https:&#x2F;&#x2F;twitter.com&#x2F;ic&#x2F;status&#x2F;756918600846356480?lang=en" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;ic&#x2F;status&#x2F;756918600846356480?lang=en</a><p>does anyone have any info about it?
评论 #15507703 未加载
KasianFranksover 7 years ago
Here&#x27;s one more reason:<p>Word2Vec is based on an approach from Lawrence Berkeley National Lab posted in Bag of Words Meets Bags of Popcorn 3 years ago 2 &quot;Google silently did something revolutionary on Thursday. It open sourced a tool called word2vec, prepackaged deep-learning software designed to understand the relationships between words with no human guidance. Just input a textual data set and let underlying predictive models get to work learning.&quot;<p>“This is a really, really, really big deal,” said Jeremy Howard, president and chief scientist of data-science competition platform Kaggle. “… It’s going to enable whole new classes of products that have never existed before.” <a href="https:&#x2F;&#x2F;gigaom.com&#x2F;2013&#x2F;08&#x2F;16&#x2F;were-on-the-cusp-of-deep-learning-for-the-masses-you-can-thank-google-later&#x2F;" rel="nofollow">https:&#x2F;&#x2F;gigaom.com&#x2F;2013&#x2F;08&#x2F;16&#x2F;were-on-the-cusp-of-deep-learn...</a><p>Spotify seems to be using it now: <a href="http:&#x2F;&#x2F;www.slideshare.net&#x2F;AndySloane&#x2F;machine-learning-spotify-madison-big-data-meetup" rel="nofollow">http:&#x2F;&#x2F;www.slideshare.net&#x2F;AndySloane&#x2F;machine-learning-spotif...</a> pg 34<p>But here&#x27;s the interesting part:<p>Lawrence Berkeley National Lab was working on an approach more detailed than word2vec (in terms of how the vectors are structured) since 2005 after reading the bottom of their patent: <a href="http:&#x2F;&#x2F;www.google.com&#x2F;patents&#x2F;US7987191" rel="nofollow">http:&#x2F;&#x2F;www.google.com&#x2F;patents&#x2F;US7987191</a> The Berkeley Lab method also seems much more exhaustive by using a fibonacci based distance decay for proximity between words such that vectors contain up to thousands of scored and ranked feature attributes beyond the bag-of-words approach. They also use filters to control context of the output. It was also made part of search&#x2F;knowledge discovery tech that won the 2008 R&amp;D100 award <a href="http:&#x2F;&#x2F;newscenter.lbl.gov&#x2F;news-releases&#x2F;2008&#x2F;07&#x2F;09&#x2F;berkeley-lab-wins-four-2008-rd-100-awards&#x2F;" rel="nofollow">http:&#x2F;&#x2F;newscenter.lbl.gov&#x2F;news-releases&#x2F;2008&#x2F;07&#x2F;09&#x2F;berkeley-...</a> &amp; <a href="http:&#x2F;&#x2F;www2.lbl.gov&#x2F;Science-Articles&#x2F;Archive&#x2F;sabl&#x2F;2005&#x2F;March&#x2F;06-genopharm.html" rel="nofollow">http:&#x2F;&#x2F;www2.lbl.gov&#x2F;Science-Articles&#x2F;Archive&#x2F;sabl&#x2F;2005&#x2F;March...</a><p>A search company that competed with Google called &quot;seeqpod&quot; was spun out of Berkeley Lab using the tech but was then sued for billions by Steve Jobs <a href="https:&#x2F;&#x2F;medium.com&#x2F;startup-study-group&#x2F;steve-jobs-made-warner-music-sue-my-startup-9a81c5a21d68#.jw76fu1vo" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;startup-study-group&#x2F;steve-jobs-made-warne...</a> and a few media companies <a href="http:&#x2F;&#x2F;goo.gl&#x2F;dzwpFq" rel="nofollow">http:&#x2F;&#x2F;goo.gl&#x2F;dzwpFq</a><p>We might combine these approaches as there seems to be something fairly important happening here in this area. Recommendations and sentiment analysis seem to be driving the bottom lines of companies today including Amazon, Google, Nefflix, Apple et al.<p><a href="https:&#x2F;&#x2F;www.kaggle.com&#x2F;c&#x2F;word2vec-nlp-tutorial&#x2F;discussion&#x2F;12349" rel="nofollow">https:&#x2F;&#x2F;www.kaggle.com&#x2F;c&#x2F;word2vec-nlp-tutorial&#x2F;discussion&#x2F;12...</a>
评论 #15506985 未加载
make3over 7 years ago
professionals don&#x27;t use pretrained word2vec vectors in the really complex (like neural machine transnation) deep learning models anymore, they let the models train their own word embeddings directly, or let the models learn character level embeddings.
评论 #15504856 未加载
评论 #15504178 未加载
评论 #15510170 未加载
phy6over 7 years ago
I find these baiting titles tiresome, and I generally assume (even if it makes an ass out of me) that the author is splitting hairs or wants to grandstand on some inefficiency that most of us knew was there already. (I&#x27;m assuming if they had a real argument then it would have been in a descriptive title) With titles like these I&#x27;ll go straight to the comments section before giving you any ad-revenue. This is HN, not Buzzfeed, and we deserve better than this.
评论 #15504314 未加载
评论 #15504592 未加载
JKirchartzover 7 years ago
Wake me up when you have a readily available libraries to implement this in multiple programming languages.
评论 #15503797 未加载
评论 #15507023 未加载
ytersover 7 years ago
This is excellent. This is the kind of machine learning we need, that provides understanding instead of &quot;throw this NN at this lump of data and tweak parameters until the error is small enough.&quot;