paperbot · PL 论文追踪

全部论文 待读 收藏

P2 xASTNN: Improved Code Representations for Industrial Practice

xASTNN:面向工业实践的改进代码表示
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 2/10 · 该论文研究基于AST的神经网络代码表示,用于代码分类与克隆检测,属于机器学习与程序语言交叉,但与用户关注的静态分析、Agentic程序、LLM/Agent改进形式化验证、浮点或贝叶斯程序分析均无直接关联。仅“工业落地”与“代码表示”与兴趣有微弱交集。引用 10 inbox
Zhiwei Xu, Min Zhou, Xibin Zhao, Yang Chen, Xi Cheng, Hongyu Zhang
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:提出基于AST的神经网络代码表示xASTNN,通过三项设计与动态批处理,在代码分类和克隆检测上提升效果与速度。

深度学习在软件工程中的应用日益广泛,但高质量、易部署且高效的源代码表示仍是难题,现有方法常因预处理复杂和性能瓶颈难以落地工业界。本文提出xASTNN,一种基于抽象语法树(AST)的源代码表示神经网络。它直接基于通用AST,无需复杂预处理,可适配多种编程语言与实际场景;设计语句子树序列以刻画代码自然性,使用门控递归单元编码语法信息,并用门控循环单元建模序列信息;同时引入动态批处理算法显著降低时间复杂度。作者在代码分类和代码克隆检测两个代码理解下游任务上评估,结果表明xASTNN能超越当前最优方法,同时比基线方法更快。

问题
现有深度学习代码表示方法常依赖复杂预处理且性能受限,难以在工业实践中部署和应用。
方法
提出基于通用AST的xASTNN,结合语句子树序列、门控递归单元和门控循环单元,并采用动态批处理降低计算复杂度。
评估
在代码分类与代码克隆检测两个下游任务上进行实验,验证其效果优于当前最优方法且速度更快。
原文摘要(Abstract)

The application of deep learning techniques in software engineering becomes increasingly popular. One key problem is developing high-quality and easy-to-use source code representations for code-related tasks. The research community has acquired impressive results in recent years. However, due to the deployment difficulties and performance bottlenecks, seldom these approaches are applied to the industry. In this paper, we present xASTNN, an eXtreme Abstract Syntax Tree (AST)-based Neural Network for source code representation, aiming to push this technique to industrial practice. The proposed xASTNN has three advantages. First, xASTNN is completely based on widely-used ASTs and does not require complicated data pre-processing, making it applicable to various programming languages and practical scenarios. Second, three closely-related designs are proposed to guarantee the effectiveness of xASTNN, including statement subtree sequence for code naturalness, gated recursive unit for syntactical information, and gated recurrent unit for sequential information. Third, a dynamic batching algorithm is introduced to significantly reduce the time complexity of xASTNN. Two code comprehension downstream tasks, code classification and code clone detection, are adopted for evaluation. The results demonstrate that our xASTNN can improve the state-of-the-art while being faster than the baselines.

链接与引用

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

BibTeX
@inproceedings{abs-2303-07104,
  title = {xASTNN: Improved Code Representations for Industrial Practice},
  author = {Zhiwei Xu and Min Zhou and Xibin Zhao and Yang Chen and Xi Cheng and Hongyu Zhang},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3613869}
}