arXiv:2609.06270cs.ARSep 2026

Manuscript Offprint

arXiv:2609.06270

Towards Enabling Distance-Based Memory Addressing

Ananth Krishna Prasad, Rajeev Balasubramonian, Mahdi Nazm Bojnordi

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Approximate Nearest-Neighbor Search (ANNS) in high dimensional vector datasets is an application of significant prevalence across different AI applications. However, such an operation is significantly bandwidth limited at large working-set sizes owing to the curse of dimensionality. Traditional indices used to accelerate ANNS rely on search-space pruning as a preprocessing step to alleviate such bandwidth requirement, but such optimization occurs either at the cost of increased bandwidth-inefficiency and/or degradation of search quality. This paper proposes a data-parallel hardware/software mechanism for performing large-scale similarity search in-memory. We propose a novel algorithm to simplify the computation requirement for similarity search across various distance metrics through lightweight primitives to perform a fast and approximate data-parallel brute-force search on the entire vector space. We further build a memory system capable of executing the required operations to generate a distance metric per datapoints, which is then used to enable pruning as a post-processing step. We offer adequate software support for user control over the proposed system. By enabling such search-space pruning as a post-processing step, we achieve near-perfect recall across representative workloads while achieving orders of magnitude performance and energy improvement over state-of-the-art algorithmic approaches on million and billion-scale workloads.

1 Introduction

Nearest Neighbor Search (NN-Search) in multidimensional data space is a fundamental problem in computer science. The brute-force approach for finding the nearest neighbor for a given query involves calculating the distance to every point in the dataset (linear scan). Such an approach is memory-bound owing to the requirement of fetching the entire dataspace for each query. Unfortunately, it is often impossible to provably find the exact nearest neighbors without resorting to brute force, especially as the dimensionality of data increases. This problem is termed popularly as the curse of dimensionality. It turns out that most of the present-day applications of nearest neighbors can tolerate a certain amount of imprecision, leading to the emergence of Approximate Nearest Neighbor Search (ANNS). Multimedia such as text, audio, and video can be represented as embedding vectors indexed into a vector database. ANNS in such vector databases are prevalent in a variety of server-scale machine-learning applications such as Large-Language

Models [32, 35] used in ChatGPT, information retrieval systems [33, 54], recommendation systems [24, 46], and web search [49]. ANNS algorithms generate indices on the dataset through pre-processing, which is leveraged to prune down the search space for each query.

State-of-the-art algorithms for high-dimensional ANNS can be categorized into two main classes - graph-based and compression-based. Compression-based indices use compression/quantization techniques to encode vectors using codebooks. This lowers the memory footprint and computational intensity per datapoint [15, 28, 31, 36], but is bandwidth-bound and inaccurate. Graph-based algorithms [22, 34, 36] build neighborhood graphs on top of the uncompressed vector dataset. This approach is highly accurate but not scalable due to significant indexing overhead and bandwidth inefficiency stemming from memory indirection during graph traversal. The root cause of inefficiency in the existing indices is in the inherently massive bandwidth required to overcome the curse of dimensionality. Irrespective of the underlying approach, it is often necessary to visit a large fraction of the vector dataset to ensure high recall, resulting in bandwidth-bound behavior.

This bandwidth-bound characteristic of ANNS applications presents a unique challenge to computer architects. One approach to addressing the bottleneck is to accelerate these indices using Processing-In-Memory and leverage the massive bandwidth available within memory devices. However, traditional indices incur memory indirection during pruning, making a poor fit for the SIMD-like computation model PIM offers. This, coupled with significant computation requirements renders conventional PIM inefficient in accelerating state-of-the-art ANNS indices. To address the above problems, we propose a novel memory system for highly accurate similarity search applications through careful hardware-software codesign. We envision the proposed memory system to function as a "Distance-Addressable Memory", or DAM, where the memory is capable of calculating and returning the k-"closest" points to any input query point. The key idea is to utilize the massive internal bandwidth to perform a fast and approximate data-independent brute-force search within memory, then leverage the generated approximate distance metrics to prune the dataspace in a data-parallel fashion. By formulating pruning as a post-processing step to brute-force computation rather than as a pre-filtering step, we manage to mitigate the curse of dimensionality, offering fast similarity search within a high recall space.

We make the following contributions: 1) We propose a novel algorithm for similarity search that generates an approximate distance metric for vector datasets on a per-query basis. With a simple reformulation of the distance calculation, we support multiple distance metrics. 2) We propose a lightweight near-array processor (NAP) coupled with a 1T-1R-based memory array that computes approximate distances. These distances are then used as indices to generate partially ordered responses from the memory, enabling search-space pruning and bandwidth-efficient data reranking. 3) We identify the challenges in the proposed system and devise data/control-flow techniques that improve efficiency. Adequate software support is provided through an API that enables sufficient user control over memory configuration. 4) We highlight key metrics in emerging vector database applications, such as index-freshness, support for out-of-distribution queries, and filtered searches, and show how DAM readily extends support for such applications.

A simulation-based evaluation of our algorithm and platform over a wide variety of real-world embedding vector datasets shows that DAM achieves near-perfect accuracy with 52.7×52.7\times and 97×97\times throughput and latency improvement respectively over a state-of-the-art compression-based approach on an Intel Xeon E5-2680. Each DAM chip consumes 50% more area in comparison to a conventional RRAM chip, while achieving an energy improvement of 4.15×4.15\times on average.

References (49)