Fine-grained Pseudo-code Generation Method via Code Feature Extraction and Transformer
Guang Yang, Yanlin Zhou, Xiang Chen, Chi Yu

TL;DR
This paper introduces DeepPseudo, a deep learning approach combining code feature extraction and Transformer models to generate accurate pseudo-code from source code, aiding program comprehension.
Contribution
It presents a novel pseudo-code generation method that integrates code feature extraction with Transformer architecture, outperforming existing baselines on real-world datasets.
Findings
DeepPseudo outperforms seven state-of-the-art baselines.
The method effectively captures local code features.
Component analysis confirms the effectiveness of the design choices.
Abstract
Pseudo-code written by natural language is helpful for novice developers' program comprehension. However, writing such pseudo-code is time-consuming and laborious. Motivated by the research advancements of sequence-to-sequence learning and code semantic learning, we propose a novel deep pseudo-code generation method DeepPseudo via code feature extraction and Transformer. In particular, DeepPseudo utilizes a Transformer encoder to perform encoding for source code and then use a code feature extractor to learn the knowledge of local features. Finally, it uses a pseudo-code generator to perform decoding, which can generate the corresponding pseudo-code. We choose two corpora (i.e., Django and SPoC) from real-world large-scale projects as our empirical subjects. We first compare DeepPseudo with seven state-of-the-art baselines from pseudo-code generation and neural machine translation…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Advanced Malware Detection Techniques · Software Testing and Debugging Techniques
