← News

ResearchSources: arXiv · 4 Dec 2026

DECoR rewrites code comments to enrich pre-training data

A reinforcement-learning pipeline rewrites sparse comments in code corpora, producing about 52B tokens of comment-enriched training data that improved benchmark results in the authors' experiments.

In plain words

Code AI models learn better when source code is paired with natural-language descriptions, but many training files have poor or missing comments. The DECoR pipeline trains a small rewriter model to add structured comments documenting parameters and return values. The authors say pre-training on this enriched data improved results on a coding benchmark.

What was announced

Researchers behind DECoR, a pipeline for Disciplined and Efficient Code Pre-Training Data Rewriting, address a weakness in how coding LLMs are trained. These models are usually pre-trained on corpora mixing code with related natural language to strengthen text-code alignment, and comments inside source files carry that signal directly, yet large-scale code corpora are often sparsely or poorly commented. DECoR builds rewriting supervision from well-documented code and trains a 1.5B-parameter rewriter with reinforcement learning, using a reward that combines an LLM judge's assessment of the comments with a penalty for edits to the underlying Python. During training, the rewriter learns to document parameters and return values in structured comments.

Applying the pipeline to code pre-training corpora yields approximately 52B tokens of comment-enriched data. In the authors' from-scratch experiments with 1B and 30B-A3B models, DECoR produced the largest gains on BigCodeBench. On the Stack, their 1B model outperformed both baselines on that benchmark at a fixed token budget and at checkpoints near the first four epoch boundaries; the baselines used either the original data or rewrites from a model trained with supervised fine-tuning. The authors note that longer rewrites change how often a model sees each file within a token budget, making it hard to isolate the effects of comment content, length, and repetition.

What it does not show

  • Evidence is limited to the paper's abstract, so the reported gains cannot be independently verified and full experimental details are not available.
  • The authors state that longer rewrites alter file repetition within a token budget, so the effects of comment content, length, and repetition are not isolated.
  • Benchmark results come from the authors' own from-scratch experiments and have not been confirmed by third parties.

For security and IT teams

Scope
The released evidence covers only the paper abstract; the authors point to a GitHub repository for data and code, but its contents are not described here.

Sources

Source-support review completed 4 Dec 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.

Coverage: arXiv: abstract.

Updates and corrections

No corrections so far.

First published 4 Dec 2026

New to the subject? AI from the Ground Up starts from the beginning.