TLDR: AdvFusion, a Parameter Efficient Fine-Tuning (PEFT) method for multilingual code learning, was re-evaluated on Code Large Language Models (Code-LLMs) for tasks like code generation, commit message generation, and code translation. While previously effective on smaller models, its performance on Code-LLMs is task-dependent. It improved code generation over AdapterFusion but was often surpassed by other PEFTs like LoRA and TaskAdapter. For commit message generation, AdapterFusion performed better. Notably, for code translation, AdvFusion initially underperformed but saw significant improvement when combined with Compacter adapters, making it competitive with LoRA. The study highlights that AdvFusion’s effectiveness varies with the task, programming language, and model architecture.
In the rapidly evolving landscape of artificial intelligence, language models are becoming increasingly sophisticated, especially in specialized domains like software engineering. A recent study delves into the capabilities of AdvFusion, an innovative approach designed to enhance how large language models learn and transfer knowledge across different programming languages.
The research, titled “Analysis of AdvFusion: Adapter-based Multilingual Learning for Code Large Language Models,” was conducted by Amirreza Esmaeili, Fahd Seddik, Yongyi Ji, Fatemeh Fard, and Fuxiang Chen. Their work builds upon previous findings, extending the application of AdvFusion to more powerful Code Large Language Models (Code-LLMs) and exploring its effectiveness across a broader range of complex software development tasks.
Understanding AdvFusion and its Evolution
At its core, AdvFusion is a Parameter Efficient Fine-Tuning (PEFT) method. PEFT techniques are crucial for adapting large, pre-trained language models to new tasks without the prohibitive computational cost of full fine-tuning. AdvFusion specifically aims to improve multilingual knowledge transfer, allowing a model to learn from various programming languages before specializing in a target task or language.
The unique aspect of AdvFusion lies in its two-phase training process. Unlike traditional AdapterFusion, which sometimes over-prioritizes the target language, AdvFusion first undergoes an “adversarial training” phase. During this phase, the model is intentionally prevented from learning from the target language’s adapter, forcing it to extract valuable insights from other programming languages. Only then, in the “fine-tuning” phase, is the target language adapter re-enabled, allowing AdvFusion to integrate all learned knowledge effectively.
In earlier work, AdvFusion demonstrated superior performance over methods like AdapterFusion and LoRA on smaller Code Language Models (Code-LMs) for tasks such as code summarization and method name prediction. It showed a significant improvement in metrics like BLEU and F1-score, particularly benefiting low-resource languages like Ruby by leveraging knowledge from languages like Go, Python, and JavaScript.
AdvFusion on Modern Code-LLMs: New Tasks, New Insights
The current study pushes the boundaries by evaluating AdvFusion on state-of-the-art Code-LLMs, including CodeLlama, DeepSeek-Coder, and Qwen2.5-Coder. It also introduces three new, more challenging software engineering tasks:
- Commit Message Generation (CMG): Creating concise natural language descriptions for code changes.
- Code Generation: Producing code from natural language descriptions.
- Code Translation: Converting code from one programming language to another.
The findings reveal that AdvFusion’s performance is highly dependent on the specific task, the programming language involved, and the underlying model architecture. This contrasts with its more consistent superiority observed on smaller Code-LMs.
For Commit Message Generation, AdapterFusion generally outperformed AdvFusion. While AdvFusion remained competitive with other PEFT methods like LoRA and TaskAdapter, it didn’t consistently lead. Interestingly, aligning programming languages by family (e.g., C-C++ or Java-Kotlin) improved CMG performance, suggesting that structural similarities aid the fusion process.
In Code Generation, AdvFusion showed a consistent improvement over AdapterFusion across all Code-LLMs. However, other PEFT methods, particularly TaskAdapter and LoRA, often achieved better overall performance. This suggests that while AdvFusion enhances cross-language learning, TaskAdapter might offer a more effective adaptation mechanism for code construction in Code-LLMs.
The most intriguing results emerged from Code Translation. Initially, AdvFusion performed substantially worse than other fine-tuning methods, with its effectiveness decreasing as model size increased. However, a significant turnaround occurred when AdvFusion was combined with Compacter adapters (referred to as AdvFusion+Compacter). This variant showed substantial and consistent performance improvements, often surpassing both AdvFusion and AdapterFusion, and becoming highly competitive with LoRA, which otherwise demonstrated the strongest average performance.
Also Read:
- Unlocking Trust: How to Improve Large Language Models’ Self-Confidence in Code Reasoning
- RefAgent: A Multi-Agent AI Framework for Smarter Software Refactoring
Practical Takeaways for Developers and Researchers
The research provides valuable practical insights for anyone working with Code-LLMs:
- For Commit Message Generation, AdapterFusion is often the preferred choice, especially for languages like Scala and Swift.
- For Code Generation, TaskAdapter is generally recommended due to its robust performance.
- For Code Translation, LoRA remains a top performer, but AdvFusion+Compacter presents a strong and competitive alternative, demonstrating that adversarial mechanisms, when paired with compact parameterizations, can significantly enhance complex code-related tasks.
The study underscores that while AdvFusion is a powerful concept for multilingual learning, its application to larger, more complex Code-LLMs requires careful consideration of the task and the specific adapter architecture used. This work paves the way for future research into optimizing PEFT methods for the diverse and demanding world of software engineering with large language models. You can read the full research paper here.


