paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Incorporating domain knowledge through task augmentation for front-end JavaScript code generation

通过任务增强融入领域知识的前端 JavaScript 代码生成
FSE Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2022匹配度 3/10 · 该论文属于程序合成/代码生成方向,与用户关注的 PL+ML 交叉有弱关联,并包含工业落地案例;但其核心是前端 JavaScript 代码生成与任务增强,未涉及静态分析、Agentic 程序、浮点程序分析、贝叶斯程序分析或 LLM/Agent 改进程序分析,因此与研究方向不匹配。引用 26 inbox
Sijie Shen, Xiang Zhu, Yihong Dong, Qizhi Guo, Yankun Zhen, Ge Li
crossref: 2026-09-12

AI 速览

一句话:提出任务增强方法与 Subtoken-TranX 模型,在前端 JavaScript 领域数据稀缺下显著提升代码生成准确率。

自然语言到代码的生成通常依赖大规模「描述—代码」配对语料,但在前端 JavaScript 等特定领域,此类数据难以直接获取,人工撰写代码描述成本极高。数据受限会导致模型训练不充分、易过拟合,难以满足实际应用需求。为此,本文提出一种任务增强方法,通过引入辅助任务把领域知识注入代码生成模型;同时将原 TranX 模型扩展为支持 subtoken 级生成的 Subtoken-TranX,以缓解标识符切分带来的问题。作者收集了真实世界的前端代码生成数据集并开展实验,结果表明 Subtoken-TranX 优于原 TranX 与 Transformer,且借助任务增强,其精确匹配准确率提升 12.75%,在若干代码类别上已达到工业系统可用水平。该方法已被阿里巴巴 BizCook 平台采用,据作者所知是首个在工业开发环境中落地的领域代码生成系统。

问题
在领域特定的代码生成场景中,缺乏可直接使用的「自然语言描述—代码」配对语料,人工标注成本高,导致训练数据有限、模型过拟合且生成性能不佳。
方法
提出任务增强方法,通过辅助任务将领域知识注入代码生成模型;并将 TranX 扩展为支持 subtoken 级生成的 Subtoken-TranX,以更好地处理代码中的标识符切分。
评估
构建真实世界的前端 JavaScript 代码生成数据集,与原始 TranX 及 Transformer 进行对比实验;Subtoken-TranX 在任务增强下精确匹配准确率提升 12.75%,并在部分代码类别上达到工业可用标准,已落地于阿里巴巴 BizCook 平台。
原文摘要(Abstract)

Code generation aims to generate a code snippet automatically from natural language descriptions. Generally, the mainstream code generation methods rely on a large amount of paired training data, including both the natural language description and the code. However, in some domain-specific scenarios, building such a large paired corpus for code generation is difficult because there is no directly available pairing data, and a lot of effort is required to manually write the code descriptions to construct a high-quality training dataset. Due to the limited training data, the generation model cannot be well trained and is likely to be overfitting, making the model's performance unsatisfactory for real-world use. To this end, in this paper, we propose a task augmentation method that incorporates domain knowledge into code generation models through auxiliary tasks and a Subtoken-TranX model by extending the original TranX model to support subtoken-level code generation. To verify our proposed approach, we collect a real-world code generation dataset and conduct experiments on it. Our experimental results demonstrate that the subtoken-level TranX model outperforms the original TranX model and the Transformer model on our dataset, and the exact match accuracy of Subtoken-TranX improves significantly by 12.75% with the help of our task augmentation method. The model performance on several code categories has satisfied the requirements for application in industrial systems. Our proposed approach has been adopted by Alibaba's BizCook platform. To the best of our knowledge, this is the first domain code generation system adopted in industrial development environments.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot7013,
  title = {Incorporating domain knowledge through task augmentation for front-end JavaScript code generation},
  author = {Sijie Shen and Xiang Zhu and Yihong Dong and Qizhi Guo and Yankun Zhen and Ge Li},
  booktitle = {FSE},
  year = {2022},
  doi = {10.1145/3540250.3558965}
}