SC-LoRA: Balancing Efficient Fine-tuning and Knowledge Preservation via Subspace-Constrained LoRA

Minrui Luo, Fuhang Kuang, Yu Wang, Zirui Liu, Tianxing HearXiv 2025 · DOI

Abstract

Fine-tuning Large Language Models (LLMs) often involves a "tug-of-war" between acquiring new capabilities and preserving existing knowledge or safety alignments. We present SC-LoRA, a novel initialization framework for Low-Rank Adaptation (LoRA) that addresses this challenge by constraining model updates to a mathematically defined subspace. By leveraging data-driven covariance and a balancing hyperparameter $\beta$, SC-LoRA ensures that updates prioritize new task learning without degrading critical pre-trained features. Experimental results on Llama-2-7b demonstrate that SC-LoRA outperforms vanilla LoRA and other state-of-the-art methods in both task performance (e.g., mathematical reasoning) and knowledge preservation (e.g., world knowledge and safety).

Introduction

Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA have become standard for adapting massive models due to their low computational overhead. However, vanilla LoRA suffers from two primary limitations: slow convergence due to random or zero initialization, and catastrophic forgetting, where the model loses its original safety alignment or general world knowledge while learning a new task. SC-LoRA is the first framework to address both issues simultaneously by treating fine-tuning as a balancing act within a specific mathematical subspace.

Methods

The core of SC-LoRA is Subspace-Constrained initialization. Unlike standard LoRA, which initializes matrices $A$ and $B$ with random noise or zeros, SC-LoRA derives these matrices from the data the model is about to see ($T_+$) and the knowledge it must preserve ($T_-$).

Comparison of vanilla LoRA and SC-LoRA initialization strategies.
  1. Data-Driven Covariance: A small sample of both new task data and preservation data is passed through the model to identify the most active "directions" in the neural network for each.
  2. Reward Function and Balancing: A reward function $R(S)$ uses a hyperparameter $\beta$ to balance these directions. A high $\beta$ prioritizes preservation, while a low $\beta$ prioritizes new task learning.
  3. Eigenvalue Decomposition: The framework calculates a balanced covariance matrix ($\Delta Cov = (1-\beta)Cov_+ - \beta Cov_-$) and performs an eigenvalue decomposition.
  4. Initialization: The LoRA adapter $B$ is initialized with the top eigenvectors of this matrix, and $A$ is projected accordingly. This ensures model updates are constrained to a subspace that facilitates the new task without overwriting critical pre-existing knowledge.

Experimental Setup

The authors evaluated SC-LoRA across several demanding scenarios using Llama-2-7b:

  • Math & Logic: Fine-tuned on MetaMathQA and evaluated on GSM8k and MATH.
  • World Knowledge: Evaluated using TriviaQA, NQ-open, and WebQS to monitor knowledge retention.
  • Safety & Alignment: Tested using the Samsum dataset and a specialized Safety dataset to determine if fine-tuning on benign or "poisoned" data would compromise safety guardrails.

Key Insights

  • The "Safe" Subspace: SC-LoRA identifies specific directions in the activation space that are critical for safety but irrelevant for specific tasks like mathematics, allowing the model to learn in these "blind spots."
  • Initialization as a Prior: While LoRA weights evolve during training, the initialization acts as a powerful prior. Starting in the correct subspace naturally biases the model away from destructive updates.
  • The $\beta$ Dial: The hyperparameter $\beta$ provides a direct control mechanism for the safety-performance trade-off, showing a clear relationship between preservation and task performance.

Key Results

SC-LoRA consistently outperformed vanilla LoRA and other state-of-the-art initializers like PiSSA and CorDA across all benchmarks.

Performance comparison of SC-LoRA against baselines on world knowledge and mathematical reasoning tasks.
  • Superior Math Performance: On MetaMathQA, SC-LoRA achieved an average math score of 31.25, surpassing full fine-tuning (28.60) and vanilla LoRA (23.62).
  • Knowledge Preservation: While learning math, SC-LoRA ($\beta=0.8$) maintained a world knowledge score of 22.73, significantly higher than vanilla LoRA's 18.30.
  • Safety Defense: In poisoned data tests (1% malicious data), SC-LoRA ($\beta=0.9$) maintained a harmfulness rate of 1.212%, matching the base model, while methods like PiSSA saw harmfulness skyrocket to 29.39%.

Limitations and Future Work

As an initialization strategy, SC-LoRA provides a strong starting bias but does not strictly prevent the model from drifting out of the safe subspace during extremely long training runs. Future work will explore applying these subspace constraints to multimodal models and more complex reasoning tasks to ensure long-term stability and safety.

Summary updated

BibTeX
@misc{luo2025sc,
  author = {Minrui Luo and Fuhang Kuang and Yu Wang and Zirui Liu and Tianxing He},
  title = {{SC-LoRA: Balancing Efficient Fine-tuning and Knowledge Preservation via Subspace-Constrained LoRA}},
  year = {2025},
  eprint = {2505.23724},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.23724},
}
Figure