arrow
Return

Bipartite-Grammar-Aware Pretraining for XML-SQL Code Updating

delete2026-02-01
delete2
PRE
AI
Q
Qingyuan Liang
Z
Zeyu Sun *
Y
Yifan Zhao
Z
Zhihao Gong
G
Guoqing Wang
Y
Yizhou Chen
L
Lu Zhang *
G
Guangtai Liang *
Q
Qianxiang Wang
DOI:10.1145/3731752delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
The eX tensible Markup Language (XML) is a file format widely used for data transmission in modern software development. In recent years, embedding SQL statements in XML files (i.e., XML-SQL) has become a popular way for developing applications with database access capability. Typically, XML-SQL code snippets demonstrate similar functionalities and structures, leading to repetitive programming work. Therefore, leveraging pretrained code models for automated code generation presents a promising way to alleviate duplicated efforts and enhance the efficiency of developing XML-SQL code. However, XML-SQL code has strong domainspecific characteristics that general pre-trained code models typically struggle to fully harness, thereby leading to limited overall performance of general pre-trained code models. In this article, we aim to address the challenge of handling this domain-specific knowledge. First, we propose a code updating task and construct the corresponding TwinXSQL dataset to better evaluate the model's code generation performance in the XML-SQL domain. Then, we leverage the common characteristics of XML-SQL and other programming languages (i.e., all programming languages impose grammar constraints on behavior) to design a bipartitegrammar-aware training framework (named BGA) for unsupervised pre-training, thereby improving the transfer of general-purpose code models to the XML-SQL domain. Specifically, we divide the XML-SQL code into two types of grammatical components: structure components and value components. During pretraining, we undertake three tasks, each designed to learn the internal information of these grammatical components and the relationships between them, enabling the pre-training process to better incorporate previously unlearned domain-specific knowledge of XML-SQL code. Our experimental results show that our trained model XSQLT5-base (220M) improves accuracy by 13.8% compared to the similarly sized CodeT5-base (220M). Additionally, our experiments reveal that ChatGPT, due to its inability to fully learn the XML-SQL domain knowledge, achieves a much lower generation accuracy even with few-shot samples compared to our XSQLT5-base (220M) model.
Keywords:
XML
Pre-training
Large Language Models
Code Generation
Software Evolution

Journal

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
Papers:
1.2K
Citations:
3.4K

Organization

I
institute of software, cas
Scholars:
446
Papers: 388
Citations: 0
P
peking university
Scholars:
11.9W
Papers: 8.7W
Citations: 146
C
chinese academy of sciences
Scholars:
56.7W
Papers: 45.0W
Citations: 704
researcher View more organizations
Cited Papers

Cited Papers

Automating code review activities by large-scale pre-training
err2022-11-09
err0
errOAAI
errZhiyu Li; Shuai Lu; Daya Guo; Nan Duan; Shailesh Jannu; Grant Jenks; Deep Majumder; Jared Green; Alexey Svyatkovskiy; Shengyu Fu; Neel Sundaresan
errShare
errSave
ASAC: A Benchmark for Algorithm Synthesis
err2024-07-10
err0
PREAI
errZhang,Zhao; Sun,Yican; Ji,Ruyi; Li,Siyuan; Peng,Xuanyu; Huang,Zhechong; Li,Sizhe; Zhu,Tianran; Xiong,Yingfei
errShare
errSave
The XML web
err2003-01-01
err0
PREAI
errLaurent Mignet; Denilson Barbosa; Pierangelo Veltri
errShare
errSave
Deep learning-based software engineering: progress, challenges, and opportunities
err2024-12-24
err0
errOAAI
errChen, Xiangping; Hu, Xing; Huang, Yuan; Jiang, He; Ji, Weixing; Jiang, Yanjie; Jiang, Yanyan; Liu, Bo; Liu, Hui; Li, Xiaochen; Lian, Xiaoli; Meng, Guozhu; Peng, Xin; Sun, Hailong; Shi, Lin; Wang, Bo; Wang, Chong; Wang, Jiayi; Wang, Tiantian; Xuan, Jifeng; Xia, Xin; Yang, Yibiao; Yang, Yixin; Zhang, Li; Zhou, Yuming; Zhang, Lu
errShare
errSave
An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation
err2019-09-02
err204
errOAAI
errTufano, Michele; Watson, Cody; Bavota, Gabriele; Di Penta, Massimiliano; White, Martin; Poshyvanyk, Denys
errShare
errSave
err
IF0
err
err0
PREAI
err
errShare
errSave
Optimizing Statistical Machine Translation for Text Simplification
err2016-12-01
err0
errOAAI
errWei Xu; Courtney Napoles; Ellie Pavlick; Quanze Chen; Chris Callison-Burch
errShare
errSave
researcher View more