Mitigating Catastrophic Forgetting with Adaptive Transformer Block Expansion in Federated Fine-Tuning

Yujia Huo, Jianchun Liu, Hongli Xu, Zhenguo Ma, Shilong Wang, Liusheng HuangarXiv 2025 · DOI

TL;DR

This paper introduces FedBE, a novel federated fine-tuning framework for large language models (LLMs) that combats catastrophic forgetting by adaptively expanding transformer blocks and dynamically assigning them to clients. FedBE significantly improves accuracy retention on general tasks and accelerates convergence in heterogeneous federated environments.

What Problem Does This Paper Address?

Large language models (LLMs) have revolutionized NLP, but fine-tuning them on distributed, privacy-sensitive data presents challenges. Federated fine-tuning (FedFT) offers a privacy-preserving solution, but existing methods often struggle with catastrophic forgetting – where the model forgets previously learned general knowledge when adapting to new, specific tasks. This issue is exacerbated in federated settings due to data heterogeneity (clients having different data distributions) and resource heterogeneity (clients having varying computational capabilities). Traditional FedFT methods, especially parameter-efficient fine-tuning (PEFT) techniques like adapters or LoRA, fail to adequately address this forgetting, leading to performance degradation on general tasks.

Methods

The core of FedBE lies in two novel strategies:

  • Server-Side Transformer Block Expansion: Instead of just fine-tuning existing parameters or adding small adapter modules, FedBE expands the LLM architecture by inserting new, trainable transformer blocks after specific layers of the frozen pre-trained backbone. This structural separation helps isolate newly learned task-specific knowledge from the original pre-trained representations, mitigating forgetting. The selection of which blocks to expand and where to insert them is guided by analyzing gradient magnitudes. Layers with higher gradients are deemed more critical for adaptation.
  • Client-Aware Trainable Block Allocation: To handle client heterogeneity, FedBE dynamically assigns these expanded blocks to clients. This allocation is based on:
  • Data Distribution: Clients with more uniform data receive blocks for general feature extraction, while those with skewed data get blocks for abstract representation learning.
  • Resource Capability: The number of blocks assigned to a client is adjusted based on its computational power and memory, ensuring efficient training without overwhelming clients.

This approach allows for a structured decoupling of knowledge and adaptive learning tailored to individual client needs.

Datasets

The paper evaluates FedBE on several standard NLP datasets:

  • AG News: Used for text classification.
  • IMDB: Used for sentiment analysis.
  • MRPC (Microsoft Research Paraphrase Corpus): Used as the primary fine-tuning task.
  • RTE (Recognizing Textual Entailment), QNLI (Question Natural Language Inference), SST-2 (Stanford Sentiment Treebank), CoLA (Corpus of Linguistic Acceptability), QQP (Quora Question Pairs): Used for evaluating general language understanding capabilities and catastrophic forgetting.

The paper does not introduce new benchmarks but uses existing ones to demonstrate the effectiveness of FedBE.

Key Insights and Ideas

  • Structural Separation is Key: Simply fine-tuning parameters or adding small modules isn't enough. Physically expanding the model architecture with new blocks creates a more robust separation between old and new knowledge, directly tackling catastrophic forgetting.
  • Gradient-Informed Expansion: Not all transformer blocks are created equal for adaptation. Focusing expansion on layers with high gradient norms is a smart heuristic for identifying critical adaptation points.
  • Dynamic Allocation for Heterogeneity: A one-size-fits-all approach to federated learning is insufficient. Dynamically assigning tasks (expanded blocks) based on both data and resource characteristics is crucial for efficient and effective adaptation in real-world scenarios.
  • Trade-offs in Expansion: While more expanded blocks can improve performance, there's a point of diminishing returns, and it comes with increased computational cost. FedBE balances this by considering system constraints.

Key Results

FedBE demonstrates significant improvements over existing FedFT methods:

  • Accuracy Retention: Achieves 12–74% higher accuracy retention on general tasks after fine-tuning compared to baselines.
  • Downstream Task Accuracy: Outperforms FedNLP, FedAdapter, and FedLoRA by 1.6% to 3.2% on AG News and 1.7% to 2.2% on IMDB for RoBerta-base. Similar gains are observed for BERT-large.
  • Convergence Speed: Achieves a model convergence acceleration ratio of 1.9–3.1×, reaching target accuracies in significantly fewer training rounds and less total time. For example, on AG News, FedBE reaches 90% accuracy in 2266 seconds, compared to over 3000 seconds for other methods.
  • Catastrophic Forgetting Mitigation: Shows substantial improvements on GLUE benchmark tasks, particularly in complex semantic understanding tasks like QNLI and sentiment analysis (SST-2).

Limitations and Future Work

  • Limitations: The paper acknowledges that the performance of FedBE critically depends on the proper number and position of expanded blocks, and the effectiveness of the allocation strategy. While they propose methods for these, further optimization might be possible. The current approach focuses on transformer blocks and might need adaptation for other model architectures.
  • Future Work: The authors suggest exploring parameter compression and cross-modal adaptation to extend FedBE's applicability to edge devices. They also aim to further optimize parameter compression and cross-modal adaptation for broader applicability.

Summary updated

BibTeX
@misc{huo2025mitigating,
  author = {Yujia Huo and Jianchun Liu and Hongli Xu and Zhenguo Ma and Shilong Wang and Liusheng Huang},
  title = {{Mitigating Catastrophic Forgetting with Adaptive Transformer Block Expansion in Federated Fine-Tuning}},
  year = {2025},
  eprint = {2506.05977},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.05977},
}
Figure