Abstract
Large language models (LLMs) encounter significant adaptation challenges in diverse multitask finetuning. Mixture-of-experts (MoE) provides a promising solution with a dynamic architecture, enabling effective task decoupling. However, scaling up the number of MoE experts incurs substantial parameter and computational overheads and suffers from limited performance gain due to naive routing mechanisms. In this paper, we design a novel framework, mixTure-of-Rank-onE-eXperts (T-REX), which leverages the combination of ultra-low rank experts to construct LoRA weights on pretrained LLMs. The rank-1 experts enable a mix-and-match mechanism to quadratically expand the vector subspace of experts with linear parameter overheads, achieving approximate error reduction with optimal efficiency. In addition, T-REX offers implicit guidance to the router, leveraging the inherent semantic clustering of training embeddings as prior knowledge, enabling optimized feature allocation across experts for a smoother convergence. Extensive theoretical and empirical results demonstrate that T-REX achieves superior efficiency and generalizability across diverse tasks. Compared with other LoRA-based methods, T-REX achieves up to 1.78% mean accuracy improvement with around 30%-40% less trainable parameters across 14 public datasets.
Introduction
Fine-tuning Large Language Models (LLMs) for diverse multi-task environments (MTL) is notoriously difficult. While Mixture-of-Experts (MoE) is a popular solution—activating only a subset of "expert" layers for a given input—it faces two major hurdles: scaling overhead and naive routing. In standard LoRA-based MoE, adding experts increases the parameter count linearly, which quickly becomes expensive. Furthermore, most MoE models use a simple linear layer to decide which expert to use, often ignoring the actual semantic distribution of the data and relying on coarse human-defined task categories.
The T-REX Framework
T-REX introduces two primary innovations to solve these issues: the Mix-and-Match (MaM) mechanism and a Semantic-aware Router.
Mix-and-Match Rank-1 Experts (MaM)
Instead of creating full-rank or even standard low-rank (e.g., rank-8) LoRA experts, T-REX utilizes rank-1 experts. By decoupling the row vectors ($A_i$) and column vectors ($B_j$) of the LoRA weights, any $A_i$ can be paired with any $B_j$ to create $I \times J$ unique experts. This allows the model to scale the number of experts quadratically while the parameters only grow linearly ($I + J$). Mathematically, this approach expands the vector subspace that the experts can cover, significantly reducing approximation error for ideal weight updates.
Semantic-aware Router (Intuition)
T-REX provides the router with "intuition"—a prior understanding of where an input sits in the semantic space. Before training, an embedding model maps training tokens into a vector space to perform $k$-means clustering and identify "task centroids." During finetuning, the model calculates an "intuition score" based on the cosine similarity between the current input's embedding and these centroids. This score guides the model to choose experts that have specialized in similar semantic clusters, leading to more optimized feature allocation.
Experimental Evaluation
The authors evaluated T-REX using a massive multi-task suite of 20 datasets spanning reasoning, examination, language, understanding, and knowledge (including ANLI, MMLU, ARC, HellaSwag, and BoolQ). To test out-of-distribution (OOD) generalization, the Big-Bench Hard (BBH) dataset was used for tasks never seen during finetuning.
Key Results
T-REX was tested across 7 LLM backbones (including LLaMA-2/3, Mistral, and Phi-2) and consistently outperformed state-of-the-art LoRA-MoE baselines:
- Performance: Achieved up to a 1.78% mean accuracy improvement over baselines like MoLoRA and SiRA across 14 public datasets.
- Generalization: On the BBH benchmark, T-REX outperformed standard LoRA by over 1% on Gemma 2B and Yi 6B, proving that its semantic intuition helps handle unfamiliar tasks.
- Efficiency: T-REX achieves these gains while using 30-40% fewer trainable parameters and showing a significant reduction in FLOPs and training overhead.
Conclusion
T-REX demonstrates that many-expert systems do not require "heavy" experts; they require a smarter way to combine light ones. By routing based on intrinsic semantic clusters rather than noisy human labels, the model converges more smoothly and generalizes better. Future work will explore extending this framework to Vision-Language Models (VLMs) and further optimizing router scaling.
Summary updated