DM-Adapter: Domain-Aware Mixture-of-Adapters for Text-Based Person Retrieval

Yating Liu, Zimo Liu, Xiangyuan Lan, Wenming Yang, Yaowei Li, Qingmin Liao

TL;DR

DM-Adapter introduces a novel parameter-efficient framework for text-based person retrieval by combining Mixture-of-Experts (MoE) with lightweight adapters. By freezing the CLIP backbone and training only 16M domain-aware parameters, it achieves state-of-the-art retrieval accuracy while drastically reducing computational and memory costs compared to full-model fine-tuning.

What Problem Does This Paper Address?

Text-Based Person Retrieval (TPR) is the task of searching for a specific person in an image database using only a textual description (e.g., "a woman with long hair, black tights, and a paper bag"). While vision-language foundation models like CLIP possess immense general knowledge, adapting them to the highly specific, fine-grained domain of person retrieval presents a dilemma:

  1. Full Fine-Tuning (FFT): Modifying all of CLIP's weights is computationally expensive, memory-intensive, and highly prone to overfitting on relatively small person-retrieval datasets.
  2. Parameter-Efficient Transfer Learning (PETL): Freezing CLIP and adding a single, simple adapter module saves compute but lacks the specialized capacity to capture the fine-grained details (like clothing textures or specific accessories) necessary for accurate person matching.

The authors bridge this gap by introducing a method that is both highly efficient and capable of fine-grained feature extraction.

Methods

The authors propose the Domain-Aware Mixture-of-Adapters (DM-Adapter) framework, which integrates a sparse mixture-of-experts strategy directly into the parameter-efficient tuning process.

Figure 3: The overall framework of the proposed method. We adopt CLIP (ViT-B/16) as backbone, and design Domain-Aware Mixture-of-Adapters spanning MLP layer. The full parameters of vanilla CLIP are frozen during training phase. Only a fewer of parameters in DM-Adapter are trainable. The overall optimization objective incorporates SDM loss and LB auxiliary loss.

Key components include:

  • Sparse Mixture-of-Adapters (SMA): Instead of using a single adapter, multiple small adapter "experts" are placed in parallel with the MLP layers in both the vision and language branches of CLIP. A sparse gating mechanism activates only the Top-K (specifically, $K=2$) most relevant adapters per token, keeping computational costs stable while expanding model capacity.
  • Domain-Aware Router (DR): Standard MoE routers operate in a purely data-driven manner, ignoring the broader task context. The DR injects learnable, domain-specific vision and language prompts into the gating function. This forces the router to select expert adapters based on person-retrieval domain knowledge.
  • Load-Balancing (LB) Loss: To prevent the model from over-relying on a single expert, an auxiliary load-balancing loss encourages an even distribution of tokens across all available adapters.

Datasets

The model was evaluated on three widely used public TPR benchmarks:

  • CUHK-PEDES: The most common benchmark, containing 40,206 images and 80,412 textual descriptions across 13,003 identities.
  • ICFG-PEDES: A dataset featuring 54,522 images for 4,102 identities, with one description per image.
  • RSTPReid: A newer, smaller dataset containing 20,505 images of 4,101 identities, with two descriptions per image.

Key Insights and Ideas

  • Micro-Scaling via Adapters: Instead of scaling up massive foundation models, MoE can be applied at the adapter level. This allows individual adapters to specialize in distinct aspects of person characteristics (e.g., upper body vs. accessories) without increasing active parameter counts during inference.
  • Prompt-Guided Routing: Purely data-driven routing can lead to imbalances. Injecting domain-specific prompts directly into the routing function guides the model to make smarter, context-aware expert selections.
  • Mitigating Overfitting: On smaller datasets like RSTPReid, heavy full-model fine-tuning methods (like CFine) overfit and generalize poorly. Freezing the backbone and tuning a sparse mixture of adapters acts as a powerful regularizer, preserving CLIP's robust zero-shot capabilities while sharpening its domain performance.

Key Results

DM-Adapter achieves an optimal trade-off between performance and parameter efficiency, outperforming both previous PETL methods and massive full-fine-tuned models.

Figure 2: Comparison with CLIP-based methods. Our ap- proach achieves the best trade-off between performance and parameter efficiency.
  • CUHK-PEDES: DM-Adapter achieves a 72.17% Rank-1 accuracy and 64.33% mAP, outperforming the previous PETL state-of-the-art (CSKT) by +2.47% Rank-1 while training only 16M parameters.
  • RSTPReid: On this smaller dataset, DM-Adapter outperforms the full-model fine-tuned method CFine by a massive absolute margin of +9.45% Rank-1, demonstrating superior generalization.
  • Memory Efficiency: During training (with a batch size of 32), DM-Adapter requires only 2,952M of memory, compared to 7,034M for IRRA and 13,570M for CFine.

Limitations and Future Work

The authors note that the model's capacity cannot grow indefinitely; increasing the number of expert adapters ($n$) beyond 6 actually led to a decrease in retrieval performance. This indicates that the total number of experts must be carefully aligned with the scale of the training data to prevent sub-optimal routing.

Other explicit limitations or specific avenues for future work are not discussed in the paper.

Summary updated

Abstract

Text-based person retrieval (TPR) has gained significant attention as a fine-grained and challenging task that closely aligns with practical applications. Tailoring CLIP to person domain is now a emerging research topic due to the abundant knowledge of vision-language pretraining, but challenges still remain during fine-tuning: (i) Previous full-model fine-tuning in TPR is computationally expensive and prone to overfitting.(ii) Existing parameter-efficient transfer learning (PETL) for TPR lacks of fine-grained feature extraction. To address these issues, we propose Domain-Aware Mixture-of-Adapters (DM-Adapter), which unifies Mixture-of-Experts (MOE) and PETL to enhance fine-grained feature representations while maintaining efficiency. Specifically, Sparse Mixture-of-Adapters is designed in parallel to MLP layers in both vision and language branches, where different experts specialize in distinct aspects of person knowledge to handle features more finely. To promote the router to exploit domain information effectively and alleviate the routing imbalance, Domain-Aware Router is then developed by building a novel gating function and injecting learnable domain-aware prompts. Extensive experiments show that our DM-Adapter achieves state-of-the-art performance, outperforming previous methods by a significant margin.
BibTeX
@inproceedings{liu2025dm,
  author = {Yating Liu and Zimo Liu and Xiangyuan Lan and Wenming Yang and Yaowei Li and Qingmin Liao},
  title = {{DM-Adapter: Domain-Aware Mixture-of-Adapters for Text-Based Person Retrieval}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i6.32608},
}
Figure