TL;DR
Circulant and Diagonal Vector based Fine-Tuning (CDVFT) is a novel parameter-efficient fine-tuning (PEFT) method that models weight updates as a product of interleaved circulant and diagonal matrices. By leveraging 1D Fast Fourier Transforms (FFTs) and avoiding the explicit reconstruction of the weight change matrix during training, CDVFT drastically reduces computational complexity (FLOPs) and parameter counts while matching or exceeding the performance of LoRA and FourierFT across NLP and computer vision tasks.
What Problem Does This Paper Address?
Fine-tuning Large Foundation Models (LFMs) for downstream tasks is notoriously resource-intensive. While Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA reduce the number of trainable parameters by using low-rank matrix decomposition, they still introduce significant memory and computational overhead during training.
Recent advanced methods, such as FourierFT, attempt to train sparse coefficients in the frequency domain. However, FourierFT relies on 2D Inverse Fast Fourier Transforms (2D IFFTs) to reconstruct the full weight update matrix ($\Delta W$) at every step. This creates a massive computational bottleneck ($O(d^2 \log(d^2))$ complexity) and demands substantial GPU memory, limiting its practicality for real-world deployment on consumer hardware. The authors of this paper set out to design a frequency-domain PEFT method that eliminates the need to ever reconstruct the full $\Delta W$ matrix during training.
Methods
The core innovation of CDVFT is representing the weight change matrix $\Delta W$ as a product of interleaved diagonal and circulant matrices:
$$\Delta W = \text{diag}(a_{2m-1}) \times \text{circ}(a_{2m-2}) \times \dots \times \text{diag}(a_1)$$
Crucially, each of these component matrices can be completely defined by a single vector, leading to linear storage complexity.
The training process is optimized through three key techniques:
- Right-to-Left Vector Operations: Instead of computing $\Delta W$ explicitly, CDVFT multiplies the input vector $x$ sequentially from right to left. This transforms matrix-matrix operations into highly efficient matrix-vector operations.
- 1D FFT Acceleration: Circulant matrix-vector multiplication is mathematically equivalent to a circular convolution, which can be computed in the frequency domain using a 1D FFT, element-wise multiplication, and a 1D IFFT. This drops the computational complexity to loglinear ($O(md \log d)$).
- Block Partitioning for Non-Square Weights: Interleaved circulant and diagonal products naturally yield square matrices. To handle non-square weight matrices (common in models like LLaMA), CDVFT partitions the target matrix into smaller square blocks, processing them as independent square circulant operations.
Datasets
The authors evaluated CDVFT across three distinct domains:
- Natural Language Understanding: The GLUE benchmark (including SST-2, MRPC, CoLA, QNLI, RTE, and STS-B) using a RoBERTa-base backbone.
- Image Classification: The RESISC45 (remote sensing) and CIFAR-100 datasets using a Vision Transformer (ViT-Base) backbone.
- Instruction Tuning: The Alpaca dataset (evaluated via MT-Bench using GPT-4) and the GSM8K mathematical reasoning dataset using LLaMA2-7B.
Key Insights and Ideas
- Skip the Reconstruction: The biggest "aha moment" is that you don't actually need to materialize $\Delta W$ to compute the forward or backward passes. Keeping everything in vector form via right-to-left evaluation circumvents the quadratic memory wall.
- 1D beats 2D: Moving from the 2D FFTs used in FourierFT to 1D FFTs drastically cuts down floating-point operations (FLOPs) without sacrificing the expressive power needed to adapt the model.
- Structural Regularization: Interestingly, the authors found that larger block partition sizes (which reduce parameter counts) do not always degrade performance. The rigid mathematical structure of circulant matrices appears to act as a beneficial regularizer, preventing over-parameterization in massive models like LLaMA.
Key Results
CDVFT achieves a compelling balance between accuracy, parameter efficiency, and computational speedup.
- On RoBERTa (GLUE): CDVFT achieves an average score comparable to LoRA and FourierFT, but with 51.89$\times$ fewer FLOPs than FourierFT and 5.33$\times$ fewer trainable parameters than LoRA.
- On ViT (Image Classification): CDVFT delivers identical accuracy to FourierFT on RESISC45 (92.0%) while requiring 51.9$\times$ fewer FLOPs. It also uses 10.7$\times$ fewer parameters than LoRA.
- On LLaMA2-7B (Instruction Tuning): On MT-Bench, CDVFT achieved a score of 5.42 (outperforming LoRA's 5.20 and FourierFT's 5.18) while utilizing only 1.05M parameters compared to LoRA's 33.55M.
Limitations and Future Work
While CDVFT shows impressive efficiency gains, the choice of the block partition size $p$ for non-square matrices introduces a hyperparameter tuning trade-off. Smaller block sizes yield more precise matrix approximations but increase parameter counts and computational complexity. Currently, finding the optimal block size requires empirical experimentation. Future work could focus on automating this selection process or dynamically adapting block sizes across different layers of the network.
Summary updated