arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2412.01072cs.SE
收藏

当微调大语言模型遇到数据隐私:联邦学习在基于大语言模型的程序修复中的实证研究

When Fine-Tuning LLMs Meets Data Privacy: An Empirical Study of Federated Learning in LLM-Based Program Repair

Wenqiang Luo, Jacky Wai Keung, Boyang Yang, He Ye, Claire Le Goues, Tegawende F. Bissyande, Haoye Tian, Bach Le

AI总结:

针对基于LLM的程序修复依赖私有代码库但面临数据隐私问题的挑战,本研究实证探索联邦学习的应用,发现其可有效提升修复能力,异构代码影响可忽略,且需根据不同LLM定制联邦算法以优化效果。

摘要:

软件系统正快速演进,不可避免地导致缺陷引入率上升,造成软件维护消耗的资源大幅损失。近年来,大语言模型(LLMs)在增强软件开发和维护实践方面展现出显著潜力,尤其在自动化程序修复(APR)领域,提升了缺陷修复的准确性和效率。然而,基于LLM的APR严重依赖高质量代码库。现有代码库的很大一部分是各行业的私有和专有资产,这些数据反映出更多样化和细微的特征,因为现实行业通常有更广泛的软件开发实践,仅靠公共数据集无法覆盖。因此,利用私有数据集在增强软件开发和维护方面具有显著潜力。但由于企业不愿共享其代码库,数据隐私问题阻碍了从各行业获取此类数据。为解决这一差距,我们研究了联邦学习作为一种隐私保护方法的应用,它使私有实体能够在专有和去中心化数据上微调LLMs,促进客户端之间的协作以充分利用其数据来增强软件开发和维护。我们的评估表明,联邦微调能有效提升程序修复能力。值得注意的是,异构代码对LLM微调的影响可忽略不计,这表明无论数据分布如何多样化,现实行业都能从协作开发中受益。此外,每种联邦算法在不同LLM上都表现出独特优势,这表明通过根据不同LLM的特定特征定制优化过程,可以增强程序修复的微调效果。

英文摘要:

Software systems have been evolving rapidly and inevitably introducing bugs at an increasing rate, leading to significant losses in resources consumed by software maintenance. Recently, large language models (LLMs) have demonstrated remarkable potential in enhancing software development and maintenance practices, particularly in automated program repair (APR) with improved accuracy and efficiency of bug fixing. However, LLM-based APR heavily relies on high-quality code repositories. A larger portion of existing code repositories are for private use and proprietary assets from various industries, reflecting more diversity and nuances in the data since real-world industries often have more extensive software development practices, which cannot be covered by merely public datasets. Therefore, utilizing private datasets shows significant potential in enhancing software development and maintenance. However, obtaining such data from various industries is hindered by data privacy concerns, as companies are reluctant to share their codebases. To address the gap, we investigate the use of federated learning as a privacy-preserving approach that enables private entities to fine-tune LLMs on proprietary and decentralized data, facilitating the collaboration between clients to fully utilize their data to help enhance software development and maintenance. Our evaluation reveals that federated fine-tuning can effectively enhance program repair capabilities. Notably, the impact of heterogeneous code on LLM fine-tuning is negligible, indicating that real-world industries can benefit from collaborative development regardless of diverse data distributions. Furthermore, each type of federated algorithm exhibits unique strengths across different LLMs, suggesting that fine-tuning for program repair can be enhanced by tailoring the optimization process to specific characteristics of different LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑