Variational Prefix Tuning for Diverse and Accurate Code Summarization Using Pre-trained Language Models
Not on the map. Why?
Abstract (arXiv)
Recent advancements in source code summarization have leveraged transformer-based pre-trained models, including Large Language Models of Code (LLMCs), to automate and improve the generation of code summaries. However, existing methods often focus on generating a single high-quality summary for a given source code, neglecting scenarios where the generated summary might be inadequate and alternative options are needed. In this paper, we introduce Variational Prefix Tuning (VPT), a novel approach that enhances pre-trained models' ability to generate diverse yet accurate sets of summaries, allowing the user to choose the most suitable one for the given source code. Our method integrates a Conditional Variational Autoencoder (CVAE) framework as a modular component into pre-trained models, enabling us to model the distribution of observed target summaries and sample continuous embeddings to be used as prefixes to steer the generation of diverse outputs during decoding. Importantly, we construct our method in a parameter-efficient manner, eliminating the need for expensive model retraining, especially when using LLMCs. Furthermore, we employ a bi-criteria reranking method to select a subset of generated summaries, optimizing both the diversity and the accuracy of the options presented to users. We present extensive experimental evaluations using widely used datasets and current state-of-the-art pre-trained code summarization models to demonstrate the effectiveness of our approach and its adaptability across models.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 49 of its 83 references that are in the map. First posted on arXiv 14 May 2025.
Builds on
49 of 83 references.
References · 49
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2015Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shiftcited by 7,005
- 2019BERTScore: Evaluating Text Generation with BERTcited by 5,512
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
- 2019The Curious Case of Neural Text Degenerationcited by 2,916
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2015A Diversity-Promoting Objective Function for Neural Conversation Modelscited by 1,077
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
37 more
- 2015Generating Sentences from a Continuous Spacecited by 612
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2018Texygen: A Benchmarking Platform for Text Generation Modelscited by 491
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 333
- 2016Diverse Beam Search: Decoding Diverse Solutions from Neural Sequence Modelscited by 301
- 2020Unsupervised Translation of Programming Languagescited by 263
- 2019Stochastic Beams and Where to Find Them: The Gumbel-Top-k Trick for Sampling Sequences Without Replacementcited by 211
- 2019Cyclical Annealing Schedule: A Simple Approach to Mitigating KL Vanishingcited by 191
- 2020A Transformer-based Approach for Source Code Summarizationcited by 133
- 2020Evaluating the Evaluation of Diversity in Natural Language Generationcited by 129
- 2019Don't Blame the ELBO! A Linear VAE Perspective on Posterior Collapsecited by 121
- 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 100
- 2014Deep Captioning with Multimodal Recurrent Neural Networks (m-RNN)cited by 94
- 2020Improved Code Summarization via a Graph Neural Networkcited by 79
- 2019A Neural Model for Generating Natural Language Summaries of Program Subroutinescited by 77
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2019Code Generation as a Dual Task of Code Summarizationcited by 62
- 2016A Simple, Fast Diverse Decoding Algorithm for Neural Generationcited by 58
- 2017A parallel corpus of Python functions and documentation strings for automated code documentation and code generationcited by 57
- 2023A Survey of Learning-based Automated Program Repaircited by 55
- 2017Z-Forcing: Training Stochastic Recurrent Networkscited by 51
- 2018DialogWAE: Multimodal Response Generation with Conditional Wasserstein Auto-Encodercited by 44
- 2021Transformer-based Conditional Variational Autoencoder for Controllable Story Generationcited by 44
- 2018DP-GAN: Diversity-Promoting Generative Adversarial Network for Generating Informative and Diversified Textcited by 40
- 2020Variational Transformers for Diverse Response Generationcited by 36
- 2017Diverse and Accurate Image Description Using a Variational Auto-Encoder with an Additive Gaussian Encoding Spacecited by 33
- 2021Code Structure Guided Transformer for Source Code Summarizationcited by 30
- 2020Code Summarization with Structure-induced Transformercited by 29
- 2016Tree-to-Sequence Attentional Neural Machine Translationcited by 28
- 2017Creativity: Generating Diverse Questions using Variational Autoencoderscited by 24
- 2019Sequential Latent Spaces for Modeling the Intention During Diverse Image Captioningcited by 21
- 2023Evaluating Code Summarization Techniques: A New Metric and an Empirical Characterizationcited by 21
- 2020A Batch Normalized Inference Network Keeps the KL Vanishing Awaycited by 20
- 2016Noisy Parallel Approximate Decoding for Conditional Recurrent Language Modelcited by 18
- 2022An Extractive-and-Abstractive Framework for Source Code Summarizationcited by 18
- 2023ContraBERT: Enhancing Code Pre-trained Models via Contrastive Learningcited by 16
- 2022Source Code Summarization with Structural Relative Position Guided Transformercited by 14
Built on by
Citing papers per year: 2026: 1.
1 paper.