Can Code Comments Pay for Themselves?

Coding agents write a growing share of code and readily fill it with comments, which add to the token bill of every model that reads the code afterward. We ask whether the comments help these models, and whether a cheap score can tell which ones are worth keeping. We evaluate language models' performance and reasoning cost on programs from four tasks: Python-to-Java translation, output prediction, loop counting, and call-graph recovery. We generate comments from each program's code, then compare the same code with comments, without comments, and with generic filler comments as a control for added text. Comments do not help: across twenty-eight task and model settings spanning four model families, they never detectably outperform either control and, after accounting for their own length, reduce total token use in only one. We test whether reduced uncertainty about code identifies "useful" comments, using the decrease in a proxy language model's negative log-likelihood of the code given each comment. The score distinguishes code-specific comments from filler on every dataset, but does not predict performance gains or which comments are worth keeping. We re-examine a prior study reporting Python-to-Java translation gains from generated comments. We find that code reformatting in that study confounds the comparison: the comments add no detectable gain beyond the reformatting. Overall, reduced uncertainty about code through comments does not imply better language model task performance. Comments containing only information inferable from the code rarely repay their token cost. We release the comments, filler, and scores.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-29
DOI
https://doi.org/10.5281/zenodo.24660207
Primary Topic
Software Engineering Research
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Can Code Comments Pay for Themselves?

Alon Kipnis, Alexander Tsvetkov
3 links
Zenodo (CERN European Organization for Nuclear Research)
Software Engineering Research
preprint

Can Code Comments Pay for Themselves?

Alon Kipnis, Alexander Tsvetkov
preprint en

Abstract

Coding agents write a growing share of code and readily fill it with comments, which add to the token bill of every model that reads the code afterward. We ask whether the comments help these models, and whether a cheap score can tell which ones are worth keeping. We evaluate language models' performance and reasoning cost on programs from four tasks: Python-to-Java translation, output prediction, loop counting, and call-graph recovery. We generate comments from each program's code, then compare the same code with comments, without comments, and with generic filler comments as a control for added text. Comments do not help: across twenty-eight task and model settings spanning four model families, they never detectably outperform either control and, after accounting for their own length, reduce total token use in only one. We test whether reduced uncertainty about code identifies "useful" comments, using the decrease in a proxy language model's negative log-likelihood of the code given each comment. The score distinguishes code-specific comments from filler on every dataset, but does not predict performance gains or which comments are worth keeping. We re-examine a prior study reporting Python-to-Java translation gains from generated comments. We find that code reformatting in that study confounds the comparison: the comments add no detectable gain beyond the reformatting. Overall, reduced uncertainty about code through comments does not imply better language model task performance. Comments containing only information inferable from the code rarely repay their token cost. We release the comments, filler, and scores.

Zenodo (CERN European Organization for Nuclear Research)
Reichman University (IL)
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
Can Code Comments Pay for Themselves? — Alon Kipnis, Alexander Tsvetkov · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS