## 4 Experiment Setup  
### DGA Datasets and Detection Models  
For the preparation of training AI models, we collected domain name datasets and organized them into two distinct categories. First is benign domains that were sourced from the Cisco Umbrella Top 1 Million list ([[http://s3-us-west-1.amazonaws.com/umbrella-static/index.html](http://s3-us-west-1.amazonaws.com/umbrella-static/index.html)]([http://s3-us-west-1.amazonaws.com/umbrella-static/index.html](http://s3-us-west-1.amazonaws.com/umbrella-static/index.html)), accessed on 8 March 2025), which contains the most frequently accessed and widely used domains on the Internet. The second is DGA domains--known as malicious domains gathered from open-source GitHub repositories ([[https://github.com/baderj/domain_generation_algorithms](https://github.com/baderj/domain_generation_algorithms)]([https://github.com/baderj/domain_generation_algorithms](https://github.com/baderj/domain_generation_algorithms)), tag version 1.0.0, accessed on  
Figure 4: Overview of the FedSAGE framework for federated client clustering and selection, the blue arrows represent the flow between steps, while the green arrows indicate the communication flow between devices. Each client \(i\) uses the VAEs to compute and infer the latent vector on their private data, then they send the latent mean vectors (\(\overline{\mu_{i}}\)) to the server. The server performs latent-space clustering to group clients with similar data distributions. Within each cluster, a resource-aware client selection strategy chooses the most efficient clients for training. Selected clients then participate in model training and send their updates to the server for aggregation. This process repeats periodically on each training round. 22 December 2024), covering 20 different DGA families, with approximately 50,000 domain names per family. We randomly divided the dataset into four separate zones to simulate real-world non-IID scenarios, where each IDS node may be exposed to different DGA families. The detailed distribution of domain types across these zones is summarized in Table 2.  
To effectively detect domain names generated by DGA, we implemented and evaluated three deep learning models: _CNN_[29], _BiLSTM_[37], and _Transformer_[38]. Each model is designed to capture different aspects of the sequential patterns inherent in domain names:  
* _CNN Model:_ Built by a multiple-layer convolutional architecture to capture local n-gram patterns in domain names. It employs an embedding layer followed by four parallel 1D convolutional layers with kernel sizes of \(\{3,5,7,9\}\), each with 128 filters. Then, these outputs are pooled via adaptive max pooling and concatenated before passing through fully connected layers. * _BiLSTM Model:_ This uses a bidirectional LSTM encoder with a hidden dimension of 64 in each direction (128 total), followed by an attention mechanism that computes a weighted sum of hidden states. The attention-enhanced representation is then passed through batch-normalized dense layers for classification. This architecture is effective for modeling sequential correlations inherent in algorithmically generated domain names. * _Transformer Model:_ This model uses the global attention method for modeling input sequences, enabling parallel computation and strong generalization. It uses an embedding layer of size 64 with added positional encoding, followed by a stack of 4 Transformer encoder layers with 4 heads and a feedforward dimension of 256. Then, this final output is taken from the first token's transformed representation, similar to BERT-style classification [39]. This model is the most computationally intensive among the three, but it demonstrates strong performance in capturing long-range semantic patterns.