Class-Competence Aggregation: Output-Layer Routing for Federated Multiclass DDoS Detection under Class-Concentrated Non-IID Data

Tapu Datta, Hafiz ImtiazarXiv 2026 · arXiv

TL;DR

Researchers have identified a "localized failure mode" in federated learning for DDoS detection where standard aggregation methods (like FedAvg) completely destroy the model's ability to recognize specific attack classes. By introducing Class-Competence Aggregation (CCA)—a method that routes aggregation weights for the output layer based on per-class validation performance—they successfully recovered detection rates for concentrated attack classes from 0% to over 84%, nearly matching centralized training performance.

What Problem Does This Paper Address?

In the real world, network intrusion detection is inherently distributed. Different sensors (at an LDAP server vs. a Syn flood gateway) see entirely different types of traffic. In Federated Learning (FL), this creates a "class-concentrated non-IID" regime: one client might hold 99% of all LDAP attack samples, while other clients have never seen a single one.

The authors discovered that under these conditions, standard Federated Averaging (FedAvg) doesn't just dilute the signal for rare attacks—it actively destroys it. When a client trains on its local data (e.g., Syn floods), the cross-entropy loss function doesn't just reward the correct class; it actively penalizes all other classes. Consequently, the clients that don't have LDAP data produce "anti-signals" that suppress the LDAP neuron. During aggregation, these numerous anti-signals overwhelm the single specialist client, driving the global model's performance on that class to zero.

Methods

The core innovation is Class-Competence Aggregation (CCA). Instead of treating the entire model as a single block for averaging, CCA treats the output layer differently:

  1. Output-Layer Routing: For the final linear layer (where each row corresponds to a specific class decision boundary), the server aggregates weights using each client’s locally reported validation F1 score for that specific class. If a client hasn't seen LDAP traffic, its F1 is 0, and its "anti-signal" is ignored for the LDAP neuron.
  2. Standard Hidden Layers: The hidden layers, which learn general features shared across all traffic types, continue to use standard size-weighted FedAvg.
  3. Preconditions: To make CCA work, the authors use two supporting techniques:
  4. Adaptive Epoch Scheduling: Harder clients (those with rare attacks) are given more local training epochs.
  5. Class-Weighted Loss: Inverse-frequency weighting is used locally to prevent the majority "Benign" class from drowning out local attacks.
Fig. 1. Standard FedAvg (left) vs. CCA (right) for the LDAP class. Line thickness represents aggregation weight. Under FedAvg, all five clients contribute comparably regardless of whether they hold any LDAP data. Under CCA, weight for the LDAP output row is routed almost entirely to Client_LDAP, the only client with meaningful local LDAP competence.

Datasets

The study utilizes two primary benchmarks for DDoS detection:

  • CIC-DDoS2019: The primary dataset, partitioned into five clients to simulate class concentration (e.g., LDAP and MSSQL attacks concentrated at single clients).
  • CICIDS2017: Used for replication and to test "multi-holder" scenarios where a class is split across two clients rather than just one.

Key Insights and Ideas

  • Locality of Failure: The most striking finding is that the federated collapse is not uniform. It is almost entirely confined to the output layer. By changing how only 325 parameters (out of 1.29 million) were aggregated, the researchers fixed the model.
  • Anti-Signal vs. Dilution: The paper clarifies that the problem isn't just "noisy" updates from clients without data; it's a systematic "anti-signal" inherent to how neural networks are trained with cross-entropy.
  • Architecture Independence: The effect was observed in both a complex CNN-LSTM and a much smaller MLP, suggesting this is a fundamental property of federated optimization under class concentration, not a quirk of a specific model.
  • No Auxiliary Data Needed: Unlike previous attempts to fix non-IID issues, CCA requires no globally shared datasets or complex inter-client communication, preserving the core privacy benefits of FL.
Fig. 2. The dual-branch CNN-LSTM architecture (1,290,629 param- eters). The two branches are fused before the final 5-way output layer, whose row-wise structure (Eq. 2) is what CCA targets.

Key Results

On the CIC-DDoS2019 dataset using a CNN-LSTM:

  • Standard FedAvg resulted in a 0.00% F1 score for the concentrated LDAP attack class.
  • CCA raised the LDAP F1 to 84.83 ± 1.65%.
  • The Full Proposed Method reached 91.64% macro F1, closing the gap to centralized training (95.69%) significantly compared to FedAvg (53.16%).
  • Reliability: While other methods like FedNova or FedDWC occasionally recovered the class on some runs, they were highly unstable. CCA was the only method to recover the class substantially and reliably across all seeds.
Fig. 3. LDAP and MSSQL F1 across the ablation chain (mean ± std over seeds 42/123/7 where seeded). LDAP F1 stays at exactly 0.00% through FedAvg, FLAD-only, and FLAD+CW, and only recovers once CCA is added. The dotted lines mark the centralized (non- federated) per-class F1 ceiling for LDAP (86.66%) and MSSQL (94.09%), matching the Centralized reference row in Table V.

Limitations and Future Work

  • Privacy Leaks: The authors acknowledge that reporting per-class F1 scores is a "legible" disclosure. An observer could easily identify which client holds which attack class just by looking at the F1 stream. While less sensitive than raw data, it is a trade-off that might require Differential Privacy (DP) mitigation in the future.
  • Signal Integrity: CCA currently trusts clients to report honest F1 scores. A malicious or miscalibrated client could inflate its competence to hijack a specific class's output neuron.
  • Scale: The study focused on a relatively small number of clients (5-10). Evaluating CCA in massive-scale federations remains for future work.

Summary updated

Abstract

Federated learning over distributed intrusion-detection sensors naturally produces \emph{class-concentrated} non-IID data, where an entire attack class is held by a single client and absent elsewhere. We show this collapses federated averaging in a specific, localized way: the output layer holds one decision boundary per class, and when a class's aggregation weight comes overwhelmingly from clients that have never seen it, its neuron receives an active anti-signal rather than mere dilution, collapsing to zero. On CIC-DDoS2019, standard FedAvg drives the concentrated LDAP class to $0.00 \pm 0.00\%$ F1 across every seed. We propose Class-Competence Aggregation (CCA), which aggregates the output layer per class using each client's own locally reported validation F1 as the weight, while hidden layers remain under standard size-weighted FedAvg. CCA requires no server-held auxiliary data and adds only one F1 scalar per class per round beyond the feature-scaling and class-count exchanges common to any federated pipeline. On our primary CNN-LSTM architecture, CCA alone raises LDAP F1 from $0\%$ to $84.83 \pm 1.65\%$, and the full method reaches $91.64 \pm 0.57\%$ macro F1, closing the federated-to-centralized gap from $-42.53$ to $-4.05$ points. Benchmarked against four other federated methods under identical partitions and seeds, CCA is the only one that recovers the concentrated class substantially and reliably; a $178\times$ smaller MLP shows the same qualitative recovery, though less completely, confirming the effect holds across architecture scale even as its magnitude varies. Results are validated across three seeds and replicated on a second dataset, CICIDS2017.
BibTeX
@misc{datta2026class,
  author = {Tapu Datta and Hafiz Imtiaz},
  title = {{Class-Competence Aggregation: Output-Layer Routing for Federated Multiclass DDoS Detection under Class-Concentrated Non-IID Data}},
  year = {2026},
  eprint = {2611.16772},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.16772},
}
Figure