用强化学习优化文档表示,让小模型检索效果超过大模型。
Document Optimization for Black-Box Retrieval via Reinforcement Learning
- 用强化学习让模型自动改写文档,使其更匹配查询分布。
- 小模型经优化后在代码和视觉文档检索上超越大模型,如nDCG5提升至66.8。
- 仅需黑盒检索接口,适合资源有限但追求高效检索的场景。
文档扩展是提升检索质量的经典方法,因其可将计算移至离线阶段而具有吸引力。然而,应用于现代检索器时,常因引入噪声导致性能下降。本文将文档扩展重构为文档优化问题:通过GRPO算法,使用目标检索器的排名提升作为奖励,微调语言模型或视觉语言模型,将文档转换为与查询分布更对齐的表示。该方法仅需黑盒访问检索排名,适用于单向量、多向量及词法检索器。在代码检索和视觉文档检索(VDR)任务上评估,发现优化后的文档表示能显著提升检索效果,且在多数情况下使小型高效检索器超越大型模型。例如,对OpenAI text-embedding-3-small进行优化后,代码检索nDCG5从58.7提升至66.8,VDR从53.3升至57.6,甚至略超6.5倍昂贵的text-embedding-3-large模型(代码66.3,VDR 57.0)。当可访问检索器权重时,该方法常与微调相当,两者结合表现最佳,使Jina-ColBERT-V2在VDR上从55.8提升至63.3,在代码检索上从48.6升至61.8。
原文摘要 · Abstract (English)
Document expansion is a classical technique for improving retrieval quality, and is attractive since it shifts computation offline, avoiding additional query-time processing. However, when applied to modern retrievers, it has been shown to degrade performance, often introducing noise that obfuscates the discriminative signal. We recast document expansion as a document optimization problem: a language model or a vision language model is fine-tuned to transform documents into representations that better align with the expected query distribution under a target retriever, using GRPO with the retriever's ranking improvements as rewards. This approach requires only black-box access to retrieval ranks, and is applicable across single-vector, multi-vector and lexical retrievers. We evaluate our approach on code retrieval and visual document retrieval (VDR) tasks. We find that learned document transformations yield retrieval gains and in many settings enable smaller, more efficient retrievers to outperform larger ones. For example, applying document optimization to OpenAI text-embedding-3-small model improves nDCG5 on code (58.7 to 66.8) and VDR (53.3 to 57.6), even slightly surpassing the 6.5X more expensive OpenAI text-embedding-3-large model (66.3 on code; 57.0 on VDR). When retriever weights are accessible, document optimization is often competitive with fine-tuning, and in some settings their combination performs best, improving Jina-ColBERT-V2 from 55.8 to 63.3 on VDR and from 48.6 to 61.8 on code retrieval.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。