{"id":33163955,"url":"https://github.com/cgtuebingen/ggnn","last_synced_at":"2025-11-20T17:01:00.104Z","repository":{"id":39646589,"uuid":"225813685","full_name":"cgtuebingen/ggnn","owner":"cgtuebingen","description":"GGNN: State of the Art Graph-based GPU Nearest Neighbor Search","archived":false,"fork":false,"pushed_at":"2021-03-16T10:25:38.000Z","size":967,"stargazers_count":131,"open_issues_count":9,"forks_count":19,"subscribers_count":26,"default_branch":"release_0.5","last_synced_at":"2024-02-11T23:47:09.047Z","etag":null,"topics":["ann","approximate-nearest-neighbor-search","cuda","gpu","nearest-neighbor-search","vector-database","vector-db"],"latest_commit_sha":null,"homepage":"https://uni-tuebingen.de/fakultaeten/mathematisch-naturwissenschaftliche-fakultaet/fachbereiche/informatik/lehrstuehle/computergrafik/lehrstuhl/veroeffentlichungen/ggnn-graph-based-gpu-nearest-neighbor-search/","language":"Cuda","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cgtuebingen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-04T08:11:17.000Z","updated_at":"2024-01-21T12:00:51.000Z","dependencies_parsed_at":"2022-09-16T13:51:10.430Z","dependency_job_id":null,"html_url":"https://github.com/cgtuebingen/ggnn","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cgtuebingen/ggnn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgtuebingen%2Fggnn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgtuebingen%2Fggnn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgtuebingen%2Fggnn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgtuebingen%2Fggnn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cgtuebingen","download_url":"https://codeload.github.com/cgtuebingen/ggnn/tar.gz/refs/heads/release_0.5","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cgtuebingen%2Fggnn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285475217,"owners_count":27178110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-20T02:00:05.334Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ann","approximate-nearest-neighbor-search","cuda","gpu","nearest-neighbor-search","vector-database","vector-db"],"created_at":"2025-11-15T23:00:43.434Z","updated_at":"2025-11-20T17:01:00.084Z","avatar_url":"https://github.com/cgtuebingen.png","language":"Cuda","funding_links":[],"categories":["ANN search"],"sub_categories":[],"readme":"# GGNN: Graph-based GPU Nearest Neighbor Search\n*Fabian Groh, Lukas Ruppert, Patrick Wieschollek, Hendrik P.A. Lensch\n\nApproximate nearest neighbor (ANN) search in high dimensions is an integral part of several computer vision systems and gains importance in deep learning with explicit memory representations. Since PQT and FAISS started to leverage the massive parallelism offered by GPUs, GPU-based implementations are a crucial resource for today’s state-of-the-art ANN methods. While most of these methods allow for faster queries, less emphasis is devoted to accelerate the construction of the underlying index structures. In this paper, we propose a novel search structure based on nearest neighbor graphs and information propagation on graphs. Our method is designed to take advantage of GPU architectures to accelerate the hierarchical building of the index structure and for performing the query. Empirical evaluation shows that GGNN significantly surpasses the state-of-the-art GPU- and CPU-based systems in terms of build-time, accuracy and search speed.\n\n---\n\n# Update: 03/14/21\nThis work is currently under review. \nWe've updated the code. Some new results are shown below.\n![GGNN Plots](ggnn_plots.png)\n\n\n\n## How to run the code?\n\n```bash\n# Get the repository and dependencies\ngit clone --recursive https://github.com/cgtuebingen/ggnn.git\ncd ggnn\n\n# get the SIFT1M data\ncd data\n./get_sift1m\ncd ..\n\n# Build the demo\nmkdir build_local\ncd build_local\ncmake ..\nmake\n\n# Example for SIFT1M on GPU 0:\n./sift1m_multi  --base_filename ../data/sift/sift_base.fvecs \n                --query_filename ../data/sift/sift_query.fvecs \n                --groundtruth_filename ../data/sift/sift_groundtruth.ivecs \n                --gpu_ids=\"0\"\n\n# Example usage with 2 GPUs and 4 shards in total (4x250k = 1M):\n./sift1m_multi  --base_filename ../data/sift/sift_base.fvecs \n                --query_filename ../data/sift/sift_query.fvecs \n                --groundtruth_filename ../data/sift/sift_groundtruth.ivecs \n                --gpu_ids=\"0 1\" \n                --factor 10000 \n                --base 100 \n                --shard 25\n```\n\n\n### Native build\n\nRequirements:\n* CUDA (\u003e10.2)\n* libgflags-dev (`sudo apt install libgflags-dev`)\n\n\n### Docker build\nAn alternative to the native build is to use nvidia-docker. Follow instruction on https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#installing-docker-ce\n\nPrepare the docker image by\n\n```bash\ncd docker\nmake\ncd ../\n```\n\nMake sure you can run\n\n```bash\nsudo docker run --gpus all cgtuebingen/ggnn:v1 nvidia-smi\n```\n\nNow build the code via\n\n```bash\nuser@host $ sudo docker run --rm -it --user \"$(id -u):$(id -g)\" -v ${PWD}:/ggnn:rw --gpus all cgtuebingen/ggnn:v1 bash\nuser@container $ ./build.sh\n\ncd build_docker\nmake\n```\n\n## More Resources\n\n- [Arxiv Pre-Print](https://arxiv.org/abs/1912.01059)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgtuebingen%2Fggnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcgtuebingen%2Fggnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcgtuebingen%2Fggnn/lists"}