Paper: https://eprint.iacr.org/2024/1600
We implement a sublinear query cost private vector ANN search algorithm based on PianoPIR and Graph-based ANN.
- Install Go 1.22.
- Install the dependency of NGT. Instruction can be found here (https://github.com/yahoojapan/NGT)
- Install the dependency of hnswgo: HNSWGO(https://github.com/evan176/hnswgo)
- Run
go mod tidyto download the go module dependencies. - Download the SIFT dataset (http://corpus-texmex.irisa.fr/). Run
sh SIFT-download.sh. It takes a while -- the dataset is around 100GB. Warning: it could take hours to download and extrat the files. It's recommended to run it in the background. Make sure the disk space is enough (>230GB).
- To run the private search algorithm:
sh run-private-search.sh. See the report inprivate-search-report.txt. The parameters can be changed by modifying the script file.
Optional:
- To run the NGT non-private ANN for quality comparison:
sh run-ngt-search.sh. See the report inngt-report.txt. - To run the cluster-based algorithm for quality comparison:
sh run-cluster-search.sh. See the report incluster-report.txt. (Requiring the FAISS package. To download it:pip install faiss-cpu) - To test the latency of an optimized inner product baseline (as what we used in the paper):
- a.
cd graphann - b.
go test -v -run InnerProduct(you can go intographann_test.goand see the parameters)
This project is licensed under the MIT License - see the LICENSE file for details.