Code Generator Evaluation Using Block-Level CAT Ranking

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current evaluation schemes for code generators lack human-centric metrics that capture functional equivalence, correctness, and complexity, making it time-consuming and expensive to select well-performing generators and improve machine learning training.

Innovation Solution

A coding activity task (CAT) evaluation approach that separates software code into constituent blocks, generates equivalent blocks, determines coding scores, and aggregates them to rank code generators, incorporating human-centric measures like complexity and readability, followed by online evaluation for final selection.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If current evaluation schemes rely on similarity between generated code and ground truth, then evaluation is simple to implement, but they fail to capture functional equivalence, correctness, or complexity

Engineering Contradiction:
Improveevaluation accuracyVSAvoidevaluation system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent segments code evaluation into multiple dimensions: similarity metrics (edit distance, token overlap), functional metrics (test pass/fail, code coverage), and complexity metrics (cognitive difficulty, computational complexity). This segmentation allows comprehensive evaluation without requiring a single complex evaluation system, resolving the contradiction between measurement precision and device complexity.

Inventive Principle:
Principle #1Segmentation

2Measurement precision

If evaluation schemes rely on pass/fail functional testing, then correctness is directly measured, but execution requirements create security implications and overly coarse granularity

Engineering Contradiction:
Improvecorrectness measurementVSAvoidsecurity implications
Core Design Contradiction:
Measurement precisionVSObject-affected harmful factors

Solution Approach 1:

The patent introduces test suites as an intermediary between code generation and direct execution. Instead of executing generated code directly (which poses security risks), the system uses pre-defined test suites that safely evaluate functional correctness. This intermediary approach maintains measurement precision while eliminating security implications.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Ease of operation

If evaluation schemes measure acceptance or survival of generated functions, then human-centric evaluation is achieved, but functional equivalence, correctness, or complexity remain uncaptured

Engineering Contradiction:
Improvehuman-centric evaluationVSAvoidfunctional equivalence measurement
Core Design Contradiction:
Ease of operationVSMeasurement precision

Solution Approach 1:

The patent merges multiple evaluation approaches into a unified framework that combines human-centric metrics (acceptance rate, survival rate) with objective metrics (functional equivalence, correctness, complexity). This merging allows the system to maintain ease of operation through human-centric evaluation while simultaneously capturing functional equivalence and correctness through automated metrics.

Inventive Principle:
Principle #5Merging (Combining)

4Measurement precision

If manual evaluation of code generators is performed, then detailed assessment is possible, but the process becomes time-consuming and expensive

Engineering Contradiction:
Improveevaluation detailVSAvoidevaluation time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent implements self-service evaluation where the code generators automatically evaluate themselves through test suites and automated metrics. The system performs functional testing, similarity comparison, and complexity analysis without requiring manual intervention for each code sample. This self-service approach maintains detailed assessment capability while dramatically reducing evaluation time and cost.

Inventive Principle:
Principle #25Self-service

Data Source

PatentEP4511730B1Coding activity task (CAT) evaluation for source code generators
Publication Date: 2026.02.25 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP4511730B1 patent drawingFigure 1
  • EP4511730B1 patent drawingFigure 2
  • EP4511730B1 patent drawingFigure 3A

AI summary

Solutions for evaluating source code generators use offline and online evaluation stages. Offline evaluation includes separating each of a plurality of input passages of software code into a plurality of constituent blocks. Each code generator (of a plurality of code generators) generates an equivalent block corresponding to each constituent block. A coding score is determined for each equivalent block (for each code generator), and the coding scores are aggregated across the equivalent blocks to provide an aggregate score for each code generator. Ranking of the aggregate scores is used to down-select to a fewer number of code generators for online evaluation. For this stage, the code generators output passages of software code, and user acceptance of the code generators' outputs may be used for further ranking and down-selection. Some examples weight the coding score according to a code utility estimate of the constituent blocks for which equivalent blocks are generated.