[BUG] Brute-force kNN can return nonzero distances for identical vectors
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- cpp, github
- Ambito
- machine-learning, performance
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
#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.
- Lingua principale
- Cuda
- Stelle
- 902
- Fork
- 267
- Merge medio
- 2g 21h
- PR unite (30g)
- 57
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/cuvs
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG] CAGRA multi-CTA and multi-kernel search over-allocate the hashmap they useForse già presa @mc8max l’ha presa 12 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
NVIDIA/cuvs#2856 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] cuVS Bench Faiss CAGRA b_ratio reads the wrong JSON keyForse già presa @arcusbuilds l’ha presa 55 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
doc
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Upgrade faiss to v1.16.0Forse già presa @aamijar l’ha presa 8 giorni fa. Apertafaiss improvement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
Specifically suppress IsEnoughWorkspace, instead of all MIopen warnings in denoiser/config.pyAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
supersonic-lumina/ENM156#50 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
tenstorrent/tt-metal#67322 ·
I maintainer di solito rispondono entro 1 giorno
-
`mm_fp4(backend="cute-dsl")` on SM107 gives wrong output: `alpha` is rounded to the output dtype before the FP32 epilogueForse già presa @shotsan l’ha presa oggi. Apertaneeds-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
flashinfer-ai/flashinfer#10041 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] Stats API always returns model-level stats, ignoring target_stat_levels and stat filtersForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertauntriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
opensearch-project/ml-commons#5293 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] sapo_loss_fn gives a NaN gradient when a masked token's log ratio overflows expForse già presa @shashank11yadav l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
areal-project/AReaL#2007 ·
I maintainer di solito rispondono entro 1 giorno