TL;DR
Orthogonal Butterfly (BOFT) is a novel parameter-efficient finetuning (PEFT) method that leverages "butterfly factorization"—a technique inspired by the Fast Fourier Transform—to create dense orthogonal matrices with minimal trainable parameters. By preserving the relational information (angles) between neurons while remaining highly efficient, BOFT outperforms popular methods like LoRA and standard Orthogonal Finetuning (OFT) across diverse tasks in vision, language, and image generation.
The Challenge of Adapting Foundation Models
Adapting massive foundation models (like LLaMA-2 or Stable Diffusion) to specific downstream tasks is a major computational challenge. Because standard full-model finetuning is prohibitively expensive, the industry has increasingly turned to Parameter-Efficient Fine-Tuning (PEFT).
Currently, LoRA (Low-Rank Adaptation) is the standard PEFT approach, relying on additive low-rank updates to the model's weights. An emerging alternative is Orthogonal Finetuning (OFT), which instead uses multiplicative orthogonal matrices to transform neurons. OFT is theoretically appealing because orthogonal transformations preserve the pairwise angles between neurons, keeping the semantic structure of the pretrained model intact.
However, OFT faces a structural dilemma: using a full, dense orthogonal matrix requires $O(d^2)$ parameters, which is too memory-intensive. Conversely, using a block-diagonal matrix saves parameters but sacrifices expressivity and global connectivity. The authors sought a method to create a dense orthogonal matrix that remains parameter-efficient.
Introducing Orthogonal Butterfly (BOFT)
To solve this dilemma, the authors introduce Orthogonal Butterfly (BOFT), drawing inspiration from the Cooley-Tukey algorithm used in Fast Fourier Transforms (FFT).
- Information Transmission View: The generation of an orthogonal matrix can be framed as a flow of information through a grid. For a matrix to be "dense," every input node must be able to reach every output node.
- Butterfly Factorization: Instead of learning one massive matrix, BOFT represents the orthogonal transformation as a product of $m$ sparse "butterfly" matrices. In a $d$-dimensional space, this achieves dense connectivity with only $O(d \log d)$ parameters.
- Orthogonal Constraints: To ensure the final product remains strictly orthogonal, each small $2 \times 2$ (or $2b \times 2b$) block within the butterfly factors is parameterized using the Cayley transform or rotations.
- Multiplicative Dropout: Because standard dropout interferes with multiplicative updates, the authors propose a specialized version that randomly sets butterfly factors or blocks to identity matrices during training, effectively preventing overfitting.
Key Insights and Advantages
- The Power of Sparsity: The butterfly structure hits a sweet spot. It is sparse enough to be computationally efficient but structured enough to recover classic dense linear transforms (like Fourier or Cosine transforms) that simple block-diagonal matrices cannot represent.
- Spectral Stability: By utilizing orthogonal matrices, BOFT perfectly preserves the spectral norm of the pretrained weights. This leads to more stable training dynamics and better generalization compared to additive methods like LoRA.
- Free Weight Interpolation: Because the final transformation is a product of multiple factors, individual factors can be "turned off" (set to the identity matrix) at inference time. This allows for smooth, training-free interpolation between the base model and the fully finetuned model.
- Expressivity vs. Regularity: BOFT provides a smoother interpolation between the full orthogonal group and the identity matrix, allowing it to find a better hypothesis class for downstream tasks than previous methods.
Empirical Results
The authors conducted an extensive empirical study across three major domains, demonstrating BOFT's versatility:
- Large Language Models (LLMs): On the GLUE benchmark, BOFT outperformed both LoRA and OFT while using fewer parameters. In mathematical reasoning tasks (GSM8K), it achieved a remarkable 10% relative improvement over LoRA.
- Computer Vision: On the VTAB-1K benchmark (19 diverse image classification tasks), BOFT achieved the highest average accuracy, proving more stable and consistent than alternatives like GLoRA or BitFit. When applied to the Segment Anything Model (SAM), BOFT matched the performance of the much heavier HQ-SAM using only 3% of its trainable parameters.
- Generative AI: In subject-driven generation (DreamBooth) and controllable text-to-image generation (ControlNet) using Stable Diffusion, BOFT showed superior ability to preserve subject identity (e.g., specific objects or pets) compared to LoRA, which often struggled with fine details or strict prompt adherence.
Limitations and Future Directions
While highly effective, BOFT does introduce a slight training overhead because it represents a single transformation as a product of multiple sparse matrices. However, once trained, these matrices can be collapsed into the original weights, resulting in zero inference latency.
Future work may involve searching for even more efficient sparse topologies beyond the butterfly structure, as well as developing automated ways to tune the optimal number of butterfly factors ($m$) and block sizes ($b$) for specific downstream tasks.
Summary updated