Comments (11)
@searchivarius Of course! I had sent it.
from hnswlib.
@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 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.
@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.
@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.
@fcjy Thank you! I'll test it in a few days.
from hnswlib.
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.
@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.
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.
@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.
@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)
- ability to have a custom distance function
- Question : Implementing disk paging for index larger than memory
- Question: Single vs. Multiple HNSW Graphs for Nearest Neighbor Searches Across Multiple Companies? HOT 1
- Error: ‘_mm512_reduce_add_ps’ was not declared in this scope HOT 1
- CMakeLists needs a fix for some hardcoded flags HOT 2
- Question: Is index build time unstable? HOT 2
- Sharing: Single vs Multiple HNSW graph && Impact of parameters on HNSW search
- Purpose of label_lookup_ HOT 1
- InnerProduct possible BUG: 1.0 - sum(x * y). In faiss and milvus, its just sum(x * y)
- Illegal instruction (core dumped) when importing hnswlib HOT 1
- The IP space [1.0 - sum(AiBi)] might be inaccurate. Why not separate the IP from the cosine, and define the IP simply as [- sum(AiBi)]? HOT 1
- Loaded index query error
- Normalization of CLIP Vectors Before Storing in Milvus for Cosine Similarity HOT 1
- About checkIntegrity HOT 1
- How do I use hnswlib for ColBERT's set of vectors? HOT 1
- Regarding the identification of elements with a high contribution rate in the inspection vector.
- Is simultaneous querying and inserting thread-safe? HOT 2
- Correlation of `M`, `k` and `number of items` in the index HOT 1
- Illegal instruction (core dumped) when load_index HOT 1
- stream load. Is it possible? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hnswlib.