CMLReID: CLIP-Based Lifelong ReID
- The paper introduces CMLReID, a novel CLIP-based framework that jointly addresses same-clothing and clothing-change scenarios under lifelong learning.
- It employs Context-Aware Semantic Prompt and Adaptive Knowledge Fusion modules to adapt visual-text representations and mitigate catastrophic forgetting.
- Experimental results show significant improvements in mAP and Rank-1 accuracy across multiple ReID datasets, demonstrating robust intra- and inter-domain generalization.
CMLReID is a CLIP-based framework for lifelong person re-identification under hybrid clothing conditions, introduced for the LReID-Hybrid task, where a model must handle both same-clothing (SC) and clothing-change (CC) cases while learning sequentially across tasks without catastrophic forgetting (Long et al., 14 Sep 2025). The formulation addresses a gap in prior practice: previous existing methods either develop models specifically for one application, which is mostly a same-cloth setting, or treat CCReID as its own separate sub-problem. CMLReID targets mismatched representations and forgetting through two modules, Context-Aware Semantic Prompt (CASP) and Adaptive Knowledge Fusion and Projection (AKFP), with the stated goal of robust performance on seen domains and generalization to unseen SC/CC datasets (Long et al., 14 Sep 2025).
1. LReID-Hybrid task formulation
The LReID-Hybrid setting is defined over a continual stream of ReID tasks indexed by . At step , the model observes a labeled dataset
where is the -th person image, is its identity label, and indicates clothing state (Long et al., 14 Sep 2025). In this formulation, SC means the identity has not changed outfit versus its gallery images, whereas CC means the person is in different attire.
The lifelong objective is to learn sequentially on and then perform ReID robustly on all seen domains while also generalizing to unseen SC/CC datasets, without catastrophic forgetting (Long et al., 14 Sep 2025). This definition is significant because it turns SC and CC from isolated evaluation regimes into a joint continual-learning problem. A plausible implication is that hybrid clothing-state ReID is treated not merely as a robustness issue, but as a domain-sequential representation learning problem.
2. Core architecture
CMLReID builds upon CLIP, using a Vision Transformer (ViT-B/16) for images and a text encoder (Long et al., 14 Sep 2025). The architecture is organized as a two-stage pipeline.
In Stage A, the Context-Aware Semantic Prompt module first computes a visual embedding
0
A context encoder 1, described as a small MLP with self-attention, maps 2 to a context vector
3
Base semantic tokens 4 and dynamic tokens
5
are concatenated to form
6
and the text encoder produces
7
for cross-modal alignment (Long et al., 14 Sep 2025).
In Stage B, the Adaptive Knowledge Fusion and Projection module maintains slow-updated text prototypes for each clothing state 8: 9 The model also predicts a clothing-state distribution from the visual feature,
0
and applies two projection heads 1 and 2. The fused projection is
3
which is then aligned to the corresponding slow prototype 4 (Long et al., 14 Sep 2025).
Architecturally, the framework is multimodal in a strict sense: visual features are not merely paired with fixed text templates, but are used to generate adaptive prompts and state-specific projections. This suggests that CMLReID treats clothing-state variation as both a semantic alignment problem and a continual memory problem.
3. Context-Aware Semantic Prompt
CASP is designed to address multi-grained representation mismatches by conditioning the text prompt on visual context (Long et al., 14 Sep 2025). Its computations are
5
followed by
6
The role of CASP is not only to generate adaptive prompts, but also to incorporate context so as to align richly multi-grained visual cues with semantic text space (Long et al., 14 Sep 2025). Cross-modal alignment is encouraged by standard contrastive or classification losses between 7 and 8. The paper specifies that this allows 9 to adapt its semantic granularity, for example by focusing on clothing details for SC or on body-shape cues for CC (Long et al., 14 Sep 2025).
This design is important because SC and CC emphasize different discriminative signals. In SC, garment-specific information is often informative; in CC, such cues become unstable, making body-shape and other intrinsic identity traits more salient. CASP operationalizes this distinction at the prompt level rather than through separate models.
4. Adaptive Knowledge Fusion and Projection
AKFP comprises a dual-path slow learner, a state-conditioned fusion mechanism, and the Clothing-State-Aware Projection Loss (Long et al., 14 Sep 2025). For each state 0, the framework maintains a long-term prototype 1. At task iteration 2,
3
where 4 is a small momentum, with an example value 5, and 6 is the subset of the batch with state 7 (Long et al., 14 Sep 2025).
The state-aware fusion is followed by the projection loss
8
which is the average cosine-distance to the correct state prototype (Long et al., 14 Sep 2025). By slowly updating 9 across tasks and aligning each incoming fused projection 0 to the corresponding prototype, the network retains long-term, state-specific knowledge and resists overwriting earlier representations.
A recurrent misconception in continual learning is that robustness necessarily requires an explicit replay buffer. CMLReID explicitly states that no explicit replay buffer is needed; the slow-learner prototypes serve as implicit memory, and the small momentum 1 ensures stability against forgetting (Long et al., 14 Sep 2025). Within the framework’s own logic, the prototypes are therefore both semantic anchors and continual-learning memory states.
5. Optimization procedure and empirical results
Training follows an alternating optimization strategy (Long et al., 14 Sep 2025). The CASP stage, given as an example of 120 epochs, optimizes 2, 3, and 4 to produce high-quality 5. The AKFP stage, given as an example of 60 epochs, updates 6, 7, 8, and 9 using the refined 0 and prototypes 1.
The AKFP stage uses the joint loss
2
where 3 is cross-entropy on identity, 4 is a standard triplet loss with margin 5, and 6 balances the projection term (Long et al., 14 Sep 2025).
The evaluation protocol spans seen and unseen SC/CC domains, with mean Average Precision (mAP) and Rank-1 (R-1) as metrics, and six lifelong orders such as Market→LTCC→MSMT→PRCC (Long et al., 14 Sep 2025).
| Split | Datasets |
|---|---|
| Seen (training) SC | Market-1501, MSMT17 |
| Seen (training) CC | LTCC, PRCC |
| Unseen SC | CUHK01/02, GRID, SenseReID, PRID |
| Unseen CC | VC-Clothes, Celeb-ReID |
On Order 1, for the seen domains average, CMLReID achieves Total-Avg mAP 7 and R-1 8, outperforming the next best CLIP-ReID by about 9 percentage points in mAP and 0 percentage points in R-1 (Long et al., 14 Sep 2025). The framework is also reported to remain stable across all six learning orders, always exceeding baselines by about 1–2 percentage points in mAP, and on unseen SC/CC datasets it consistently exceeds baselines by 3–4 percentage points in mAP (Long et al., 14 Sep 2025).
Ablation results on Order 1 isolate the contribution of each major component.
| Variant | Tot-Avg mAP / R-1 |
|---|---|
| 5CASP (fixed prompts) | 6 |
| 7dynamic context in CASP | 8 |
| 9AKFP (single projection, no 0, no slow-learner) | 1 |
| %%%%66%%%%3 only | 4 |
| 5single prototype (no dual-path) | 6 |
These drops confirm each component’s necessity (Long et al., 14 Sep 2025). In interpretive terms, the ablation pattern indicates that prompt adaptation, state-aware projection, and slow prototype updates contribute complementary forms of robustness rather than redundant ones.
6. Position within ReID research and open directions
CMLReID belongs to a broader family of ReID methods that use memory structures, multimodal alignment, or contrastive objectives, but its defining contribution is the joint treatment of SC and CC in a continual setting. This can be clarified by comparison with adjacent lines of work represented in the contemporary literature.
Prototype-based memory has appeared in large-scale unsupervised ReID through Meta Clustering Learning, where a subset of unlabeled data is clustered, the resulting cluster centroids are treated as meta-prototypes, and the remaining data are softly annotated for further polishing (Jin et al., 2021). Multi-memory design has also been explored in unsupervised visible-infrared ReID: the MMM framework uses Cross-Modality Clustering, Multi-Memory Learning and Matching, and Soft Cluster-level Alignment, subdividing each identity into multiple sub-memories to establish cross-modality correspondences (Shi et al., 2024). Weakly supervised ReID has pursued a different route: CMIL learns from noisy bag-level labels with a single model, bag embeddings, and contrastive bag-level triplet losses, then discards the aggregator at test time and ranks crops via instance embeddings (Tyo et al., 2024). At the system level, spatio-temporal structuring has been used in multi-camera vehicle tracking through a trajectory-based Camera Link Model and temporal-attention ReID, where transition-time windows prune impossible cross-camera matches (Hsu et al., 2020).
Against this background, CMLReID’s distinctive formulation is not merely “multimodal” or “prototype-based.” It combines CLIP-derived visual-text alignment, context-conditioned prompt generation, clothing-state-aware projection, and implicit continual memory for hybrid SC/CC learning (Long et al., 14 Sep 2025). This suggests that its novelty lies in the coupling of semantic prompting and state-specific continual retention, rather than in any single component viewed in isolation.
The limitations and future directions stated for CMLReID are also specific. The context encoder’s accuracy in marginal cases, particularly ambiguous attire change, can be further improved (Long et al., 14 Sep 2025). Extending the framework to video sequences or adding other modalities such as pose and depth could enhance fine-grained discrimination, and reducing prompt-generation overhead or exploring prompt-efficiency through prompt expert mixtures may speed up inference (Long et al., 14 Sep 2025). These points indicate that the current formulation is best understood as a principled baseline for lifelong hybrid-clothing ReID rather than a closed solution to all clothing-variation and continual-learning scenarios.