Lune

ICLR2026Top-tier venue

Probabilistic Kernel Function for Fast Angle Testing

Kejing Lu, Chuan Xiao, Yoshiharu Ishikawa

Abstract

In this paper, we study the angle testing problem in the context of similarity search in high-dimensional Euclidean spaces and propose two projection-based probabilistic kernel functions, one designed for angle comparison and the other for angle thresholding. Unlike existing approaches that rely on random projection vectors drawn from Gaussian distributions, our approach leverages reference angles and adopts a deterministic structure for the projection vectors. Notably, our kernel functions do not require asymptotic assumptions, such as the number of projection vectors tending to infinity, and can be theoretically and experimentally shown to outperform Gaussian-distribution-based kernel functions. We apply the proposed kernel function to Approximate Nearest Neighbor Search (ANNS) and demonstrate that our approach achieves a 2.5×-3× higher query-per-second (QPS) throughput compared to the widely-used graph-based search algorithm HNSW. Our code and data are available at https://github.com/KejingLu-810/KS . INTRODUCTION Vector-based similarity search is a core problem with broad applications in machine learning, data mining, and information retrieval. It involves retrieving data points in a high-dimensional space that are most similar to a given query vector based on a specific similarity measure. This task is central to many downstream applications, including nearest neighbor classification, recommendation systems, clustering, anomaly detection, and retrieval-augmented generation (RAG). However, the high dimensionality of modern datasets makes efficient similarity search particularly challenging, highlighting the need for fast and scalable vector computation techniques. Among the various similarity measures for high-dimensional vectors, the ℓ 2 norm, cosine similarity, and inner product are the most commonly used in practice. As discussed in Yan et al. ( 2018 ); Dai et al. (2020); Lu et al. ( 2024 ), it is often possible to pre-compute and store the norms of vectors in advance, allowing these measures to be reduced to the computation of the cosine of the angle between two normalized vectors, thereby highlighting the central role of angle computation. On the other hand, in many real-world scenarios, we are not concerned with the exact values of the angles but rather with the outcome-which one is greater-of an angle comparison, which is referred to as angle testing: Given a query vector q and data vectors v 1 , v 2 , v on the sphere S d-1 , typical operations include comparing ⟨q, v 1 ⟩ and ⟨q, v 2 ⟩, or determining whether ⟨q, v⟩ exceeds a certain threshold. These operations, however, require computing exact cosines of angles, which has a cost of O(d) per comparison and becomes expensive in high dimensions. To address this, we aim to design a computationally efficient probabilistic kernel function K that can approximate these comparisons with reduced cost and high success probability. More precisely, we focus on the following two problems: Problem 1.1. (Probabilistic kernel function for comparison) Design a probabilistic kernel function K: S d-1 × S d-1 → RV with computational cost o(d), where RV denotes the set of random variables, such that, for any data vectors v 1 , v 2 ∈ S d-1 and query q ∈ S d-1 satisfying ⟨q, v 1 ⟩ > ⟨q, v 2 ⟩, we have Pr[K(q, v 1 ) > K(q, v 2 )] > 1 -ϵ, where ϵ ≤ 0.5. Problem 1.2. (Probabilistic kernel function for thresholding) Given a fixed angle threshold θ ∈ (0, π), design a probabilistic kernel function K: S d-1 × S d-1 → RV with computational cost o(d) such that

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • RaBitQ: Quantizing High-Dimensional Vectors with a Theoretical Error Bound for Approximate Nearest Neighbor Search cites High-Dimensional Approximate Nearest Neighbor Search: with Reliable and Efficient Distance Comparison Operations
  • RaBitQ: Quantizing High-Dimensional Vectors with a Theoretical Error Bound for Approximate Nearest Neighbor Search cites FINGER: Fast Inference for Graph-based Approximate Nearest Neighbor Search
  • RaBitQ: Quantizing High-Dimensional Vectors with a Theoretical Error Bound for Approximate Nearest Neighbor Search cites Efficient Approximate Nearest Neighbor Search in Multi-dimensional Databases
  • RaBitQ: Quantizing High-Dimensional Vectors with a Theoretical Error Bound for Approximate Nearest Neighbor Search cites Accelerating Large-Scale Inference with Anisotropic Vector Quantization
  • High-Dimensional Approximate Nearest Neighbor Search: with Reliable and Efficient Distance Comparison Operations cites Accelerating Large-Scale Inference with Anisotropic Vector Quantization
  • FINGER: Fast Inference for Graph-based Approximate Nearest Neighbor Search cites Accelerating Large-Scale Inference with Anisotropic Vector Quantization
  • Approximate Nearest Neighbor Search for Modern AI: A Projection-Augmented Graph Approach cites RaBitQ: Quantizing High-Dimensional Vectors with a Theoretical Error Bound for Approximate Nearest Neighbor Search
  • Approximate Nearest Neighbor Search for Modern AI: A Projection-Augmented Graph Approach cites High-Dimensional Approximate Nearest Neighbor Search: with Reliable and Efficient Distance Comparison Operations
  • Approximate Nearest Neighbor Search for Modern AI: A Projection-Augmented Graph Approach cites FINGER: Fast Inference for Graph-based Approximate Nearest Neighbor Search
  • Approximate Nearest Neighbor Search for Modern AI: A Projection-Augmented Graph Approach cites Accelerating Large-Scale Inference with Anisotropic Vector Quantization
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Approximate Nearest Neighbor Search for Modern AI: A Projection-Augmented Graph ApproachKejing Lu, Zhenpeng Pan, Yoshiharu Ishikawa, Chuan Xiao et al.ICML 2026 · 1 citation

Builds on14

  1. Accelerating Large-Scale Inference with Anisotropic Vector QuantizationRuiqi Guo, Philip Sun, Erik Lindgren, Quan Geng et al.ICML 2020 · 539 citations
  2. RaBitQ: Quantizing High-Dimensional Vectors with a Theoretical Error Bound for Approximate Nearest Neighbor SearchJianyang Gao, Cheng LongSIGMOD 2024 · 83 citations
  3. Efficient Approximate Nearest Neighbor Search in Multi-dimensional DatabasesYun Peng, Byron Choi, Tsz Nam Chan, Jianye Yang et al.SIGMOD 2023 · 74 citations
  4. High-Dimensional Approximate Nearest Neighbor Search: with Reliable and Efficient Distance Comparison OperationsJianyang Gao, Cheng LongSIGMOD 2023 · 73 citations
  5. FINGER: Fast Inference for Graph-based Approximate Nearest Neighbor SearchPatrick H. Chen, Wei-Cheng Chang, Jyun-Yu Jiang, Hsiang-Fu Yu et al.WWW 2023 · 35 citations

Related papers

  1. Angular Distance-Guided Neighbor Selection for Graph-Based Approximate Nearest Neighbor SearchSungjun Jung, Yongsang Park, Haeun Lee, Young H. Oh et al.WWW 2025 · 3 citations
  2. Efficient Approximate Nearest Neighbor Search via Hemi-Sphere Centroids GraphRunwen Qiu, Jing TangSIGMOD 2026 · 5 citations
  3. GPU-accelerated Proximity Graph Approximate Nearest Neighbor Search and ConstructionYuanhang Yu, Dong Wen, Ying Zhang, Lu Qin et al.ICDE 2022 · 28 citations
  4. Accelerating Graph Indexing for ANNS on Modern CPUsMengzhao Wang, Haotian Wu, Xiangyu Ke, Yunjun Gao et al.SIGMOD 2025 · 6 citations
  5. PANNS: Enhancing Graph-based Approximate Nearest Neighbor Search through Recency-aware Construction and Parameterized SearchXizhe Yin, Chao Gao, Zhijia Zhao, Rajiv GuptaPPoPP 2025 · 5 citations
Dusk over the sea between two cliffs drawn in fine vertical lines