Pith. sign in

Is functional correctness enough to evaluate code language models? exploring diversity of generated codes

4 Pith papers cite this work. Polarity classification is still indexing.

4 Pith papers citing it
abstract

Language models (LMs) have exhibited impressive abilities in generating codes from natural language requirements. In this work, we highlight the diversity of code generated by LMs as a critical criterion for evaluating their code generation capabilities, in addition to functional correctness. Despite its practical implications, there is a lack of studies focused on assessing the diversity of generated code, which overlooks its importance in the development of code LMs. We propose a systematic approach to evaluate the diversity of generated code, utilizing various metrics for inter-code similarity as well as functional correctness. Specifically, we introduce a pairwise code similarity measure that leverages large LMs' capabilities in code understanding and reasoning, demonstrating the highest correlation with human judgment. We extensively investigate the impact of various factors on the quality of generated code, including model sizes, temperatures, training approaches, prompting strategies, and the difficulty of input problems. Our consistent observation of a positive correlation between the test pass score and the inter-code similarity score indicates that current LMs tend to produce functionally correct code with limited diversity.

citation-role summary

background 1

citation-polarity summary

fields

cs.SE 3 cs.PL 1

years

2026 4

roles

background 1

polarities

background 1

representative citing papers

Rethinking Code Performance Benchmarks for LLMs

cs.SE · 2026-07-08 · conditional · novelty 6.0

Re-evaluating four LLM code-efficiency benchmarks with 30-run statistical testing shows 93.89% of 'performant' implementations are indistinguishable from baselines; a multi-agent test-generation framework reveals hidden significant improvements in ~24% of previously non-significant tasks.

Insights into Security-Related AI-Generated Pull Requests

cs.SE · 2026-04-21 · unverdicted · novelty 6.0

AI-generated security pull requests frequently contain a small set of recurring weaknesses, with many flawed ones merged and rejections driven by process factors rather than technical issues.

citing papers explorer

Showing 4 of 4 citing papers.

  • Rethinking Code Performance Benchmarks for LLMs cs.SE · 2026-07-08 · conditional · none · ref 95 · internal anchor

    Re-evaluating four LLM code-efficiency benchmarks with 30-run statistical testing shows 93.89% of 'performant' implementations are indistinguishable from baselines; a multi-agent test-generation framework reveals hidden significant improvements in ~24% of previously non-significant tasks.

  • Bridging Generation and Training: A Systematic Review of Quality Issues in LLMs for Code cs.SE · 2026-05-06 · accept · none · ref 17

    A review of 114 studies creates taxonomies for code and data quality issues, formalizes 18 propagation mechanisms from training data defects to LLM-generated code defects, and synthesizes detection and mitigation techniques.

  • Insights into Security-Related AI-Generated Pull Requests cs.SE · 2026-04-21 · unverdicted · none · ref 77

    AI-generated security pull requests frequently contain a small set of recurring weaknesses, with many flawed ones merged and rejections driven by process factors rather than technical issues.

  • Functional Cache Grafting: Robust and Rapid Code-Policy Synthesis for Embodied Agents cs.PL · 2026-06-11 · conditional · none · ref 5

    By reusing validated function-level KV caches (stitching) and regenerating only localized error spans (patching), FCGraft makes CodeLLM policies for embodied agents faster and more robust than prompt-level caching.