Abstract
Large Language Models (LLMs) have reshaped code generation by synergizing their exceptional comprehension of natural language and programming syntax, thereby substantially boosting developer productivity. These advancements have prompted numerous efforts to quantitatively evaluate their coding capabilities. However, persistent challenges, such as benchmark leakage, data dissipation, and limited system accessibility, continue to impede a timely and accurate assessment. To address these limitations, we introduce CodeArena, an online evaluation framework tailored for LLM code generation. The key innovation is a collective evaluation mechanism, which dynamically recalibrates individual model scores based on the holistic performance of all participating models, mitigating score biases caused by widespread benchmark leakage. In addition, CodeArena ensures open access to all submitted solutions and test cases and provides automation-friendly APIs to streamline the code evaluation workflow. Our main contributions are: (1) a collective evaluation system for unbiased assessment, (2) a public repository of solutions and test cases, and (3) automation-ready APIs for seamless integration.
Introduction
The evaluation of Large Language Models (LLMs) in the domain of code generation has become a "cat and mouse" game. Traditional benchmarks, such as HumanEval, are static; once published, they are inevitably incorporated into the training corpora of subsequent models. This phenomenon, known as benchmark leakage or contamination, results in inflated performance metrics that do not accurately reflect a model's zero-shot reasoning capabilities.
Beyond leakage, existing evaluation frameworks often suffer from data dissipation, where only final scores are recorded while the generated code is discarded. This prevents researchers from performing qualitative error analysis or studying the computational efficiency of model-generated solutions. Furthermore, the lack of automated submission pipelines hinders the integration of evaluation into modern CI/CD workflows. CodeArena addresses these gaps by providing a continuous, automated, and transparent assessment platform.
The CodeArena Framework
CodeArena is designed as a multi-layered system to ensure robustness and scalability. Its architecture consists of four primary layers:
- API Layer: Offers RESTful endpoints for automated problem retrieval and solution submission, facilitating seamless integration for developers.
- Runtimes Layer: Utilizes isolated sandboxes to execute code across multiple programming languages (e.g., Python, C++, Go), ensuring security and consistency.
- Dynamic Evaluation Layer: The core engine responsible for calculating model performance using a novel collective scoring mechanism.
- Data Layer: A public repository that archives every submitted solution and test case, promoting community-driven analysis and transparency.
Collective Evaluation Mechanism
The hallmark of CodeArena is its Collective Evaluation Mechanism, which moves away from static scoring in favor of Dynamic Points (DP). The DP score for a model is the sum of two distinct components:
Challenge Score (CS)
Instead of assigning a fixed point value to a problem based on its perceived difficulty, the CS is dynamically adjusted based on the success rate of all participating models. If a problem labeled as "Hard" is solved by a high percentage of models, the system assumes the problem is either trivial for current LLMs or has leaked into training sets. Consequently, the points awarded for that problem decrease, naturally penalizing models that rely on memorized solutions.
Efficiency Score (ES)
CodeArena treats code efficiency as a first-class citizen. The ES rewards models that produce optimized code by calculating the runtime percentile of a solution relative to all other successful submissions for that specific problem. This encourages the development of models that prioritize algorithmic performance over mere functional correctness.
Data Collection and Benchmarking
To maintain a fresh and uncontaminated problem set, CodeArena initializes its repository using established benchmarks like APPS and Mercury, but supplements them with monthly scrapes from competitive programming platforms such as LeetCode and CodeForces. For new problems where test cases are not publicly available, the platform utilizes GPT-4o to generate high-quality test suites, ensuring rigorous validation of submitted code.
Key Insights and Results
Observations from a live leaderboard maintained between July and November 2024 revealed several critical insights into the current state of LLM code generation:
- Top Performers: DeepSeek-Coder (249.28 DP) and GPT-4o (247.32 DP) emerged as the dominant models, leading in both functional correctness and execution efficiency.
- The Myth of Static Difficulty: The study found that traditional "Easy/Medium/Hard" labels from external platforms do not always correlate with LLM performance. The Challenge Score acts as a necessary self-correcting mechanism for these discrepancies.
- Open-Source Trends: While closed-source models generally follow established scaling laws, open-source models like Llama-3 showed a downward trend in Dynamic Points over time. This suggests that as the "collective" performance improves, the relative uniqueness of solutions from mid-tier models diminishes.
- Efficiency Gains: By incorporating the Efficiency Score, the platform highlighted that some smaller models, such as DeepSeek-Coder-V2-Lite, can achieve high performance and efficiency despite lower parameter counts.
Limitations and Future Work
CodeArena currently relies on external platforms for problem sourcing, which introduces dependencies on their availability and quality. Additionally, while LLM-generated test cases are efficient, they may occasionally lack the nuance of human-curated edge cases. Future work will focus on expanding language support and fostering a community-driven ecosystem where researchers can contribute problems and analyze the growing repository of model-generated solutions to advance the field of AI-assisted software engineering.
Summary updated