[Paper Review] One Model, Many Skills: Parameter-Efficient Fine-Tuning for Multitask Code Analysis
This paper shows that a single parameter-efficient fine-tuning (PEFT) module shared across multiple code-analysis tasks can match or exceed full multi-task fine-tuning, while greatly reducing trainable parameters and compute.
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.
Motivation & Objective
- Evaluate whether PEFT methods can effectively enable multi-task learning for code-analysis tasks.
- Compare multi-task PEFT against full multi-task fine-tuning across diverse model architectures and tasks.
- Identify factors that influence the success of co-fine-tuning, including task grouping and model type.
- Benchmark multi-task PEFT against zero-shot prompting of open-source general-purpose LLMs on code analysis tasks.
Proposed method
- Fine-tune four code LLM backbones (UniXcoder-base, CodeT5+ Large, DeepSeek-Coder 1.3B, Qwen2.5-Coder-1.5B) in a multi-task setting with PEFT modules (serial adapters, parallel adapters, LoRA, prefix tuning).
- Freeze the encoder backbone; train only PEFT modules and task-specific heads.
- Use hard parameter sharing with one shared encoder and per-task heads; inputs are batched in a round-robin multi-task sampler.
- Incorporate adaptive, learnable loss weights to balance task losses via softmax-normalized weights.
- Compare against full fine-tuning (SFT) and against zero-shot prompting of large instruction-tuned LLMs.

Experimental results
Research questions
- RQ1RQ1: Are PEFT techniques effective in multi-task learning for code analysis?
- RQ2RQ2: What is the performance-efficiency trade-off between multi-task PEFT and single-task PEFT?
- RQ3RQ3: Which factors influence the performance of multi-task PEFT (task stability, architecture, dataset, similarity, etc.)?
- RQ4RQ4: How does multi-task PEFT compare with zero-shot prompting of general-purpose LLMs?
Key findings
- PEFT in multi-task learning is competitive with full multi-task fine-tuning, with deltas typically within ±1 percentage point for clone and vulnerability tasks.
- Single-task vs multi-task PEFT shows large efficiency gains, reducing trainable parameters by about a factor equal to the number of tasks.
- Serial adapters are the most reliable across tasks; LoRA benefits retrieval-style objectives like code search; Prefix tuning often underperforms in this setting.
- Transfer dynamics significantly affect outcomes: task stability, model architecture, task complementarity, asymmetry, and dataset quality influence co-fine-tuning success.
- Multi-task PEFT on compact code-specialized backbones consistently outperforms zero-shot prompting of larger general-purpose LLMs on code analysis tasks, with near-SFT accuracy but lower storage/computation needs.
- Across four backbones and four tasks, PEFT achieves favorable efficiency without substantial loss in accuracy, and can outperform full fine-tuning on certain metrics.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.