paperbot · PL 论文追踪

全部论文 待读 收藏

P2 ABC: Towards a Universal Code Styler through Model Merging

ABC:通过模型合并迈向通用代码风格转换器
OOPSLA 9(OOPSLA2)2025匹配度 2/10 · 论文聚焦代码风格转换与模型合并,属于代码生成/转换应用,与用户关注的静态分析、形式化验证、浮点/贝叶斯程序分析及 Agentic 程序等核心方向无直接关联;虽涉及代码语言模型,但目标并非用 LLM 改进静态分析,而是提升风格转换性能。引用 0 inbox
Yitong Chen, Zhiqiang Gao, Chuanqi Shi, Baixuan Li, Miao Gao
crossref: 2026-09-10

AI 速览

一句话:提出ABC框架,用模型合并实现基础与组合代码风格转换,并发布BCC Style数据集和CS4BLEU指标。

现有基于代码语言模型的代码风格转换通常只处理目标风格遵循单一准则的基础风格,难以应对涉及多重准则的组合风格,限制了其在实际风格指南中的应用。本文提出ABC(Absent-Basis-Combination)框架,通过模型合并提升组合风格转换并克服已有方法局限;实现0.5B、1.3B、1.5B和3B四种规模变体。在基础与组合风格转换上,各规模均持续优于已有方法,性能提升最高达86.70%,即使基线参数量为其三倍仍保持优势。为缓解高质量数据集和评估指标缺乏,作者构建并发布BCC Style数据集,并提出CS4BLEU代码相似度指标,在准确性与一致性上超越现有指标。

问题
现有代码风格转换模型多针对单一准则的基础风格,难以处理多准则的组合风格,导致与实际风格指南脱节。
方法
提出ABC框架,利用模型合并实现基础到组合风格转换,并构建BCC Style数据集与CS4BLEU评估指标;实现四种参数规模变体。
评估
在基础与组合风格转换任务上,与已有方法对比,ABC在各规模均更优,最高提升86.70%,并以更小参数超越三倍参数基线;同时评估CS4BLEU的准确性与一致性。
原文摘要(Abstract)

Code style transformation models built on code Language Models (code LMs) have achieved remarkable success. However, they typically focus on basis style transformations, where the target style follows a single criterion, and often struggle with combination styles, where the target style involves multiple criteria. In practice, style guides encompass multiple criteria, making the lack of effective combination style transformation a major limitation to their real-world applicability. In this paper, we propose Absent-Basis-Combination (abbreviated as ABC), a novel framework for code style transformation that significantly improves combination style transformation and overcomes the limitations of existing approaches. We implement four variants of ABC with parameter sizes of 0.5B, 1.3B, 1.5B, and 3B, demonstrating consistent superiority over existing approaches across all model sizes in both basis and combination style transformations. Specifically, ABC achieves performance gains of up to 86.70%, and remains superior even when baseline approaches use three times the parameters. Furthermore, to address the lack of high-quality datasets and evaluation metrics, we construct and release a new style transformation dataset, Basis & Combination Code Style (abbreviated as BCC Style ), and introduce Code Sequence, Syntactic, Semantic and Stylistic BLEU (abbreviated as CS4BLEU), a novel code similarity metric that surpasses existing metrics in accuracy and consistency.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2998,
  title = {ABC: Towards a Universal Code Styler through Model Merging},
  author = {Yitong Chen and Zhiqiang Gao and Chuanqi Shi and Baixuan Li and Miao Gao},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {OOPSLA2},
  year = {2025},
  doi = {10.1145/3763104}
}