arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2603.09978cs.SEcs.AIcs.LG
收藏

一个模型,多种技能:用于多任务代码分析的参数高效微调

One Model, Many Skills: Parameter-Efficient Fine-Tuning for Multitask Code Analysis

Amal Akli, Maxime Cordy, Mike Papadakis, Yves Le Traon

AI总结:

本文提出多任务PEFT方法,通过共享模块在代码分析中实现性能与效率的平衡,验证了其在多任务场景下的有效性。

摘要:

大型语言模型最近在代码生成任务上超越了专用系统,但它们在其他代码分析任务上的有效性仍不明确。同时,多任务学习提供了一种在单一模型中统一多样化目标的方法,但对LLM进行跨任务全量微调在计算上是不可行的。参数高效微调通过仅更新少量权重来缓解这一成本。尽管PEFT在单任务设置中已被证明有效,但其在多任务学习中的潜力尚未系统性地被探索。我们首次全面评估了多任务PEFT在代码分析中的应用,比较了多种方法在多样化任务和模型架构上的表现。我们的实验表明,一个跨任务共享的PEFT模块可以匹配,甚至在某些情况下超越全量多任务微调,证实了PEFT的好处不仅限于孤立任务。当比较单任务和多任务设置时,我们发现多任务PEFT实现了有利的性能-效率权衡:它在准确性上接近单任务微调,同时减少存储需求,将可训练参数数量减少到任务数量的因子,且将计算成本降低高达85%。同时,多任务收益仍对任务分组敏感。通过任务配对实验,我们识别出影响结果的关键因素:任务稳定性、模型架构、任务互补性、不对称性和数据集质量决定了协同微调的成功。最后,我们通过高效多任务PEFT与直接提示开放源一般用途LLM(包括DeepSeek、Qwen、Mistral、CodeLlama和StarCoder)进行基准测试。尽管这些模型在代码生成任务上表现强劲,但它们在分析任务上表现不佳,其中即使一个10亿参数模型使用多任务PEFT也能显著取得更好的结果。

英文摘要:

Large language models have recently surpassed specialized systems on code generation, yet their effectiveness on other code-analysis tasks remains less clear. At the same time, multi-task learning offers a way to unify diverse objectives within a single model, but fully fine-tuning LLMs across tasks is computationally prohibitive. Parameter-efficient fine-tuning mitigates this cost by updating only a small fraction of weights. Although PEFT has proven effective in single-task settings, its potential for multi-task learning has not yet been systematically explored. We present the first comprehensive evaluation of multi-task PEFT for code analysis, comparing several methods across diverse tasks and model architectures. Our experiments show that a single PEFT module shared across tasks can match, and in some cases surpass, full multi-task fine-tuning, confirming that the benefits of PEFT extend beyond isolated tasks. When comparing single-task and multi-task setups, we find that multi-task PEFT achieves a favorable performance-efficiency trade-off: it delivers accuracy close to single-task fine-tuning while reducing storage requirements, cutting the number of trainable parameters by a factor of the task count, and lowering computation costs by as much as 85%. At the same time, multi-task gains remain sensitive to task grouping. Through task-pairing experiments, we identify key factors shaping outcomes: task stability, model architecture, task complementarity, asymmetry, and dataset quality determine the success of co-fine-tuning. Finally, we benchmark efficient multi-task PEFT against direct prompting of open-source general-purpose LLMs, including DeepSeek, Qwen, Mistral, CodeLlama, and StarCoder. Despite their strong performance in code generation, these models underperform on analysis tasks, where even a 1B-parameter model with multi-task PEFT achieves significantly better results.

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

↑