CAST: Enhancing Code Summarization with Hierarchical Splitting and Reconstruction of Abstract Syntax Trees
Not on the map. Why?
Abstract (arXiv)
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://anonymous.4open.science/r/CAST/.
Key facts. Cited by 31 papers in the map (data through 7 Oct 2026). First posted on arXiv 30 Aug 2021.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2022: 10; 2023: 9; 2024: 4; 2025: 3; 2026: 5.
31 papers.
Sort:
By area:
- 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
- 2022RACE: Retrieval-Augmented Commit Message Generationcited by 27
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022CoCoSoDa: Effective Contrastive Learning for Code Searchcited by 21
- 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 15
- 2023Nova: Generative Language Models for Assembly Code with Hierarchical Attention and Contrastive Learningcited by 12
- 2023CP-BCS: Binary Code Summarization Guided by Control Flow Graph and Pseudo Codecited by 11
- 2025Towards an Understanding of Context Utilization in Code Intelligencecited by 10
- 2022HierarchyNet: Learning to Summarize Source Code with Heterogeneous Representationscited by 9
- 2024EyeTrans: Merging Human and Machine Attention for Neural Code Summarizationcited by 9
- 2023SoTaNa: The Open-Source Software Development Assistantcited by 8
- 2026ShieldedCode: Learning Robust Representations for Virtual Machine Protected Codecited by 8
19 more
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completioncited by 7
- 2023Tram: A Token-level Retrieval-augmented Mechanism for Source Code Summarizationcited by 6
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 6
- 2022GypSum: Learning Hybrid Representations for Code Summarizationcited by 5
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?cited by 5
- 2024WAFFLE: Finetuning Multi-Modal Models for Automated Front-End Developmentcited by 5
- 2025EffiReasonTrans: RL-Optimized Reasoning for Code Translationcited by 5
- 2022A Survey of Deep Learning Models for Structural Code Understandingcited by 4
- 2022NS3: Neuro-Symbolic Semantic Code Searchcited by 3
- 2022A Survey on Natural Language Processing for Programmingcited by 3
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generationcited by 3
- 2026DRAINCODE: Stealthy Energy Consumption Attacks on Retrieval-Augmented Code Generation via Context Poisoningcited by 3
- 2022Diverse Title Generation for Stack Overflow Posts with Multiple Sampling Enhanced Transformercited by 2
- 2026PhoenixRepair: Rethinking Repair Strategy Exploration in Software Agentscited by 2
- 2022Learning Rate Perturbation: A Generic Plugin of Learning Rate Schedule towards Flatter Local Minimacited by 1
- 2023Knowledge Transfer for Pseudo-code Generation from Low Resource Programming Languagecited by 1
- 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Codecited by 1
- 2023Sparse Attention-Based Neural Networks for Code Classificationcited by 0
- 2025A Benchmark Dataset for Graph Regression with Homogeneous and Multi-Relational Variantscited by 0
- 2026PhoenixRepair: Rethinking Repair Strategy Exploration in Software Agents21 Jul 2026
- 2026ShieldedCode: Learning Robust Representations for Virtual Machine Protected Code28 Jan 2026
- 2026DRAINCODE: Stealthy Energy Consumption Attacks on Retrieval-Augmented Code Generation via Context Poisoning28 Jan 2026
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion27 Jan 2026
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generation14 Jan 2026
- 2025EffiReasonTrans: RL-Optimized Reasoning for Code Translation21 Oct 2025
- 2025A Benchmark Dataset for Graph Regression with Homogeneous and Multi-Relational Variants29 May 2025
- 2025Towards an Understanding of Context Utilization in Code Intelligence11 Apr 2025
- 2024WAFFLE: Finetuning Multi-Modal Models for Automated Front-End Development24 Oct 2024
- 2024Agents in Software Engineering: Survey, Landscape, and Vision13 Sep 2024
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization1 Jul 2024
- 2024EyeTrans: Merging Human and Machine Attention for Neural Code Summarization21 Feb 2024
19 more
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?1 Dec 2023
- 2023Nova: Generative Language Models for Assembly Code with Hierarchical Attention and Contrastive Learning22 Nov 2023
- 2023Sparse Attention-Based Neural Networks for Code Classification11 Nov 2023
- 2023CP-BCS: Binary Code Summarization Guided by Control Flow Graph and Pseudo Code24 Oct 2023
- 2023SoTaNa: The Open-Source Software Development Assistant25 Aug 2023
- 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Code5 Jul 2023
- 2023Tram: A Token-level Retrieval-augmented Mechanism for Source Code Summarization18 May 2023
- 2023Knowledge Transfer for Pseudo-code Generation from Low Resource Programming Language16 Mar 2023
- 2022A Survey on Natural Language Processing for Programming12 Dec 2022
- 2022Learning Rate Perturbation: A Generic Plugin of Learning Rate Schedule towards Flatter Local Minima25 Aug 2022
- 2022Diverse Title Generation for Stack Overflow Posts with Multiple Sampling Enhanced Transformer24 Aug 2022
- 2022An Extractive-and-Abstractive Framework for Source Code Summarization15 Jun 2022
- 2022HierarchyNet: Learning to Summarize Source Code with Heterogeneous Representations31 May 2022
- 2022NS3: Neuro-Symbolic Semantic Code Search21 May 2022
- 2022A Survey of Deep Learning Models for Structural Code Understanding3 May 2022
- 2022GypSum: Learning Hybrid Representations for Code Summarization26 Apr 2022
- 2022CoCoSoDa: Effective Contrastive Learning for Code Search7 Apr 2022
- 2022RACE: Retrieval-Augmented Commit Message Generation5 Mar 2022
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022CoCoSoDa: Effective Contrastive Learning for Code Searchcited by 21
- 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 15
- 2023Nova: Generative Language Models for Assembly Code with Hierarchical Attention and Contrastive Learningcited by 12
- 2023CP-BCS: Binary Code Summarization Guided by Control Flow Graph and Pseudo Codecited by 11
- 2025Towards an Understanding of Context Utilization in Code Intelligencecited by 10
- 2022HierarchyNet: Learning to Summarize Source Code with Heterogeneous Representationscited by 9
- 2024EyeTrans: Merging Human and Machine Attention for Neural Code Summarizationcited by 9
- 2023SoTaNa: The Open-Source Software Development Assistantcited by 8
- 2026ShieldedCode: Learning Robust Representations for Virtual Machine Protected Codecited by 8
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completioncited by 7
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 6
12 most cited of 24 All 24 (JSON)
- 2026ShieldedCode: Learning Robust Representations for Virtual Machine Protected Code28 Jan 2026
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion27 Jan 2026
- 2025A Benchmark Dataset for Graph Regression with Homogeneous and Multi-Relational Variants29 May 2025
- 2025Towards an Understanding of Context Utilization in Code Intelligence11 Apr 2025
- 2024WAFFLE: Finetuning Multi-Modal Models for Automated Front-End Development24 Oct 2024
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization1 Jul 2024
- 2024EyeTrans: Merging Human and Machine Attention for Neural Code Summarization21 Feb 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?1 Dec 2023
- 2023Nova: Generative Language Models for Assembly Code with Hierarchical Attention and Contrastive Learning22 Nov 2023
- 2023Sparse Attention-Based Neural Networks for Code Classification11 Nov 2023
- 2023CP-BCS: Binary Code Summarization Guided by Control Flow Graph and Pseudo Code24 Oct 2023
12 newest of 24 All 24 (JSON)