Files
myWiki/papers/claw-swe-bench.md

88 lines
4.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "Claw-SWE-Bench: OpenClaw 风格 Agent Harness 的代码任务基准评测"
created: 2026-06-15
updated: 2026-06-15
type: paper
tags: [benchmark, coding-agent, evaluation, multi-agent]
sources: [raw/papers/zheng-claw-swe-bench-2026.md]
---
# Claw-SWE-Bench
## 基本信息
- **论文:** Claw-SWE-Bench: A Benchmark for Evaluating OpenClaw-style Agent Harnesses on Coding Tasks
- **作者:** Mengyu Zheng, Kai Han, Boxun Li, Haiyang Xu, Yuchuan Tian, Wei He, Hang Zhou, Jianyuan Guo, Hailin Hu, Lin Ma, Chao Xu, Guohao Dai, Lixue Xia, Yunchao Wei, Yunhe Wang, Yu Wang
- **机构:** TokenRhythm, Infinigence AI, CityU HK, SEE Fund, 北大, 上海交大, 北京交大, 清华
- **arXiv:** [2606.12344](https://arxiv.org/abs/2606.12344v1) | **日期:** 2026-06-10
- **资源:** [GitHub](https://github.com/opensquilla/claw-swe-bench) | [HuggingFace](https://huggingface.co/datasets/TokenRhythm/Claw-SWE-Bench)
## 核心问题
通用 agent如 [[openclaw|OpenClaw]])作为自主工具使用者日益普及,但它们在真实代码任务上的能力难以用 [[swe-bench|SWE-bench]] 标准评测。通用 agent 本身不满足 SWE-bench 所需的 Docker 工作空间、patch 和预测合约。Claw-SWE-Bench 将 **agent harnessclaw** 作为受控实验变量,通过统一的 [[adapter-protocol|适配器协议]] 使异构 harness 在公平条件下可比较。
## 方法贡献
### 1. 适配器协议 (Adapter Protocol)
通过标准化的生命周期方法(`create_agent`, `send_task`, `backup_session`, `delete_agent`, `get_docker_args`)将异构 harness 连接到统一的评测管道。关键设计:
- **Full Adapter:** 让 agent 通过工具编辑仓库文件runner 从 Git 状态导出 patch
- **Bare Adapter:** 仅最小集成,要求模型直接输出 unified diff
- Full adapter 将 Apply Failed 从 69.1% 降至 <1.5%Pass@1 19.1% 提升至 73.4%
### 2. 标准化执行管道
- 统一 prompt 模板3600s 超时3 并发 worker
- [[future-commit-cleanup|Future-Commit 清理]]对非 Python 实例移除 base_commit 之后的可达 Git 历史
- Patch 从仓库状态收集而非从 agent 消息解析
### 3. Claw-SWE-Bench Lite
80-instance 低代价子集每语言 10 通过 [[cost-aware-benchmarking|代价感知]]、排序感知的 17 列校准选择保留 full-350 Pass@1 尺度语言分布和代价结构Lite 运行代价约为 full 22.9%。
## 关键发现
### LLM 轴变化9 模型 × OpenClaw
| 模型 | Pass@1 | API 代价 |
|------|--------|------------|
| GPT 5.5 | 78.0% | $1,399 |
| Claude Opus 4.7 | 77.1% | $1,082 |
| GLM 5.1 | 73.4% | $277 |
| DeepSeek-V4 Pro | 71.7% | $81 |
| DeepSeek-V4 Flash | 70.3% | $8.2 |
| Qwen 3.6-flash | 66.0% | $71.5 |
模型选择产生 **29.4 pp** Pass@1 差距相似准确率对应**数量级差异** API 代价
### Claw 轴变化5 Claw × 2 Model
| Claw | GLM 5.1 Pass@1 | Qwen 3.6-flash Pass@1 |
|------|----------------|----------------------|
| OpenClaw | 73.4% | 66.0% |
| Hermes-Agent | 71.1% | 62.6% |
| ZeroClaw | 70.3% | 58.3% |
| Generic Agent | 63.1% | 38.6% |
| NanoBot | 60.9% | 47.4% |
Harness 选择产生 **12.5-27.4 pp** Pass@1 差距足以重排 Leaderboard
### Future-Commit 清理影响
清理后 Pass@1 从不上涨Claude Opus 4.7 下降最多8.0 ppGPT 5.5 仅下降 ~1 pp——不同模型对信息泄露的敏感度不同
## 核心洞察
1. **Adapter 设计不是工程包装,是评分可靠性的必要条件。** Bare adapter 69.1% patch 无法 apply说明直接生成 unified diff 是脆弱的
2. **Harness 是第一序变量。** 在固定模型下不同 harness Pass@1 差距可达 27.4 pp——如果 harness 未被控制Leaderboard 结论可能被颠覆
3. **准确率 ≠ 代价。** [[pareto-frontier-evaluation|Pareto 前沿]]分析表明某些组合在更低代价下达到相似准确率DeepSeek-V4 Flash $8.2 达到 70.3%GPT 5.5 $1,399 达到 78.0%——代价相差 170
4. **代价会计是第一等评测轴。** 仅报告 Resolved Rate 会奖励更长探索/更高预算的系统掩盖更便宜但更脆弱的系统
## 相关概念
- [[adapter-protocol]] 适配器协议的设计与实现
- [[cost-aware-benchmarking]] 代价感知的基准评测方法论
- [[pareto-frontier-evaluation]] 准确率-代价 Pareto 前沿分析
- [[future-commit-cleanup]] Future-commit 清理策略
- [[patch-based-evaluation]] 基于 patch 的评测合约
- [[harness-model-interaction]] Harness × Model 交互效应
- [[claw-swe-bench-lite]] Lite 子集的设计与验证
- [[swe-bench]] SWE-bench 评测体系
- [[openclaw]] OpenClaw 通用 agent