arXiv:2409.12020cs.SEcs.AI2024-09中稿 · the ASE 2024 Confe…被引 13

研究协作编程模型的生成效果与数据泄露风险,发现联邦学习在保护隐私的同时仍存代码复现隐患。

Promise and Peril of Collaborative Code Generation Models: Balancing Effectiveness and Memorization

  • 对比中心化、联邦与增量学习,评估代码生成效果与数据记忆程度。
  • 联邦学习性能接近中心化训练,但生成代码仍可能复现原始数据片段。
  • 强调跨组织代码克隆问题,建议优化多源数据以降低隐私泄露风险。

在机器学习快速发展的背景下,利用来自不同机构和地区的数据集进行模型训练面临隐私与法律挑战。本研究探讨协作训练方法在代码下一词预测中的有效性,以及生成代码的正确性与实用性,展示了其潜力。同时,评估了不同协作训练设置(包括集中式、联邦式和增量式)下各参与方训练数据的记忆程度,揭示了数据泄露风险。研究发现,代码数据集的规模与多样性是决定协作训练成功的关键因素。结果显示,联邦学习在性能上可媲美集中式训练,且生成代码中的记忆比例更低,但仍可能产生与隐藏训练数据完全一致的代码片段,存在隐私或版权违规风险。研究还分析了增量学习中数据引入顺序的影响,并识别出跨组织代码克隆在集中式与联邦学习中均普遍存在。结果表明,即使训练数据未被直接访问,推理阶段仍存在持续的数据泄露风险。最后,论文为实践者与研究者提供优化多源数据集的建议,推动跨组织协作发展。

原文摘要 · Abstract (English)

In the rapidly evolving field of machine learning, training models with datasets from various locations and organizations presents significant challenges due to privacy and legal concerns. The exploration of effective collaborative training settings capable of leveraging valuable knowledge from distributed and isolated datasets is increasingly crucial. This study investigates key factors that impact the effectiveness of collaborative training methods in code next-token prediction, as well as the correctness and utility of the generated code, demonstrating the promise of such methods. Additionally, we evaluate the memorization of different participant training data across various collaborative training settings, including centralized, federated, and incremental training, highlighting their potential risks in leaking data. Our findings indicate that the size and diversity of code datasets are pivotal factors influencing the success of collaboratively trained code models. We show that federated learning achieves competitive performance compared to centralized training while offering better data protection, as evidenced by lower memorization ratios in the generated code. However, federated learning can still produce verbatim code snippets from hidden training data, potentially violating privacy or copyright. Our study further explores effectiveness and memorization patterns in incremental learning, emphasizing the sequence in which individual participant datasets are introduced. We also identify cross-organizational clones as a prevalent challenge in both centralized and federated learning scenarios. Our findings highlight the persistent risk of data leakage during inference, even when training data remains unseen. We conclude with recommendations for practitioners and researchers to optimize multisource datasets, propelling cross-organizational collaboration forward.

代码生成联邦学习数据隐私记忆风险

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。