跳转至

RLVR 深入:Research / Report / 开放域

更新日期:2026-04-15


一、开放域 RLVR 的核心问题

数学/代码有明确的"对错",但研究报告、客户支持、策略分析等任务没有唯一答案。如何给这些任务设计验证器?这是 2025-2026 的核心研究问题。

flowchart LR
    closed["闭式任务<br/>(数学/代码)"]
    semi["半结构化<br/>(报告/SQL)"]
    open["开放任务<br/>(创作/咨询)"]

    closed --> v_rule["规则验证器<br/>(sympy / unit test)"]
    semi --> v_ref["参考验证 (RLVRR)<br/>+ Judge Code"]
    open --> v_judge["LLM Judge<br/>+ debiasing"]

    classDef stage fill:#fff,stroke:#cc785c,color:#1a1a1a;
    classDef ver fill:#f5f3eb,stroke:#bdb9ab,color:#1a1a1a;
    class closed,semi,open stage
    class v_rule,v_ref,v_judge ver
任务类型 例子 主流验证器 信号噪声
闭式 AIME / HumanEval rule-based (sympy / pytest) 极低
半结构化 学术报告 / SQL / 代码 review Judge Code / RLVRR 低-中
开放 写作 / 咨询 / 角色扮演 LLM-as-Judge + debiasing 中-高

R1 的成功是闭式任务上的,开放任务的 RLVR 还在演进。


二、RLVRR (Reference-based Verifiable Rewards)

2026 年 ICLR 的重要突破:从高质量参考答案中提取一系列可验证信号,而不是检查单一最终答案。参考 RLVRR (2026)

2.1 核心思想

传统 RLVR vs RLVRR:

  • 传统 RLVR: 检查最终答案是否匹配(reward = (final_answer == ground_truth)

  • RLVRR: 从参考答案中提取多个结构化信号,每个都可验证:

  • 是否包含必需章节

  • 是否引用必需来源

  • 是否遵循格式要求

  • 是否包含关键事实

class RLVRRVerifier:
    def __init__(self, reference_output):
        self.required_sections = extract_sections(reference_output)
        self.required_citations = extract_citations(reference_output)
        self.key_facts = extract_facts(reference_output)
        self.format_rules = infer_format(reference_output)

    def verify(self, model_output):
        scores = {}
        scores['sections'] = check_sections(model_output, self.required_sections)
        scores['citations'] = check_citations(model_output, self.required_citations)
        scores['facts'] = check_facts(model_output, self.key_facts)
        scores['format'] = check_format(model_output, self.format_rules)
        # 每个检查都是确定性的,不需要 LLM judge
        return weighted_average(scores)

2.2 适用任务


三、Judge Code 方法

让 LLM 生成评分代码(而不是直接评分),因为代码可以审查、调试、重用。 传统 LLM-as-Judge 直接让 LLM 评分(如 judge_llm.evaluate(response) → "8/10, because..."),问题是不透明,同一回答可能得不同分。Judge Code 则是先让 LLM 生成评分代码,再用代码确定性地评分。

def generate_judge_code(task, criteria):
    code = llm.generate(f"""
Write a Python function that evaluates a response to this task:
Task: {task}
Criteria: {criteria}

def evaluate(response: str) -> float:
    # Return score 0-1
    score = 0
    ...
""")
    return compile(code)

Judge Code 的优势: 1. 确定性 -- 同一回答得同一分 2. 可审查 -- 人类可以看代码是否合理 3. 可复用 -- 一次生成,用于所有 RL 训练 4. 透明 -- 失败时可 debug


四、LLM-as-Judge 的偏见问题

4.1 偏见缓解脚本

def debiased_llm_judge(response_a, response_b, judge_model, n_judges=3):
    scores = []
    for _ in range(n_judges):
        # 1. 随机交换 A 和 B 位置 (消除 position bias)
        if random.random() < 0.5:
            order = "AB"
            a, b = response_a, response_b
        else:
            order = "BA"
            a, b = response_b, response_a

        # 2. 使用明确的评分标准 (减少 length/style bias)
        score = judge_model.evaluate(a, b, rubric=strict_rubric)

        # 3. 还原顺序
        if order == "BA":
            score = flip(score)

        scores.append(score)

    return median(scores)

五、开放域 RL 训练 Recipe

flowchart LR
    base["SFT base"]
    cold["Cold start<br/>少量高质量"]
    rl1["RL with<br/>RLVRR 信号"]
    judge["LLM Judge<br/>过滤 high-reward"]
    sft2["再 SFT<br/>(rejection sampling)"]
    rl2["最终 RL<br/>多 reward 合成"]
    final["产品 model"]

    base --> cold --> rl1 --> judge --> sft2 --> rl2 --> final

    classDef stage fill:#fff,stroke:#cc785c,color:#1a1a1a;
    class base,cold,rl1,judge,sft2,rl2,final stage

5 阶段 pipeline(参考 R1 + 开放域调整):

  1. Cold start SFT:少量高质量参考输出 + 严格格式(思考 / 回答)
  2. RL with RLVRR:用 RLVRR / Judge Code 多维度 reward 合成
  3. Rejection sampling:用 strong judge 过滤高 reward output → 大规模 SFT
  4. Final RL:多 reward 合成(helpfulness + safety + RLVRR)
  5. Eval + iterate:calibration + adversarial test

5.1 Scaling 策略

阶段 数据规模 计算 关键超参
Cold start SFT 1k-10k 单 epoch LR 1e-5
RL #1 100k prompts 5-20% pretrain KL=0.04, G=8-16
Rejection SFT 100k-1M 1-2 epoch LR 5e-6
Final RL 100k-500k 2-10% pretrain KL=0.02

scaling 上限受verifier 质量 + 多样 reward source 限制;不是计算瓶颈。


六、前沿方向

方向 描述 代表工作
Process Reward 不只看结果,看每一步推理质量 PRM (Lightman et al., 2023)
Debate-based RL 多 Agent 辩论达成共识作为 reward AI Safety via Debate
Constitutional RL 用宪法原则作为评分维度 Constitutional AI
Self-Rewarding 模型自己评判自己的输出 Self-Rewarding LLMs (2024)
Meta-RL 学习"如何评估",不只是"如何回答" 新兴方向

七、Research Agent 的 RLVR

flowchart LR
    query["用户研究 query"]
    plan["分解 sub-question"]
    search["WebSearch /<br/>WebFetch"]
    cite["Citation 抽取"]
    synth["综合写报告"]
    verify["验证器:<br/>citation 准确性 +<br/>事实覆盖度 +<br/>结构完整性"]
    reward["RL reward"]

    query --> plan --> search --> cite --> synth --> verify --> reward

    classDef stage fill:#fff,stroke:#cc785c,color:#1a1a1a;
    class query,plan,search,cite,synth,verify,reward stage

Research Agent(如 Anthropic Research / OpenAI Deep Research / Perplexity Pro Search)的 RLVR:

  • 训练时 Agent 完整 rollout(query → search → cite → synth)
  • Verifier 多维度评分:citation 真实存在 + 事实匹配 + 结构 / 引用 / 章节完整
  • 难点:search engine 状态变化让 reward 不再 reproducible,需要冻结 search snapshot

7.1 Research Agent 的关键组件

组件 作用 验证
Sub-question planner 把 query 拆成可独立检索的子问题 sub-question 是否覆盖 query
Search executor 多源检索(web / 论文 / DB) 结果数 + 多样性
Citation extractor 从 search 结果抽事实 + URL URL 可达 + 文本 在 source 里
Synthesizer 综合写报告 结构 / 引用 / 完整 (RLVRR)
Critic / Verifier 自审 + 修订 事实矛盾 / 缺失检测

八、应用场景

场景 可验证信号 成熟度
客服回复 问题解决 + 礼貌 + 准确
合规审查 法规条款覆盖 + 风险标识 中高
医疗问答 循证医学来源 + 免责声明 低 (需专业审查)
法律咨询 法条引用 + 案例参考
投资分析 数据来源 + 多元观点
学术写作 结构 + 引用 + 论证 中高

参考文献

  • [1] RLVRR: RL with Reference-based Verifiable Rewards. 2026. 博客

  • [2] Lightman et al. Let's Verify Step by Step (PRM). 2023. 论文

  • [3] Bai et al. Constitutional AI. 2022. 论文

  • [4] Yuan et al. Self-Rewarding Language Models. 2024. 论文

  • [5] Irving et al. AI Safety via Debate. 2018. 论文

  • [6] Lu et al. AI Scientist. 2024. 论文


上级 · E. 后训练与对齐