Interpretability in black-box dense retrievers remains a central challenge in Retrieval-Augmented Generation (RAG). Understanding how queries and documents semantically interact is critical for diagnosing retrieval behavior and improving model design. However, existing dense retrievers rely on static embeddings for both queries and documents, which obscures this bidirectional relationship. Post-hoc approaches such as re-rankers are computationally expensive, add inference latency, and still fail to reveal the underlying semantic alignment. To address these limitations, we propose Interpretable Modular Retrieval Neural Networks (IMRNNs), a lightweight framework that augments any dense retriever with dynamic, bidirectional modulation at inference time. IMRNNs employ two independent adapters: one conditions document embeddings on the current query, while the other refines the query embedding using corpus-level feedback from initially retrieved documents. This iterative modulation process enables the model to adapt representations dynamically and expose interpretable semantic dependencies between queries and documents. Empirically, IMRNNs not only enhance interpretability but also improve retrieval effectiveness. Across seven benchmark datasets, applying our method to standard dense retrievers yields average gains of +6.35% nDCG, +7.14% recall, and +7.04% MRR over state-of-the-art baselines. These results demonstrate that incorporating interpretability-driven modulation can both explain and enhance retrieval in RAG systems.
翻译:在黑盒密集检索器中实现可解释性仍然是检索增强生成(RAG)领域的核心挑战。理解查询与文档如何进行语义交互对于诊断检索行为和改进模型设计至关重要。然而,现有的密集检索器对查询和文档均依赖静态嵌入表示,这掩盖了二者之间的双向关系。诸如重排序器这类事后处理方法计算成本高昂,会增加推理延迟,且仍无法揭示底层的语义对齐机制。为应对这些局限,我们提出了可解释模块化检索神经网络(IMRNNs),这是一个轻量级框架,可在推理时通过动态双向调制增强任何密集检索器。IMRNNs采用两个独立的适配器:一个根据当前查询对文档嵌入进行条件化调整,另一个则利用初始检索文档的语料库级反馈优化查询嵌入。这种迭代调制过程使模型能够动态调整表示,并揭示查询与文档之间可解释的语义依赖关系。实验表明,IMRNNs不仅提升了可解释性,还提高了检索效能。在七个基准数据集上,将我们的方法应用于标准密集检索器,相比最先进的基线模型,在nDCG、召回率和MRR指标上分别平均提升了+6.35%、+7.14%和+7.04%。这些结果证明,引入可解释性驱动的调制机制既能解释也能增强RAG系统中的检索性能。