# Spaghetti Architect: A Controlled Code Benchmark Generator, and What Its Own Comments Do to Model Scores

DevFeed: [Spaghetti Architect: A Controlled Code Benchmark Generator, and What Its Own Comments Do to Model Scores](<https://devfeed.tech/articles/spaghetti-architect-a-controlled-code-benchmark-generator-and-what-its-own-comments-do-to-model-scores-127196.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2607.18642>)

Author: Yuxiang Ji

Published: 2026-11-10T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Software Engineering](<https://devfeed.tech/sources/arxiv-software-engineering.md>)

Topics: [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [scaling laws](<https://devfeed.tech/topics/scaling-laws.md>), [code comments](<https://devfeed.tech/topics/code-comments.md>), [Compilers and Linkers](<https://devfeed.tech/topics/compilers-and-linkers.md>)

Tags: [aggregation](<https://devfeed.tech/tags/aggregation.md>), [architect](<https://devfeed.tech/tags/architect.md>), [behaviour](<https://devfeed.tech/tags/behaviour.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [code](<https://devfeed.tech/tags/code.md>), [comment](<https://devfeed.tech/tags/comment.md>), [control](<https://devfeed.tech/tags/control.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [cs-se](<https://devfeed.tech/tags/cs-se.md>), [dataset](<https://devfeed.tech/tags/dataset.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [generator](<https://devfeed.tech/tags/generator.md>), [json](<https://devfeed.tech/tags/json.md>), [languages](<https://devfeed.tech/tags/languages.md>), [messy](<https://devfeed.tech/tags/messy.md>), [model](<https://devfeed.tech/tags/model.md>), [models](<https://devfeed.tech/tags/models.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [program](<https://devfeed.tech/tags/program.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [reference](<https://devfeed.tech/tags/reference.md>), [rendering](<https://devfeed.tech/tags/rendering.md>)

## AI overview

Spaghetti Architect generates deliberately messy programs in five languages from JSON descriptions, then compiles and runs them against reference outputs and labels them by size and messiness. This controlled setup lets researchers vary one property at a time. Across four tested models, removing generated comments lowered refactoring scores, with a larger drop for the weakest model; a preregistered replication found the same pattern at smaller magnitude. Comments also masked messiness-related score declines on both tasks, leading the authors to recommend evaluating comment-free code. Changing problem size reduced direct-answer aggregation accuracy to zero for all models, while changing literal values shifted scores by less than 0.012. The abstract says the generator, dataset, and evaluation records are open source.

## Source excerpt

arXiv:2607.18642v3 Announce Type: replace-cross Abstract: Code corpora mined from the wild cannot change one thing at a time: a program's behaviour, messiness and size vary together, and nothing marks the correct answer. We present Spaghetti Architect, a generator that turns a small JSON description of a program into deliberately messy programs in five languages. It compiles and runs every program, checks the output against a reference computed from the description, and labels each program by problem size and by messiness. This control lets us change one property at a time and still know the correct answer. The generator writes comments into its own output, so we first re-render identical code without them. Removing the comments lowers the refactoring score of all four models we tested, and lowers the weakest model's about ten times as much as the strongest model's; a pre-registered replication confirms the difference at a smaller magnitude. The comments also hide an effect: messiness leaves scores flat while they are present and lowers them on both tasks once they are gone. We therefore recommend evaluating on the comment-free rendering. Changing only problem size drives direct-answer aggregation accuracy to zero for every model, and changing only literal values moves scores by less than 0.012. The generator, the dataset and the evaluation records are open source.