Metraipolis › archive › dc_75e04b876422

SpecCoder: Specification-Aware Code Generation with Curriculum Dual-Task Reinforcement Learning — arXiv:2609.06041

Source
arXiv (en)
Original
https://arxiv.org/abs/2609.06041
License (as archived)
CC0-1.0
Archived
2026-10-16T14:09:00.500Z
SHA-256 of the archived text
a67600eccb551f71fe4d0842620067c965503225d45fc75595d0d7036016b695
Stable URL of this page
https://metraipolis.com/documento/dc_75e04b876422

How to cite

SpecCoder: Specification-Aware Code Generation with Curriculum Dual-Task Reinforcement Learning — arXiv:2609.06041 — arXiv (en), https://arxiv.org/abs/2609.06041 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_75e04b876422 (Metraipolis archive dc_75e04b876422, sha256 a67600eccb551f71fe4d0842620067c965503225d45fc75595d0d7036016b695)
BibTeX
@misc{dc75e04b876422,
  title = {SpecCoder: Specification-Aware Code Generation with Curriculum Dual-Task Reinforcement Learning — arXiv:2609.06041},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2609.06041},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_75e04b876422; sha256 a67600eccb551f71fe4d0842620067c965503225d45fc75595d0d7036016b695},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.06041. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Large language models (LLMs) have made substantial progress in code generation but still struggle with challenging programming tasks that require understanding rich natural language requirements. These requirements often specify problem goals, input/output formats, constraints, examples, and edge cases. Overlooking even one may produce executable but functionally incorrect code. Existing training-free methods mainly rely on prompting or agent-based workflows, while training-based methods typically optimize final code outputs. However, existing approaches provide limited supervision for learning the intermediate mapping from raw requirements to structured specifications and for grounding them in concrete implementation behavior. Consequently, models may omit critical constraints, and even when an explicit specification is produced, the implementation may fail to reflect it consistently. Motivated by this gap, we propose SpecCoder, a specification-aware two-stage training framework for code generation. SpecCoder first employs specification-guided SFT to train LLMs to derive structured specification analyses and generate code conditioned on them. It then introduces curriculum dual-task GRPO, which jointly optimizes specification-guided generation and discrimination to encourage stronger correspondence between specifications and code behavior. Experiments on APPS, CodeContests, and xCodeEval demonstrate the effectiveness of specification-aware training, with SpecCoder consistently improving both standalone code generation and agent-based workflows. Additional evaluations on BigCodeBench-Hard and ClassEval, alongside human evaluation and perturbation studies, further validate the role of structured specifications in guiding code generation and discrimination.

Tema degli esploratori: calcolo e infrastrutture (retro-catalogo arXiv: annunci del 2026-09-09 in cs.SE).
Categorie arXiv: Software Engineering (cs.SE).
Pagina del lavoro: https://arxiv.org/abs/2609.06041 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-16T13:58:36.355Z dalla pagina https://arxiv.org/catchup/cs.SE/2026-09-09?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).