Skip to content

Research Articles

Metadata Filtering with Vector Search: Uneven Workloads

Talia Dovemere (Data Engineering Group, Ivermere University), Rowan Thornmere (Data Engineering Group, Valehart Institute of Computational Science)

Vol. 4 No. 1 (2023) · pp. 70–82 · Published 25 April 2023

Abstract

This synthetic study compares choosing between filter-first retrieval and graph search based on estimated selectivity with running the same graph search before every filter in a workload with many common cases and a small set of recurring high-cost cases. Each configuration is evaluated on the same 240 cases. In the 60 stress cases, a very selective predicate must occur in a large partition; the rare cases are assessed separately so that the dominant group does not hide their behavior. A case counts as a pass only if it meets this criterion: queries must meet recall and latency targets against exact filtered neighbors. The replay retains source versions and arrival order. A reference output built from the complete synthetic history is used to distinguish a fast response from one that is both current and correct. The first configuration passes 177 of 240 cases, versus 174 for the comparator. In the stress subset, the respective counts are 38 and 33 of 60. The alternative exceeds the comparator overall by 1.2 percentage points. The practical trade-off is that incorrect cardinality estimates can route requests to a poor strategy. A subsequent evaluation should set tolerances independently and repeat the comparison on workloads not used to select the configuration.

Keywords: vector search, approximate nearest neighbors, filtering, uneven workloads, synthetic evaluation

References

  1. Andoni, A., & Indyk, P. (2006). Near-optimal hashing algorithms for approximate nearest neighbor in high dimensions. Proceedings of the 47th Annual IEEE Symposium on Foundations of Computer Science, 459–468.
  2. André, F., Kermarrec, A.-M., & Le Scouarnec, N. (2015). Cache locality is not enough: High-performance nearest neighbor search with product quantization fast scan. Proceedings of the VLDB Endowment, 9(4), 288–299.
  3. Aumüller, M., Bernhardsson, E., & Faithfull, A. (2017). ANN-Benchmarks: A benchmarking tool for approximate nearest neighbor algorithms. Similarity Search and Applications (SISAP 2017), Lecture Notes in Computer Science, 10609, 34–49.
  4. Chapelle, O., Vapnik, V., Bousquet, O., & Mukherjee, S. (2002). Choosing multiple parameters for support vector machines. Machine Learning, 46(1–3), 131–159.
  5. Fu, C., Xiang, C., Wang, C., & Cai, D. (2017). Fast approximate nearest neighbor search with the navigating spreading-out graph. arXiv:1707.00143.
  6. Ge, T., He, K., Ke, Q., & Sun, J. (2013). Optimized product quantization for approximate nearest neighbor search. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2946–2953.
  7. Ginsberg, J., Mohebbi, M. H., Patel, R. S., Brammer, L., Smolinski, M. S., & Brilliant, L. (2009). Detecting influenza epidemics using search engine query data. Nature, 457(7232), 1012–1014.
  8. Indyk, P., & Motwani, R. (1998). Approximate nearest neighbors: Towards removing the curse of dimensionality. Proceedings of the 30th Annual ACM Symposium on Theory of Computing, 604–613.
  9. Izacard, G., et al. (2022). Atlas: Few-shot learning with retrieval augmented language models. arXiv:2208.03299.
  10. Jégou, H., Douze, M., & Schmid, C. (2011). Product quantization for nearest neighbor search. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33(1), 117–128.
  11. Malkov, Y. A., & Yashunin, D. A. (2016). Efficient and robust approximate nearest neighbor search using hierarchical navigable small world graphs. arXiv:1603.09320. arXiv
  12. Muja, M., & Lowe, D. G. (2009). Fast approximate nearest neighbors with automatic algorithm configuration. Proceedings of the International Conference on Computer Vision Theory and Applications, 331–340.
  13. Salton, G., & Buckley, C. (1988). Term-weighting approaches in automatic text retrieval. Information Processing & Management, 24(5), 513–523.
  14. Smeulders, A. W. M., Worring, M., Santini, S., Gupta, A., & Jain, R. (2000). Content-based image retrieval at the end of the early years. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(12), 1349–1380.
  15. Weinberger, K. Q., & Saul, L. K. (2009). Distance metric learning for large margin nearest neighbor classification. Journal of Machine Learning Research, 10, 207–244.
  16. Xiong, L., et al. (2020). Approximate nearest neighbor negative contrastive learning for dense text retrieval. arXiv:2007.00808.