TreeCaps: Tree-Based Capsule Networks for Source Code Processing
Nghi D. Q. Bui, Yijun Yu, Lingxiao Jiang
摘要
Recently program learning techniques have been proposed to process source code based on syntactical structures (e.g., abstract syntax trees) and/or semantic information (e.g., dependency graphs). While graphs may be better than trees at capturing code semantics, constructing the graphs from code inputs through the semantic analysis of multiple viewpoints can lead to inaccurate noises for a specific software engineering task. Compared to graphs, syntax trees are more precisely defined on the grammar and easier to parse; unfortunately, previous tree-based learning techniques have not been able to learn semantic information from trees to achieve better accuracy than graph-based techniques. We have proposed a new learning technique, named TreeCaps, by fusing together capsule networks with tree-based convolutional neural networks to achieve a learning accuracy higher than some existing graph-based techniques while it is based only on trees. TreeCaps introduces novel variable-to-static routing algorithms into the capsule networks to compensate for the loss of previous routing algorithms. Aside from accuracy, we also find that TreeCaps is the most robust to withstand those semantic-preserving program transformations that change code syntax without modifying the semantics. Evaluated on a large number of Java and C/C++ programs, TreeCaps models outperform prior deep learning models of program source code, in terms of both accuracy and robustness for program comprehension tasks such as code functionality classification and function name prediction. Our implementation is publicly available at: https://github.com/bdqnghi/treecaps.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 10 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Two Sides of the Same Coin: Exploiting the Impact of Identifiers in Neural Code Comprehension 引用了 Generating Adversarial Examples for Holding Robustness of Source Code Processing Models
- Two Sides of the Same Coin: Exploiting the Impact of Identifiers in Neural Code Comprehension 引用了 Self-Supervised Contrastive Learning for Code Retrieval and Summarization via Semantic-Preserving Transformations
- Self-Supervised Contrastive Learning for Code Retrieval and Summarization via Semantic-Preserving Transformations 引用了 Generating Adversarial Examples for Holding Robustness of Source Code Processing Models
- Lightweight global and local contexts guided method name recommendation with prior knowledge 引用了 Global Relational Models of Source Code
引用它的顶会 Paper10
- Self-Supervised Contrastive Learning for Code Retrieval and Summarization via Semantic-Preserving TransformationsNghi D. Q. Bui, Yijun Yu, Lingxiao JiangSIGIR 2021 · 98 次引用
- DEAR: A Novel Deep Learning-based Approach for Automated Program RepairYi Li, Shaohua Wang, Tien N. NguyenICSE 2022 · 91 次引用
- Lightweight global and local contexts guided method name recommendation with prior knowledgeShangwen Wang, Ming Wen, Bo Lin, Xiaoguang MaoFSE 2021 · 38 次引用
- Multi-View Graph Representation for Programming Language Processing: An Investigation into Algorithm DetectionTing Long, Yutong Xie, Xianyu Chen, Weinan Zhang 等AAAI 2022 · 23 次引用
- Two Sides of the Same Coin: Exploiting the Impact of Identifiers in Neural Code ComprehensionShuzheng Gao, Cuiyun Gao, Chaozheng Wang, Jun Sun 等ICSE 2023 · 17 次引用
它引用的 Paper6
- On the Variance of the Adaptive Learning Rate and BeyondLiyuan Liu, Haoming Jiang, Pengcheng He, Weizhu Chen 等ICLR 2020 · 2,210 次引用
- Global Relational Models of Source CodeVincent J. Hellendoorn, Charles Sutton, Rishabh Singh, Petros Maniatis 等ICLR 2020 · 252 次引用
- GNN-FiLM: Graph Neural Networks with Feature-wise Linear ModulationMarc BrockschmidtICML 2020 · 180 次引用
- Generating Adversarial Examples for Holding Robustness of Source Code Processing ModelsHuangzhao Zhang, Zhuo Li, Ge Li, Lei Ma 等AAAI 2020 · 148 次引用
- Adversarial Robustness for CodePavol Bielik, Martin T. VechevICML 2020 · 101 次引用
相关 Paper
- Learning Graph-based Code Representations for Source-level Functional Similarity DetectionJiahao Liu, Jun Zeng, Xiang Wang, Zhenkai LiangICSE 2023 · 27 次引用
- CodeTrek: Flexible Modeling of Code using an Extensible Relational RepresentationPardis Pashakhanloo, Aaditya Naik, Yuepeng Wang, Hanjun Dai 等ICLR 2022 · 15 次引用
- Grammatically Recognizing Images with Tree ConvolutionGuangrun Wang, Guangcong Wang, Keze Wang, Xiaodan Liang 等KDD 2020 · 12 次引用
- InferCode: Self-Supervised Learning of Code Representations by Predicting SubtreesNghi D. Q. Bui, Yijun Yu, Lingxiao JiangICSE 2021 · 106 次引用
- Functional code clone detection with syntax and semantics fusion learningChunrong Fang, Zixi Liu, Yangyang Shi, Jeff Huang 等ISSTA 2020 · 125 次引用
