paperbot · PL 论文追踪

全部论文 待读 收藏

P2 From Execution to Embedding: Enriching Code Representations with Data Difference Signals for Comment Generation

从执行到嵌入:利用数据差异信号丰富代码表示以生成注释
ICSE Proceedings of the IEEE/ACM 48th International Conference on Software Engineering2026匹配度 3/10 · 该论文属于机器学习与程序语言交叉中的代码表示与注释生成,但未涉及用户核心关注的静态分析、Agentic 程序、浮点程序分析或贝叶斯程序分析,也未使用 LLM/Agent 改进分析工具。引用 0 inbox
Giacomo Fantino, Antonio Vetrò, Marco Torchiano, Federica Cappelluti
crossref: 2026-09-12

AI 速览

一句话:提出执行感知嵌入,将数据差异信号与代码表示融合,以改进自动注释生成。

论文针对自动注释生成难以捕捉以数据为中心的工作流意图的问题,提出捕获代码执行后的符号化数据变换差异,即数据差异信号,并通过双编码器架构将其与代码表示融合。作者在已执行 Python notebook 数据集上评估,该数据集包含代码、效果序列与人工注释。结果显示:当未检测到变换时,完整流程在自动指标和人工评价上均优于基线;当存在变换时,基线仍具竞争力,部分简化变体在特定指标上更优。作者公开软件与数据,并主张执行感知嵌入可推广至多种下游任务。

问题
仅依赖语法难以捕捉以数据为中心的工作流意图,自动注释生成对代码如何转换数据的语义信号利用不足。
方法
捕获执行后的符号化数据变换作为数据差异信号,并采用双编码器架构将其与代码表示融合,形成执行感知嵌入。
评估
在包含已执行 Python notebook 的代码、效果序列和人工注释数据集上,用自动指标与人工评价对比基线,并分析有无数据变换时的表现。
原文摘要(Abstract)

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.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@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}
}