合并修复:用于自动程序修复的代码llm中合并特定任务适配器的探索性研究。

IF 3.4 2区 计算机科学 Q1 COMPUTER SCIENCE, SOFTWARE ENGINEERING
Empirical Software Engineering Pub Date : 2027-01-01 Epub Date: 2026-09-25 DOI:10.1007/s10664-026-10943-y
Meghdad Dehghan, Jie Jw Wu, Fatemeh H Fard, Ali Ouni
{"title":"合并修复:用于自动程序修复的代码llm中合并特定任务适配器的探索性研究。","authors":"Meghdad Dehghan, Jie Jw Wu, Fatemeh H Fard, Ali Ouni","doi":"10.1007/s10664-026-10943-y","DOIUrl":null,"url":null,"abstract":"<p><p>Large Language Models (LLMs) have shown high capabilities in several software development-related tasks such as program repair, documentation, code refactoring, debugging, and testing. However, training these models requires massive amount of data and significant computational resources. Adapters are specialized, small modules designed for parameter efficient fine-tuning of LLMs for specific tasks, domains, or applications without requiring extensive retraining of the entire model. These adapters offer a more efficient way to customize LLMs for particular needs, leveraging the pre-existing capabilities of the large model. Model (and adapter) merging have emerged as a technique to develop one model capable of multiple tasks, with minimal or no training required. Although model and adapter merging has shown promising performance in domains such as natural language processing and computer vision, its applicability to software engineering tasks remains underexplored. In this paper, we investigate the effectiveness of merged adapters within the context of software engineering, with a particular focus on the Automated Program Repair (APR) task, through our approach, <b>MergeRepair</b>. In particular, we merge multiple task-specific adapters using three different merging methods, including weight-averaging, TIES-Merging, and DARE-TIES, and evaluate the performance of the merged adapter on the APR task. We introduce a <b>continual merging</b> approach, a novel method in which we sequentially merge the task-specific adapters where the order and weight of the merged adapters play a significant role. We further compare the performance of our approach with a baseline method consisting of equal-weight merging applied on parameters of different adapters, where all adapters are of equal importance. Through continual merging, we explore the capability of merged adapters and the effect of task order, as it occurs in real-world software projects. To evaluate our approach, we consider two LLMs, StarCoder2 and Granite models on an APR benchmark, HumanEvalFix, with various combinations of the merged adapters trained on a subset of the CommitPackFT dataset that contains four tasks and APR in Python. The results show that merging task-specific adapters can enhance the performance of models on the APR task, <i>without additional training</i>. In particular, our approach achieves up to 2.38% performance improvement over APR task in terms of pass@1 score when merging APR with Improvement and Misc task-adapters on top of the StarCoder2 model. Performance rises to 4.01% for pass@10 score with the same model and merged adapters. This improvement could be significantly influenced by the base model and the specific task adapters merged, rather than only the number of adapters. The proposed continual merging approach can be effective if the order of merging is efficiently determined. Results show that performance improves when the most effective task-adapter is added last in a continual merging process. Moreover, we can achieve on-par or even better performance when APR adapter is not used in the merged model, emphasizing the generalizeability of the approach. These findings suggest that leveraging knowledge from other code-related tasks through adapter merging can improve performance on new tasks like APR, even with limited data.</p>","PeriodicalId":11525,"journal":{"name":"Empirical Software Engineering","volume":"32 1","pages":"37"},"PeriodicalIF":3.4000,"publicationDate":"2027-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC13615117/pdf/","citationCount":"0","resultStr":"{\"title\":\"MergeRepair: An Exploratory Study on Merging Task-Specific Adapters in Code LLMs for Automated Program Repair.\",\"authors\":\"Meghdad Dehghan, Jie Jw Wu, Fatemeh H Fard, Ali Ouni\",\"doi\":\"10.1007/s10664-026-10943-y\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<p><p>Large Language Models (LLMs) have shown high capabilities in several software development-related tasks such as program repair, documentation, code refactoring, debugging, and testing. However, training these models requires massive amount of data and significant computational resources. Adapters are specialized, small modules designed for parameter efficient fine-tuning of LLMs for specific tasks, domains, or applications without requiring extensive retraining of the entire model. These adapters offer a more efficient way to customize LLMs for particular needs, leveraging the pre-existing capabilities of the large model. Model (and adapter) merging have emerged as a technique to develop one model capable of multiple tasks, with minimal or no training required. Although model and adapter merging has shown promising performance in domains such as natural language processing and computer vision, its applicability to software engineering tasks remains underexplored. In this paper, we investigate the effectiveness of merged adapters within the context of software engineering, with a particular focus on the Automated Program Repair (APR) task, through our approach, <b>MergeRepair</b>. In particular, we merge multiple task-specific adapters using three different merging methods, including weight-averaging, TIES-Merging, and DARE-TIES, and evaluate the performance of the merged adapter on the APR task. We introduce a <b>continual merging</b> approach, a novel method in which we sequentially merge the task-specific adapters where the order and weight of the merged adapters play a significant role. We further compare the performance of our approach with a baseline method consisting of equal-weight merging applied on parameters of different adapters, where all adapters are of equal importance. Through continual merging, we explore the capability of merged adapters and the effect of task order, as it occurs in real-world software projects. To evaluate our approach, we consider two LLMs, StarCoder2 and Granite models on an APR benchmark, HumanEvalFix, with various combinations of the merged adapters trained on a subset of the CommitPackFT dataset that contains four tasks and APR in Python. The results show that merging task-specific adapters can enhance the performance of models on the APR task, <i>without additional training</i>. In particular, our approach achieves up to 2.38% performance improvement over APR task in terms of pass@1 score when merging APR with Improvement and Misc task-adapters on top of the StarCoder2 model. Performance rises to 4.01% for pass@10 score with the same model and merged adapters. This improvement could be significantly influenced by the base model and the specific task adapters merged, rather than only the number of adapters. The proposed continual merging approach can be effective if the order of merging is efficiently determined. Results show that performance improves when the most effective task-adapter is added last in a continual merging process. Moreover, we can achieve on-par or even better performance when APR adapter is not used in the merged model, emphasizing the generalizeability of the approach. These findings suggest that leveraging knowledge from other code-related tasks through adapter merging can improve performance on new tasks like APR, even with limited data.</p>\",\"PeriodicalId\":11525,\"journal\":{\"name\":\"Empirical Software Engineering\",\"volume\":\"32 1\",\"pages\":\"37\"},\"PeriodicalIF\":3.4000,\"publicationDate\":\"2027-01-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC13615117/pdf/\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Empirical Software Engineering\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://doi.org/10.1007/s10664-026-10943-y\",\"RegionNum\":2,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"2026/9/25 0:00:00\",\"PubModel\":\"Epub\",\"JCR\":\"Q1\",\"JCRName\":\"COMPUTER SCIENCE, SOFTWARE ENGINEERING\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Empirical Software Engineering","FirstCategoryId":"94","ListUrlMain":"https://doi.org/10.1007/s10664-026-10943-y","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2026/9/25 0:00:00","PubModel":"Epub","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

摘要

大型语言模型(llm)在一些软件开发相关的任务中表现出了很高的能力,比如程序修复、文档、代码重构、调试和测试。然而,训练这些模型需要大量的数据和大量的计算资源。适配器是专门的小型模块,用于针对特定任务、领域或应用程序对llm进行参数有效微调,而不需要对整个模型进行广泛的再培训。这些适配器提供了一种更有效的方法来根据特定需求定制llm,利用大型模型的现有功能。模型(和适配器)合并已经作为一种技术出现,用于开发一个能够执行多个任务的模型,只需要很少的培训或不需要培训。尽管模型和适配器合并在自然语言处理和计算机视觉等领域显示出很好的性能,但其对软件工程任务的适用性仍未得到充分探索。在本文中,我们研究了在软件工程上下文中合并适配器的有效性,并通过我们的方法MergeRepair特别关注了自动程序修复(APR)任务。特别是,我们使用三种不同的合并方法合并多个特定于任务的适配器,包括加权平均、ties - merge和DARE-TIES,并评估合并适配器在APR任务上的性能。我们引入了一种持续合并方法,这是一种新的方法,在这种方法中,我们顺序地合并特定于任务的适配器,其中合并适配器的顺序和权重起着重要作用。我们进一步将我们的方法的性能与基线方法进行比较,该方法由应用于不同适配器参数的等权重合并组成,其中所有适配器都具有同等重要性。通过持续的合并,我们探索合并适配器的能力和任务顺序的影响,就像它在真实的软件项目中发生的那样。为了评估我们的方法,我们考虑了两个llm,在APR基准上的StarCoder2和Granite模型,HumanEvalFix,在包含四个任务和Python APR的CommitPackFT数据集的子集上训练合并适配器的各种组合。结果表明,合并特定于任务的适配器可以提高模型在APR任务上的性能,而无需额外的训练。特别是,当在StarCoder2模型之上合并APR与improvement和Misc任务适配器时,我们的方法在pass@1得分方面比APR任务实现了高达2.38%的性能提升。使用相同的模型和合并的适配器,pass@10得分的性能提高到4.01%。这种改进可能会受到基本模型和合并的特定任务适配器的显著影响,而不仅仅是适配器的数量。如果能有效地确定合并顺序,所提出的连续合并方法是有效的。结果表明,在连续合并过程中最后添加最有效的任务适配器可以提高性能。此外,当合并模型中不使用APR适配器时,我们可以获得同等甚至更好的性能,强调了该方法的通用性。这些发现表明,通过适配器合并利用来自其他代码相关任务的知识可以提高APR等新任务的性能,即使数据有限。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
MergeRepair: An Exploratory Study on Merging Task-Specific Adapters in Code LLMs for Automated Program Repair.

Large Language Models (LLMs) have shown high capabilities in several software development-related tasks such as program repair, documentation, code refactoring, debugging, and testing. However, training these models requires massive amount of data and significant computational resources. Adapters are specialized, small modules designed for parameter efficient fine-tuning of LLMs for specific tasks, domains, or applications without requiring extensive retraining of the entire model. These adapters offer a more efficient way to customize LLMs for particular needs, leveraging the pre-existing capabilities of the large model. Model (and adapter) merging have emerged as a technique to develop one model capable of multiple tasks, with minimal or no training required. Although model and adapter merging has shown promising performance in domains such as natural language processing and computer vision, its applicability to software engineering tasks remains underexplored. In this paper, we investigate the effectiveness of merged adapters within the context of software engineering, with a particular focus on the Automated Program Repair (APR) task, through our approach, MergeRepair. In particular, we merge multiple task-specific adapters using three different merging methods, including weight-averaging, TIES-Merging, and DARE-TIES, and evaluate the performance of the merged adapter on the APR task. We introduce a continual merging approach, a novel method in which we sequentially merge the task-specific adapters where the order and weight of the merged adapters play a significant role. We further compare the performance of our approach with a baseline method consisting of equal-weight merging applied on parameters of different adapters, where all adapters are of equal importance. Through continual merging, we explore the capability of merged adapters and the effect of task order, as it occurs in real-world software projects. To evaluate our approach, we consider two LLMs, StarCoder2 and Granite models on an APR benchmark, HumanEvalFix, with various combinations of the merged adapters trained on a subset of the CommitPackFT dataset that contains four tasks and APR in Python. The results show that merging task-specific adapters can enhance the performance of models on the APR task, without additional training. In particular, our approach achieves up to 2.38% performance improvement over APR task in terms of pass@1 score when merging APR with Improvement and Misc task-adapters on top of the StarCoder2 model. Performance rises to 4.01% for pass@10 score with the same model and merged adapters. This improvement could be significantly influenced by the base model and the specific task adapters merged, rather than only the number of adapters. The proposed continual merging approach can be effective if the order of merging is efficiently determined. Results show that performance improves when the most effective task-adapter is added last in a continual merging process. Moreover, we can achieve on-par or even better performance when APR adapter is not used in the merged model, emphasizing the generalizeability of the approach. These findings suggest that leveraging knowledge from other code-related tasks through adapter merging can improve performance on new tasks like APR, even with limited data.

求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
Empirical Software Engineering
Empirical Software Engineering 工程技术-计算机:软件工程
CiteScore
8.50
自引率
12.20%
发文量
169
审稿时长
>12 weeks
期刊介绍: Empirical Software Engineering provides a forum for applied software engineering research with a strong empirical component, and a venue for publishing empirical results relevant to both researchers and practitioners. Empirical studies presented here usually involve the collection and analysis of data and experience that can be used to characterize, evaluate and reveal relationships between software development deliverables, practices, and technologies. Over time, it is expected that such empirical results will form a body of knowledge leading to widely accepted and well-formed theories. The journal also offers industrial experience reports detailing the application of software technologies - processes, methods, or tools - and their effectiveness in industrial settings. Empirical Software Engineering promotes the publication of industry-relevant research, to address the significant gap between research and practice.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书