S2FT: Efficient, Scalable and Generalizable LLM Fine-tuning by Structured Sparsity

Xinyu Yang, Jixuan Leng, Geyang Guo, Jiawei Zhao, Ryumei Nakada, Linjun Zhang, Huaxiu Yao, Beidi Chen

Abstract

S2FT (Structured Sparse Fine-Tuning) is a novel approach that achieves high model quality, training efficiency, and scalable serving. By strategically selecting and permuting specific "coupled structures" like attention heads into dense submatrices, S2FT outperforms LoRA in generalization while reducing memory usage by up to 3× compared to full fine-tuning. This method bridges the gap between the generalization benefits of sparse updates and the hardware efficiency of dense matrix operations.

Introduction

Fine-tuning Large Language Models (LLMs) often involves a trade-off between performance and efficiency. Full Fine-Tuning (FT) is effective but prone to "catastrophic forgetting" and high memory costs. Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA reduce memory but can lag in performance on complex tasks and introduce inference latency when serving multiple adapters. While Unstructured Sparse Fine-Tuning (SpFT) offers better generalization, it is notoriously inefficient on modern GPU hardware designed for dense math. S2FT addresses these challenges by enabling sparse selection with dense computation.

Methods: Select Sparsely, Compute Densely

The core innovation of S2FT is the identification and manipulation of "coupled structures" within the Transformer architecture. The method follows a three-step process:

  1. Identify Coupled Structures: LLM components are intrinsically linked. For instance, an attention head in the Query/Key/Value projections corresponds to specific rows in the Output projection. Similarly, FFN channels are coupled across "Up" and "Down" gates.
  2. Co-Permutation: Instead of random weight updates, S2FT selects entire coupled units. It then permutes the weight matrices to move these units to the front, forming a contiguous, dense submatrix. Since Transformers are largely invariant to head/channel ordering, this reordering preserves model output while optimizing for hardware.
  3. Partial Back-propagation: Training is restricted to these dense submatrices. This allows the use of standard, high-speed dense matrix kernels while updating only a small fraction of parameters.
Overview of S2FT's co-permutation and dense computation strategy for MHA and FFN layers.

Experimental Results

S2FT was evaluated across benchmarks including commonsense reasoning (8 datasets), arithmetic reasoning (7 datasets), and instruction following (MT-Bench).

Performance and Generalization

S2FT consistently outperformed LoRA, showing a 4.6% average improvement on commonsense reasoning and a 1.3% improvement on arithmetic tasks. Crucially, S2FT demonstrated superior resistance to catastrophic forgetting. In instruction-following tasks, it surpassed full fine-tuning by 11.5% when generalizing to new domains.

Comparison of S2FT, LoRA, Full FT, and Vanilla models across training loss and various Out-of-Distribution (OOD) accuracy metrics.

Efficiency and Scalability

Compared to full fine-tuning, S2FT achieves up to 3× training memory savings and improves latency by 1.5–2.7×. Furthermore, S2FT adapters are highly scalable for serving; switching between adapters on a CPU is nearly instantaneous, whereas LoRA's switching time scales quadratically with model size.

Conclusion

S2FT provides a robust framework for LLM fine-tuning that combines the generalization strengths of sparsity with the efficiency of dense computation. While currently focused on Transformer architectures, future work may extend these principles to multimodal models and other neural structures. Its ability to maintain pre-trained knowledge while adapting to new tasks makes it a powerful tool for scalable AI deployment.

Summary updated

BibTeX
@inproceedings{yang2024s,
  author = {Xinyu Yang and Jixuan Leng and Geyang Guo and Jiawei Zhao and Ryumei Nakada and Linjun Zhang and Huaxiu Yao and Beidi Chen},
  title = {{S2FT: Efficient, Scalable and Generalizable LLM Fine-tuning by Structured Sparsity}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
}
Figure