Lune

EMNLP Findings2025

MATCH: Task-Driven Code Evaluation through Contrastive Learning

Marah Ghoummaid, Vladimir Tchuiev, Ofek Glick, Michal Moshkovitz, Dotan Di Castro

Abstract

AI-based code generation is increasingly prevalent, with GitHub Copilot estimated to generate 46% of the code on GitHub. Accurately evaluating how well generated code aligns with developer intent remains a critical challenge. Traditional evaluation methods, such as unit tests, are often unscalable and costly. Syntactic similarity metrics (e.g., BLEU, ROUGE) fail to capture code functionality, and metrics like CodeBERTScore require reference code, which is not always available. To address the gap in reference-free evaluation, with few alternatives such as ICE-Score, this paper introduces MATCH, a novel reference-free metric. MATCH uses Contrastive Learning to generate meaningful embeddings for code and natural language task descriptions, enabling similarity scoring that reflects how well generated code implements the task. We show that MATCH achieves stronger correlations with functional correctness and human preference than existing metrics across multiple programming languages.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • CodeBERTScore: Evaluating Code Generation with Pretrained Models of Code cites InCoder: A Generative Model for Code Infilling and Synthesis
  • CodeBERTScore: Evaluating Code Generation with Pretrained Models of Code cites DocPrompting: Generating Code by Retrieving the Docs
  • CodeBERTScore: Evaluating Code Generation with Pretrained Models of Code cites CrystalBLEU: Precisely and Efficiently Measuring the Similarity of Code
  • DocPrompting: Generating Code by Retrieving the Docs cites InCoder: A Generative Model for Code Infilling and Synthesis
  • WizardCoder: Empowering Code Large Language Models with Evol-Instruct cites InCoder: A Generative Model for Code Infilling and Synthesis
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on6

  1. WizardCoder: Empowering Code Large Language Models with Evol-InstructZiyang Luo, Can Xu, Pu Zhao, Qingfeng Sun et al.ICLR 2024 · 945 citations
  2. InCoder: A Generative Model for Code Infilling and SynthesisDaniel Fried, Armen Aghajanyan, Jessy Lin, Sida Wang et al.ICLR 2023 · 140 citations
  3. CodeBERTScore: Evaluating Code Generation with Pretrained Models of CodeShuyan Zhou, Uri Alon, Sumit Agarwal, Graham NeubigEMNLP 2023 · 77 citations
  4. CrystalBLEU: Precisely and Efficiently Measuring the Similarity of CodeAryaz Eghbali, Michael PradelASE 2022 · 33 citations
  5. DocPrompting: Generating Code by Retrieving the DocsShuyan Zhou, Uri Alon, Frank F. Xu, Zhengbao Jiang et al.ICLR 2023 · 18 citations

Related papers

  1. Evaluating Code Summarization Techniques: A New Metric and an Empirical CharacterizationAntonio Mastropaolo, Matteo Ciniselli, Massimiliano Di Penta, Gabriele BavotaICSE 2024 · 28 citations
  2. ReFEree: Reference-Free and Fine-Grained Method for Evaluating Factual Consistency in Real-World Code SummarizationSuyoung Bae, CheolWon Na, Jaehoon Lee, Yumin Lee et al.ACL 2026 · 1 citation
  3. On the Robustness of Code Generation Techniques: An Empirical Study on GitHub CopilotAntonio Mastropaolo, Luca Pascarella, Emanuela Guglielmi, Matteo Ciniselli et al.ICSE 2023 · 124 citations
  4. MATCHA: Matching Text via Contrastive Semantic AlignmentSiran Li, Ece Sena Etoglu, Carsten Eickhoff, Seyed Ali BahrainianACL Findings 2026
  5. Calibration of Large Language Models on Code SummarizationYuvraj Virk, Premkumar T. Devanbu, Toufique AhmedFSE 2025 · 5 citations
Dusk over the sea between two cliffs drawn in fine vertical lines