Using Diffusion Models as Generative Replay in Continual Federated Learning - What will Happen?

Yongsheng Mei, Liangqi Yuan, Dong-Jun Han, Kevin S. Chan, Christopher G. Brinton, Tian LanarXiv 2024 · DOI

Introduction

Continual Federated Learning (CFL) represents a critical frontier in machine learning, combining the decentralized nature of Federated Learning (FL) with the adaptive requirements of Continual Learning (CL). In real-world deployments, data is rarely static; distributions shift as new classes emerge or environmental conditions change. The primary challenge in this setting is "catastrophic forgetting," where models abruptly lose the ability to perform previous tasks upon learning new ones.

This paper introduces DCFL (Diffusion-based Continual Federated Learning), a novel framework that leverages the high-fidelity generative capabilities of conditional diffusion models to mitigate forgetting. By generating synthetic historical data locally to "replay" alongside new data, DCFL establishes a new state-of-the-art for CFL, providing the first successful integration of diffusion models into the CFL pipeline with a solid theoretical convergence bound.

Problem Formulation

The authors address three primary scenarios within the CFL landscape, each presenting unique challenges for model stability and data privacy:

Overview of the three Continual Federated Learning (CFL) scenarios: Class Incremental IID, Class Incremental Non-IID, and Domain Incremental.
  1. Class Incremental IID: New categories appear over time, and all clients observe the same distribution of these classes.
  2. Class Incremental Non-IID: New categories appear, but different clients observe different subsets of these classes, creating local data heterogeneity.
  3. Domain Incremental: The set of classes remains constant, but the visual domain (e.g., style, lighting, or sensor type) shifts over time.

Existing approaches like local replay buffers often violate privacy or storage constraints, while GAN-based generative replay frequently suffers from mode collapse, leading to "memory poisoning" with low-quality synthetic data.

The DCFL Framework

DCFL addresses these limitations by integrating a local dual-model architecture at each client node, ensuring that historical knowledge is preserved without storing raw data or increasing communication overhead.

Architecture of the DCFL framework showing the local dual-model setup and synthetic data generation process.

Local Dual-Model Setup

Each client maintains two distinct models:

  • Target Model (θ): The primary model performing the downstream task, such as image classification.
  • Conditional Diffusion Model (ω): A local "memory" generator that captures the distribution of previously seen data.

Synthetic Generative Replay

When a client transitions to a new learning session (Time $t+1$), the local diffusion model generates synthetic images representing the classes or domains from previous sessions (Time $t$). This synthetic "history" is interleaved with new real data to train the target model, effectively preventing the weights from drifting too far from the previous task's optimal state. To prevent the diffusion model itself from forgetting, it is updated using a mix of current real data and its own generated synthetic data.

Privacy and Convergence

To maintain strict privacy, the diffusion model never leaves the local device. Only the target model's parameters are communicated to the central server for aggregation. Furthermore, the authors provide a theoretical convergence bound, demonstrating that the system's stability is mathematically tied to the approximation error of the diffusion model. As the generator's quality improves, the "forgetting" term in the error bound effectively vanishes.

Experimental Results

The framework was evaluated using MNIST, Fashion-MNIST, CIFAR-10, and the PACS (Photo, Art, Cartoon, Sketch) dataset. DCFL demonstrated significant performance gains over traditional FL (FedAvg) and specialized CFL baselines:

  • Class Incremental IID: Achieved a 32.61% accuracy improvement over GAN-based baselines.
  • Class Incremental Non-IID: Improved accuracy by 15.16%, effectively transforming a difficult Non-IID problem into a more manageable IID-like setup by "filling in the gaps" with synthetic data.
  • Domain Incremental: Showed a 7.45% improvement on the PACS dataset, proving robustness to stylistic shifts.

Discussion and Future Work

The core insight of this work is that the superior fidelity of diffusion models prevents the error propagation typically seen in GAN-based replay. By treating high-quality synthetic data as a valid substitute for real history, DCFL maintains a steady, stepwise improvement in accuracy across communication rounds.

However, diffusion models introduce significant computational overhead compared to GANs. Future research directions include optimizing local compute requirements through fine-tuning pre-trained models and extending the framework to multimodal data, such as using text-to-image diffusion to guide memory reconstruction.

Summary updated

BibTeX
@misc{mei2024using,
  author = {Yongsheng Mei and Liangqi Yuan and Dong-Jun Han and Kevin S. Chan and Christopher G. Brinton and Tian Lan},
  title = {{Using Diffusion Models as Generative Replay in Continual Federated Learning - What will Happen?}},
  year = {2024},
  eprint = {2411.06618},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.06618},
}
Figure