Meta-UCF: Unified Task-Conditioned LoRA Generation for Continual Learning in Large Language Models

ShiLin Xiao, Tianxiang Xu, Canran Xiao, Weihao Luo, Liwei Hou, Chuangxin ZhaoICLR 2026

TL;DR

Meta-UCF is a novel framework for continual learning that replaces the ever-growing "bank" of task-specific adapters with a single, shared hypernetwork. By generating LoRA weights on the fly from a compact task embedding, it achieves state-of-the-art accuracy and a 13% reduction in forgetting while maintaining a constant memory footprint.

What Problem Does This Paper Address?

Large Language Models (LLMs) often need to learn new skills or adapt to new domains sequentially. However, standard fine-tuning leads to catastrophic forgetting, where new knowledge overwrites the old.

To solve this, researchers typically use Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA. While effective, existing LoRA-based continual learning (CL) methods face a fundamental dilemma:

  1. Linear Growth: They allocate a new "slot" or adapter for every new task, causing the model size to bloat as the task horizon expands.
  2. Interference: If they try to reuse a single adapter, new tasks interfere with old ones, leading to severe performance degradation.
Comparison of existing LoRA-CL methods and Meta-UCF

The authors of Meta-UCF aim for a highly sought-after goal in lifelong learning: memory-constant, on-the-fly adaptation for a frozen LLM facing an unbounded stream of tasks.

Methods

The core innovation of Meta-UCF (Meta-Unified Contrastive Fine-tuning) is reframing continual learning as a generative problem. Instead of storing weights for every new task, the system learns to generate them dynamically.

Architecture of the Meta-UCF framework
  1. Task Embedding Acquisition: For any given task, the model takes a small "support set" (a few examples) and passes them through the frozen LLM backbone. It uses layer-normalized mean pooling of the hidden states to create a compact, representative task vector ($e_k$).
  2. Meta-Conditioned Parameter Generator: This task vector is fed into a single hypernetwork. This hypernetwork instantly synthesizes rank-$r$ LoRA updates for every transformer layer in the model.
  3. Geometric Regularization: To ensure the generator doesn't get "confused" between tasks, the authors employ two key objectives:
  4. Meta-Contrastive Loss: Uses an InfoNCE objective to push task embeddings into near-orthogonal directions on a unit hypersphere.
  5. Orthogonality Penalty: Discourages the generated subspaces of different tasks from overlapping, which significantly reduces cross-task interference.
  6. Dynamic Bias Calibration: A specialized loss term helps maintain fairness and stability by monitoring the demographic-parity gap during training.

Datasets

The framework was evaluated on four diverse and challenging benchmark streams:

  • Std-CL 5: A standard five-task text classification sequence (AG News, Amazon, Yelp, DBpedia, Yahoo).
  • Seq-GLUE 7: Seven tasks from the General Language Understanding Evaluation benchmark.
  • Long-CL 15: A complex 15-task sequence designed to test long-term stability.
  • TRACE-8: A multi-domain stream covering coding, math, and multilingual comprehension.

Key Insights and Ideas

  • Decoupling Growth from Learning: By using a hypernetwork, the number of trainable parameters remains constant regardless of whether the model has learned 5 tasks or 500.
  • Orthogonality is Key: The paper demonstrates that forcing task embeddings to be orthogonal is a powerful "zero-shot" way to prevent forgetting. It allows the hypernetwork to treat each task as a distinct "mode" without needing complex inner-loop gradients.
  • Backbone Agnostic: The method is remarkably robust. The authors showed that the same "recipe" works across different model families without needing to retune hyperparameters.

Key Results

  • Superior Performance: Meta-UCF outperformed the strongest LoRA baselines by up to 2.2 percentage points in average accuracy.
  • Stability: It reduced catastrophic forgetting by 13% relative to the best existing methods.
  • Efficiency: While using the parameter budget of roughly a single adapter, it matched or surpassed the performance of "slot-based" methods that use many adapters.
  • Pareto Efficiency: The authors identified a "sweet spot" (adapting only the top half of layers) that retains >99% accuracy while increasing inference throughput by 8%.

Limitations and Future Work

  • Inference Overhead: While the memory footprint is constant, the hypernetwork does add a small amount of computational overhead at inference time to generate the weights.
  • Support Set Dependency: The model requires a small support set (up to 16 examples) to identify a task. In scenarios where no support data is available, a separate task-retrieval mechanism might be necessary.
  • Task Boundary Assumption: Like most continual learning research, this work assumes tasks arrive with clear boundaries. Adapting this to "blurry" or truly seamless task transitions remains an open challenge.

Summary updated

BibTeX
@inproceedings{xiao2026meta,
  author = {ShiLin Xiao and Tianxiang Xu and Canran Xiao and Weihao Luo and Liwei Hou and Chuangxin Zhao},
  title = {{Meta-UCF: Unified Task-Conditioned LoRA Generation for Continual Learning in Large Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=iNg5KL7eTC},
}
Figure