[论文解读] C-RAG: Certified Generation Risks for Retrieval-Augmented Language Models
C-RAG 为检索增强生成(RAG)模型引入了首个经认证的风险框架,利用近似推断(conformal inference)对生成风险进行可证明的边界约束。该研究证明,在非平凡的检索质量和模型性能条件下,RAG 相较于原始大语言模型(LLM)能够降低近似生成风险,且在四个 NLP 数据集上,即使在分布偏移情况下,仍能提供紧密且可靠的保证。
Despite the impressive capabilities of large language models (LLMs) across diverse applications, they still suffer from trustworthiness issues, such as hallucinations and misalignments. Retrieval-augmented language models (RAG) have been proposed to enhance the credibility of generations by grounding external knowledge, but the theoretical understandings of their generation risks remains unexplored. In this paper, we answer: 1) whether RAG can indeed lead to low generation risks, 2) how to provide provable guarantees on the generation risks of RAG and vanilla LLMs, and 3) what sufficient conditions enable RAG models to reduce generation risks. We propose C-RAG, the first framework to certify generation risks for RAG models. Specifically, we provide conformal risk analysis for RAG models and certify an upper confidence bound of generation risks, which we refer to as conformal generation risk. We also provide theoretical guarantees on conformal generation risks for general bounded risk functions under test distribution shifts. We prove that RAG achieves a lower conformal generation risk than that of a single LLM when the quality of the retrieval model and transformer is non-trivial. Our intensive empirical results demonstrate the soundness and tightness of our conformal generation risk guarantees across four widely-used NLP datasets on four state-of-the-art retrieval models.
研究动机与目标
- 解决检索增强语言模型(RAG)中生成风险缺乏理论理解的问题。
- 在分布偏移条件下,为 RAG 和原始 LLM 提供可证明的生成风险保证。
- 识别出 RAG 相较于独立 LLM 降低生成风险的充分条件。
- 实现对 RAG 配置的认证,确保生成风险始终低于期望阈值。
提出的方法
- 提出一种受约束的生成协议,通过控制检索示例数量、生成集大小和相似度阈值来调节输出多样性。
- 应用近似风险分析,推导出生成风险的高概率上界,称为“近似生成风险”。
- 利用有界风险函数,在测试时分布偏移下建立近似生成风险的理论保证。
- 使用分布内校准样本在推理过程中计算风险的有效置信区间。
- 在识别有效配置以实现风险认证时,采用邦弗朗尼校正(Bonferroni correction)控制家庭错误率。
- 在 DART、E2E、CommonGen 和 WebNLG 数据集上,对多种检索模型(BM25、BAAI/bge、OpenAI ada、Biencoder-SFT)验证了边界的有效性。

实验结果
研究问题
- RQ1RAG 真的能将生成风险降低到低于原始 LLM 的水平吗?
- RQ2我们如何为 RAG 和原始 LLM 的生成风险提供可证明的保证?
- RQ3在什么充分条件下,RAG 能够降低生成风险?
- RQ4我们能否通过 RAG 配置认证,确保生成风险低于期望阈值?
- RQ5分布偏移如何影响近似风险边界?能否实现稳健控制?
主要发现
- C-RAG 在所有四个数据集上均提供了稳健且紧密的实证生成风险上界,最大间隙不超过 1e-3。
- RAG 一致地实现了低于单一 LLM 的近似生成风险,验证了理论预测。
- 在分布偏移下,近似生成风险随 Hellinger 距离线性增加,且在 ρ = 0.2 以内保持非平凡。
- Biencoder-SFT 和 OpenAI text-embedding-ada-002 达到最低的近似风险边界,归因于更优的检索质量。
- 增加检索示例数量(N_rag)对降低近似风险的敏感度高于增加生成集大小(λ_g)。
- 通过 C-RAG 识别出的有效配置,其经验风险始终低于期望风险水平 α,证实了认证的可靠性。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。