[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-81842-en":3,"doc-seo-81842-105":30,"detail-sidebar-cat-0-en-105":92},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":11,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":27,"seo_description":14,"update_tm":28,"read_time":29},81842,5909877438554,"Maeve","https://ap-avatar.wpscdn.com/avatar/5600025385ad2bf12a7?_k=1778553567797529272",8,"Research & Report","HNSW with Accuracy Guarantees Using Graph Spanners","Hierarchical Navigable Small World (HNSW) graphs deliver logarithmic complexity and strong empirical retrieval quality, yet their greedy traversal offers no theoretical correctness guarantees. This work presents a “Certify-then-Rectify” (CTR) framework that couples efficient HNSW search with exact retrieval rigor. A distribution-free statistical certifier evaluates neighbor quality with minimal overhead; if quality is low, the method escalates to rigorous exact recovery. The recovery is made efficient by modeling the HNSW graph as a geometric spanner and using Extreme Value Theory to bound its maximum empirical stretch. The guarantees extend to filtered search and are validated on benchmark datasets, showing worst-case correctness with average-case HNSW speed.","HNSW with Accuracy Guarantees Using Graph Spanners  \nMinghao Li  \nUniversity of Toronto Toronto, Canada [mingh.li@mail.utoronto.ca](mingh.li@mail.utoronto.ca)  \nSuraj Shetiya  \nIIT Bombay Mumbai, India [surajs@cse.iitb.ac.in](surajs@cse.iitb.ac.in)  \nRaghav Mittal  \nThe University of Texas At Arlington Arlington, Texas, USA[rxm0006@mavs.uta.edu](rxm0006@mavs.uta.edu)  \nGautam Das  \nThe University of Texas at Arlington Arlington, Texas, USA [gdas@uta.edu](gdas@uta.edu)  \nSanjivni Rana  \nThe University of Texas At Arlington Arlington, Texas, USA [sxr0277@mavs.uta.edu](sxr0277@mavs.uta.edu)  \nNick Koudas University of Toronto  \nToronto, Canada [koudas@cs.toronto.edu](koudas@cs.toronto.edu)  \narXiv :2607 .02338v2 [ cs .DB] 5 Jul 2026  \nABSTRACT  \nHierarchical Navigable Small World (HNSW) graphs serve as the industry standard due to their logarithmic complexity and strong empirical performance. However, HNSW relies on greedy graph traversal, a heuristic that provides no theoretical guarantees of correctness. In this paper, we propose a novel ”Certify-then-Rectify”framework that bridges the gap between the speed of heuristic search and the rigor of exact retrieval. Rather than discarding HNSW, our approach first employs a distribution-free statistical certifier to dynamically evaluate the quality of a standard HNSW search with minimal overhead. If the certification indicates that the retrieved neighbors are of low quality, the framework safely escalates toa rigorous exact recovery algorithm. To make this exact recovery computationally feasible, we reinterpret the HNSW graph asa geometric spanner and utilize Extreme Value Theory to stochastically estimate its maximum empirical stretch factor. This allows us to mathematically bound the maximum distance of true nearest neighbors. Furthermore, we successfully extend these theoretical guarantees to filtered search scenarios. Extensive evaluations on benchmark datasets demonstrate that our tiered framework delivers the average-case speed of HNSW while ensuring the worst-case correctness of exact search.  \nPVLDB Reference Format:  \nMinghao Li, Raghav Mittal, Sanjivni Rana, Suraj Shetiya, Gautam Das, and Nick Koudas. HNSW with Accuracy Guarantees Using Graph Spanners. PVLDB, 20(1): XXX-XXX, 2027 .  \ndoi:XX.XX/XXX.XX  \nPVLDB Artifact Availability:  \nThe source code, data, and/or other artifacts have been made available at [https://github.com/ming-afk/recall_certify_hnsw](https://github.com/ming-afk/recall_certify_hnsw).  \n1 INTRODUCTION  \nNearest Neighbor Search (NNS) is the computational engine behind modern AI, driving workloads ranging from Large Language Model (LLM) retrieval to molecular simulations. As datasets scale  \nThis work is licensed under the Creative Commons BY-NC-ND 4.0 International License. Visit [https://creativecommons.org/licenses/by-nc-nd/4.0/ to view a copy of](https://creativecommons.org/licenses/by-nc-nd/4.0/ to view a copy of)[ ](https://creativecommons.org/licenses/by-nc-nd/4.0/ to view a copy of)[this license. For any use beyond those covered by this license](this license. For any use beyond those covered by this license), [obtain permission by](obtain permission by)[emailing info@vldb.org. Copyright](emailing info@vldb.org. Copyright) is held by the owner/author(s). Publication rights licensed to the VLDB Endowment.  \nProceedings of the VLDB Endowment, Vol. 20, No. 1 ISSN 2150-8097 . doi:XX.XX/XXX.XX  \ninto the billions of vectors, exact linear scanning becomes computationally prohibitive, necessitating Approximate Nearest Neighbor (ANN) algorithms. Among these, Hierarchical Navigable Small World (HNSW) graphs [37, 40] have become the industry standard due to their logarithmic complexity and generally strong empirical performance.  \nFigure 1: Certify-then-Rectify (CTR) search framework  \nHowever, HNSW relies on a greedy traversal of a proximity graph—a heuristic that offers no theoretical guarantee of recall [2, 12, 46, 57]. While HNSW performs well empirically, ","cbCaivoRR5NeSzGO","https://ap.wps.com/l/cbCaivoRR5NeSzGO","pdf",2155861,1,23,"English","en",105,"# Introduction\n# Certify-then-Rectify (CTR) Framework\n## Certifier and Escalation to Exact Retrieval\n## Stretch Bounded Expansion and Stretch Bounds\n## Extension to Filtered Search\n# Experimental Evaluation","[{\"question\":\"What problem does the paper address with HNSW retrieval?\",\"answer\":\"HNSW uses greedy graph traversal, which lacks theoretical guarantees of correctness and recall. The paper targets the gap between fast heuristic search and exact, correctness-rigorous retrieval.\"},{\"question\":\"How does the Certify-then-Rectify (CTR) framework work?\",\"answer\":\"The method first runs a standard HNSW search, then applies a distribution-free statistical certifier to assess the quality of retrieved neighbors. If the retrieved neighbors are judged to be low quality, it safely escalates to an exact recovery algorithm.\"},{\"question\":\"Why does the paper reinterpret HNSW as a graph spanner?\",\"answer\":\"To make exact recovery computationally feasible, the approach treats the HNSW graph as a geometric spanner and uses Extreme Value Theory to estimate the maximum empirical stretch factor. This enables mathematical bounds on the maximum distance of true nearest neighbors and supports correctness guarantees.\"}]","HNSW with Accuracy Guarantees Using Graph Spanners | PDF",1784176593,58,{"code":4,"msg":31,"data":32},"ok",{"site_id":24,"language":23,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":87,"head_meta":89,"extra_data":91,"updated_unix":28},"hnsw-with-accuracy-guarantees-using-graph-spanners","",{"@graph":36,"@context":86},[37,54,69],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,51],{"item":41,"name":42,"@type":43,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":50},"https://docshare.wps.com/document/research-report/",3,{"item":52,"name":13,"@type":43,"position":53},"https://docshare.wps.com/document/hnsw-with-accuracy-guarantees-using-graph-spanners/81842/",4,{"url":52,"name":13,"@type":55,"author":56,"headline":13,"publisher":58,"fileFormat":61,"inLanguage":23,"description":14,"dateModified":62,"datePublished":63,"encodingFormat":61,"isAccessibleForFree":64,"interactionStatistic":65},"DigitalDocument",{"name":9,"@type":57},"Person",{"url":41,"name":59,"@type":60},"DocShare","Organization","application/pdf","2026-08-03","2026-07-16",true,{"@type":66,"interactionType":67,"userInteractionCount":11},"InteractionCounter",{"@type":68},"ViewAction",{"@type":70,"mainEntity":71},"FAQPage",[72,78,82],{"name":73,"@type":74,"acceptedAnswer":75},"What problem does the paper address with HNSW retrieval?","Question",{"text":76,"@type":77},"HNSW uses greedy graph traversal, which lacks theoretical guarantees of correctness and recall. The paper targets the gap between fast heuristic search and exact, correctness-rigorous retrieval.","Answer",{"name":79,"@type":74,"acceptedAnswer":80},"How does the Certify-then-Rectify (CTR) framework work?",{"text":81,"@type":77},"The method first runs a standard HNSW search, then applies a distribution-free statistical certifier to assess the quality of retrieved neighbors. If the retrieved neighbors are judged to be low quality, it safely escalates to an exact recovery algorithm.",{"name":83,"@type":74,"acceptedAnswer":84},"Why does the paper reinterpret HNSW as a graph spanner?",{"text":85,"@type":77},"To make exact recovery computationally feasible, the approach treats the HNSW graph as a geometric spanner and uses Extreme Value Theory to estimate the maximum empirical stretch factor. This enables mathematical bounds on the maximum distance of true nearest neighbors and supports correctness guarantees.","https://schema.org",{"og:url":52,"og:type":88,"og:title":13,"og:site_name":59,"og:description":14},"article",{"robots":90,"canonical":52},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":93},[94,98,102,106,111,116,121,124,129,132,136],{"id":20,"doc_module":4,"doc_module_name":46,"category_name":95,"show_sort_weight":96,"slug":97},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":99,"show_sort_weight":100,"slug":101},"Literature",80,"literature",{"id":53,"doc_module":4,"doc_module_name":46,"category_name":103,"show_sort_weight":104,"slug":105},"Exam",70,"exam",{"id":107,"doc_module":4,"doc_module_name":46,"category_name":108,"show_sort_weight":109,"slug":110},5,"Comic",60,"comic",{"id":112,"doc_module":4,"doc_module_name":46,"category_name":113,"show_sort_weight":114,"slug":115},6,"Technology",50,"technology",{"id":117,"doc_module":4,"doc_module_name":46,"category_name":118,"show_sort_weight":119,"slug":120},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":122,"slug":123},30,"research-report",{"id":125,"doc_module":4,"doc_module_name":46,"category_name":126,"show_sort_weight":127,"slug":128},9,"Religion & Spirituality",20,"religion-spirituality",{"id":127,"doc_module":4,"doc_module_name":46,"category_name":130,"show_sort_weight":127,"slug":131},"World Cup","world-cup",{"id":133,"doc_module":4,"doc_module_name":46,"category_name":134,"show_sort_weight":133,"slug":135},10,"Lifestyle","lifestyle",{"id":137,"doc_module":4,"doc_module_name":46,"category_name":138,"show_sort_weight":107,"slug":139},19,"General","general"]