Introduction
The proliferation of CCTV networks has revolutionized traffic safety and urban monitoring. However, scaling video analysis across these networks faces significant challenges: the high cost of frame-level labeling, privacy concerns regarding raw data transmission, and the inherent "Non-IID" (Non-Independently and Identically Distributed) nature of decentralized data. Traditional Federated Learning (FL) often struggles with data imbalance, where some nodes possess rare but critical information (e.g., accidents) while others observe routine traffic.
The FedMIL Framework
To address these hurdles, we present FedMIL, a framework that integrates Federated Learning with Multiple Instance Learning (MIL). FedMIL enables privacy-preserving training on weakly labeled video data—where only a single label is required for an entire clip rather than every frame.
Attention-based MIL
At the core of the local training process is an attention-based MIL mechanism. Instead of treating all video frames equally, the model employs a gated attention layer to identify and prioritize frames that contain the actual anomaly. This allows the system to learn effectively from "bags" of frames where the specific timing of an event is unknown.
Optimized Client Selection: DPPQ
The primary innovation of FedMIL is DPPQ (DPP-based Quality Diversity Decomposition), a sophisticated client selection strategy. Unlike random selection, which can be biased by data-heavy nodes, DPPQ uses a Determinantal Point Process (DPP) to select a subset of clients that are both diverse and informative.
- Diversity: By analyzing feature profiles, DPPQ ensures the selected group represents varied environmental conditions (e.g., weather, lighting, urban vs. rural).
- Quality: It incorporates local loss values as a proxy for "informativeness." Clients with higher loss indicate data that the current global model hasn't yet mastered, making them high-priority for the next training round.
Data Challenges and Evaluation
The framework was evaluated using the Car Crash Dataset (CCD) and MNIST. Real-world data imbalance was simulated through label-based and feature-based partitioning to reflect the messy reality of edge computing.
As shown in the figure above, data at the edge is often highly skewed. Feature-based clustering (c) highlights how different cameras might capture distinct scenarios like snowy roads (i) or night scenes (ii). DPPQ leverages this diversity to build a more robust global model.
Key Results and Insights
FedMIL with DPPQ demonstrated significant performance gains over baseline methods:
- Superior Accuracy: On imbalanced MNIST tasks, DPPQ achieved 90.84% accuracy, outperforming standard DPP by 8.5%.
- Robustness in Video Analysis: In the CCD benchmarks, the system maintained higher AUC and F1 scores despite extreme data imbalance.
- Efficiency: Remarkably, selecting the "right" 50% of data via DPPQ often yielded better results than using 100% of the data with random selection, highlighting its potential for bandwidth-constrained environments.
Conclusion
FedMIL offers a scalable, privacy-preserving solution for decentralized video analysis. By treating high local loss as a signal for valuable data and enforcing diversity through DPP, the framework overcomes the limitations of traditional FL in non-IID settings. Future work will focus on extending the system to multi-class anomaly detection and optimizing it for more lightweight edge backbones.
Summary updated