CAIMS: Scalable Cross-Array In-Memory Search

Yi-Chun Liao, Liu Liu, Ruiyang Qin, Yiran Chen, X. Sharon HuarXiv 2026 · arXiv

TL;DR

CAIMS is a novel framework that enables highly scalable top-$k$ similarity search across multiple in-memory search (IMS) arrays. By combining intelligent threshold-based matching with a hardware-software co-design, it achieves up to $22.3\times$ higher throughput and $426.6\times$ better energy efficiency than server-class CPUs while maintaining near-optimal search accuracy.

What Problem Does This Paper Address?

Top-$k$ similarity search is the backbone of modern AI applications like Retrieval-Augmented Generation (RAG) and recommender systems. However, as datasets grow, moving massive amounts of data between memory and processors creates a significant performance bottleneck.

In-memory search (IMS) using Content-Addressable Memory (CAM) offers a solution by processing data directly where it lives. The catch? A single CAM array is too small for modern workloads. When you split a dataset across multiple arrays, a "local vs. global" accuracy gap emerges: a candidate that looks like a "winner" in its local array might actually be a poor match globally. Existing designs struggle to accurately and efficiently combine these local results into a global top-$k$ list without incurring massive data transfer overhead or requiring power-hungry hardware like high-resolution ADCs.

The "local vs global" accuracy gap: a naive approach picking local winners can lead to incorrect global results.

Methods

The authors introduce CAIMS, a framework agnostic to specific memory technologies that focuses on three core schemes:

  1. Dataset-Assisted Scalable Search (DASS): Instead of just looking for the "best" match locally, DASS applies a unified threshold ($T_{filter}$) across all arrays. This transforms binary local matches into globally comparable "coarse-grained" similarity scores.
  2. Online Result Count Adaptation (ORCA): To handle shifts in query patterns, ORCA dynamically tunes search parameters at runtime. It ensures the system returns approximately $k$ results on average, maintaining a balance between accuracy and efficiency.
  3. Local Aggregation and Selective Transfer (LAST): This hardware-software co-design performs result reduction locally within the memory peripherals. It only transfers the final global selection results and minimal control signals, drastically reducing data movement.
Overview of the CAIMS framework components: DASS, ORCA, and LAST.

Additionally, the paper utilizes Quantile Quantization to map high-precision vectors into 3-bit NAND Flash cells. Unlike standard quantization that minimizes reconstruction error, this method focuses on preserving the relative similarity between vectors, which is crucial for accurate top-$k$ ranking.

Datasets

The framework was evaluated using the retrieval phase of RAG on six diverse datasets from the BEIR and DPR benchmarks:

  • Small/Medium: BEIR-SciFact (~5k candidates), BEIR-SciDocs (~25k), BEIR-Quora (~522k).
  • Large: BEIR-NQ (~2.6M), DPR-NQ (~21M), DPR-TQA (~21M).

Key Insights and Ideas

  • Coarse-Grained is Enough: You don't need expensive, high-resolution analog-to-digital converters (ADCs) to find the top-$k$ results. Aggregating simple binary threshold matches across partitioned dimensions provides a surprisingly effective proxy for global similarity.
  • Unifying the Scale: The "aha moment" is realizing that local winners are meaningless without a shared reference. By enforcing a unified threshold across all arrays, CAIMS gives every local match the same "similarity interpretation," making global aggregation possible.
  • Constant Latency Scaling: Because CAIMS exploits the massive internal parallelism of storage devices (like 3D NAND Flash), the search latency remains largely constant even as the dataset size grows, provided it fits within the parallel capacity of the hardware.

Key Results

Compared to a server-class CPU baseline and prior 3D NAND Flash accelerators, CAIMS demonstrated:

  • Throughput: Up to $22.3\times$ improvement over CPU and $10.1\times$ over previous flash-based accelerators.
  • Energy Efficiency: A massive $426.6\times$ gain over CPU and $23.7\times$ over prior art.
  • Accuracy: Maintained comparable accuracy (HitRate@100) to theoretical-optimal brute-force search across all tested datasets.
  • Hardware Feasibility: The additional logic required for LAST is minimal, incurring less than 1.5% area overhead per plane in a standard SSD architecture.

Limitations and Future Work

  • Power Constraints: While CAIMS is energy-efficient, simultaneously activating many memory planes to maximize parallelism could exceed the power envelope of standard SSDs. The authors suggest that power-aware scheduling will be a necessary direction for future practical implementations.
  • Memory Agnosticism: Although the framework is designed to be agnostic, the current evaluation is heavily centered on 3D NAND Flash. Exploring its performance on emerging non-volatile memories like RRAM or FeFET remains an open area.
  • Distribution Shifts: While ORCA adapts to query shifts, extremely rapid or radical changes in data distribution might still require more frequent offline recalibration of the DASS parameters.

Summary updated

Abstract

Search, especially top-k similarity search, plays a vital role in many applications, but its performance can be severely limited by memory access overhead. In-memory search (IMS), an alternative to CPU/GPU-based approaches, exploits massive parallelism within a content-addressable memory (CAM) array to perform search in situ and provides both low latency and high energy efficiency. However, the capacity of a single CAM array is often insufficient for modern workloads, requiring data to be distributed across multiple arrays. Deploying scalable top-k similarity search across multiple CAM arrays poses a fundamental problem that existing designs fail to address: how to accurately and efficiently reduce local binary match results to global top-k results. This work introduces CAIMS, a cross-array IMS framework that is agnostic to memory technologies and applications, enabling scalable and efficient top-k similarity search while preserving accuracy. To enable accurate top-k result reduction, CAIMS leverages the existing threshold match functionality with a combined offline and online parameter selection approach to transform local binary match results that lack globally comparable similarity information into global coarse-grained similarity scores. To further improve efficiency, CAIMS conducts hierarchical reduction and transfers only the selection results and necessary control signals with lightweight local peripherals. Implemented on a 3D NAND Flash model and demonstrated using the retrieval phase of retrieval-augmented generation, CAIMS improves throughput by up to $22.3\times/10.1\times$ and energy efficiency by $426.6\times/23.7\times$ compared to the server-class CPU baseline and prior 3D NAND Flash accelerators, respectively, while maintaining comparable accuracy.
BibTeX
@misc{liao2026caims,
  author = {Yi-Chun Liao and Liu Liu and Ruiyang Qin and Yiran Chen and X. Sharon Hu},
  title = {{CAIMS: Scalable Cross-Array In-Memory Search}},
  year = {2026},
  eprint = {2611.25141},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.25141},
}
Figure