Whoever wrote the article must have done a cursory search at best, I'm surprised they didn't mention semantic hashing by Salakhutdinov & Hinton (2007) https://www.cs.utoronto.ca/~rsalakhu/papers/semantic_final.p... Edit: also, talking about LSH, must check out FAISS library https://github.com/facebookresearch/faiss and the current SOTA http://ann-benchmarks.com/
Vectors are over, hashes are the future of AI
21–27 of 27 posts
Re: Vectors are over, hashes are the future of AI
#22Whoever wrote the article must have done a cursory search at best, I'm surprised they didn't mention semantic hashing by Salakhutdinov & Hinton (2007) https://www.cs.utoronto.ca/~rsalakhu/papers/semantic_final.p... Edit: also, talking about LSH, must check out FAISS library https://github.com/facebookresearch/faiss and the current SOTA http://ann-benchmarks.com/
I'm intrigued by FAISS. Do you know if I can use BERT embeddings with FAISS?
Re: Vectors are over, hashes are the future of AI
#23hm. I'd like to believe, but the arguments here seem a bit obtuse. No one measures vector distance using the hamming distance on binary representations. That's silly. We use L1 or L2, usually, and the binary encoding of the numbers is irrelevant. It sounds like the LSH is maaaaybe equivalent to vector quantization. In which case this would be a form of regularization, which sometimes works well, and sometimes meh.
I was part of the above article. Happy to answer questions. In terms of accuracy, it totally depends on the resolution needed. We can get >99% accuracy of L2 waaaaay faster with 1/10 of the memory overhead. For what we are doing that is the perfect trade off. In terms of LSH, we tried projection hashing and quantization and were always disappointed.
Or is there actually some interesting hash-based neural algorithm lurking around somewhere?
Re: Vectors are over, hashes are the future of AI
#24Earlier quoted context omitted.
I'm intrigued by FAISS. Do you know if I can use BERT embeddings with FAISS?
Yes. Check out this example with Faiss + Bert: https://www.pinecone.io/learn/faiss-tutorial/
Re: Vectors are over, hashes are the future of AI
#25Whoever wrote the article must have done a cursory search at best, I'm surprised they didn't mention semantic hashing by Salakhutdinov & Hinton (2007) https://www.cs.utoronto.ca/~rsalakhu/papers/semantic_final.p... Edit: also, talking about LSH, must check out FAISS library https://github.com/facebookresearch/faiss and the current SOTA http://ann-benchmarks.com/
Re: Vectors are over, hashes are the future of AI
#26Earlier quoted context omitted.
I was part of the above article. Happy to answer questions. In terms of accuracy, it totally depends on the resolution needed. We can get >99% accuracy of L2 waaaaay faster with 1/10 of the memory overhead. For what we are doing that is the perfect trade off. In terms of LSH, we tried projection hashing and quantization and were always disappointed.
So it seems like the neural network producing the neural hash is still a standard CNN operating on the usual vector representations? And then the learned hash gets used in a downstream problem... Or is there actually some interesting hash-based neural algorithm lurking around somewhere?
Network based hashing is great to maximise information quality of the hash (compared to other LSH methods). It works to compress existing vectors super efficiently.
Very soon things like language embeddings will skip the vectors and instead networks output hashes directly. These are much faster as the network can learn where to use more bits where it needs resolution, as opposed to using floatXX for everything. It’s amazing to see it work, but not fully there yet.
Re: Vectors are over, hashes are the future of AI
#27Hi, my interest got piqued. I'm developing a similarity feature where I compare embeddings of a sentence and its translation. I wanted to know if the hashing method would be faster that the pytorch multiplication by which I get the sentence similarities. Going from strings to bytes, hashing and comparing is very fast. But if I get the embeddings, turn them into bytes, hash them and compare them, both methods take alm…