# LiveCodeBench

LiveCodeBench 是一个持续更新的基准，用来衡量大语言模型解决竞赛编程题目的能力。它的设计使每道题都带有自己的发布日期，模型只能在其训练截止日期之后发布的题目上计分。该基准由加州大学伯克利分校（UC Berkeley）、麻省理工学院（MIT）和康奈尔大学（Cornell）的研究者创建，2024 年 3 月以 arXiv 预印本 2403.07974 发布，同行评审版本发表于 ICLR 2025。<sup>[1](https://arxiv.org/html/2403.07974v2)</sup><sup> • </sup><sup>[2](https://proceedings.iclr.cc/paper_files/paper/2025/file/94074dd5a072d28ff75a76dabed43767-Paper-Conference.pdf)</sup> 其核心设计思路针对的是基准污染（benchmark contamination），即基准题目泄漏进模型训练数据的问题——正是这种泄漏抬高了 [HumanEval](https://www.edgepedia.org/zh/humaneval) 等静态编程测试的分数。

| 关键事实 | 详情 |
|---|---|
| 创建者 | 加州大学伯克利分校、麻省理工学院与康奈尔大学的研究者（Jain 等），2024 年 3 月发布 arXiv 版，ICLR 2025 论文<sup>[1](https://arxiv.org/html/2403.07974v2)</sup><sup> • </sup><sup>[2](https://proceedings.iclr.cc/paper_files/paper/2025/file/94074dd5a072d28ff75a76dabed43767-Paper-Conference.pdf)</sup> |
| 题目来源 | LeetCode、AtCoder 与 Codeforces 的周赛，每道题标注发布日期<sup>[1](https://arxiv.org/html/2403.07974v2)</sup> |
| 当前版本 | v6：1,055 道题，覆盖 2023 年 5 月至 2025 年 4 月，约为 400 题版 v1 的 2.6 倍<sup>[3](https://github.com/livecodebench/livecodebench)</sup><sup> • </sup><sup>[4](https://themodelgap.com/benchmarks/livecodebench)</sup> |
| 评分 | 四种场景下的 pass@1 与 pass@5；代码生成与自我修复要求通过全部测试<sup>[1](https://arxiv.org/html/2403.07974v2)</sup><sup> • </sup><sup>[3](https://github.com/livecodebench/livecodebench)</sup> |
| 污染证据 | DeepSeek、GPT-4o、Codestral 与 Claude-3-Sonnet 在各自截止日期之后发布的题目上性能下降<sup>[1](https://arxiv.org/html/2403.07974v2)</sup><sup> • </sup><sup>[2](https://proceedings.iclr.cc/paper_files/paper/2025/file/94074dd5a072d28ff75a76dabed43767-Paper-Conference.pdf)</sup> |
| 2026 年 9 月最高分 | Gemini 3 Pro Preview 91.7%（Artificial Analysis，独立评测）；Qwen3.7 Max 91.6%（BenchLM，厂商自报）；Claude Fable 5 89.8（The Model Gap，经独立核验）<sup>[5](https://artificialanalysis.ai/evaluations/livecodebench)</sup><sup> • </sup><sup>[6](https://benchlm.ai/benchmarks/livecodebench)</sup><sup> • </sup><sup>[4](https://themodelgap.com/benchmarks/livecodebench)</sup> |
| 已知局限 | 仅限 Python、竞赛式算法题；包含自我修复，但不衡量多文件代码库、API 或对既有系统的调试<sup>[1](https://arxiv.org/html/2403.07974v2)</sup><sup> • </sup><sup>[7](https://benchmarks.darvinyi.com/benchmarks/livecodebench)</sup> |

## LiveCodeBench 是什么

该基准持续从 LeetCode、AtCoder 和 [Codeforces](https://www.edgepedia.org/zh/codeforces) 三个竞赛平台收集新题，并为每道题标注发布日期。<sup>[1](https://arxiv.org/html/2403.07974v2)</sup> 由于模型的训练数据有截止日期，在该日期之后发布的题目几乎必然未被模型见过。官方项目页面直接描述了这一机制：训练截止日期为 D 的模型，可以在 D 之后发布的题目上评测，从而衡量其对真正新题的泛化能力。<sup>[8](https://livecodebench.github.io/)</sup>

ICLR 2025 版论文覆盖 2023 年 5 月至 2024 年 8 月间赛事的 612 道题，评测了 50 多个大语言模型（18 个基座模型、34 个指令微调模型），作者称这是针对竞赛题目的规模最大的代码大模型评测研究。<sup>[2](https://proceedings.iclr.cc/paper_files/paper/2025/file/94074dd5a072d28ff75a76dabed43767-Paper-Conference.pdf)</sup>

## 运作方式

LiveCodeBench 评测四种场景：代码生成、自我修复、代码执行与测试输出预测。代码生成与自我修复要求程序通过全部测试；pass@1 在温度 0.2、top_p 0.95 下采样 10 次补全计算得出。<sup>[1](https://arxiv.org/html/2403.07974v2)</sup> 代码仓库使用 APPS 基准随附判题器的修改版计算 pass@1 与 pass@5，并修正了若干边界情况；时间限制可能带来不到 0.5 分的波动。<sup>[3](https://github.com/livecodebench/livecodebench)</sup> 每道题平均配有 18 个以上测试用例，无法用输入输出自动判分的题目会被剔除。<sup>[2](https://proceedings.iclr.cc/paper_files/paper/2025/file/94074dd5a072d28ff75a76dabed43767-Paper-Conference.pdf)</sup>

按时间窗评测是这一基准的标志性特征。分数可通过 `--start_date` 与 `--end_date` 参数在任意日期区间上计算；[Hugging Face](https://www.edgepedia.org/zh/hugging-face) 榜单（2024 年 4 月 16 日上线，由同一团队搭建）把这一机制固化为“随时间滚动”（scrolling over time）功能，可选取特定窗口内的题目。<sup>[3](https://github.com/livecodebench/livecodebench)</sup><sup> • </sup><sup>[9](https://huggingface.co/blog/leaderboard-livecodebench)</sup> 数据集按发布窗口分版本：v1（400 题，2023 年 5 月至 2024 年 3 月）、v2（511 题，至 2024 年 5 月）、v3（612 题，至 2024 年 7 月）、v4（713 题，至 2024 年 9 月）、v5（880 题，至 2025 年 1 月）、v6（1,055 题，至 2025 年 4 月）。<sup>[3](https://github.com/livecodebench/livecodebench)</sup>

## 数字概览

v2 论文版收录 2023 年 5 月至 2024 年 5 月间发布的 511 道题，分为 182 道简单、206 道中等、123 道困难，平均每题 17.0 个测试用例。<sup>[1](https://arxiv.org/html/2403.07974v2)</sup> 作者估计，仅由题目集抽样带来的代码生成性能波动就有 1% 到 1.5%（以从 511 题数据集中自助采样出 349 题的题集测得），并建议在比较分差很小的模型时保持谨慎。<sup>[1](https://arxiv.org/html/2403.07974v2)</sup> 在更大的 v6 题集上，小于约 3.1 分的差距（1,055 道题上的两个标准误）被第三方追踪机构视为统计噪声。<sup>[4](https://themodelgap.com/benchmarks/livecodebench)</sup>

头部成绩的攀升十分陡峭。2024 年 4 月榜单上线时，GPT-4-Turbo 是大多数场景下表现最好的模型，但在测试输出预测上被 Claude-3-Opus 反超。<sup>[9](https://huggingface.co/blog/leaderboard-livecodebench)</sup> 到 2026 年 9 月，独立评测机构 [Artificial Analysis](https://www.edgepedia.org/zh/artificial-analysis) 报告 [Gemini 3 Pro](https://www.edgepedia.org/zh/gemini-3-pro) Preview（high）以 91.7% 领先，Gemini 3 Flash Preview（Reasoning）以 90.8% 次之，DeepSeek V3.2 Speciale 以 89.6% 位列第三。<sup>[5](https://artificialanalysis.ai/evaluations/livecodebench)</sup> 而 BenchLM 2026 年 9 月 14 日的榜单则把 Qwen3.7 Max（阿里巴巴）列为第一，91.6%，并明确标注为 "provider exact"，即厂商自报；其后是 Qwen3.7 Plus 89.6%、Solar Pro 4 87.8%；同一榜单上 DeepSeek V3 仅为 37.6%，足见前沿水平自 2024 年初以来推进之大。<sup>[6](https://benchlm.ai/benchmarks/livecodebench)</sup>

## 推理模型时代以来的成绩

2025 至 2026 年间推理模型的到来，把 v6 全量题集上的分数推到了 91% 以上，但追踪机构报告称，在截止日期之后的新窗口上分数明显更低——而这正是该基准自我刷新的设计所要保持的区分度。<sup>[7](https://benchmarks.darvinyi.com/benchmarks/livecodebench)</sup> 各家评测机构给出的头名并不一致：Artificial Analysis 经独立评测的表格把 Gemini 3 Pro Preview 以 91.7% 列在首位，<sup>[5](https://artificialanalysis.ai/evaluations/livecodebench)</sup> BenchLM 主榜把厂商自报的 Qwen3.7 Max 以 91.6% 列在首位，<sup>[6](https://benchlm.ai/benchmarks/livecodebench)</sup> 而 The Model Gap 追踪 2026 年 8 月 17 日及以后经核验的独立分数，把 Claude Fable 5 以 89.8 列为第一，其后是 Claude Opus 5 89.0、Gemini 3.7 Flash 88.7、[Grok 4](https://www.edgepedia.org/zh/grok-4).6 88.2、DeepSeek V4 Pro 87.5 与 GPT-5.6 Sol 82.6；该机构称前两名之间 0.8 分的差距在噪声带内，应视为并列。<sup>[4](https://themodelgap.com/benchmarks/livecodebench)</sup> 这三份榜单彼此不一致，而这一分歧在公开记录中仍未得到解决。

## 与其他编程基准的比较

论文的对比表显示，此前的基准——HumanEval、MBPP、APPS、Code-Contests 与 XCodeEval——至少缺少 LiveCodeBench 所具备的三项特性之一：抗污染、任务覆盖完整、基于执行的评测。<sup>[2](https://proceedings.iclr.cc/paper_files/paper/2025/file/94074dd5a072d28ff75a76dabed43767-Paper-Conference.pdf)</sup> 过拟合的证据很具体：在 HumanEval+ 与 LCB-Easy 上，模型分成两群，一群两者都表现良好，另一群多为微调过的开源模型，在 HumanEval 上得分不错，在 LiveCodeBench 上却落后。DS-Ins-33B 在 HumanEval+ 上仅落后 GPT-4-Turbo 4.3 分，在 LCB 代码生成上却落后 16.2 分。<sup>[1](https://arxiv.org/html/2403.07974v2)</sup>

Benchlist 报告称，LiveCodeBench 的分数通常比 HumanEval 对外公布的分数低 20 到 40 个百分点，它把这一差距称为“污染落差”（contamination delta），并警告说：在模型训练截止日期之前发布的题目上拿到 95% 的分数毫无意义。<sup>[10](https://benchlist.ai/articles/livecodebench)</sup> LiveCodeBench 与仓库级基准也并不同调：Gemini 3 Pro 在 LiveCodeBench 上得 91.7%，在 SWE-bench Verified 上却只有约 78%，某些模型两两之间的排名甚至相反，说明这两种能力相关但并不相同。<sup>[7](https://benchmarks.darvinyi.com/benchmarks/livecodebench)</sup>

## 抗污染设计与批评者

这一设计的核心证据来自基准自身。论文发现，DeepSeek 在 2023 年 8 月之后发布的题目上、GPT-4o 在 2023 年 10 月/11 月之后、[Codestral](https://www.edgepedia.org/zh/codestral) 在 2024 年 1 月之后，性能都出现明显下降，说明较早的 LeetCode 题目很可能已被污染；ICLR 版又加入了 Claude-3-Sonnet，其在 2024 年 4 月之后的题目上同样下降。<sup>[1](https://arxiv.org/html/2403.07974v2)</sup><sup> • </sup><sup>[2](https://proceedings.iclr.cc/paper_files/paper/2025/file/94074dd5a072d28ff75a76dabed43767-Paper-Conference.pdf)</sup> 为规避 DeepSeek 系列模型的污染问题，作者自己的评测只使用 2023 年 8 月之后发布的题目。<sup>[3](https://github.com/livecodebench/livecodebench)</sup>

批评者指出了真实存在的弱点。通过选择时间窗抬高分数，是有据可查的刷分路径：包含截止日期之前题目的全量分数，显著高于仅用截止日期之后题目的分数，而发布方常常只引用对自己有利的数字，却不说明所用的时间窗。<sup>[7](https://benchmarks.darvinyi.com/benchmarks/livecodebench)</sup> BenchLM 同样提醒：只有在数据集版本、时间窗、场景、pass@k 指标、采样次数、温度和执行策略全部一致时，分数才具有可比性。<sup>[6](https://benchlm.ai/benchmarks/livecodebench)</sup>

更具杀伤力的发现来自 Collinear AI 2025 年 8 月 12 日的一份审计：官方评分脚本会在一个虚假的 "###" 停止符处截断模型的正确输出，把反引号包裹的非代码文本误读为代码，并套用硬编码的对话模板，使某模型的实测得分相对变动约 50%（Qwen3-8B 实测 38.3%，修补后约 57.8%）。修复用的拉取请求 #117 与 #118 于 2025 年 8 月 12 日提交，截至本次核查时仍未合并。<sup>[4](https://themodelgap.com/benchmarks/livecodebench)</sup>

论文本身也承认，LiveCodeBench 只关注 Python 和来自三个平台的竞赛题，未必能代表通用的软件开发能力。<sup>[1](https://arxiv.org/html/2403.07974v2)</sup> 第三方分析者补充说，这些任务都是算法性的（数据结构、数学、图论），不涉及多文件代码库、API 或对既有系统的调试。<sup>[7](https://benchmarks.darvinyi.com/benchmarks/livecodebench)</sup> BenchLM 表示，LiveCodeBench 高分并不能证明模型具备代码库导航、问题理解、工具使用、补丁审查或回归安全性，并建议把它与 SWE-bench Pro 之类的仓库级基准配合使用。<sup>[6](https://benchlm.ai/benchmarks/livecodebench)</sup> 维护者在 ERRATA.md 文件中记录了错误的测试用例与无法自动判分的题目；默认评测现在改用精简测试用例的 "code_generation_lite" 变体以提升速度，原始版本可通过 `--not_fast` 使用。<sup>[3](https://github.com/livecodebench/livecodebench)</sup>

## 采用情况与截至 2026 年 9 月的状态

LiveCodeBench 已被作者之外的独立评测机构采用。Artificial Analysis 独立在其上评测模型，并将其定位为利用持续采集的 LeetCode、AtCoder 与 Codeforces 题目来评测代码生成、自我修复与执行预测的基准。<sup>[5](https://artificialanalysis.ai/evaluations/livecodebench)</sup> Hugging Face 榜单自 2024 年 4 月起运行，<sup>[9](https://huggingface.co/blog/leaderboard-livecodebench)</sup> The Model Gap、Benchlist、BenchLM 与 benchmark.darvinyi.com 等第三方追踪机构维护或记录其结果。<sup>[4](https://themodelgap.com/benchmarks/livecodebench)</sup><sup> • </sup><sup>[10](https://benchlist.ai/articles/livecodebench)</sup><sup> • </sup><sup>[6](https://benchlm.ai/benchmarks/livecodebench)</sup> Benchlist 的注册表把有签名、可复现记录佐证的结果排在厂商自行披露的数字之上，这一机制用于把厂商声明与独立核验区分开来。<sup>[10](https://benchlist.ai/articles/livecodebench)</sup>

仍有若干问题悬而未决。有记录的最新数据集版本是 v6，题目截至 2025 年 4 月；Collinear AI 指出的评分脚本修复究竟是否合并，尚不可知。现有来源确认了第三方评测机构的采用，但未指名任何使用 LiveCodeBench 的厂商模型卡或技术报告，因此它作为事实上的厂商报告标准的地位还无法完整记录。截至 2026 年 9 月，各家评测机构给出的榜首并不相同：Gemini 3 Pro Preview、Qwen3.7 Max 与 Claude Fable 5 各自登顶一份不同的榜单，取决于由谁测量、用的是哪个时间窗。<sup>[5](https://artificialanalysis.ai/evaluations/livecodebench)</sup><sup> • </sup><sup>[6](https://benchlm.ai/benchmarks/livecodebench)</sup><sup> • </sup><sup>[4](https://themodelgap.com/benchmarks/livecodebench)</sup>

## References

1. [LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code (arXiv:2403.07974)](https://arxiv.org/html/2403.07974v2)
2. [LiveCodeBench paper, ICLR 2025 proceedings](https://proceedings.iclr.cc/paper_files/paper/2025/file/94074dd5a072d28ff75a76dabed43767-Paper-Conference.pdf)
3. [LiveCodeBench official GitHub repository](https://github.com/livecodebench/livecodebench)
4. [LiveCodeBench · The Model Gap](https://themodelgap.com/benchmarks/livecodebench)
5. [LiveCodeBench Benchmark Leaderboard — Artificial Analysis](https://artificialanalysis.ai/evaluations/livecodebench)
6. [LiveCodeBench Leaderboard (September 2026) — BenchLM.ai](https://benchlm.ai/benchmarks/livecodebench)
7. [LiveCodeBench | benchmark.darvinyi.com](https://benchmarks.darvinyi.com/benchmarks/livecodebench)
8. [LiveCodeBench official project page](https://livecodebench.github.io/)
9. [Introducing the LiveCodeBench Leaderboard (Hugging Face, April 16, 2024)](https://huggingface.co/blog/leaderboard-livecodebench)
10. [LiveCodeBench, methodology, history, and how to verify a published score · Benchlist](https://benchlist.ai/articles/livecodebench)

---
*Initially written Sep 17, 2026 · Edited: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 现代人工智能：基础模型、生成式人工智能与人工智能产业 › Foundation-model methods and training › Evaluation, benchmarks, and leaderboards › Text, knowledge, and coding benchmarks

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/livecodebench

English original: https://www.edgepedia.org/livecodebench
