CS-Bench: A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery

Xiaoshuai Song,Muxi Diao,Guanting Dong,Zhengyang Wang,Yujia Fu,Runqi Qiao,Zhexu Wang,Dayuan Fu,Huangxuan Wu,Bin Liang,Weihao Zeng,Yejie Wang,Zhuoma GongQue,Jianing Yu,Qiuna Tan,Weiran Xu
2024-06-13
Abstract:Computer Science (CS) stands as a testament to the intricacies of human intelligence, profoundly advancing the development of artificial intelligence and modern society. However, the current community of large language models (LLMs) overly focuses on benchmarks for analyzing specific foundational skills (e.g. mathematics and code generation), neglecting an all-round evaluation of the computer science field. To bridge this gap, we introduce CS-Bench, the first bilingual (Chinese-English) benchmark dedicated to evaluating the performance of LLMs in computer science. CS-Bench comprises approximately 5K meticulously curated test samples, covering 26 subfields across 4 key areas of computer science, encompassing various task forms and divisions of knowledge and reasoning. Utilizing CS-Bench, we conduct a comprehensive evaluation of over 30 mainstream LLMs, revealing the relationship between CS performance and model scales. We also quantitatively analyze the reasons for failures in existing LLMs and highlight directions for improvements, including knowledge supplementation and CS-specific reasoning. Further cross-capability experiments show a high correlation between LLMs' capabilities in computer science and their abilities in mathematics and coding. Moreover, expert LLMs specialized in mathematics and coding also demonstrate strong performances in several CS subfields. Looking ahead, we envision CS-Bench serving as a cornerstone for LLM applications in the CS field and paving new avenues in assessing LLMs' diverse reasoning capabilities. The CS-Bench data and evaluation code are available at <a class="link-external link-https" href="https://github.com/csbench/csbench" rel="external noopener nofollow">this https URL</a>.
Computation and Language,Artificial Intelligence,Machine Learning
What problem does this paper attempt to address?
This paper focuses on the performance evaluation of large-scale language models (LLMs) in the field of computer science. Existing benchmarks primarily focus on specific foundational skills such as mathematics and code generation, while neglecting comprehensive evaluation of computer science. To address this, researchers propose a bilingual (Chinese and English) benchmark test called CS-Bench, aimed at evaluating the performance of LLMs in the four key areas of computer science: data structures and algorithms, computer organization, computer networks, and operating systems. CS-Bench consists of approximately 5000 carefully designed questions, covering 26 subdomains, with various task formats including multiple-choice, assertion, fill-in-the-blank, and open-ended questions. Through the evaluation of over 30 mainstream LLMs, the paper finds a logarithmic growth relationship between model size and scores on CS-Bench. The study identifies the lack of domain knowledge as a major reason for the limited performance of LLMs, emphasizing the need for targeted reinforcement. Additionally, the research explores the correlation between LLMs and computer science, mathematics, and programming abilities, finding strong correlations between these abilities. In conclusion, CS-Bench provides a comprehensive benchmark for evaluating the knowledge and reasoning abilities of LLMs in the field of computer science, helping identify existing model deficiencies and guiding future development directions.