Spatial sorting: An efficient strategy for approximate nearest neighbor searching

Many graphics and also non-graphics applications need efficient techniques to find the nearest neighbors of a given query point. There are two approaches to address this problem: space-partitioning and data-partitioning. We present a data-partitioning error-controlled strategy for solving the nearest neighbor search (NNS) problem using spatial sorting as the basic building block. We improve on the neighborhood grid method by doing an extensive study on novel spatial sorting strategies for bidimensional NNS, providing significant performance and precision gains over previous works. Experiments demonstrate that, for many dense 2D point distributions, our solution is competitive with more complex and traditional techniques, such as k-d trees and index sorting. We also show comparable results for the 3D case. Our primary contribution is a dynamic, simple to implement, memory efficient, and highly parallelizable solution for low-dimensional approximate nearest neighbor search. Graphical abstractThis paper discusses in depth the problem of spatially sorting points in 2D and 3D, aiming to perform a fast, dynamic, and memory-efficient approximate nearest neighbor search.Display Omitted HighlightsWe analyze in depth the problem of spatially sorting points in two and three dimensions.We present novel and efficient spatial sorting algorithms.The performance and precision for nearest neighbor search (NNS) is evaluated.We show that spatial sorting is competitive against current NNS techniques.

[1]  Nathaniel Baum-Snow,et al.  Mismeasurement of Usual Hours Worked In the Census and ACS. , 2009, Economics letters.

[2]  David Haws,et al.  QuickLexSort: An efficient algorithm for lexicographically sorting nested restrictions of a database , 2013, ArXiv.

[3]  Sung-Eui Yoon,et al.  Out-of-Core Proximity Computation for Particle-based Fluid Simulations , 2014, High Performance Graphics.

[4]  Roger E. Cannaday,et al.  A multivariate repeat-sales model for estimating house price indices , 2005 .

[5]  Amihai Glazer,et al.  Federal grants and yardstick competition , 2002 .

[6]  Kevin M. Murphy,et al.  Wage Inequality and the Rise in Returns to Skill , 1993, Journal of Political Economy.

[7]  Kenji Shimada,et al.  Bubble mesh: automated triangular meshing of non-manifold geometry by sphere packing , 1995, SMA '95.

[8]  Esteban Walter Gonzalez Clua,et al.  Neighborhood grid: A novel data structure for fluids animation with GPU computing , 2015, J. Parallel Distributed Comput..

[9]  P. Kumar,et al.  Parallel Construction of k-Nearest Neighbor Graphs for Point Clouds , 2008, VG/PBG@SIGGRAPH.

[10]  Marcelo Walter,et al.  Integrating shape and pattern in mammalian models , 2001, SIGGRAPH.

[11]  Christoph Rothe,et al.  Decomposing the Composition Effect , 2012, SSRN Electronic Journal.

[12]  David Autor,et al.  The Skill Content of Recent Technological Change: An Empirical Exploration , 2003 .

[13]  Fabian Gieseke,et al.  Buffer k-d Trees: Processing Massive Nearest Neighbor Queries on GPUs , 2014, ICML.

[14]  Enrico Moretti Real Wage Inequality , 2013 .

[15]  R. Oaxaca Male-Female Wage Differentials in Urban Labor Markets , 1973 .

[16]  Pierre-Olivier Weill,et al.  Why Has House Price Dispersion Gone Up? , 2006 .

[17]  H. Spencer Banzhaf,et al.  Interjurisdictional housing prices in locational equilibrium , 2002 .

[18]  A. Manning,et al.  Job Polarization in Europe , 2009 .

[19]  M. Keane,et al.  The Career Decisions of Young Men , 1997, Journal of Political Economy.

[20]  V. Crawford,et al.  Job Matching, Coalition Formation, and Gross Substitutes , 1982 .

[21]  Laurent Gobillon,et al.  In Economics and Social Sciences Working Papers Series the Productivity Advantages of Large Cities: Distinguishing Agglomeration from Firm Selection the Productivity Advantages of Large Cities: Distinguishing Agglomeration from Firm Selection , 2022 .

[22]  N. Fortin,et al.  Unconditional Quantile Regressions , 2007 .

[23]  David Albouy,et al.  Are Big Cities Bad Places to Live? Estimating Quality of Life Across Metropolitan Areas , 2008 .

[24]  Marios Hadjieleftheriou,et al.  R-Trees - A Dynamic Index Structure for Spatial Searching , 2008, ACM SIGSPATIAL International Workshop on Advances in Geographic Information Systems.

[25]  Giovanni Peri,et al.  Long-Run Substitutability between More and Less Educated Workers: Evidence from U.S. States 1950-1990 , 2004 .

[26]  Shihe Fu,et al.  Wage Premia in Employment Clusters: Agglomeration or Worker Heterogeneity? , 2010 .

[27]  V. Chernozhukov,et al.  Inference on Counterfactual Distributions , 2009, 0904.0951.

[28]  Robert Bridson,et al.  Fast Poisson disk sampling in arbitrary dimensions , 2007, SIGGRAPH '07.

[29]  Gilles Duranton,et al.  Productive Cities: Sorting, Selection, and Agglomeration , 2010, Journal of Political Economy.

[30]  Kurt Schmidheiny,et al.  Income Segregation from Local Income Taxation When Households Differ in Both Preferences and Incomes , 2005 .

[31]  J. Eeckhout Gibrat's Law for (All) Cities , 2004 .

[32]  Marcelo Walter,et al.  Simple and Efficient Approximate Nearest Neighbor Search Using Spatial Sorting , 2015, 2015 28th SIBGRAPI Conference on Graphics, Patterns and Images.

[33]  D. Mooney,et al.  Cancer: One step at a time , 2005, Nature.

[34]  Coen N. Teulings,et al.  Marriage and the city: Search frictions and sorting of singles , 2010 .

[35]  Simon Green,et al.  Particle Simulation using CUDA , 2010 .

[36]  Kaivan Munshi Networks in the Modern Economy: Mexican Migrants in the U. S. Labor Market , 2003 .

[37]  Esteban Walter Gonzalez Clua,et al.  A Neighborhood Grid Data Structure for Massive 3D Crowd Simulation on GPU , 2009, 2009 VIII Brazilian Symposium on Games and Digital Entertainment.

[38]  Marigee Bacolod,et al.  Skills in the city , 2009 .

[39]  S. Ruggles Integrated Public Use Microdata Series , 2021, Encyclopedia of Gerontology and Population Aging.

[40]  David Autor,et al.  The Growth of Low Skill Service Jobs and the Polarization of the U.S. Labor Market , 2009, SSRN Electronic Journal.

[41]  B. Hamilton,et al.  Team Incentives and Worker Heterogeneity: An Empirical Analysis of the Impact of Teams on Productivity and Participation , 2001, Journal of Political Economy.

[42]  X. Gabaix Zipf's Law for Cities: An Explanation , 1999 .

[43]  Marcin Ciura,et al.  Best Increments for the Average Case of Shellsort , 2001, FCT.

[44]  Miguel Lozano,et al.  A comparative study of partitioning methods for crowd simulations , 2010, Appl. Soft Comput..

[45]  Ephraim S. Leibtag,et al.  The Role of Prices in Measuring the Poor's Living Standards , 2009 .

[46]  David Albouy,et al.  Are big cities really bad places to live? improving quality-of-life estimates across cities , 2008 .

[47]  Bo Li A Comparative Analysis of Spatial Partitioning Methods for Large-scale , Real-time Crowd Simulation , 2014 .

[48]  A. Blinder Wage Discrimination: Reduced Form and Structural Estimates , 1973 .

[49]  A. Marshall Principles of Economics , .

[50]  Dimitri Van De Ville,et al.  High‐Quality Volumetric Reconstruction on Optimal Lattices for Computed Tomography , 2009, Comput. Graph. Forum.

[51]  Matthias Teschner,et al.  A Parallel SPH Implementation on Multi‐Core CPUs , 2011, Comput. Graph. Forum.

[52]  Nathaniel Baum-Snow,et al.  Understanding the City Size Wage Gap. , 2012, The Review of economic studies.

[53]  Keith R. Phillips,et al.  Measuring Regional Cost of Living , 2000 .

[54]  Jan Eeckhout,et al.  Sorting and Decentralized Price Competition , 2008 .

[55]  Marc Antonini,et al.  Adaptive semi-regular remeshing: A Voronoi-based approach , 2010, 2010 IEEE International Workshop on Multimedia Signal Processing.

[56]  Matthias Teschner,et al.  SPH Fluids in Computer Graphics , 2014, Eurographics.

[57]  Thomas Fahringer,et al.  Kd-Tree Based N-Body Simulations with Volume-Mass Heuristic on the GPU , 2014, 2014 IEEE International Parallel & Distributed Processing Symposium Workshops.

[58]  Jason Faberman,et al.  The Flow Approach to Labor Markets: New Data Sources and Micro-Macro Links , 2006 .

[59]  Morris A. Davis,et al.  Household Expenditures, Wages, Rents , 2007 .

[60]  Arjan Egges,et al.  One step at a time: animating virtual characters based on foot placement , 2010, The Visual Computer.

[61]  Elhanan Helpman,et al.  Inequality and Unemployment in a Global Economy , 2008 .

[62]  Nathaniel Baum-Snow,et al.  Inequality and City Size , 2013, Review of Economics and Statistics.

[63]  Thomas J. Holmes,et al.  Geographic Concentration and Establishment Size: Analysis in an Alternative Economic Geography Model , 2002 .

[64]  Brian Wyvill,et al.  Polygonization of Implicit Surfaces on Multi-Core Architectures with SIMD Instructions , 2012, EGPGV@Eurographics.

[65]  Esteban Rossi-Hansberg,et al.  ON THE INTERNAL STRUCTURE OF CITIES , 2002 .

[66]  Erik Hurst,et al.  Endogenous gentrification and housing price dynamics , 2013 .

[67]  Jeremy P. Spinrad,et al.  Doubly Lexical Ordering of Dense 0 - 1 Matrices , 1993, Inf. Process. Lett..

[68]  Junjie Chen,et al.  GPU-based polygonization and optimization for implicit surfaces , 2014, The Visual Computer.

[69]  Sariel Har-Peled A replacement for Voronoi diagrams of near linear size , 2001, Proceedings 2001 IEEE International Conference on Cluster Computing.

[70]  D. Puga,et al.  Learning by Working in Big Cities , 2012 .

[71]  Marc Alexa,et al.  Error diffusion on meshes , 2015, Comput. Graph..

[72]  J. Dinardo,et al.  Labor Market Institutions and the Distribution of Wages, 1973-1992: A Semiparametric Approach , 1996 .

[73]  Pieter A. Gautier,et al.  Search and the City , 2002 .

[74]  Leonidas J. Guibas,et al.  The Earth Mover's Distance as a Metric for Image Retrieval , 2000, International Journal of Computer Vision.

[75]  David Autor,et al.  Skills, Tasks and Technologies: Implications for Employment and Earnings , 2010 .

[76]  Eric D. Gould Cities, Workers, and Wages: A Structural Analysis of the Urban Wage Premium , 2007 .

[77]  Michael S. Lew,et al.  Very large scale nearest neighbor search: ideas, strategies and challenges , 2013, International Journal of Multimedia Information Retrieval.

[78]  M. E. Galassi,et al.  GNU SCIENTI C LIBRARY REFERENCE MANUAL , 2005 .

[79]  G. Duranton,et al.  Micro-Foundations of Urban Agglomeration Economies , 2003 .

[80]  Toni M. Whited,et al.  Macroeconomic implications of agglomeration , 2014 .

[81]  Tiow Seng Tan,et al.  Jump flooding in GPU with applications to Voronoi diagram and distance transform , 2006, I3D '06.

[82]  Olivier J. Blanchard,et al.  The Flow Approach to Labor Markets , 1992 .