FlyLoRA: Boosting Task Decoupling and Parameter Efficiency via Implicit Rank-Wise Mixture-of-Experts

Heming Zou, Yunliang Zang, Wutong Xu, Yao Zhu, Xiangyang Ji

Abstract

FlyLoRA is a novel, parameter-efficient fine-tuning method inspired by the fruit fly's olfactory system. By replacing the traditional dense down-projection matrix in LoRA with a frozen, sparse random projection that acts as an "implicit router," it achieves high parameter efficiency and strong task decoupling. This design significantly reduces parameter interference in both single-task fine-tuning and multi-task model merging, all without the computational overhead of explicit Mixture-of-Experts (MoE) routers.

Introduction

Low-Rank Adaptation (LoRA) has become the standard for fine-tuning Large Language Models (LLMs) efficiently. However, it faces significant challenges related to parameter interference. Intra-task interference occurs when different ranks within LoRA's matrices conflict, limiting the model's ability to learn complex features. Inter-task interference arises during "model merging," where combining multiple LoRA modules trained on different domains leads to performance degradation due to conflicting updates.

Performance comparison and biological inspiration from the fruit fly olfactory system.

While Mixture-of-Experts (MoE) architectures can mitigate these issues by specializing parameters, traditional MoE-LoRA requires trainable "router" networks. These routers add significant parameter overhead, especially when experts are fine-grained, undermining the efficiency benefits of LoRA.

Methods: The FlyLoRA Architecture

Inspired by the fly olfactory circuit—which processes odors using random projection followed by sparse selection—FlyLoRA introduces an implicit routing mechanism.

Comparison of (a) standard LoRA, (b) MoE-based LoRA with explicit router, and (c) FlyLoRA with implicit routing via frozen sparse random projection.

The architecture consists of several key innovations:

  • Frozen Sparse Random Projection (Matrix A): Instead of a trainable dense matrix, FlyLoRA uses a frozen, sparse random matrix. This matrix preserves input distances (similar to locality-sensitive hashing), ensuring that semantically similar inputs produce similar activation patterns.
  • Implicit Routing: FlyLoRA eliminates the need for a separate router. It selects experts based on the top-$k$ highest magnitude values from the output of Matrix $A$.
  • Rank-Wise Experts (Matrix B): Matrix $B$ is treated as a collection of rank-1 experts. Only the $k$ columns corresponding to the top-$k$ activations from Matrix $A$ are updated during training.
  • Load Balancing: A lightweight, loss-free bias term ensures that experts are utilized evenly, preventing a small subset from dominating the learning process.

Key Insights

  • Biological Efficiency: The fly olfactory system demonstrates that complex routing does not require learned neural networks; a fixed random projection can effectively map inputs to distinct subspaces.
  • Breaking the MoE Bottleneck: By using the magnitude of Matrix $A$'s output for selection, FlyLoRA enables extreme MoE (where every rank is an expert) without the parameter cost of traditional routers.
  • Inherent Orthogonality: Random projections naturally map different tasks to nearly orthogonal mathematical subspaces. This makes FlyLoRA exceptionally robust for model merging, as task-specific updates are less likely to overwrite each other.
  • Gradient Decoupling: Activating only a subset of ranks (top-$k$) reduces the gradient covariance between experts, effectively mitigating intra-task interference.

Experimental Results

The authors evaluated FlyLoRA on Llama-3.1-8B and Qwen-2.5-7B across benchmarks including MMLU, ScienceQA, GSM8K, and CodeAlpaca.

  • Single-Task Performance: FlyLoRA (activating 8 of 32 ranks) outperformed standard LoRA and Split-LoRA. It achieved these results while activating only 0.13% of the model's parameters (vs. 1.03% for LoRA-32).
  • Multi-Task Merging: FlyLoRA showed remarkable resilience during weight averaging. On Qwen-2.5-7B, while standard LoRA performance dropped significantly after merging (e.g., -39.4% on ScienceQA), FlyLoRA maintained performance or even improved (e.g., +6.5% on MMLU).
  • Efficiency: FlyLoRA demonstrated the fastest training times and lowest memory consumption among compared methods due to its frozen $A$ matrix and sparse updates.

Conclusion and Future Work

FlyLoRA represents a significant step forward in parameter-efficient fine-tuning by leveraging biological principles to solve the interference problems inherent in LoRA. Future work includes exploring adaptive modifications to the frozen random projection and integrating FlyLoRA with Reinforcement Learning (RL) fine-tuning for improved stability.

Summary updated

BibTeX
@inproceedings{zou2025flylora,
  author = {Heming Zou and Yunliang Zang and Wutong Xu and Yao Zhu and Xiangyang Ji},
  title = {{FlyLoRA: Boosting Task Decoupling and Parameter Efficiency via Implicit Rank-Wise Mixture-of-Experts}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=nGQLYn13Xf},
}
Figure