CoCo-Bench: A Comprehensive Code Benchmark For Multi-task Large Language Model Evaluation
Wenjing Yin, Tianze Sun, Yijiong Yu, Jiawei Fang, Guangyao Su, Jiancheng Wang, Zekun Wang, Wei Wang, Ran Chen, Ziyun Dai, Shuai Yuan, Menghang Dong, Peng Luo, Dong Cao, Da Lei, Yajun Zhang, Hao Chen, Xiang Ma, Yong Liu, Weifeng Liu, Yuanjian Xu, Ji Pei
TL;DR
CoCo-Bench addresses the need for a holistic, objective benchmark for code-oriented LLMs by defining four interconnected tasks—code understanding, code generation, code modification, and code review—and a difficulty-aware scoring framework. It formalizes task definitions with precise mathematical notation, introduces a weighted evaluation metric (CoCo-Score) built on a difficulty-aware pass rate, and provides extensive empirical results showing how model size and instruction-tuning affect performance across languages and tasks. The findings reveal strong task interdependencies, context-length effects, and decoding-strategy influences, offering nuanced guidance for developing robust code-oriented LLMs. Overall, CoCo-Bench offers a rigorous, real-world-aligned benchmark that differentiates model capabilities beyond existing single-task benchmarks and informs future research and practical software engineering applications.
Abstract
Large language models (LLMs) play a crucial role in software engineering, excelling in tasks like code generation and maintenance. However, existing benchmarks are often narrow in scope, focusing on a specific task and lack a comprehensive evaluation framework that reflects real-world applications. To address these gaps, we introduce CoCo-Bench (Comprehensive Code Benchmark), designed to evaluate LLMs across four critical dimensions: code understanding, code generation, code modification, and code review. These dimensions capture essential developer needs, ensuring a more systematic and representative evaluation. CoCo-Bench includes multiple programming languages and varying task difficulties, with rigorous manual review to ensure data quality and accuracy. Empirical results show that CoCo-Bench aligns with existing benchmarks while uncovering significant variations in model performance, effectively highlighting strengths and weaknesses. By offering a holistic and objective evaluation, CoCo-Bench provides valuable insights to guide future research and technological advancements in code-oriented LLMs, establishing a reliable benchmark for the field.
