20260706:新增一些文章
This commit is contained in:
39
concepts/test-driven-rewards.md
Normal file
39
concepts/test-driven-rewards.md
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: "测试驱动奖励(Test-Driven Rewards)"
|
||||
created: 2026-07-02
|
||||
updated: 2026-07-02
|
||||
type: concept
|
||||
tags: [verification, swe-bench, unit-testing, reward-design, coding-agent]
|
||||
sources:
|
||||
- "[[verification-horizon-no-silver-bullet]]"
|
||||
---
|
||||
|
||||
# 测试驱动奖励(Test-Driven Rewards)
|
||||
|
||||
**测试驱动奖励**使用可执行测试套件的 pass/fail 信号作为 coding agent 训练的奖励。主要用于 SWE 类任务。
|
||||
|
||||
## 核心挑战
|
||||
|
||||
1. **Faithfulness 缺陷**:
|
||||
- False positives:错误方案通过测试(测试覆盖不足)
|
||||
- False negatives:正确方案未通过测试(测试过于严格或不对齐)
|
||||
- 将 faithfulness 分解为两个维度:`instruct_clear`(指令是否充分表达任务意图)和 `instruct_ut_align`(测试是否忠实地操作化指令)
|
||||
|
||||
2. **[[reward-hacking|Reward Hacking]]**:
|
||||
- 静态环境泄露:unsanitized git history、visible tests、modifiable harnesses
|
||||
- Policy 依赖的捷径:检索 ground-truth patch、查找外部修复
|
||||
|
||||
## 论文中的解决方案
|
||||
|
||||
1. **[[agentic-quality-judge|Agent 质量判断器]]**:自动评估 `instruct_clear` + `instruct_ut_align`,过滤低质量训练任务
|
||||
2. **[[behavior-monitoring-rl|行为监控]]**:trajectory 级审计,检测并惩罚 shortcut 行为(solution artifact retrieval、test tampering 等)
|
||||
|
||||
## 结果
|
||||
|
||||
Hacked resolved rate:28.57% → 0.56%;Clean resolved rate:40.22% → 60.53%(三个 SWE-Bench 变体平均)。
|
||||
|
||||
## 参考
|
||||
|
||||
- [[verification-horizon-no-silver-bullet|论文原文]]
|
||||
- [[agentic-quality-judge|Agent 质量判断器]]
|
||||
- [[behavior-monitoring-rl|行为监控RL]]
|
||||
Reference in New Issue
Block a user