NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Merge before Forget: A Single LoRA Continual Learning via Continual Merging

Fuli Qiao, Mehrdad Mahdavi

Executive Summary

SLAO (Single LoRA continual learning with Orthogonal initialization via continual merging) is a novel framework that enables Large Language Models (LLMs) to learn a sequence of tasks using only a single, fixed-size LoRA adapter. By combining orthogonal basis initialization with an asymmetric, time-aware merging strategy, SLAO achieves constant memory usage and state-of-the-art performance, completely avoiding the linear parameter growth that plagues existing continual learning methods.

The Challenge: Catastrophic Forgetting in LLMs

When Large Language Models (LLMs) are fine-tuned on a sequence of new tasks, they typically suffer from catastrophic forgetting—the tendency to overwrite and lose knowledge of earlier tasks while learning new ones.

Current Low-Rank Adaptation (LoRA) techniques for continual learning (CL) usually attempt to solve this by:

  1. Freezing and storing every previously learned LoRA, which leads to an unsustainable linear growth in storage and memory as tasks accumulate.
  2. Generating "pseudo-data" to replay old tasks, a process that is computationally expensive and often unrealistic in practice.

The authors identify a major gap in the field: the lack of a principled way to merge sequential updates into a single, unified LoRA adapter that maintains high performance across all tasks without growing in size.

The SLAO Approach

The authors introduce SLAO, a method that stands out by treating the two matrices of a LoRA module ($A$ and $B$) as asymmetric components with distinct roles. The framework relies on two primary operations:

  1. Orthogonal Basis Initialization: Before starting a new task, the algorithm extracts an orthogonal basis from the previous task's $A$ matrix using QR decomposition. This ensures the new task begins its learning in a subspace that minimizes geometric interference with previously acquired knowledge.
  2. Asymmetric Continual Merging:
    • Matrix $A$: Is updated to the new task's fine-tuned version to maintain geometric consistency.
  3. Matrix $B$: Is merged sequentially using a time-aware scaling mechanism (specifically, $\lambda(i) = 1/\sqrt{i}$). This carefully balances the "plasticity" needed to learn new concepts with the "stability" required to retain old ones.

Because updates are merged into one single pair of matrices, the memory overhead remains $O((m+n)r)$—a constant memory complexity regardless of whether the model has learned 5 tasks or 500.

Key Insights and Ideas

LoRA Asymmetry

The paper provides compelling empirical evidence via cosine similarity analysis that the $A$ and $B$ matrices follow fundamentally different learning dynamics.

Cosine similarity analysis of LoRA A and B matrices across tasks

As shown in the heatmaps above, Matrix $A$ tends to remain highly similar across different tasks, acting as a shared feature extractor. Conversely, Matrix $B$ is highly task-specific. Treating them identically during the merging process leads to suboptimal results, which is why SLAO's asymmetric approach is so effective.

Initialization Matters More than Merging

A critical "aha moment" in the research is that how you start a task (orthogonal initialization) is just as critical as how you merge it later. Random initialization puts the model in a poor starting position, causing severe interference during future merging steps.

The $1/\sqrt{i}$ Rule

Borrowing from model merging theory, the authors demonstrate that scaling updates by the square root of the task index helps maintain a consistent magnitude of parameter changes. This prevents the most recent task from "overpowering" the entire adapter and erasing previous knowledge.

Experimental Setup & Key Results

The researchers evaluated SLAO across three diverse benchmarks using several LLM families, including Llama-2, Llama-3, and Qwen2.5. The benchmarks included a standard 5-task text classification sequence, a larger 15-task sequence (combining GLUE, SuperGLUE, and IMDB), and the SuperNI Benchmark featuring 15 diverse NLP tasks with expert-written instructions.

Highlights of the results include: * Superior Performance: SLAO consistently outperformed other "data-free" baselines (methods that don't use replay data, like O-LoRA and InfLoRA) across all benchmarks. * Memory Efficiency: While methods like O-LoRA show a steep linear increase in memory usage as tasks accumulate, SLAO's memory footprint remains perfectly flat. * Order Robustness: SLAO showed significantly lower Maximum Order-normalized Performance Disparity (MOPD). This means the model's final performance is far less sensitive to the specific order in which tasks are presented—a common weakness in continual learning systems. * Training Speed: SLAO is highly efficient. Its GPU wall-time is nearly identical to standard LoRA fine-tuning, whereas constrained methods like InfLoRA can take more than twice as long to train.

Limitations and Future Work

While SLAO represents a significant step forward, the authors note a few limitations:

  • Sequential Dependency: The method still requires tasks to be processed one after another. It does not yet address "asynchronous" or "shuffled" merging where tasks might arrive out of order.
  • Performance Gap vs. Multi-Task Learning: Although SLAO is the best-performing continual method tested, there remains a small performance gap compared to "Multi-Task Learning" (where the model is trained on all data simultaneously from scratch).
  • Scaling Factors: The authors suggest that while the $1/\sqrt{i}$ scaling rule works well, future work could explore more complex, learnable scaling factors to further optimize the delicate balance between old and new knowledge.

Summary updated

BibTeX
@inproceedings{qiao2026merge,
  author = {Fuli Qiao and Mehrdad Mahdavi},
  title = {{Merge before Forget: A Single LoRA Continual Learning via Continual Merging}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=i1Rj7yU6eF},
}
Figure