GGDSM: Gain-guided Dynamic Style Memory
- The paper introduces GGDSM, a memory mechanism that screens generated styles based on improvements in the global model's Rank-1 performance.
- GGDSM employs a momentum-based update for client-specific memories, ensuring only beneficial style features are retained and reused.
- Integrating with Collaborative Style Training, GGDSM optimizes both new adaptation and continuous style utilization to boost re-ID accuracy.
Searching arXiv for the cited paper and closely related context. Generalization Gain-guided Dynamic Style Memory (GGDSM) is a memory mechanism introduced within the Style Screening and Continuous Utilization (SSCU) framework for Federated Domain Generalization person re-identification (FedDG-ReID). Its purpose is to screen generated styles according to whether they improve the global model’s generalization performance, accumulate only the styles judged beneficial, and make those styles continuously available during subsequent training. In the formulation of SSCU, generated styles are not assumed to be uniformly useful: styles that increase the global model’s generalization ability are treated as positive styles, whereas styles that do not improve or degrade generalization are treated as negative styles. GGDSM operationalizes this distinction by using round-level improvement in the server model’s Rank-1 performance as the admission criterion for memory updates, thereby coupling style accumulation to measured generalization gain rather than to style generation alone (Xu et al., 22 Jul 2025).
1. Conceptual role within SSCU
GGDSM addresses a specific limitation in prior style-based FedDG-ReID pipelines: existing methods improve sample diversity through style transformation, but they implicitly treat all generated styles as beneficial. SSCU rejects that assumption and instead distinguishes between generated styles that help generalization and those that do not. In this setting, positive styles are generated styles that increase the global model’s generalization performance, while negative styles are generated styles that fail to improve or actively degrade it (Xu et al., 22 Jul 2025).
The framework-level rationale is procedural. Traditional methods discard generated styles after each communication round. SSCU instead evaluates the aggregated global model after each round; if performance improves, the styles generated in that round are treated as positive styles and stored, whereas non-improving styles are discarded. This establishes GGDSM as a selective retention mechanism rather than a passive replay buffer. A plausible implication is that GGDSM converts transient augmentation outputs into a cumulative repository of historically validated style information.
Within SSCU, GGDSM is not an isolated module. It is paired with a style memory recognition loss and a Collaborative Style Training (CST) strategy. The combined design ensures that style screening, accumulation, and reuse are parts of a single training loop rather than separate heuristics (Xu et al., 22 Jul 2025).
2. Generalization gain and the screening criterion
The paper does not introduce a separate explicit scalar formula named “generalization gain,” but it defines the screening process procedurally. In each round, clients train locally using generated styles, the server aggregates the client-global models, the aggregated global model is evaluated, and the current evaluation is compared with that of the previous round. The key indicator of generalization capability is the Rank-1 performance of the global model (Xu et al., 22 Jul 2025).
The operational criterion is:
where is the previous round’s Rank-1 and is the current round’s Rank-1. Conversely, if Rank-1 does not increase, the current round’s generated styles are treated as negative. The underlying equivalence is stated directly:
An important property of this rule is that the judgment is made at the round level rather than per image. Styles generated during a round are collectively admitted or rejected based on whether the server-side evaluation improves. This means GGDSM treats the style set of a communication round as the unit of generalization attribution. This suggests that the memory stores styles validated by end-to-end federated optimization and aggregation, not merely by local reconstruction or augmentation quality (Xu et al., 22 Jul 2025).
3. Memory structure, initialization, and update dynamics
GGDSM maintains a separate memory for each client, with no interaction between the memories of different clients. Each client memory stores category prototypes for each identity. For client , the memory is
where is the number of pedestrian identities on client (Xu et al., 22 Jul 2025).
Before training begins, a pretrained global model extracts features from all training samples on a client, and those features are averaged by identity to initialize the memory. The initialization is written as
$M_k^i = \frac{1}{n_k^i} \sum_{x \in X_k^i} f_{\text{pretrain}(x) \tag{1}$
where 0 is the set of all images of identity 1 on client 2, 3 is the number of images in that set, and 4 is the category prototype for identity 5. The source text notes obvious LaTeX or typographical corruption in this equation, but the intended operation is identity-wise prototype initialization from a pretrained model (Xu et al., 22 Jul 2025).
For an input image 6, the stylization model 7 of client 8 generates a stylized image
9
and the stylized features used for memory update are denoted in Algorithm 1 as
0
that is, the 1-normalized features extracted by the client-global model from stylized batches (Xu et al., 22 Jul 2025).
Memory updates are momentum-based:
2
where 3 denotes all images of identity 4 in the mini-batch on client 5, 6 is the client-global model, 7 denotes 8-normalization, and 9 is the momentum coefficient. The memory prototype is therefore not replaced outright; instead, it is gradually updated toward newly validated stylized features. The paper emphasizes that this supports continuous accumulation of positive styles, implicit expansion of training samples, and mitigation of limited local data (Xu et al., 22 Jul 2025).
The update is conditional rather than continuous. If the round does not improve the global Rank-1, then the styles are discarded and the memory is not updated. GGDSM is therefore a gated memory in the precise sense that admission is controlled by server-side generalization improvement (Xu et al., 22 Jul 2025).
4. Style memory recognition loss
To exploit the memorized positive styles, SSCU introduces a style memory recognition loss. Its stated motivation is that cross-entropy alone focuses too much on correct identity classification and may cause overfitting to particular styles. The proposed loss instead maximizes similarity with the correct prototype while minimizing similarity with the other prototypes, encouraging style-robust representations (Xu et al., 22 Jul 2025).
For an image 0 and client memory 1 containing 2 identities, the loss is
3
where 4 is the model to be optimized, 5 is the prototype for identity 6, and 7 is a temperature factor. Similarity is computed by a dot product between the normalized feature and the prototype (Xu et al., 22 Jul 2025).
The loss is instantiated on two branches:
8
9
and then combined as
0
This two-branch formulation makes the memory usable by both client-local and client-global models. A plausible implication is that the memory acts as an identity-conditioned style regularizer across local and federated representations, rather than as a purely auxiliary classification target (Xu et al., 22 Jul 2025).
5. Interaction with Collaborative Style Training
GGDSM is tightly coupled to SSCU’s Collaborative Style Training (CST), which uses both newly generated styles and accumulated positive styles. CST contains two parallel branches: New Style Adaptation (NSA) and Positive Style Continuous Utilization (PSCU) (Xu et al., 22 Jul 2025).
In NSA, original images are stylized and fed into the client-global model. The optimization objective is the sum of cross-entropy loss and triplet loss:
1
where 2 is the client-specific classifier and 3 is the identity label (Xu et al., 22 Jul 2025).
In PSCU, the system uses the untransformed original images 4 together with the memory prototypes 5. Both the client-local and client-global models are trained with the style memory recognition loss defined above. Conceptually, the division of labor is explicit: NSA handles rapid adaptation to newly generated styles, GGDSM screens and stores the beneficial styles, and PSCU continuously reuses them (Xu et al., 22 Jul 2025).
The coupling is central to the meaning of GGDSM. Without CST, GGDSM would only filter and store styles; with CST, the stored positive styles are integrated into ongoing optimization. The paper therefore frames GGDSM not merely as a storage structure, but as the memory component of a broader style accumulation-and-reuse pipeline.
6. Training procedure and optimization pathway
Algorithm 1 specifies the client–server workflow in which GGDSM operates. Each client first initializes its memory,
6
using the server model. Then, for each communication round 7, the server distributes the server model to each client; each client samples a batch 8, generates a stylized batch
9
trains the client-global model with the new-style adaptation objective,
0
trains both client-global and client-local models with the positive-style utilization objective,
1
and extracts stylized features,
2
The server then aggregates client-global models as
3
evaluates the aggregated model, and updates the client memories only if Rank-1 improves:
4
The paper does not explicitly print a single weighted combined objective in the provided text, but the algorithm indicates sequential application of 5 and then 6. Accordingly, the client-side optimization can be summarized as optimizing 7 and 8 using 9, with 0 operating on stylized data and 1 operating on original data and memory prototypes (Xu et al., 22 Jul 2025).
A key procedural point is that the memory update occurs after server aggregation and evaluation, not during every local mini-batch step. This differentiates GGDSM from ordinary online prototype updates and makes the memory dependent on federated generalization feedback rather than only on local training dynamics (Xu et al., 22 Jul 2025).
7. Empirical behavior, implementation profile, and interpretation
The paper characterizes GGDSM as lightweight. The memory stores only category prototypes, there is no inter-client memory exchange, the update is a momentum average, and the recognition loss is prototype-based. Relative to style generation and standard ReID training, the added overhead is therefore described as minimal (Xu et al., 22 Jul 2025).
The implementation details reported for SSCU are: backbone same network as DACS; epochs 60; batch size 64; initial learning rate 1e-3; weight decay 5e-4; momentum 0.9; MultiStepLR scheduler with milestones at epochs 20 and 40; framework Python 3.9 and PyTorch 2.1.0; hardware two Nvidia RTX-2080Ti GPUs (Xu et al., 22 Jul 2025).
The ablation study directly supports the memory accumulation mechanism. On the protocol MS+C2+C3→M, the reported results are: Baseline 20.8 mAP / 51.9 Rank-1; Baseline + PSCU 33.6 / 61.3; Baseline + NSA 36.2 / 63.9; Baseline + NSA + PSCU 39.5 / 66.4. On M+C2+C3→MS, the results are: Baseline 6.1 / 20.7; +PSCU 7.5 / 22.6; +NSA 7.9 / 24.7; +NSA+PSCU 11.9 / 32.3. These comparisons show that both branches help, that the memory branch alone yields a substantial gain, and that the combination performs best (Xu et al., 22 Jul 2025).
The main leave-one-out evaluation also reports the best average performance for SSCU. For MS+C2+C3 → M, SSCU achieves 39.5 mAP / 66.4 Rank-1, compared with DACS at 36.3 / 61.2. For M+C2+C3 → MS, SSCU reports 11.9 / 32.3, compared with DACS at 10.4 / 27.5. For M+C2+MS → C3, SSCU reports 32.8 / 34.1, compared with DACS at 30.7 / 34.1. Averaged over three unseen domains, SSCU reaches 28.1 mAP / 44.3 Rank-1, compared with DACS at 25.8 / 40.9 (Xu et al., 22 Jul 2025).
The paper also reports source-domain recognition performance, emphasizing that DG methods often prioritize target generalization while overlooking source performance. SSCU reports 73.0 / 88.7 on M, 84.9 / 83.9 on C2, and 50.4 / 53.2 on C3, outperforming DACS on each of those source-domain evaluations (Xu et al., 22 Jul 2025).
Finally, the visualization evidence in Fig. 3 is used to motivate GGDSM directly: some generated styles lose substantial detail and are labeled as negative styles, whereas positive styles preserve detail and improve performance; when styles are screened and memorized, the model recovers more quickly from performance drops than methods that discard all styles. The paper interprets this as evidence that generalization-gain-guided screening is necessary. More broadly, the reported results suggest that GGDSM improves generalization by filtering harmful styles, accumulating beneficial stylistic diversity across rounds, and enabling persistent reuse of validated styles rather than treating augmentation outputs as disposable (Xu et al., 22 Jul 2025).