scratheval-eval
ScratchEval : A Multimodal Evaluation Framework for LLMs in Block-Based Programming — Si et al. (2026) (arXiv:2602.00757, 2026)
What this evaluates
Evaluates LLMs' ability to understand, diagnose, and repair bugs in multimodal, event-driven block-based programming environments (Scratch). It probes functional correctness, structured bug explanation, trigger/mechanism identification, and patch minimality/semantic preservation.
Datasets
- ScratchEval — total 100; splits: test (100)
Metrics
G-Acc (primary) — range: [0, 1]
- Accuracy of recovering the project-level intent and functional structure (e.g., project goal, main loop, core sprites).
U-Acc — range: [0, 1]
- Strict joint accuracy where the model's structured explanation correctly identifies the trigger, mechanism, and outcome matching the reference.
T-F1 — range: [0, 1]
- F1-score for identifying the specific event or action that initiates faulty behavior against gold-standard triggers.
M-Acc — range: [0, 1]
- Accuracy of classifying the underlying causal bug mechanism (e.g., concurrency/timing, state initialization, missing handlers).
Fix Success Rate — range: [0, 1]
- Percentage of bugs where the model's generated patch passes all executable VM-level test suites.
Input / output format
Input: Buggy Scratch project exported as .sb3 (containing blocks, sprites, and metadata) paired with original multimedia assets (PNG/SVG images, WAV sounds). No gameplay videos are provided.
Output: Structured bug explanation (trigger, mechanism, outcome) and/or a repaired project patch (modified blocks/sprites). For repair tasks, the output is evaluated as a complete .sb3 project.
Scoring recipe
def score_scratheval(predictions, gold):
g_acc = 1.0 if predictions.project_intent == gold.project_intent else 0.0
u_acc = 1.0 if (predictions.trigger == gold.trigger and
predictions.mechanism == gold.mechanism and
predictions.outcome == gold.outcome) else 0.0
t_f1 = compute_f1(gold.triggers, predictions.triggers)
m_acc = 1.0 if predictions.mechanism_tag == gold.mechanism_tag else 0.0
fix_success = 1.0 if execute_vm_tests(predictions.patch) == 'PASS' else 0.0
return {'G-Acc': g_acc, 'U-Acc': u_acc, 'T-F1': t_f1, 'M-Acc': m_acc, 'Fix Success': fix_success}
Common pitfalls
- Models frequently over-edit or introduce auxiliary state/logic beyond the localized fix, violating minimality.
- Patches often exhibit semantic drift, passing tests but altering unintended project behaviors compared to the original intent.
- Models apply sequential-code heuristics that fail to respect Scratch’s event-driven concurrency and broadcast ordering.
Evidence (verbatim from paper)
Global Understanding (G-Acc) = accuracy of recovering the project-level intent/structure; Bug Understanding (U-Acc) = percentage of bugs where the model’s structured explanation matches the reference (trigger, mechanism, and outcome); T-F1 = trigger identification F1-score; M-Acc = mechanism tag accuracy; Fix Gains = number of previously failing repairs that became correct after LoRA tuning (i.e., fail→success relative to Qwen zero-shot on the 100-bug evaluation set).
Citation
@misc{si2026scratheval,
title={ScratchEval : A Multimodal Evaluation Framework for LLMs in Block-Based Programming},
author={Si et al. (2026)},
year={2026},
note={arXiv:2602.00757}
}
1---2name: scratheval-eval3description: Evaluates LLMs' ability to understand, diagnose, and repair bugs in multimodal, event-driven block-based programming environments (Scratch). It probes functional correctness, structured bug explanation, trigger/mechanism identification, and patch minimality/semantic preservation. Use when the user wants to benchmark on ScratchEval, or asks about evaluating this task. Reports G-Acc.4metadata:5 source: https://skillmd.com/skills/qhjqhj00/scratheval-eval6 skill_kind: dataset_eval7 source_arxiv: 2602.007578 bibtex_key: si2026scratheval9 confidence: high10---1112# scratheval-eval1314> ScratchEval : A Multimodal Evaluation Framework for LLMs in Block-Based Programming — Si et al. (2026) (arXiv:2602.00757, 2026)1516## What this evaluates1718Evaluates LLMs' ability to understand, diagnose, and repair bugs in multimodal, event-driven block-based programming environments (Scratch). It probes functional correctness, structured bug explanation, trigger/mechanism identification, and patch minimality/semantic preservation.1920## Datasets2122- **ScratchEval** — total 100; splits: test (100)2324## Metrics2526- `G-Acc` **(primary)** — range: [0, 1]27 - Accuracy of recovering the project-level intent and functional structure (e.g., project goal, main loop, core sprites).28- `U-Acc` — range: [0, 1]29 - Strict joint accuracy where the model's structured explanation correctly identifies the trigger, mechanism, and outcome matching the reference.30- `T-F1` — range: [0, 1]31 - F1-score for identifying the specific event or action that initiates faulty behavior against gold-standard triggers.32- `M-Acc` — range: [0, 1]33 - Accuracy of classifying the underlying causal bug mechanism (e.g., concurrency/timing, state initialization, missing handlers).34- `Fix Success Rate` — range: [0, 1]35 - Percentage of bugs where the model's generated patch passes all executable VM-level test suites.3637## Input / output format3839**Input**: Buggy Scratch project exported as .sb3 (containing blocks, sprites, and metadata) paired with original multimedia assets (PNG/SVG images, WAV sounds). No gameplay videos are provided.4041**Output**: Structured bug explanation (trigger, mechanism, outcome) and/or a repaired project patch (modified blocks/sprites). For repair tasks, the output is evaluated as a complete .sb3 project.4243## Scoring recipe4445```python46def score_scratheval(predictions, gold):47 g_acc = 1.0 if predictions.project_intent == gold.project_intent else 0.048 u_acc = 1.0 if (predictions.trigger == gold.trigger and49 predictions.mechanism == gold.mechanism and50 predictions.outcome == gold.outcome) else 0.051 t_f1 = compute_f1(gold.triggers, predictions.triggers)52 m_acc = 1.0 if predictions.mechanism_tag == gold.mechanism_tag else 0.053 fix_success = 1.0 if execute_vm_tests(predictions.patch) == 'PASS' else 0.054 return {'G-Acc': g_acc, 'U-Acc': u_acc, 'T-F1': t_f1, 'M-Acc': m_acc, 'Fix Success': fix_success}55```5657## Common pitfalls5859- Models frequently over-edit or introduce auxiliary state/logic beyond the localized fix, violating minimality.60- Patches often exhibit semantic drift, passing tests but altering unintended project behaviors compared to the original intent.61- Models apply sequential-code heuristics that fail to respect Scratch’s event-driven concurrency and broadcast ordering.6263## Evidence (verbatim from paper)6465> Global Understanding (G-Acc) = accuracy of recovering the project-level intent/structure; Bug Understanding (U-Acc) = percentage of bugs where the model’s structured explanation matches the reference (trigger, mechanism, and outcome); T-F1 = trigger identification F1-score; M-Acc = mechanism tag accuracy; Fix Gains = number of previously failing repairs that became correct after LoRA tuning (i.e., fail→success relative to Qwen zero-shot on the 100-bug evaluation set).6667## Citation6869```bibtex70@misc{si2026scratheval,71 title={ScratchEval : A Multimodal Evaluation Framework for LLMs in Block-Based Programming},72 author={Si et al. (2026)},73 year={2026},74 note={arXiv:2602.00757}75}76```7778- arXiv: 2602.00757