A Syntax-Guided Multi-Task Learning Approach for Turducken-Style Code Generation
Not on the map. Why?
Abstract (arXiv)
Due to the development of pre-trained language models, automated code generation techniques have shown great promise in recent years. However, the generated code is difficult to meet the syntactic constraints of the target language, especially in the case of Turducken-style code, where declarative code snippets are embedded within imperative programs. In this study, we summarize the lack of syntactic constraints into three significant challenges: (1) the efficient representation of syntactic constraints, (2) the effective integration of syntactic information, and (3) the scalable syntax-first decoding algorithm. To address these challenges, we propose a syntax-guided multi-task learning approach TurduckenGen. Specifically, we first explicitly append the type information to the code tokens to capture the representation of syntactic constraints. Then we formalize code generation with syntactic constraint representation as an auxiliary task to enable the model to learn the syntactic constraints of the code. Finally, the syntactically correct code is selected accurately from the multiple candidates with the help of the compiler feedback. Extensive experiments and comprehensive analysis demonstrate the effectiveness and general applicability of our approach after being compared with six state-of-the-art baselines on two Turducken-style code datasets. Finally, we conducted a human study and found the code quality generated by our approach is better than baselines in terms of code readability and semantic similarity.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). First posted on arXiv 9 Mar 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 1; 2024: 1; 2025: 2.
4 papers.
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
- 2024Defending Code Language Models against Backdoor Attacks with Deceptive Cross-Entropy Losscited by 5
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Groundingcited by 4
- 2025Strategic Innovation Management in the Age of Large Language Models Market Intelligence, Adaptive R&D, and Ethical Governancecited by 0
- 2025Strategic Innovation Management in the Age of Large Language Models Market Intelligence, Adaptive R&D, and Ethical Governance18 Nov 2025
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
- 2024Defending Code Language Models against Backdoor Attacks with Deceptive Cross-Entropy Loss12 Jul 2024
- 2023Large Language Models for Software Engineering: A Systematic Literature Review21 Aug 2023