Inthispaper,westudytheproblemofhowtoreliablycomputeneighborhoodsonaffinitygraphs.Thek-nearestneighbors(kNN)isoneofthemostfundamentalandsimplemethodswidelyusedinmanytasks,suchasclassi-ficationandgraphconstruction.