paperbot · PL 论文追踪

全部论文 待读 收藏

P2 DeMinify: Neural Variable Name Recovery and Type Inference

DeMinify:神经变量名恢复与类型推断
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 2/10 · 该论文研究基于深度学习的变量名恢复与类型推断,属于机器学习与程序分析的交叉,但并非用户核心关注的“静态分析在ML/Agentic系统中的应用”或“LLM/Agent改进静态分析”,也未涉及浮点程序分析、贝叶斯程序分析或LLM/Agent工具链,因此匹配度较低。引用 5 inbox
Yi Li, Aashish Yadavally, Jiaxing Zhang, Shaohua Wang, Tien N. Nguyen
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出基于图卷积缺失特征与双任务学习的 DeMinify,联合恢复变量名并推断类型。

为避免源码泄露,变量名常被替换为简短无意义名称,导致代码难以理解和分析。DeMinify 将变量名与类型恢复建模为图卷积网络中的缺失特征预测:图编码变量间及其类型间关系,部分节点名称或类型缺失;双任务学习让两者相互影响。作者在含18万个方法的 Python 数据集和含32.2万个文件的 JavaScript 数据集上评估。变量名预测单次建议在 Python/JS 上分别达76.7%/81.6%正确率;相比最优变量名恢复,top-1相对提升15.3%–40.7%和7.7%–49.7%,类型预测top-1相对提升14.5%–51.9%。类型学习有助于变量名恢复,反之亦然。

问题
在变量名被短名或无意义名替换的场景下,如何恢复变量名并推断其类型,以支持代码理解与分析。
方法
提出 DeMinify,用图卷积网络将变量名和类型建模为图中缺失特征,并采用双任务学习传播名称与类型学习的相互影响。
评估
在 Python(180k 方法)和 JavaScript(322k 文件)数据集上评测名称恢复与类型预测,与现有 SOTA 比较并分析双任务互益。
原文摘要(Abstract)

To avoid the exposure of original source code, the variable names deployed in the wild are often replaced by short, meaningless names, thus making the code difficult to understand and be analyzed. We introduce DeMinify, a Deep-Learning (DL)-based approach that formulates such recovery problem as the prediction of missing features in a Graph Convolutional Network–Missing Features. The graph represents both the relations among the variables and the relations among their types, in which the names or types of some nodes are missing. Moreover, DeMinify leverages dual-task learning to propagate the mutual impact between the learning of the variable names and that of their types. We conducted experiments to evaluate DeMinify in both name recovery and type prediction on a Python dataset with 180k methods and a JavaScript (JS) dataset with 322k files. For variable name prediction, in 76.7% and 81.6% of the cases in Python and JS code respectively, DeMinify can predict correctly the variables' names with a single suggested name. DeMinify relatively improves 15.3%–40.7% and 7.7%–49.7% in top-1 accuracy over the state-of-the-art variable name recovery approaches for Python and JS code, respectively. It also relatively improves 14.5%–51.9% in top-1 accuracy over the existing type prediction approaches. Our experimental results showed that learning of data types helps improve variable name recovery and vice versa.

链接与引用

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

BibTeX
@inproceedings{LiYZ0N23,
  title = {DeMinify: Neural Variable Name Recovery and Type Inference},
  author = {Yi Li and Aashish Yadavally and Jiaxing Zhang and Shaohua Wang and Tien N. Nguyen},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3616368}
}