NEAR: Neighborhood-Aware Residuals for Memory Retrieval
Han Luo, Zhan Zhuang, Xu He, Jujia Zhao, Yu Li, Suqin Yuan, Dong Li, Lei Feng
Abstract
Memory retrieval aims to identify evidence from stored records to answer a query. Stored records with different factual details may share topics, entities, or events. Such shared contents would make records without the required evidence more likely to receive high similarity scores and outrank the correct evidence. In this paper, we use the information shared by these records to construct local references for query-memory matching. We propose NEighborhood-Aware Residuals (NEAR), a training-free framework that uses these references to construct residual representations that complement the original embeddings. Specifically, each memory derives a reference direction from its neighbors, and each query obtains its reference from a precomputed table. Using these references, NEAR constructs projection residuals for both queries and memories. These residuals are combined with the original embeddings for a single approximate nearest-neighbor search over a fixed memory index. Experiments on eight long-context retrieval benchmarks show consistent improvements across nine embedding models. Downstream evaluations show that NEAR improves question-answering performance.
Create a lesson
Related papers
Tracing and Taming Hallucinated Terms via Subsequence-Association Filtering and Breadth-Aware Selection for LLM Query Expansion
Amit Kumar Jaiswal, Sagar Uprety, Prayag Tiwari
SPARQL-LLM in the TEXT2SPARQL 2026 Challenge
Panayiotis Smeros, Vincent Emonet, Ruijie Wang et al.
PRIME: Pre-Retrieval Index Modeling Enhancement for Structured Document Retrieval-Real
Cheuk Hei Chung, Li Liu
Beyond the Final Embedding: Retrieving Memories from Token-Level Evidence
Han Luo, Zhan Zhuang, Xu He et al.
Compact and Efficient Indexes for Learned Sparse Retrieval
Franco Maria Nardini, Luca Rizzo, Cosimo Rulli et al.
NativeScope: Relation-Localized Retrieval over Native Topology with a Correct Anchor
Long Wang