File size: 6,281 Bytes
cc62637
 
 
8eb9b84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
license: apache-2.0
---
# CodeEditorBench 

[**๐ŸŒ Homepage**](https://codeeditorbench.github.io/) | [**๐Ÿค— Dataset**](https://huggingface.co/datasets/m-a-p/CodeEditorBench) | [**๐Ÿ“– arXiv**]() | [**GitHub**](https://github.com/CodeEditorBench/CodeEditorBench)



<!-- This repo contains the evaluation code for the paper "[MMMU: A Massive Multi-discipline Multimodal Understanding and Reasoning Benchmark for Expert AGI](https://arxiv.org/pdf/2311.16502.pdf)" -->

<!-- ## ๐Ÿ””News

- **๐Ÿš€[2024-01-31]: We added Human Expert performance on the [Leaderboard](https://mmmu-benchmark.github.io/#leaderboard)!๐ŸŒŸ**
- **๐Ÿ”ฅ[2023-12-04]: Our evaluation server for test set is now availble on [EvalAI](https://eval.ai/web/challenges/challenge-page/2179/overview). We welcome all submissions and look forward to your participation! ๐Ÿ˜†** -->

## Introduction
Large Language Models (LLMs) for code are rapidly evolving, with code editing
emerging as a critical capability. We introduce CodeEditorBench, a pioneering
evaluation framework designed to rigorously assess the performance of LLMs
in code editing tasks, including debugging, translating, polishing, and require-
ment switching. Unlike existing benchmarks focusing solely on code generation,
CodeEditorBench emphasizes real-world scenarios and practical aspects of software
development. We curated diverse coding challenges and scenarios from five sources,
covering various programming languages, complexity levels, and editing tasks.
Evaluating 19 LLMs revealed that closed-source models, particularly Gemini-Ultra
and GPT-4, outperform open-source models in CodeEditorBench, highlighting
differences in model performance based on problem type and prompt sensitivity.
CodeEditorBench aims to catalyze advancements in LLMs by providing a robust
platform for assessing code editing capabilities. We will release all prompts and
datasets to enable the community to expand the dataset and benchmark emerging
LLMs. By introducing CodeEditorBench, we contribute to the advancement of
LLMs in code editing and provide a valuable resource for researchers and practi-
tioners in the field.

![Alt text](tech_route.png)
<!-- ## Dataset Creation
See [**GitHub**]() for the specific inference process


## Evaluation
See [**GitHub**]() for the specific evaluation process -->

## ๐Ÿ† Leaderboard
<!-- | Model                      | Zero Shot | Three Shot |
|----------------------------|:---------:|:----------:|
| Gemini Ultra               | **59.4**  |     --     |
| GPT-4                      |   56.8    |  **55.7**  | -->

| Model           | Size | Open | Debug               | Translate           | Switch | Polish           | Win Rate           |
|-----------------|------|------|---------------------|---------------------|--------|------------------|--------------------|
|                                **Zero-shot**                  |
| Gemini-Ultra    | -    | โŒ   | 0.301 (0.457)       | 0.338 (0.261)       | 0.028  | 4.64% (3.45%)    | **0.779 (0.632)**  |
| GPT-4           | -    | โŒ   | **0.308 (0.489)**   | 0.335 (**0.449**)   | **0.225** | 0.15% (0.87%)   | **0.779 (0.882)**  |
| GPT-3.5-Turbo   | -    | โŒ   | 0.284 (**0.491**)   | **0.385 (0.443)**   | 0.169  | 0.09% (0.84%)    | 0.765 (0.853)      |
| Gemini-Pro      | -    | โŒ   | 0.279 (0.420)       | 0.200 (0.285)       | 0.061  | **5.07% (6.27%)**| 0.750 (0.765)      |
| DS-33B-INST     | 33B  | โœ…   | 0.267 (0.483)       | 0.353 (0.427)       | 0.131  | 0.06% (0.64%)    | 0.676 (0.728)      |
| WC-33B          | 33B  | โœ…   | 0.265 (0.483)       | 0.315 (0.415)       | 0.125  | 0.19% (0.62%)    | 0.676 (0.669)      |
| ...             | ...  | ...  | ...                 | ...                 | ...    | ...              | ...                |
| **Few-shot**    |      |      |                     |                     |        |                  |                    |
| Gemini-Ultra    | -    | โŒ   | 0.283 (0.446)       | 0.406 (0.292)       | 0.131  | **4.83% (4.17%)**| **0.897 (0.706)**  |
| GPT-4           | -    | โŒ   | **0.336 (0.519)**   | **0.453 (0.488)**   | **0.275** | 0.22% (0.7%)   | 0.868 (**0.926**)  |
| ...             | ...  | ...  | ...                 | ...                 | ...    | ...              | ...                |
| **CoT**         |      |      |                     |                     |        |                  |                    |
| GPT-4           | -    | โŒ   | **0.280 (0.439)**   | **0.338 (0.414)**   | **0.174** | 0.33% (1.45%)  | **0.850 (0.800)**  |
| GLM-4           | -    | โŒ   | 0.228 (0.201)       | 0.218 (0.260)       | 0.072  | **4.09% (5.28%)**| 0.750 (0.600)      |
| ...             | ...  | ...  | ...                 | ...                 | ...    | ...              | ...                |

๐ŸŽฏAll results of models are generated by greedy decoding.

โœจCode Debug, Code Translate and Code Requirement Switch are evaluated with pass@1, while Code Polish is evaluated with Mean OptScore.

๐Ÿ—‚๏ธValues outside parentheses denoting Plus results and inside denoting Primary results. For the Switch class, Primary and Plus results are identical, and only one score is displayed.

## Disclaimers
The guidelines for the annotators emphasized strict compliance with copyright and licensing rules from the initial data source, specifically avoiding materials from websites that forbid copying and redistribution. 
Should you encounter any data samples potentially breaching the copyright or licensing regulations of any site, we encourage you to [contact](#contact) us. Upon verification, such samples will be promptly removed.

## Contact
<!-- - Jiawei Guo: moriatysss152@gmail.com
- Ziming Li : 
- Xueling Liu: 
- Kaijing Ma: -->
- Ge Zhang: zhangge@01.ai
- Wenhu Chen: wenhuchen@uwaterloo.ca
- Jie Fu: jiefu@ust.hk
## Citation

**BibTeX:**
```bibtex
@inproceedings{guo2024editorbench,
  title={CodeEditorBench: Evaluating Code Editing Capability of Large Language Models},
  author={Jiawei Guo and Ziming Li and Xueling Liu and Kaijing Ma and Tianyu Zheng and Zhouliang Yu and Ding Pan and Ruibo Liu and Yue Wang and Yizhi Li and Xingwei Qu and Xiang Yue and Shuyue Guo and Ge Zhang and Wenhu Chen and Jie Fu},
  booktitle={arxiv},
  year={2024},
}
```