一句话:提出以分层离散隐变量作为可检视中间表示,在 token 之上实现结构保持的代码再生成控制。
论文关注受限修复、分阶段精化与结构保持修改等软件工程工作流中对“改什么、留什么”的控制需求。作者指出 token 级生成只约束局部表面文本,难以维持粗粒度的结构不变量,因此研究分层离散隐变量作为一种可检视的软件制品中间表示:用分层 VQ-VAE 将 64 token 的 Python 函数压缩为粗、细两级离散码,再用掩码离散生成在部分约束下只重新生成指定位置。在 2000 个预处理 Python 函数上,锁定四个顶层码可将解析率从 0.453 提升到 0.591,同时未锁定位置保持较高编辑自由度(0.936)与近乎最大的样本唯一性(0.998)。固定粗粒度上下文时,低层精化效果较弱但仍单调,支持该层级结构的“由粗到细”解读。作者认为这为 token 级别之上的有界、结构保持再生成控制层提供了初步证据。
Software-engineering workflows such as constrained repair, staged refinement, and structure-preserving modification require control over what changes and what remains fixed. Token-level generation is a weak control surface for these operations because it constrains local surface text rather than the coarse structural invariants that software engineering often aims to preserve. We study hierarchical discrete latents as an inspectable intermediate representation for software artifacts: a hierarchical VQ-VAE compresses a 64-token Python function into coarse and fine discrete codes, and masked discrete generation regenerates only selected positions under partial constraints. On 2,000 preprocessed Python functions, locking four top-level codes improves parse rate from 0.453 to 0.591 while preserving substantial change in unlocked positions (edit freedom, 0.936) and near-maximal sample uniqueness (diversity, 0.998). Under fixed coarse context, lower-level refinement is weaker but remains monotonic, supporting a coarse-to-fine reading of the hierarchy. Overall, these results provide early evidence for a practical control layer that supports bounded, structure-preserving software-artifact regeneration above the token level.
@inproceedings{GavrilovGMMM26,
title = {Inspectable Control for Structure-Preserving Software Regeneration},
author = {Alexey Gavrilov and Alan-Barsag Gazzaev and Mikhail Mozikov and Ilya Makarov and Sergey Muravyov},
booktitle = {FSE},
year = {2026},
doi = {10.1145/3803437.3807386}
}