Coder Social home page Coder Social logo

Comments (11)

fcjy avatar fcjy commented on August 15, 2024 1

@searchivarius Of course! I had sent it.

from hnswlib.

searchivarius avatar searchivarius commented on August 15, 2024

@fcjy do you have the same issue with NMSLIB implementation?
PS: HNSW doesn't always work. I have an example where it doesn't work with the cosine similarity and with the inner product.

from hnswlib.

fcjy avatar fcjy commented on August 15, 2024

@fcjy do you have the same issue with NMSLIB implementation?
PS: HNSW doesn't always work. I have an example where it doesn't work with the cosine similarity and with the inner product.

Thank you for your reply!
I had tried NMSLIB, it is better than hnswlib. it's recall rate is 72%, cost 7ms for once search, with the same parameters.
Maybe faiss::IndexIVFFlat is more suitable for my situation.

from hnswlib.

yurymalkov avatar yurymalkov commented on August 15, 2024

@fcjy Can you please share a dataset with the problem?
Also, did you tried post=2 in nmslib's HNSW and setting EXTEND_USE_EXTENDED_NEIGHB_AT_CONSTR to 1 in nmslib's code https://github.com/nmslib/nmslib/blob/master/similarity_search/src/method/hnsw.cc#L52?

I have some ideas why this might happen. One way to solve the problems is using https://github.com/stanis-morozov/ip-nsw code/ (C++), an extension of HNSW done specifically for inner product space.

from hnswlib.

fcjy avatar fcjy commented on August 15, 2024

@yurymalkov Of course! I had sent an email to you(yurymalkov_mail_ru), please check it.
And I will try the two methods you mentioned today.
Thanks!

from hnswlib.

yurymalkov avatar yurymalkov commented on August 15, 2024

@fcjy Thank you! I'll test it in a few days.

from hnswlib.

fcjy avatar fcjy commented on August 15, 2024

I do a transform, let the MIPS problem change to NNS problem, such as chapter 2.1 in this paper, and then run libhnsw, that get a very nice result!

from hnswlib.

searchivarius avatar searchivarius commented on August 15, 2024

@fcjy could you share your data with me to? (leo at boytsov.info). A one to 10 million sample will be enough. Many thanks!

from hnswlib.

wuwenjunwwj avatar wuwenjunwwj commented on August 15, 2024

hi, I have encountered the same problem。I have a dataset with 128 dimension and I build a index(M = 200, ef_construction = 1000) in inner product space,search topK = 5000, it's call rate is 70%。but when I build index with normalized vector with the same parametor,it‘s rate is about 98% 。Do you know the reason now and have any suggestions ?

from hnswlib.

searchivarius avatar searchivarius commented on August 15, 2024

@wuwenjunwwj the inner product search is likely more challenging. It's not the same search problem. Plus, for topK=5000 it's difficult to get accurate results with k-NN search overall.

from hnswlib.

searchivarius avatar searchivarius commented on August 15, 2024

@fcjy do you still have that old data set? I tried to download it recently, but clearly it's not there any more :-)

from hnswlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.