NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

CRScore: Grounding Automated Evaluation of Code Review Comments in Code Claims and Smells

Atharva Naik, Marcus Alenius, Daniel Fried, Carolyn P. Rosé · DOI

Introduction

Evaluating AI-generated code reviews is notoriously difficult. Traditional reference-based metrics like BLEU or BERTScore compare model outputs to a single human-written "ground truth" comment. However, code review is a one-to-many problem: a single code change (a "diff") may contain multiple valid issues, while a human reference typically only highlights one. If an AI correctly identifies a different valid issue, traditional metrics penalize it. Furthermore, human references are often noisy or lack context. CRScore addresses this by evaluating reviews based on the code itself rather than mimicking specific human phrasing.

Methodology: The CRScore Framework

CRScore employs a two-step "neuro-symbolic" process to evaluate comments without relying on human references.

The CRScore architecture: from code diff to pseudo-references and semantic alignment.
  1. Pseudo-Reference Generation: Instead of a human comment, CRScore analyzes the code diff. It uses an LLM to generate "claims" (what changed) and "implications" (the meaning of those changes). Simultaneously, Static Analysis Tools (CATs) detect objective "code smells" like design flaws. These combined outputs form a set of "pseudo-references" representing potential review points.
  2. Semantic Alignment: CRScore uses a Sentence Transformer to calculate the Semantic Textual Similarity (STS) between the generated review and the pseudo-references.

From this alignment, CRScore derives three key metrics:

  • Conciseness (Precision): The fraction of review sentences relating to detected issues.
  • Comprehensiveness (Recall): The fraction of detected issues covered by the review.
  • Relevance (F1-equivalent): The harmonic mean of conciseness and comprehensiveness.

Datasets and Evaluation

The authors utilized the large-scale CodeReviewer Dataset for benchmarking and introduced a new human-annotated corpus. This new dataset contains 2.9k human-annotated quality scores across Python, Java, and JavaScript, where experts rated reviews on a 5-point Likert scale for conciseness, comprehensiveness, and relevance.

Key Results

CRScore significantly outperforms traditional metrics in aligning with human judgment. While metrics like BLEU and ROUGE often show near-zero or negative correlations, CRScore achieves a 0.54 Spearman correlation ($r_s$) with human ratings.

Comparison of metric correlations with human judgment. CRScore (Rel) significantly outperforms traditional NLP metrics.

Additional findings include:

  • System Ranking: CRScore ranks various LLMs (e.g., GPT-3.5, Llama, Magicoder) in the same order as human experts.
  • Pseudo-Reference Accuracy: Human evaluators verified that 82.6% of automatically generated pseudo-references were correct.
  • Ground Truth Fragility: The study revealed that human references are often lower quality than AI-generated reviews; GPT-3.5 actually outscored "ground truth" human references in relevance and comprehensiveness.

Discussion and Future Work

CRScore demonstrates that evaluation should be grounded in claims (code facts) rather than n-grams (word sequences). However, limitations remain. The STS models can struggle with inline code snippets, potentially overestimating relevance. Future work aims to expand the pseudo-reference generator to include security vulnerabilities and performance efficiency, as well as extending support to languages beyond Python, Java, and JavaScript.

Summary updated

BibTeX
@inproceedings{naik2025crscore,
  author = {Atharva Naik and Marcus Alenius and Daniel Fried and Carolyn P. Rosé},
  title = {{CRScore: Grounding Automated Evaluation of Code Review Comments in Code Claims and Smells}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2025},
  doi = {10.18653/v1/2025.naacl-long.457},
}
Figure