Cross-Attention Calibrated Deduplication for Retrieval-Augmented Generation System
Abstract
Common chunking strategies in Retrieval-Augmented Generation (RAG) systems often create redundant chunks. These redundant chunks make the vector database bigger and slow down retrieval. A common fix is cosine-similarity thresholding. This method reduces each chunk to a single vector, then compares vectors using a similarity score. But a single vector can lose the fine-grained, token-level detail needed to tell a true duplicate apart from a chunk that just shares the same topic. We propose Cross-Attention Calibrated Deduplication (CACD). CACD checks each new chunk against an in-memory pool of chunks already kept, using a cross-encoder instead of a single pooled vector. This keeps token-level detail all the way to the final comparison. CACD combines three parts: the cross-encoder comparison itself, a New Information Score (NIS) that measures how much of a chunk is not explained by a candidate already kept, and a majority vote across several candidates rather than a single best match. NIS is calculated from the attention entropy of the cross-encoder. We tested CACD against five existing filtering methods, nine chunking strategies, and 18 configurations, all on the full SQuAD 1.1 validation set. In our experiments, CACD removes 9.75% of chunks on average. This drop rate is close to other semantic-level methods, and much higher than exact-match filters, which barely remove anything. In these experiments, CACD also processes each configuration in 51.0 seconds on average, about 27% faster than the strongest baseline, NERExact (69.6s), and about 7x faster than cosine-similarity filtering (356.7s). These results come from a single dataset, so we present them as an early comparison, not a general claim. Code for the baseline evaluation and for CACD is available at https://github.com/lehuyphuong/ragbench and https://github.com/lehuyphuong/cacddedup.
Create a lesson
Metadata
- Categories
- cs.CL, cs.LG
Related papers
StateRAG: Typed State Contracts for Complex Retrieval-Augmented Generation
Shared title terminologycs.CLMiaohe Niu, Xinyu Liu, Runsong Zhao et al.
VisRAG2.0: Mitigating Visual Hallucinations via Evidence-Guided Multi-Image Reasoning in Visual Retrieval-Augmented Generation
Shared title terminologycs.CLYubo Sun, Chunyi Peng, Yukun Yan et al.
Language-Coupled Reinforcement Learning for Multilingual Retrieval-Augmented Generation
Shared title terminologycs.CLRui Qi, Fengran Mo, Yufeng Chen et al.
Med-R^3: Enhancing Medical Retrieval-Augmented Reasoning of LLMs via Progressive Reinforcement Learning
Shared title terminologycs.CLKeer Lu, Zheng Liang, Youquan Li et al.
Retrieval-Augmented Large Language Models as Components of Cognitive Computing architecture for Regulatory Knowledge Management
Shared title terminologycs.CLDariusz Nowak-Nova
ML2B: Benchmarking LLMs on Cross-Lingual ML Pipeline Generation
Shared title terminologycs.CLEkaterina Trofimova, Zosia Shamina, Maria Selifanova et al.