Lune

EMNLP2021顶会

CAST: Enhancing Code Summarization with Hierarchical Splitting and Reconstruction of Abstract Syntax Trees

Ensheng Shi, Yanlin Wang, Lun Du, Hongyu Zhang, Shi Han, Dongmei Zhang, Hongbin Sun

摘要

Code summarization aims to generate concise natural language descriptions of source code, which can help improve program comprehension and maintenance. Recent studies show that syntactic and structural information extracted from abstract syntax trees (ASTs) is conducive to summary generation. However, existing approaches fail to fully capture the rich information in ASTs because of the large size/depth of ASTs. In this paper, we propose a novel model CAST that hierarchically splits and reconstructs ASTs. First, we hierarchically split a large AST into a set of subtrees and utilize a recursive neural network to encode the subtrees. Then, we aggregate the embeddings of subtrees by reconstructing the split ASTs to get the representation of the complete AST. Finally, AST representation, together with source code embedding obtained by a vanilla code token encoder, is used for code summarization. Extensive experiments, including the ablation study and the human evaluation, on benchmarks have demonstrated the power of CAST. To facilitate reproducibility, our code and data are available at https://github.com/ DeepSoftwareAnalytics/CAST .

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 18 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • CoCoSoDa: Effective Contrastive Learning for Code Search 引用了 RACE: Retrieval-augmented Commit Message Generation
  • CoCoSoDa: Effective Contrastive Learning for Code Search 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • CoCoSoDa: Effective Contrastive Learning for Code Search 引用了 On the Evaluation of Neural Code Summarization
  • CoCoSoDa: Effective Contrastive Learning for Code Search 引用了 Retrieval-based neural source code summarization
  • CoCoSoDa: Effective Contrastive Learning for Code Search 引用了 GraphCodeBERT: Pre-training Code Representations with Data Flow
  • CoCoSoDa: Effective Contrastive Learning for Code Search 引用了 Code Completion by Modeling Flattened Abstract Syntax Trees as Graphs
  • Developer-Intent Driven Code Comment Generation 引用了 Are we building on the rock? on the importance of data preprocessing for code summarization
  • Developer-Intent Driven Code Comment Generation 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Developer-Intent Driven Code Comment Generation 引用了 Retrieval-based neural source code summarization
  • Developer-Intent Driven Code Comment Generation 引用了 GraphCodeBERT: Pre-training Code Representations with Data Flow
  • RACE: Retrieval-augmented Commit Message Generation 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • RACE: Retrieval-augmented Commit Message Generation 引用了 On the Evaluation of Neural Code Summarization
  • RACE: Retrieval-augmented Commit Message Generation 引用了 Retrieval-based neural source code summarization
  • Are we building on the rock? on the importance of data preprocessing for code summarization 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Are we building on the rock? on the importance of data preprocessing for code summarization 引用了 On the Evaluation of Neural Code Summarization
  • Are we building on the rock? on the importance of data preprocessing for code summarization 引用了 Retrieval-based neural source code summarization
  • On the Evaluation of Neural Code Summarization 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • On the Evaluation of Neural Code Summarization 引用了 Retrieval-based neural source code summarization
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper18

  1. On the Evaluation of Neural Code SummarizationEnsheng Shi, Yanlin Wang, Lun Du, Junjie Chen 等ICSE 2022 · 76 次引用
  2. Are we building on the rock? on the importance of data preprocessing for code summarizationLin Shi, Fangwen Mu, Xiao Chen, Song Wang 等FSE 2022 · 65 次引用
  3. CoCoSoDa: Effective Contrastive Learning for Code SearchEnsheng Shi, Yanlin Wang, Wenchao Gu, Lun Du 等ICSE 2023 · 45 次引用
  4. RACE: Retrieval-augmented Commit Message GenerationEnsheng Shi, Yanlin Wang, Wei Tao, Lun Du 等EMNLP 2022 · 36 次引用
  5. Developer-Intent Driven Code Comment GenerationFangwen Mu, Xiao Chen, Lin Shi, Song Wang 等ICSE 2023 · 25 次引用

它引用的 Paper8

  1. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
  2. GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng 等ICLR 2021 · 1,644 次引用
  3. Retrieval-based neural source code summarizationJian Zhang, Xu Wang, Hongyu Zhang, Hailong Sun 等ICSE 2020 · 242 次引用
  4. InferCode: Self-Supervised Learning of Code Representations by Predicting SubtreesNghi D. Q. Bui, Yijun Yu, Lingxiao JiangICSE 2021 · 106 次引用
  5. Code Completion by Modeling Flattened Abstract Syntax Trees as GraphsYanlin Wang, Hui LiAAAI 2021 · 96 次引用

相关 Paper

  1. AST-Trans: Code Summarization with Efficient Tree-Structured AttentionZe Tang, Xiaoyu Shen, Chuanyi Li, Jidong Ge 等ICSE 2022 · 57 次引用
  2. Modeling Hierarchical Syntax Structure with Triplet Position for Source Code SummarizationJuncai Guo, Jin Liu, Yao Wan, Li Li 等ACL 2022
  3. BLOCSUM: Block Scope-based Source Code Summarization via Shared Block RepresentationYunSeok Choi, Hyojun Kim, Jee-Hyong LeeACL Findings 2023 · 2 次引用
  4. Learning Sequential and Structural Information for Source Code SummarizationYunSeok Choi, JinYeong Bak, CheolWon Na, Jee-Hyong LeeACL Findings 2021 · 34 次引用
  5. MGF-ESE: An Enhanced Semantic Extractor with Multi-Granularity Feature Fusion for Code SummarizationXiaolong Xu, Yuxin Cao, Hongsheng Hu, Haolong Xiang 等WWW 2025 · 4 次引用
黄昏的海面,两侧是细线勾勒的悬崖