Abstract
As neural networks scale to billions of parameters, efficient fine-tuning becomes critical for practical deployment. We present Group-and-Shuffle (GS) matrices, a novel class of structured matrices that unifies and generalizes previous architectures like Butterfly and Monarch matrices. By alternating local group operations with global shuffles, our method, GSOFT, enables the construction of dense orthogonal transformations with significantly fewer layers than existing techniques. We demonstrate the effectiveness of GSOFT across natural language understanding, text-to-image diffusion, and robust vision tasks, achieving superior performance with reduced computational and parameter overhead.
Introduction
Parameter-Efficient Fine-Tuning (PEFT) has emerged as a vital strategy for adapting large-scale models. While Low-Rank Adaptation (LoRA) is widely used, it can suffer from training instabilities. Orthogonal Fine-Tuning (OFT) offers a more stable alternative by preserving the model's internal geometry (such as the angles between neurons). However, current orthogonal methods like BOFT (Butterfly Orthogonal Fine-Tuning) face a "Goldilocks" problem: they require many layers (typically 5-6) to achieve sufficient expressivity, leading to high memory and latency costs. This work introduces GS-matrices to bridge the gap between expressivity and efficiency.
The Group-and-Shuffle (GS) Architecture
The core innovation is the GS-matrix construction, which is based on a sequence of operations: grouping and shuffling. An input vector is first processed by a block-diagonal matrix (Group), then rearranged by a permutation matrix (Shuffle), and finally processed by another block-diagonal matrix.
Mathematically, a GS-matrix $A$ is defined as $A = P_L(LPR)P_R$, where $L$ and $R$ are block-diagonal matrices and $P$ is a permutation. To ensure orthogonality, we parametrize the individual blocks of $L$ and $R$ using the Cayley transform. A key theoretical result of this work is that GS-matrices achieve "density" (where every output depends on every input) in only $1 + \log_b(r)$ layers, where $b$ is the block size. In practice, this allows GSOFT to use as few as two layers to outperform BOFT configurations that require five or six, making it highly hardware-friendly for modern GPUs.
Experimental Evaluation
We evaluated GSOFT across three diverse domains to demonstrate its versatility and efficiency:
Natural Language Understanding
On the GLUE benchmark using a RoBERTa-base model, GSOFT achieved an average score of 86.67. This outperformed LoRA (86.53), standard OFT (86.27), and BOFT (85.84) while maintaining a comparable parameter budget.
Subject-Driven Image Generation
Using the DreamBooth dataset with Stable Diffusion v2, we found that GSOFT and its variant, Double GSOFT (which adapts both left and right singular vectors), were less prone to overfitting than LoRA. GSOFT maintained higher concept fidelity—ensuring generated images accurately reflected training subjects—while following complex text prompts more effectively.
Robust Vision and Convolutions
We extended our framework to orthogonal convolutions (GS-SOC). In training 1-Lipschitz networks on CIFAR-100, GS-SOC achieved higher accuracy than standard SOC while being 1.64x faster and using 3.5x fewer parameters.
Conclusion
Group-and-Shuffle matrices provide a highly efficient and expressive framework for orthogonal parametrization. By unifying and generalizing previous structured matrix classes, GSOFT offers a superior balance of parameter efficiency and computational performance. While slightly slower than LoRA during training due to orthogonality constraints, its stability and density efficiency make it a powerful tool for adapting the next generation of large-scale models.
Summary updated