[BUG] Brute-force kNN can return nonzero distances for identical vectors
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp, github
- Lĩnh vực
- machine-learning, performance
Hướng nghiên cứu
Read PR #2841 and the existing brute-force kNN tests, including the Go test whose tolerance was adjusted there. Reproduce the float32 self-distance behavior with copied and sliced datasets, then trace the brute-force distance calculation and the existing pairwise-distance diagonal correction. Done means identical finite vectors return zero distance while distinct nearby vectors retain correct nonzero distances; add coverage for the reported input forms and metrics.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
#2841 removed a rule that forced small distances to zero when two vectors had equal squared lengths. This addressed a real problem: distinct nearby vectors could incorrectly receive zero distance, affecting neighbor ordering and clustering.
As discussed in the PR, removing that rule also exposes underlying rounding errors when comparing a vector with itself. Negative errors are still clamped to zero, while positive errors remain. Taking the square root makes these errors more visible with the Euclidean metric. The PR documents this tradeoff and adjusts the Go brute-force test tolerance accordingly.
Observed behavior :
In a float32 test with 800 vectors of 32 dimensions, searching an independently allocated copy of the dataset returned nonzero self-distances for 256 vectors:
- Maximum squared Euclidean self-distance: approximately 0.000732.
- Maximum Euclidean self-distance: approximately 0.0271.
This occurred with both k=8 and k=65. The correct self-neighbor IDs were returned. Similar behavior occurs with dataset slices, column-major inputs, and filtered searches.
Expected behavior :
Identical finite vectors should have zero distance, including when queries are copies or slices of the dataset.
Could we preserve this behavior while retaining the improvements from #2841? This would complement the diagonal correction already added for certain pairwise-distance calls, extending support to brute-force kNN.
- Ngôn ngữ chính
- Cuda
- Star
- 902
- Fork
- 267
- Merge trung bình
- 2 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 57
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NVIDIA/cuvs
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] CAGRA multi-CTA and multi-kernel search over-allocate the hashmap they useCó thể đã có người làm @mc8max đã nhận 12 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
NVIDIA/cuvs#2856 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] cuVS Bench Faiss CAGRA b_ratio reads the wrong JSON keyCó thể đã có người làm @arcusbuilds đã nhận 55 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
doc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Upgrade faiss to v1.16.0Có thể đã có người làm @aamijar đã nhận 8 ngày trước. Đang mởfaiss improvement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Specifically suppress IsEnoughWorkspace, instead of all MIopen warnings in denoiser/config.pyĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
supersonic-lumina/ENM156#50 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
tenstorrent/tt-metal#67322 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`mm_fp4(backend="cute-dsl")` on SM107 gives wrong output: `alpha` is rounded to the output dtype before the FP32 epilogueCó thể đã có người làm @shotsan đã nhận hôm nay. Đang mởneeds-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
flashinfer-ai/flashinfer#10041 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Stats API always returns model-level stats, ignoring target_stat_levels and stat filtersCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởuntriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
opensearch-project/ml-commons#5293 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] sapo_loss_fn gives a NaN gradient when a masked token's log ratio overflows expCó thể đã có người làm @shashank11yadav đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
areal-project/AReaL#2007 ·
Maintainer thường phản hồi trong vòng 1 ngày