Learn to Preserve and Diversify: Parameter-Efficient Group with Orthogonal Regularization for Domain Generalization

Jiajun Hu, Jian Zhang, Lei Qi, Yinghuan Shi, Yang Gao

Abstract

Domain Generalization (DG) remains a critical challenge in machine learning, requiring models to perform effectively on unseen target domains. While large foundation models offer strong latent generalization, standard fine-tuning often degrades their pre-trained features. This paper introduces PEGO (Parameter-Efficient Group with Orthogonal regularization), a framework that leverages a group of Low-Rank Adaptation (LoRA) modules combined with orthogonal regularization. PEGO simultaneously preserves original generalized knowledge and encourages the learning of diverse new features. Experimental results on five major benchmarks demonstrate that PEGO achieves state-of-the-art performance with zero additional inference cost.

Introduction

The advent of large foundation models, such as Vision Transformers (ViT) pre-trained via CLIP, has provided a powerful baseline for various downstream tasks. However, adapting these models to specific domains without losing their inherent robustness is difficult. This "Fine-Tuning Dilemma" presents two extremes: full fine-tuning, which often distorts robust pre-trained features, and standard parameter-efficient fine-tuning (PEFT), which may lack the capacity to capture the diversity required for complex Domain Generalization tasks.

The Fine-Tuning Dilemma in Domain Generalization

Domain Generalization (DG) involves training a model on limited source domains to ensure performance on unseen target domains. Standard approaches face significant hurdles:

  1. Feature Distortion: Updating all parameters during full fine-tuning can overwrite the generalized knowledge acquired during large-scale pre-training, leading to overfitting on source domains.
  2. Capacity Constraints: While methods like LoRA reduce the number of trainable parameters, a single low-rank module often fails to capture the multi-faceted features necessary for diverse domains and can still interfere with pre-trained weights.

Methodology: The PEGO Framework

To address these challenges, the PEGO framework introduces two core strategies: preserving pre-trained knowledge and diversifying learned features.

Architecture of the PEGO framework, illustrating the frozen pre-trained weights and the group of N LoRA modules with orthogonal regularization.

Learn to Preserve

To prevent new updates from interfering with the pre-trained "wisdom," PEGO employs an orthogonal regularization loss between the frozen pre-trained weights ($W$) and the trainable LoRA weights ($BA$). By enforcing orthogonality, the model is encouraged to learn new information in a subspace that does not overlap with or distort the original feature space. This acts as a protective shield for the model's foundational knowledge.

Learn to Diversify

Instead of relying on a single LoRA module, PEGO utilizes a group of $N$ LoRA modules per layer. To ensure these modules capture distinct aspects of the data, a pairwise orthogonal loss is applied between the modules. This "Learn to Diversify" approach allows the model to scale its capacity effectively for complex DG tasks without redundant learning.

Efficient Inference

A key advantage of PEGO is its efficiency. Because LoRA updates are linear, the entire group of learned weights can be mathematically merged back into the original weights after training: $W_{final} = W + \sum_{i=1}^{N} B_i A_i$ Consequently, the final model maintains the original architecture's inference speed and memory footprint, providing a "free lunch" in terms of performance gains without computational overhead at test time.

Experimental Evaluation

The researchers evaluated PEGO using the DomainBed benchmark, encompassing five diverse datasets: PACS, VLCS, OfficeHome, TerraIncognita, and DomainNet. The experiments utilized ViT-B/16 and ViT-L/14 backbones pre-trained via CLIP.

Key Results

PEGO demonstrated superior performance across all benchmarks:

  • State-of-the-Art Accuracy: PEGO achieved an average accuracy of 76.1%, outperforming standard Empirical Risk Minimization (ERM) with full fine-tuning by 15% and standard LoRA by 1.1%.
  • Robustness on Challenging Tasks: On the TerraIncognita dataset, which features wild animal photos from various camera traps, PEGO reached 57.3% accuracy—a significant improvement over the 35.3% achieved by standard fine-tuning.
  • Superiority over Zero-Shot: PEGO significantly outperformed "Zero-shot CLIP," proving that structured adaptation to source domains is more effective than relying solely on pre-trained weights.

Conclusion and Future Work

PEGO offers a robust solution for Domain Generalization by balancing the preservation of pre-trained features with the acquisition of diverse new information. While the method requires hyperparameter tuning for the number of modules and regularization coefficients, its ability to achieve state-of-the-art results with zero inference overhead makes it highly practical. Future research may explore the application of the "Preserve and Diversify" philosophy to other architectures, such as CNNs or Mamba-based models, and other domains like Continual Learning.

Summary updated

BibTeX
@inproceedings{hu2024learn,
  author = {Jiajun Hu and Jian Zhang and Lei Qi and Yinghuan Shi and Yang Gao},
  title = {{Learn to Preserve and Diversify: Parameter-Efficient Group with Orthogonal Regularization for Domain Generalization}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72983-6\_12},
}
Figure