UniGenCoder: Merging Seq2Seq and Seq2Tree Paradigms for Unified Code Generation
Liangying Shao, Yanfu Yan, Denys Poshyvanyk, Jinsong Su

TL;DR
UniGenCoder unifies sequence-to-sequence and sequence-to-tree paradigms for code generation, improving performance by dynamically selecting the best approach for each task through multi-task learning, distillation, and contrastive training.
Contribution
This paper introduces a novel unified model that combines two complementary code generation paradigms with a dynamic selector, enhancing flexibility and accuracy.
Findings
Effective on text-to-code and code-to-code tasks
Outperforms existing models in accuracy
Demonstrates the benefit of paradigm integration
Abstract
Deep learning-based code generation has completely transformed the way developers write programs today. Existing approaches to code generation have focused either on the Sequence-to-Sequence paradigm, which generates target code as a sequence of tokens, or the Sequence-to-Tree paradigm, which outputs code as a sequence of actions. While these two paradigms are intuitively complementary, their combination has not been previously explored. By comparing the code generated under these two paradigms, we find that integrating them holds significant potential. In this paper, we propose UniGenCoder for code-related generation tasks, which consists of a shared encoder, a shared decoder with a minimal set of additional parameters to unify two paradigms, and a selector that dynamically chooses optimal paradigm for each instance. Also, during the model training, we first perform the multi-task…
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
TopicsModel-Driven Software Engineering Techniques · Embedded Systems Design Techniques · Software Engineering Research
MethodsContrastive Learning · Sparse Evolutionary Training
