一句话:提出执行感知嵌入,将数据差异信号与代码表示融合,以改进自动注释生成。
论文针对自动注释生成难以捕捉以数据为中心的工作流意图的问题,提出捕获代码执行后的符号化数据变换差异,即数据差异信号,并通过双编码器架构将其与代码表示融合。作者在已执行 Python notebook 数据集上评估,该数据集包含代码、效果序列与人工注释。结果显示:当未检测到变换时,完整流程在自动指标和人工评价上均优于基线;当存在变换时,基线仍具竞争力,部分简化变体在特定指标上更优。作者公开软件与数据,并主张执行感知嵌入可推广至多种下游任务。
Modern automatic comment generation tools often fail to capture data-centric workflow intents, because syntax alone provides weak signals of how code transforms data. We instead capture semantic data differences—symbolic descriptions of post-execution data transformations—and integrate them with code through a dual-encoder architecture. We evaluate this approach on a dataset of executed Python notebooks pairing code, effect sequences, and human comments. When no transformation is detected, the full pipeline outperforms the baseline across both automatic metrics and human evaluation. When transformations are present, the baseline remains competitive, though some simplified variants surpass it on specific metrics. We make available all software and data to encourage replication and further studies in this area. While our experiments focus on comment generation, our core contribution is broader: we introduce execution-aware embeddings and argue for their applicability to a variety of downstream tasks.
@inproceedings{paperbot12025,
title = {From Execution to Embedding: Enriching Code Representations with Data Difference Signals for Comment Generation},
author = {Giacomo Fantino and Antonio Vetrò and Marco Torchiano and Federica Cappelluti},
booktitle = {ICSE},
year = {2026},
doi = {10.1145/3786582.3786826}
}