Abstract
Unsupervised image anomaly detection (UAD) is critical for industrial and medical applications but faces significant challenges in federated learning (FL) environments due to data privacy concerns and distribution biases. Traditional FL methods struggle with the limited class diversity of one-class classification and the skewness of intra-class features across different clients. This article proposes FedDyMem, an efficient federated learning method that facilitates knowledge sharing through a client's dynamic memory bank instead of model parameters. By utilizing a memory generator and a novel "Memory-Reduce" method based on weighted averages, FedDyMem significantly decreases communication overhead while enhancing privacy. Experiments across six diverse industrial and medical datasets demonstrate that FedDyMem achieves state-of-the-art performance in both anomaly detection and localization.
The Challenge: Anomaly Detection in Federated Settings
Unsupervised Image Anomaly Detection (UAD) typically relies on learning a robust representation of "normal" data to identify outliers. In a Federated Learning context, where data remains decentralized to protect privacy, three primary obstacles arise:
- Intra-class Distribution Bias: Normal samples vary significantly between clients (e.g., different product models or imaging hardware), leading to skewed feature distributions.
- One-Class Limitations: Standard FL algorithms are designed for multi-class problems. In UAD, each client often only possesses "normal" samples, making it difficult to establish a global decision boundary.
- Communication and Privacy Risks: Sharing high-dimensional model weights is bandwidth-intensive and vulnerable to gradient inversion attacks that can reconstruct sensitive raw images.
The FedDyMem Approach
FedDyMem shifts the federated paradigm from parameter aggregation to dynamic memory sharing. Instead of syncing neural network weights, clients share a compressed representation of their local "normal" feature space.
Workflow and Architecture
The framework consists of a local training phase and a server-side aggregation phase:
- Local Memory Generation: Each client employs a trainable memory generator and a metric loss to align local features into a high-quality, continuous representation of normalcy.
- Memory-Reduce: To ensure communication efficiency, a weighted average-based reduction method compresses the local memory bank into a fixed, compact size. This process also acts as a privacy filter by reducing the mutual information between the shared features and the original data.
- Global Aggregation: The server collects these reduced banks and uses K-means clustering to synthesize a "Global Memory Bank." This global knowledge is then redistributed to clients to refine their local anomaly detection capabilities.
Experimental Results
The researchers evaluated FedDyMem against eight baseline methods (including FedAvg and FedProx) across 11 public datasets combined into six heterogeneous categories, such as Mixed-PCB-AD and Mixed-Brain-AD.
- Superior Accuracy: On the MVTec dataset, FedDyMem achieved a 99.24% Image-AUROC, significantly outperforming standard FedAvg (~80%).
- Precise Localization: The method excels at pixel-level detection, reaching 98.97% Pixel-AUROC on the MPDD dataset.
- Efficiency and Privacy: The communication payload was reduced to 5.62MB per round—roughly half that of parameter-based methods. Furthermore, adversarial tests showed that FedDyMem is highly resilient to reconstruction attacks, yielding only uninterpretable blurs compared to the recognizable images recovered from traditional FL gradients.
Conclusion
FedDyMem demonstrates that for one-class tasks like anomaly detection, sharing feature distributions via dynamic memory is more effective, efficient, and private than sharing model parameters. By addressing intra-class bias and communication bottlenecks, it provides a robust framework for privacy-preserving quality control and medical diagnostics. Future work aims to extend this framework to architecture-agnostic settings, allowing collaboration between clients using heterogeneous model backbones.
Summary updated