Hierarchical Federated Domain Generalization
- HFedDG is a federated learning framework with a multi-tier hierarchy that aggregates localized client updates to tackle domain shift.
- It employs techniques like optimal transport alignment and semantic calibration to preserve cross-domain semantics and enhance performance on unseen domains.
- Empirical studies in medical imaging and vision benchmarks validate HFedDG’s ability to reduce drift, improve generalization, and maintain privacy.
Searching arXiv for recent HFedDG and closely related papers to ground the article in the literature. Hierarchical Federated Domain Generalization (HFedDG) denotes a federated learning scenario and design pattern in which domain generalization is pursued within a multi-tier or explicitly hierarchical federation architecture rather than a single-server topology. In this setting, raw data remain localized, aggregation is performed across multiple levels, and the learned hypothesis is intended to generalize to target domains never seen during training. Recent work uses the term in two closely related senses: as a formal problem setting for hierarchical federations with stations or intermediate aggregators, and as a substantive methodological property of systems whose training, dissemination, or inference procedures are organized hierarchically to reduce domain shift and preserve cross-domain generalization under privacy constraints (Nguyen et al., 7 Aug 2025, Song et al., 21 Oct 2025).
1. Definition and problem setting
HFedDG was formally introduced as “a novel scenario designed to investigate domain shift within hierarchical architectures” (Nguyen et al., 7 Aug 2025). In that formulation, the federation contains a central server, a middle tier of aggregating stations, and clients assigned to exactly one source domain. Stations aggregate only model updates, not raw data, and the server seeks a hypothesis that generalizes to target domains never seen during training (Nguyen et al., 7 Aug 2025). This extends classic single-server Federated Domain Generalization (FedDG) by introducing explicitly hierarchical communication while preserving the data-free constraints of domain generalization.
The broader FDG setting from which HFedDG emerges assumes multiple source domains with decentralized data, no target-domain access during training, non-IID distributions, and privacy preservation via federated training (Li et al., 2023). In the survey formulation, the FDG goal is to learn a model trained solely on multi-source federated data that minimizes prediction error on unseen target domains (Li et al., 2023). HFedDG inherits this objective but adds multi-level aggregation, thereby making intra-group and inter-group heterogeneity first-class concerns.
A second, more architectural use of the term appears in systems that do not explicitly name an external framework “HFedDG” but embody hierarchy in topology, aggregation, dissemination, or inference. TreeFedDG is described in exactly this way: it is “in substance, a hierarchical federated DG approach” because the hierarchy is used both in training and inference (Song et al., 21 Oct 2025). CSAC similarly “naturally instantiates HFedDG” through layer-by-layer semantic aggregation and cross-layer calibration, even though the paper does not explicitly define HFedDG (Yuan et al., 2021). FedPartWhole is presented as “precisely a hierarchical FDG approach” because it encodes explicit part–whole hierarchies in the backbone and integrates them into federated optimization (Radwan et al., 2024).
This dual usage suggests that HFedDG is both a formal hierarchical extension of FedDG and a family resemblance among methods that use hierarchy to confront domain shift under federation. A plausible implication is that the term now spans topology-level hierarchy, representation-level hierarchy, and aggregation-level hierarchy, provided the end objective remains generalization to unseen domains without raw-data sharing.
2. Sources of hierarchy and domain shift
The central motivation for HFedDG is that standard federated averaging is brittle when heterogeneity is structured across multiple levels. In the formal HFedDG setting, even after effective local DG at clients, “residual inter-station discrepancies remain because convolutional filters learned at different stations are arbitrarily ordered and linear layers encode station-specific correlations” (Nguyen et al., 7 Aug 2025). Naive hierarchical averaging is therefore “semantically destructive and is insufficient under domain shift” (Nguyen et al., 7 Aug 2025).
In medical imaging, TreeFedDG identifies a related but differently operationalized failure mode: global drift in federated domain generalization for medical imaging (FedDG-GD) (Song et al., 21 Oct 2025). The stated cause is severe cross-silo heterogeneity arising from differences in hardware, acquisition protocols, and patient populations; standard aggregation can push the global model away from an “ideal” direction that would generalize to unseen domains (Song et al., 21 Oct 2025). TreeFedDG operationalizes drift through parameter-space divergence measured by cosine similarity of client parameters and through cross-site performance inconsistency measured by the standard deviation of Dice on unseen sites (Song et al., 21 Oct 2025).
The theoretical formulation in HFedATM makes this multi-level heterogeneity explicit. The paper extends single-server DG bounds to hierarchical settings using client risk terms together with intra-station breadths and divergences and inter-station breadth and divergence terms (Nguyen et al., 7 Aug 2025). After good local DG, these hierarchical terms dominate the target-risk bound, which directly motivates aggregation methods designed to reduce them (Nguyen et al., 7 Aug 2025).
Earlier FDG literature had already cataloged the underlying ingredients of this problem: feature shift, label shift, domain shift, privacy constraints, communication efficiency, and the tension between personalization and generalization (Li et al., 2023). HFedDG adds the hierarchical implication that such heterogeneity can be nested. The survey explicitly notes that multi-level heterogeneity, imbalanced domain sizes across edges, and straggler effects become salient once an edge–cloud or multi-tier organization is considered (Li et al., 2023).
A different conception of hierarchy appears in CSAC and FedPartWhole. In CSAC, hierarchy refers to semantic strata across network depth: lower and higher layers encode different semantic levels, and domain shift can produce “semantic dislocation,” meaning that corresponding semantic content may reside at different layers across domains (Yuan et al., 2021). In FedPartWhole, hierarchy is a property of the object representation itself: objects are assumed to preserve a part–whole organization across domains, and that stable structure is used to support out-of-domain generalization (Radwan et al., 2024). These works show that HFedDG is not restricted to network topology; hierarchy may instead be semantic or architectural, provided it is operationalized under federated constraints.
3. Core methodological patterns
Recent HFedDG methods organize around several recurrent mechanisms: similarity-aware aggregation, semantically aligned aggregation, hierarchy-aware dissemination or personalization, and hierarchical inference or representation learning.
A concise comparison is useful.
| Method | Primary hierarchical mechanism | Domain-shift mitigation mechanism |
|---|---|---|
| HFedATM | Server–station–client hierarchy | FOTA + SRMA |
| TreeFedDG | Tree-structured topology | Hierarchical parameter aggregation + FedStyle + progressive fusion + chain ensemble |
| CSAC | Layer-wise semantic hierarchy | Divergence-weighted semantic aggregation + cross-layer semantic calibration |
| FedPartWhole | Part–whole representation hierarchy | CCNet with BU/TD/Attention and multi-level heads |
| FedDAG | Two-level hierarchical aggregation | SHA + NDAG |
HFedATM is a two-stage server-side scheme that first performs Filter-wise Optimal Transport Alignment (FOTA) and then Shrinkage-aware Regularized Mean Aggregation (SRMA) (Nguyen et al., 7 Aug 2025). FOTA addresses the fact that convolutional filter indices are arbitrary across stations, so index-wise means can mix unrelated visual primitives. Filters are flattened, -normalized, compared through a squared Euclidean cost matrix, and aligned via an optimal transport problem over the Birkhoff polytope, optionally with entropic regularization (Nguyen et al., 7 Aug 2025). Convolutional layers are then aggregated by weighted means, while linear layers use Gram-based, shrinkage-regularized least squares that incorporate second-order activation geometry without requiring raw data (Nguyen et al., 7 Aug 2025).
TreeFedDG replaces the star topology with a tree-structured hierarchy whose leaf nodes preserve client-specific features, intermediate nodes capture shared knowledge among similar clients, and the root carries global, cross-domain features (Song et al., 21 Oct 2025). A node tree is constructed by bottom-up clustering and aggregation based on parameter cosine similarity, using a layer-dependent threshold
Singletons are promoted unchanged when no suitable cluster is found, and the root model is updated from the last level’s aggregation (Song et al., 21 Oct 2025). During distribution, progressive personalized fusion partitions parameters into fixed and variable layers and fuses the variable part with a level-decayed coefficient
so fusion is stronger near the root and weaker near leaves (Song et al., 21 Oct 2025).
CSAC approaches hierarchical FDG through semantic levels within the network. Its server performs data-free layer-wise aggregation
followed by divergence-weighted fusion
where the distance is empirically (Yuan et al., 2021). Clients then calibrate the broadcast model through cross-layer alignment with attention weights that combine position-wise and channel-wise similarities and use MMD as the discrepancy term (Yuan et al., 2021). The method alternates semantic aggregation and semantic calibration.
FedPartWhole shifts the focus from aggregation to the backbone. Its Cortical Columns Network represents an image by a hierarchy of columns and levels, with Bottom-Up, Top-Down, Identity, and Attention modules producing multi-level embeddings (Radwan et al., 2024). Initialization uses SAM-generated multi-level segmentation masks embedded by a lightweight MaxViT encoder to set (Radwan et al., 2024). The hierarchy is thus encoded directly in the representation, and the backbone is used with standard FL algorithms such as FedAvg, FedProx, RSC, and Scaffold (Radwan et al., 2024).
FedDAG introduces a two-level hierarchical aggregation design called Sharpness-aware Hierarchical Aggregation (SHA) (Che et al., 22 Jan 2025). Within-client aggregation averages the current task model with selected historical models whose generalization scores exceed a threshold, while across-client aggregation weights clients by sharpness-based scores derived from SAM-style perturbations and cross-client validation loss (Che et al., 22 Jan 2025). These aggregation mechanisms are coupled to Novel Domain Adversarial Generation (NDAG), which generates style-shifted images through perturbations
and trains invariant task representations by minimizing feature discrepancy between original and generated images (Che et al., 22 Jan 2025).
Across these methods, a consistent theme is that hierarchy is used to avoid indiscriminate averaging. Whether the object of alignment is filter order, parameter direction, semantic layer, part–whole structure, or historical model trajectory, HFedDG systems are designed to merge only what is semantically or statistically compatible.
4. Training, dissemination, and inference workflows
HFedDG training typically decomposes into local optimization, one or more intermediate aggregation stages, and a hierarchy-aware redistribution step. In the formal HFedATM workflow, clients receive the current global model, train locally for 0 epochs using any FedDG-compatible method such as FedAvg, FedProx, FedSR, or FedIIR, and send model weights to their station together with per-layer Gram matrices computed from the last mini-batch of the last local epoch (Nguyen et al., 7 Aug 2025). Stations aggregate client models, average Gram matrices, apply diagonal shrinkage, and forward station models plus shrunk Gram matrices to the server (Nguyen et al., 7 Aug 2025). The server performs FOTA, convolutional weighted averaging, and SRMA for linear layers, then broadcasts the assembled global model (Nguyen et al., 7 Aug 2025).
TreeFedDG’s communication round executes local training for 1 epochs, bottom-up clustering and aggregation across levels up to 2, and top-down dissemination with progressive fusion (Song et al., 21 Oct 2025). The implementation uses 100 rounds, local epochs 3, and maximum tree depth 4 (Song et al., 21 Oct 2025). TreeFedDG also incorporates FedStyle, a parameter-difference-based style mixing method. For client 5, the paired client 6 is chosen by minimizing parameter cosine similarity:
7
Feature statistics are mixed with 8, 9, activated with probability 0.5 per forward pass, disabled at test time, and implemented without additional loss terms (Song et al., 21 Oct 2025).
Inference becomes a distinctive stage in some HFedDG systems. TreeFedDG performs feature-similarity-guided retrieval using a frozen pretrained ResNet-18 encoder and aggregated feature descriptor
0
It selects the most similar source domain, retrieves the corresponding leaf-to-root model chain, and ensembles along that chain through weighted pixel-wise voting
1
with exponentially decayed level weights emphasizing lower levels (Song et al., 21 Oct 2025). This makes hierarchy an inference-time asset rather than merely a training-time convenience.
CSAC likewise alternates server and client roles, but the critical redistribution phase is semantic calibration rather than personalization. The fused model is broadcast, copied locally, and optimized per client with
2
where 3 is the attention-weighted cross-layer MMD alignment loss and 4 is an auxiliary retraining cross-entropy term used to mitigate catastrophic forgetting (Yuan et al., 2021).
FedDAG adds a teacher–student–generator local loop. For each mini-batch, the client generates perturbed images, updates the generator by minimizing classification loss minus capped discrepancy, updates the student by minimizing classification loss plus discrepancy, and updates the teacher by EMA of the student (Che et al., 22 Jan 2025). The server then evaluates sharpness-based scores, performs within-client dense averaging over historical models, aggregates globally using soft balancing weights, and broadcasts the global task model to students and the global generator to clients (Che et al., 22 Jan 2025).
These workflows indicate that HFedDG often decouples hierarchy across phases: bottom-up during aggregation, top-down during redistribution, and path-based or multi-head during inference. This suggests a systematic departure from flat FL pipelines in which aggregation alone carries the full burden of coordination.
5. Empirical results and evaluation practices
Evaluation in HFedDG closely follows FedDG conventions, especially leave-one-domain-out or held-out-site protocols, but the reported gains depend on the modality and on which component of hierarchy is being exploited.
TreeFedDG was evaluated on fundus retinal image segmentation and prostate multi-site MRI segmentation under leave-one-domain-out settings, with each source domain treated as one federated client at a leaf (Song et al., 21 Oct 2025). Using a lightweight U-Net backbone, PyTorch 2.4, Ubuntu 22.04, 5× NVIDIA RTX 4090 GPUs, batch size 8, learning rate 5, 6, 7, and 8, it achieved average Dice 88.29 and average HD95 13.03 on fundus, and Dice 90.35 and HD95 7.43 on prostate MRI (Song et al., 21 Oct 2025). Performance consistency across unseen sites was also emphasized through Dice standard deviation: 1.98 for fundus optic disc, 3.51 for optic cup, and 1.64 for prostate MRI, which the paper interprets as evidence of reduced drift and better cross-domain balance (Song et al., 21 Oct 2025).
HFedATM evaluated hierarchical DG across both vision and NLP: PACS, Office-Home, TerraInc, and Amazon Reviews, using LeNet-5, ResNet-18, VGG-11, RoBERTa-base, and DeBERTa-base (Nguyen et al., 7 Aug 2025). The hierarchy contained 10 stations and 100 clients, all active each round, with heterogeneity controlled by 9 (Nguyen et al., 7 Aug 2025). The method consistently improved over naive station-server averaging. Examples reported for 0 include PACS with FedSR +Avg at 84.1/80.9/83.6/73.4 versus +HFedATM at 87.7/84.4/86.6/76.7, Office-Home with FedIIR +Avg at 69.4/57.3/49.7/74.8 versus +HFedATM at 73.5/60.7/53.5/78.7, and Amazon Reviews with FedAvg +Avg at 70.3–69.5 versus +HFedATM at 78.1–78.9 (Nguyen et al., 7 Aug 2025). With stronger backbones, improvements persisted: ResNet-18 with FedSR rose from 89.4 to 92.8 on PACS, 78.6 to 81.9 on Office-Home, and 52.7 to 56.5 on TerraInc; DeBERTa-base with FedSR rose from 77.3 to 81.2 (Nguyen et al., 7 Aug 2025).
CSAC reported leave-one-domain-out results on PACS, VLCS, Rotated MNIST, and Office-Caltech-Home (Yuan et al., 2021). On PACS with ResNet-18, CSAC obtained 83.81 ± 0.33, compared with 82.36 ± 0.44 for FedAvg and 82.15 ± 0.35 for FedDG (Yuan et al., 2021). On VLCS, results were 73.40 ± 0.17 with AlexNet and 76.18 ± 0.42 with ResNet-18; on Rotated MNIST, CSAC achieved 94.07 ± 0.02, exceeding FedAvg at 92.65 ± 0.08 and FedDG at 88.60 ± 0.30 (Yuan et al., 2021). Runtime analyses showed modest overhead over FedAvg but much lower cost than FedDG, which relied on a distribution bank (Yuan et al., 2021).
FedPartWhole evaluated its CCNet backbone on PACS and VLCS under leave-one-domain-out training, with 5 local epochs per round, batch size 256, Lion optimizer, and 10 communication rounds (Radwan et al., 2024). Under FedAvg, the CNN backbone achieved PACS average 54.98% and VLCS average 67.68%, whereas CCNet achieved 75.73% and 71.74%; analogous improvements were also reported for AM, FedProx, RSC, and Scaffold (Radwan et al., 2024). A head ablation on PACS showed gains from 72.41% with one head to 75.725% with three heads (Radwan et al., 2024).
FedDAG reported weighted AUC, F1, and ACC on WILDS-Camelyon17, MIDOG2022, GDRBench, and FLamby-ISIC2019 under leave-one-domain-out FedDG protocols (Che et al., 22 Jan 2025). The reported average AUC improvements over FedAvg were +5.3% on Camelyon17 (96.1 vs 90.8), +4.3% on MIDOG2022 (80.8 vs 76.5), and +8.1% on GDRBench (78.3 vs 70.2) (Che et al., 22 Jan 2025). The paper also states that performance gains were especially notable on hospitals with real domain shifts in FLamby-ISIC2019 (Che et al., 22 Jan 2025).
Across these studies, common evaluation practices include held-out-domain testing, architecture-matched comparisons to FedAvg or hierarchical averaging baselines, and ablations that isolate the contribution of the hierarchical mechanism. A plausible implication is that HFedDG is increasingly evaluated not only by mean performance but also by cross-domain balance, robustness to shift severity, and overhead relative to flat alternatives.
6. Relation to adjacent areas, limitations, and open questions
HFedDG intersects with several established research areas but is not reducible to any one of them. Relative to conventional HFL, its defining concern is unseen-domain generalization rather than only scalability, robustness, or mitigation of optimization drift (Nguyen et al., 7 Aug 2025). Relative to standard FedDG, it adds multi-level aggregation, intermediate discrepancies, and new failure modes such as semantic destruction under station-level averaging or global drift under cross-domain parameter merging (Nguyen et al., 7 Aug 2025, Song et al., 21 Oct 2025). Relative to architecture-centric DG, it permits hierarchy to reside in the representation itself, as in part–whole parse-tree modeling (Radwan et al., 2024).
The survey perspective places these developments within broader FDG taxonomies: federated domain alignment, data manipulation, learning strategies, and aggregation optimization (Li et al., 2023). HFedATM most directly extends aggregation optimization with data-free alignment and regularized mean aggregation; TreeFedDG combines aggregation optimization with data manipulation through FedStyle and with personalized dissemination; CSAC blends semantic aggregation with alignment; FedDAG couples adversarial generation to sharpness-aware aggregation; FedPartWhole alters the backbone rather than the optimizer (Nguyen et al., 7 Aug 2025, Song et al., 21 Oct 2025, Yuan et al., 2021, Che et al., 22 Jan 2025, Radwan et al., 2024).
Several limitations recur. HFedATM assumes homogeneous architectures across clients and stations, and extending it to heterogeneous models is stated as future work (Nguyen et al., 7 Aug 2025). TreeFedDG notes sensitivity to the threshold schedule 1, the quality of cosine-similarity-based clustering, the design-dependent split between fixed and variable layers, and the absence of formal guarantees on directional preservation (Song et al., 21 Oct 2025). CSAC does not provide formal convergence or generalization guarantees and assumes aligned architectures and layer semantics (Yuan et al., 2021). FedPartWhole depends on the quality of SAM-based hierarchical initialization and acknowledges that noisy masks or non-object-centric scenes can weaken the part–whole prior (Radwan et al., 2024). FedDAG highlights generator-capacity limits, the communication overhead of cross-client evaluation for sharpness scoring, and sensitivity to the perturbation hyperparameter 2 (Che et al., 22 Jan 2025).
Privacy is preserved in the basic federated sense across these systems—no raw images are exchanged—but stronger protections vary. HFedATM explicitly discusses optional clipping and Gaussian noise on Gram matrices to ensure 3-DP and reports less than 2% drop for 4 (Nguyen et al., 7 Aug 2025). TreeFedDG states that it does not exchange raw images and that FedStyle uses only feature statistics with gradients blocked for those statistics, aligning privacy with standard FL assumptions (Song et al., 21 Oct 2025). CSAC and FedPartWhole do not implement DP or secure aggregation, and CSAC explicitly notes that transmitting only models does not eliminate possible parameter leakage risks (Yuan et al., 2021, Radwan et al., 2024).
Open questions follow directly from the current literature. One concerns theory: HFedATM provides tighter generalization-error bounds and contraction arguments, but other HFedDG variants largely rely on empirical validation (Nguyen et al., 7 Aug 2025). Another concerns adaptive hierarchy construction: TreeFedDG suggests that learning thresholds or optimizing topology could further reduce drift (Song et al., 21 Oct 2025). A third concerns heterogeneous architectures and multimodality, particularly for transformer-dominated settings where convolutional alignment is less relevant and representation-level hierarchy may be more natural (Nguyen et al., 7 Aug 2025, Radwan et al., 2024). Finally, the survey’s broader agenda—communication efficiency, privacy–utility trade-offs, continual generalization, and balancing personalization against OOD robustness—acquires an additional hierarchical dimension under HFedDG (Li et al., 2023).
Taken together, the literature indicates that HFedDG is evolving from an implicit design intuition into a more explicit research program. Its unifying principle is that, under federated domain shift, hierarchy is not merely a systems convenience; it is a mechanism for preserving semantics, controlling drift, and structuring generalization to unseen domains.