[BUG] Brute-force kNN can return nonzero distances for identical vectors
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- cpp, github
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
#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.
- 主要言語
- Cuda
- スター
- 902
- フォーク
- 267
- 平均マージ
- 2日 21時間
- マージ済み PR(30日)
- 57
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/cuvs のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
[BUG] CAGRA multi-CTA and multi-kernel search over-allocate the hashmap they use対応中かも @mc8max が 12 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
[BUG] cuVS Bench Faiss CAGRA b_ratio reads the wrong JSON key対応中かも @arcusbuilds が 55 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
doc
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Upgrade faiss to v1.16.0対応中かも @aamijar が 8 日前に担当しました。 オープンfaiss improvement
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
supersonic-lumina/ENM156#50 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
tenstorrent/tt-metal#67322 ·
メンテナーはふだん 1 日以内に返信
-
`mm_fp4(backend="cute-dsl")` on SM107 gives wrong output: `alpha` is rounded to the output dtype before the FP32 epilogue対応中かも @shotsan が今日担当しました。 オープンneeds-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
flashinfer-ai/flashinfer#10041 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] Stats API always returns model-level stats, ignoring target_stat_levels and stat filters対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンuntriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
opensearch-project/ml-commons#5293 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] sapo_loss_fn gives a NaN gradient when a masked token's log ratio overflows exp対応中かも @shashank11yadav が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
areal-project/AReaL#2007 ·
メンテナーはふだん 1 日以内に返信