Skip to content
AIAI Wranglers

40 Federated Learning for Generative Models

Imagine training a diffusion model on everyone's medical records. Now imagine doing it without seeing a single one. This is not a thought experiment-it is the central promise of federated learning for generative models, a discipline born from the collision of two irresistible forces: the insatiable appetite of generative AI for ever-larger training corpora, and the equally inexorable tightening of data privacy law, clinical ethics, and corporate sovereignty across the globe.

In the decade between 2014 and 2024, the default assumption of machine learning shifted from โ€œcollect all the data, ship it to a data centre, and trainโ€ to something more fraught and more interesting. The Generative Adversarial Network (Goodfellow et al., 2014) required an ImageNet-scale dataset assembled in one place. The original DALL-E (Ramesh et al., 2021) was trained on 250 million image-text pairs scraped from the web. GPT-4 (OpenAI, 2023) consumed, by various estimates, between one and ten trillion tokens, drawn from essentially every freely accessible text document on the internet. The trajectory is unmistakable: generative models grow more capable by consuming more data, and the next frontier of improvement lies in data that cannot be freely assembled-medical records, financial documents, personal communications, industrial sensor streams.

The very moment this data becomes scientifically indispensable, it becomes legally inaccessible. The European Union's General Data Protection Regulation (GDPR, 2018) established the right to erasure, the right to data portability, and strict requirements for lawful processing. The California Consumer Privacy Act (CCPA, 2020) extended analogous protections to the world's fifth-largest economy. The Health Insurance Portability and Accountability Act (HIPAA) in the United States has governed medical data since 1996, and its de-identification requirements make centralised clinical AI training a legal minefield. The EU AI Act (2024), the first comprehensive regulatory framework specifically targeting artificial intelligence, imposes risk-based obligations that make data governance a first-class engineering concern.

The result is a profound paradox: generative models need more data than discriminative models, but data is becoming more restricted. A discriminative model learns a boundary p(y|๐’™); it needs enough examples to trace that boundary. A generative model must learn the full joint distribution p(๐’™,y)-or even p(๐’™) alone-and must therefore capture the entire support of the data manifold, including rare modes, tail events, and distributional subgroups that a classifier can safely ignore. This requirement for comprehensive coverage scales badly with the fragmentation of data across organisational, geographic, and jurisdictional boundaries.

Federated learning, proposed in its modern form by McMahan et al. (2017) under the name โ€œcommunication-efficient learning of deep networks from decentralised data,โ€ offers a principled resolution. The insight is architectural: instead of moving data to the model, move the model to the data. Clients train locally on private data; a central server aggregates their updates; no raw data ever leaves its origin. This chapter develops the theory and practice of applying this paradigm to generative models-a much harder problem than the discriminative setting that motivated the original proposal.

The Privacy Paradox of Generative AI

The Data Hunger of Generative Models

The difference in data requirements between discriminative and generative models is not a matter of degree-it is a matter of kind. To understand why, consider a simple binary image classification problem: given an image ๐’™โˆˆโ„dโก, predict whether it contains a cat. A classifier needs only to learn a decision boundary that separates cat images from non-cat images. It can, in principle, succeed by memorising a few hundred representative examples from each class. Indeed, transfer learning has made it routine to train effective classifiers on datasets of a few thousand labelled images.

A generative model has no such luxury. It must learn p(๐’™), the full distribution over images. In a d-dimensional space with d=3ร—256ร—256=196,608, the support of natural images is a highly curved, low-dimensional manifold embedded in this ambient space. Capturing this manifold faithfully requires training examples that densely sample every region of it-every pose, every lighting condition, every age demographic, every rare anatomical variant in a medical setting.

Quantitatively, the gap is stark. State-of-the-art image classifiers on ImageNet achieve near-human performance trained on 1.2 million examples. The best image generation models require datasets that are two to three orders of magnitude larger: LAION-5B (5 billion image-text pairs), JFT-3B (3 billion images), and CommonCrawl-derived corpora of comparable scale for language models. Every mode of the training distribution that is underrepresented becomes a mode that the model either drops (mode collapse) or distorts.

Key Idea.

A discriminative model learns a boundary p(y|๐’™); it needs data dense near that boundary. A generative model must learn the full density p(๐’™); it needs data dense everywhere in the support. This fundamental difference means generative models are quantitatively and qualitatively more sensitive to dataset size, coverage, and distributional balance than any discriminative counterpart trained on the same task.

This distinction becomes critical when we consider specialised domains. In medical imaging, the โ€œrare diseaseโ€ problem is endemic: some pathologies appear in fewer than one in ten thousand scans. A classifier trained to detect the most common conditions can afford to be weak on rare ones; a generative model that cannot synthesise rare pathologies authentically is useless for data augmentation precisely where augmentation is most needed.

Similarly, in natural language processing, dialect diversity, domain specificity, and linguistic minority languages are precisely the conditions most undersupplied in any centralised web crawl. A generative model trained on majority-dialect text will systematically fail to model minority variants-not because the architecture is flawed, but because the data was never collected in the first place.

The Regulatory Landscape

The same years that witnessed the explosion of data-hungry generative models also saw the construction of a global regulatory apparatus designed to limit their data supply. We survey the major frameworks here not as lawyers but as engineers who must understand the constraints they impose.

General Data Protection Regulation (GDPR, 2018).

The GDPR, effective May 25, 2018, applies to any processing of personal data of EU residents, regardless of where the processing organisation is located. Its key provisions for machine learning practitioners are:

  • Lawful basis for processing (Article 6): data may only be processed with explicit consent, for contractual necessity, legal obligation, vital interests, public task, or legitimate interests. Training a generative model on scraped web data satisfies none of these for identifiable individuals.

  • Right to erasure (Article 17): individuals may request that their data be deleted. For a trained model, this raises the question of โ€œmachine unlearningโ€-can a specific data point's influence be removed from a trained generative model? (Explored in Chapter 29.)

  • Data minimisation (Article 5): only the minimum necessary data should be collected. This principle directly conflicts with the generative model paradigm of โ€œmore data is always better.โ€

  • Purpose limitation (Article 5): data collected for one purpose cannot be reused for another. Electronic health records collected for clinical care cannot be freely repurposed for AI training.

Violations carry fines up to 4% of global annual turnover or EUR,20 million, whichever is higher. The GDPR has been enforced: Meta was fined EUR,1.2 billion in 2023 for transferring EU user data to the United States; Amazon was fined EUR,746 million in 2021.

Health Insurance Portability and Accountability Act (HIPAA, 1996/2013).

HIPAA governs Protected Health Information (PHI) in the United States. The HIPAA Privacy Rule (2003) and Security Rule (2005) impose strict access controls on 18 categories of individually identifying health information, including names, geographic identifiers, dates, phone numbers, medical record numbers, and account numbers. The HIPAA de-identification standard (45 CFR 164.514) requires either expert determination (statistical demonstration that re-identification risk is โ€œvery smallโ€) or the Safe Harbor method (removal of all 18 identifiers). These requirements make centralised training on electronic health records legally and operationally hazardous.

California Consumer Privacy Act (CCPA, 2020) and CPRA (2023).

The CCPA, enacted in 2020 and strengthened by the California Privacy Rights Act (CPRA) in 2023, grants California residents the right to know what personal information is collected, the right to delete it, and the right to opt out of its sale. California is the world's fifth-largest economy, and compliance with CCPA is effectively mandatory for any technology company with a significant US presence. The CPRA additionally created the California Privacy Protection Agency, the first US data privacy enforcement agency.

EU Artificial Intelligence Act (2024).

The EU AI Act, adopted in March 2024, is the world's first comprehensive regulatory framework specifically targeting AI systems. It establishes a risk-based classification:

  • Unacceptable risk (prohibited): AI systems for social scoring by governments, real-time remote biometric identification in public spaces, and AI that subliminally manipulates behaviour.

  • High risk: AI systems in critical infrastructure, education, employment, essential services, law enforcement, migration, and administration of justice. These require conformity assessments, data governance measures, and transparency obligations.

  • Limited risk: AI systems interacting with humans (chatbots) and those generating synthetic content (deepfakes) must disclose their AI nature.

  • Minimal risk: all other AI systems, subject only to voluntary codes of conduct.

Generative models used for medical diagnosis, credit scoring, or facial recognition fall squarely in the high-risk category. Foundation models (GPAI, general-purpose AI) with over 1025 FLOPs of training compute face additional requirements for transparency, adversarial testing, and incident reporting.

Remark 1.

The regulatory trend is unmistakable and global: Brazil's LGPD (2020), India's DPDP Act (2023), China's PIPL (2021), South Korea's PIPA (amended 2020), and analogous frameworks across the Gulf Cooperation Council are all converging on the same core principles-consent, purpose limitation, data minimisation, and accountability. The question is not whether data privacy regulation will constrain generative AI training; it already does. The question is whether the ML community will adapt by building privacy into the architecture rather than treating it as a compliance checkbox. Federated learning is the most principled answer to that question currently available.

Data at the Edge: The IoT Reality

While regulation restricts the centralisation of existing data, a parallel technological trend is ensuring that an enormous fraction of future data will be generated in locations where centralisation was never viable in the first place.

By 2030, estimates suggest there will be 40 billion Internet of Things (IoT) devices in operation worldwide-smartphones, wearables, industrial sensors, connected vehicles, home appliances, and environmental monitors. These devices collectively generate data at rates that defy centralisation on purely physical grounds. The International Data Corporation projects that the global datasphere-the total amount of data created, captured, copied, and consumed-will reach 200 zettabytes by 2030, with over half of it generated at the edge.

Consider the arithmetic. One zettabyte is 1021 bytes. The total capacity of all the world's data centres as of 2023 is approximately 10 zettabytes. Shipping 100 zettabytes of edge-generated data per year to centralised servers would require global network infrastructure two orders of magnitude larger than what exists. It is not merely inadvisable; it is physically impossible.

Definition 1 (Data Silo).

A data silo is a collection of data ๐’Ÿk held by a single entity (a hospital, a device, an organisation, or a jurisdiction) that cannot be directly shared with other entities due to privacy, legal, bandwidth, or sovereignty constraints. Formally, given K entities each holding a local dataset ๐’Ÿk={(๐’™i(k),yi(k))}i=1nk, the data is siloed if there is no mechanism by which any entity jโ‰ k can observe the raw samples {(๐’™i(k),yi(k))}. The aggregate dataset ๐’Ÿ=โ‹ƒk=1K๐’Ÿk is notionally available but physically inaccessible as a whole.

Data silos exist on multiple scales:

  • Device-level silos: each smartphone or wearable holds its owner's personal data. A keyboard app generates personalised language data; a health monitor generates biometric time series; a camera generates face images.

  • Institutional silos: hospitals hold patient records; banks hold financial transaction histories; law firms hold privileged communications.

  • National silos: data localisation laws in Russia (FZ-242), China (MLPS 2.0), and increasingly other jurisdictions require that personal data on citizens be stored and processed within the country's borders.

  • Competitive silos: companies with valuable proprietary datasets refuse to share them with competitors even when collaboration would be mutually beneficial scientifically.

The IoT context introduces a further dimension: the data is not merely siloed-it is non-iid (not independently and identically distributed). Each device generates data from a distribution that reflects its owner's personal behaviour, demographics, location, and device characteristics. User k's smartphone keyboard captures their personal vocabulary, writing style, and the topics they discuss; user kโ€ฒ's keyboard captures something qualitatively different. When a generative model trained on such heterogeneous data must capture the full joint distribution, this non-iid structure creates profound challenges that we address throughout this chapter.

Why Centralisation Fails

The naive approach to training generative models on siloed data is to centralise it first and worry about the consequences later. This approach fails on four independent grounds, each sufficient on its own.

Privacy failure.

Once data leaves its origin, the centralising entity becomes liable for its protection. Data breaches are not theoretical: the Anthem breach (2015) exposed 78.8 million health records; the Equifax breach (2017) exposed 147 million financial records; the Yahoo breach (2013โ€“2016) exposed 3 billion user accounts. Even in the absence of external attacks, centralised training creates insider threat vectors: researchers, engineers, and infrastructure providers with access to training data have historically exploited it. Moreover, as demonstrated in Chapter 29, even a model trained on centralised data and then published-without releasing the training data-leaks information about individual training examples through membership inference attacks.

Bandwidth failure.

The raw data volume at the edge simply cannot traverse available network infrastructure. A single hospital's PACS (Picture Archiving and Communication System) generates terabytes of imaging data per month. A manufacturing plant with continuous sensor monitoring generates gigabytes per hour. A fleet of autonomous vehicles captures terabytes per vehicle per day. Aggregating these at a central server is not economically or technically feasible at the required scale.

Moving data across national borders, across institutional boundaries, or between corporate entities creates legal exposure under data protection law, sector-specific regulation, contractual non-disclosure agreements, and national security rules. The Schrems II ruling (2020) invalidated the EU-US Privacy Shield, making routine transatlantic data flows for AI training legally uncertain until the EU-US Data Privacy Framework (2023) was established-and that framework remains contested. Clinical data sharing between hospitals requires data use agreements, IRB approval, and institutional review processes that can take months to years to complete.

Sovereignty failure.

National AI strategies explicitly frame domestic data as a strategic asset. China's Cybersecurity Law (2017) and Data Security Law (2021) prohibit the cross-border transfer of data deemed important to national security or the public interest without government approval. Russia's Federal Law No. 242-FZ requires personal data of Russian citizens to be processed on servers located in Russia. India's Digital Personal Data Protection Act (2023) includes provisions for cross-border data transfer restrictions. In this environment, building generative AI on centralised, globally assembled datasets is not just technically difficult-it is politically untenable for an increasing fraction of the world's data.

The Federated Learning Solution

Federated learning resolves the centralisation dilemma by inverting the direction of movement: instead of moving data to the model, move the model to the data.

The canonical federated learning algorithm, FedAvg (McMahan et al., 2017), operates as follows:

  1. A server initialises a global model with parameters ๐œฝ(0).

  2. In each communication round t: enumerate

  3. The server selects a subset ๐’ฎ(t)โІ[K] of C clients, where Cโ‰คK.

  4. Each selected client kโˆˆ๐’ฎ(t) receives the current global parameters ๐œฝ(t), runs E epochs of local stochastic gradient descent on ๐’Ÿk, and sends back updated parameters ๐œฝk(t).

  5. The server aggregates: (Fedavg)๐œฝ(t+1)=โˆ‘kโˆˆ๐’ฎ(t)nkโˆ‘jโˆˆ๐’ฎ(t)nj๐œฝk(t). enumerate

  6. The process repeats until convergence.

At no point does any client's raw data ๐’Ÿk leave its local storage. The server and other clients observe only parameter vectors ๐œฝk(t)-high-dimensional tensors of floating-point numbers that do not directly encode individual training examples.

Key Idea.

Train the model where the data lives, not the data where the model lives. This inversion of the centralisation paradigm is the foundational principle of federated learning. It trades communication of gradients and parameters for non-communication of raw data, achieving privacy through architecture rather than through post-hoc anonymisation, which as Chapter 29 demonstrates, is rarely sufficient.

A Brief History of Federated Learning

Historical Note.

From FedAvg to Federated Foundation Models. The term โ€œfederated learningโ€ was coined by McMahan, Moore, Ramage, Hampson, and Aguera y Arcas in a 2017 paper, โ€œCommunication-Efficient Learning of Deep Networks from Decentralized Data,โ€ presented at AISTATS. The paper proposed FedAvg and evaluated it on a language modelling task (next-word prediction for mobile keyboard) using data from one thousand simulated clients. The choice of application was not accidental: Google was simultaneously deploying what would become Gboard, a keyboard application that personalises autocomplete without sending keystroke data to Google's servers. FedAvg was the algorithmic engine behind this deployment, and it represented the first large-scale industrial application of the federated paradigm.

The years 2017โ€“2019 saw rapid theoretical development. Li et al. (2018) identified gradient divergence as the main challenge in non-iid settings, where heterogeneous local datasets cause local gradients to diverge from the global optimum. Hsieh et al. (2019) introduced the concept of client drift, formalising how each client's local optimum can be far from the global consensus. Yang et al. (2019) at WeBank published a systematic survey and taxonomy that established the division between horizontal FL (clients share the same feature space but different samples), vertical FL (clients share the same samples but different features), and federated transfer learning (clients differ in both samples and features).

The years 2020โ€“2022 brought the convergence of federated learning with differential privacy and secure multi-party computation. Bonawitz et al. (2022) at Google described the production-scale implementation of federated learning with secure aggregation, where the server learns only the aggregate gradient update, not individual contributions. Andrew et al. (2021) demonstrated formal (ฯต,ฮด)-differential privacy guarantees for the FedAvg algorithm.

The period 2022โ€“2024 marked the emergence of federated generative models as a research subfield in its own right. FedAvg had been designed for discriminative models; applying it to GANs, VAEs, and diffusion models required fundamentally new techniques. The challenges of mode collapse under data heterogeneity, gradient inversion attacks that exploit the generative model's structure, and the question of whether a federally trained generative model can memorise and subsequently reveal private training data became central research themes. Concurrent with these theoretical developments, the emergence of large language models (GPT-3, PaLM, LLaMA) spurred interest in federated fine-tuning of foundation models-FedLLM-as the only viable path to personalisation without privacy violation. By 2024, federated learning had evolved from a niche algorithmic contribution into a critical infrastructure component for responsible deployment of generative AI at scale.

The FL Architecture: No Raw Data Moves

The canonical federated learning architecture. A global server distributes the current model parameters ๐œฝ(t) (blue solid arrows) to a set of clients. Each client trains locally on its private data silo ๐’Ÿk (amber arrows) and returns only the parameter update ฮ”๐œฝk (orange dashed arrows). The server performs weighted aggregation to produce ๐œฝ(t+1). Crucially, no raw data crosses any boundary between silos (red dashed lines): the Hospital A records, Smartphone B photos, and Factory C sensor streams never leave their respective origins.

The architecture in fig:fedgen:fl-architecture makes several implicit design choices that carry significant consequences:

  1. Parameter transmission, not gradient transmission. FedAvg transmits complete model snapshots after local training, not gradients computed on individual batches. This reduces communication cost (fewer synchronisation rounds) but increases the divergence between local models and the global optimum in heterogeneous settings.

  2. Asynchronous vs. synchronous aggregation. The standard protocol is synchronous: the server waits for all selected clients to return before aggregating. Asynchronous variants aggregate as clients return, tolerating stragglers-slow clients that would otherwise bottleneck the round.

  3. Partial participation. In practice, only a fraction of clients participate in each round. In cross-device settings (smartphones), participation may be conditioned on device state: charging, connected to WiFi, and idle. In cross-silo settings (hospitals), participation is deterministic and controlled.

Unique Challenges for Federated Generative Models

The original FedAvg paper and the discriminative model literature that followed it identified three core challenges in federated learning: communication efficiency, statistical heterogeneity (non-iid data), and systems heterogeneity (varying client capabilities). When we turn to generative models, these challenges interact with model-specific pathologies in ways that require fundamentally new analysis and new algorithms.

Mode collapse under data heterogeneity.

Consider a GAN trained federally on medical images distributed across K hospitals. Hospital k may have a patient population with a characteristic demographic profile: Hospital A serves predominantly elderly patients with cardiac conditions; Hospital B serves a diverse urban population with higher rates of infectious disease; Hospital C is a paediatric specialist centre. Each client's GAN generator, trained only on local data, will capture its local modality. When the server averages generator parameters in FedAvg style, the averaged generator does not necessarily capture any modality well. This is the mode averaging problem: unlike discriminative models, where averaging parameters produces a model with intermediate decision boundaries, averaging generative model parameters can produce a model whose outputs are interpolations between modes that exist nowhere in the training distribution-blurry, physically implausible images that neither represent the elderly cardiac profile nor the paediatric profile faithfully.

Gradient inversion attacks.

A foundational assumption of federated learning is that parameter updates ฮ”๐œฝk do not reveal the training data ๐’Ÿk. Zhu et al. (2019) demonstrated that this assumption is false: given the gradient update from a single batch, an adversarial server can reconstruct the training images with high fidelity using an optimisation procedure. This vulnerability is significantly worse for generative models. A GAN discriminator's gradient update, computed on a batch of real images, carries structural information about those images' high-frequency details precisely because the GAN training objective requires the discriminator to detect fine-grained distributional differences. A VAE encoder's gradient encodes information about the posterior q(๐’›|๐’™) for each training sample, which in turn encodes information about ๐’™ itself. The very architectural properties that make generative models powerful make them vulnerable to gradient inversion.

Memorisation and privacy amplification.

Generative models are more susceptible to memorisation than discriminative ones (Chapter 29). When a generative model is trained federally, the server's aggregate model can memorise patterns from specific clients' data even without the server ever seeing that data directly. If Client k has a dataset containing a unique individual (a rare disease patient, a distinctive speaker), the global generative model may generate outputs that effectively reveal this individual's presence. The formal analysis of this phenomenon requires combining membership inference theory with the privacy accounting methods of federated differential privacy.

Heterogeneous architectures and model personalisation.

In cross-device settings, clients may have different computational budgets that prevent them from training the full global model. A smartphone cannot train a 10-billion-parameter diffusion model. This creates the need for model heterogeneous federated learning, where the global model and local models may have different architectures. For discriminative models, split learning and knowledge distillation provide partial solutions. For generative models, the interaction between architecture and the learned distribution is more intimate: changing the model architecture changes the generative manifold, and federated aggregation of models with different manifold structures is not well-defined.

Section Exercises

Exercise 1 (The Centralisationโ€“Privacy Trade-off).

Let ๐’Ÿ=โ‹ƒk=1K๐’Ÿk be a dataset distributed across K clients with nk=|๐’Ÿk| samples each and let n=โˆ‘knk.

  1. Let pk denote the marginal data distribution of client k. Prove that the FedAvg objective F(๐œฝ)=โˆ‘k=1KnknFk(๐œฝ) equals the centralised objective 1nโˆ‘i=1nโ„“(๐œฝ;๐’™i) if and only if pk=p for all k, where p is the global distribution. (Hint: expand both objectives and use linearity of expectation.)

  2. Now consider a GDPR-compliant scenario where data cannot be centralised. Define a formal privacy cost Cpriv as the KL divergence between the distribution over model outputs trained on centralised data versus federated data: Cpriv=KLโก(pcentralโ€–pfederated). Show that Cpriv=0 under the condition you derived in part (a), and argue that Cpriv>0 in general non-iid settings.

  3. Suppose each client has nk=n/K samples and the local distributions satisfy KLโก(pkโ€–p)โ‰คฯต for all k. Derive an upper bound on Cpriv in terms of K, ฯต, and any other relevant quantities.

Exercise 2 (Gradient Leakage in Generative Models).

Consider a GAN discriminator Dฯ•:โ„dโกโ†’[0,1] trained with the standard non-saturating loss on a batch of B real images {๐’™1,โ€ฆ,๐’™B}โŠ‚โ„dโก.

  1. The gradient of the discriminator loss with respect to ฯ• is โˆ‡ฯ•โ„’D=1Bโˆ‘i=1Bโˆ‡ฯ•logโกDฯ•(๐’™i). For a linear discriminator Dฯ•(๐’™)=ฯƒ(ฯ•โŠค๐’™), show that โˆ‡ฯ•โ„’D is a weighted average of the training inputs ๐’™i. Under what conditions on the weights can the server perfectly reconstruct every ๐’™i from โˆ‡ฯ•โ„’D?

  2. Explain why the linear case is representative of the general case near a saddle point in GAN training. (Hint: consider the first-order Taylor expansion of Dฯ• around the saddle point.)

  3. Propose a defence against gradient inversion that modifies the FedAvg aggregation step rather than the local training step. What are the trade-offs of your defence in terms of model utility and privacy guarantee?

Exercise 3 (Regulatory Compliance as a Federated Learning Objective).

A medical imaging company operates hospitals in France (GDPR), the United States (HIPAA), and China (PIPL). They wish to train a shared diffusion model for chest X-ray synthesis.

  1. List at least three regulatory constraints from each jurisdiction that affect the choice of federated learning protocol. For each constraint, identify which component of the FL system (client, server, communication protocol, or model) must be modified to achieve compliance.

  2. The GDPR's right to erasure requires that, upon request, an individual's data is removed from the system. Formally, define what โ€œerasure from a trained generative modelโ€ means using the framework of machine unlearning (see Chapter 29). Describe a federated unlearning protocol that handles a deletion request from Client k without requiring the other Kโˆ’1 clients to retrain from scratch.

  3. Discuss whether federated learning by itself satisfies the GDPR's principle of data minimisation (Article 5(1)(c)). What additional technical measures (e.g., differential privacy, secure aggregation, input perturbation) would strengthen the compliance argument, and at what utility cost?

Why Federated Generative Models?

The case for applying federated learning to generative models rests on three distinct motivations that reinforce each other. The first is privacy-preserving synthesis: the ability to generate realistic synthetic data for downstream tasks without exposing any individual's real data. The second is data augmentation across silos: the ability to use federated training to produce augmented datasets that improve discriminative models in data-scarce domains. The third is collaborative generation: the ability to build generative models whose quality benefits from the aggregate knowledge of all clients, in a way that no single silo could achieve alone. These motivations are not redundant; each points to a different use case and a different set of technical requirements.

Motivation 1: Privacy-Preserving Synthesis

The fundamental idea is simple: if a generative model pฮธ(๐’™) faithfully approximates the true data distribution p(๐’™), then samples drawn from pฮธ can serve as a privacy-preserving substitute for real data. Downstream users who need data for training classifiers, running statistical analyses, or building risk models can work with synthetic samples ๐’™~โˆผpฮธ(๐’™) instead of real protected data.

The privacy argument is subtle and requires careful qualification. A naive version would claim that synthetic data is always safe because โ€œit's not real.โ€ This claim is false. A generative model trained on a small dataset with rare individuals can produce synthetic samples that effectively reveal the existence and attributes of those individuals. The correct claim, formalised in the differential privacy literature, is that if the generative model is trained with (ฯต,ฮด)-DP guarantees, then samples from the model provide (ฯต,ฮด)-DP guarantees for downstream analyses. This relies on the post-processing immunity property of differential privacy: any function of a DP output is also DP with the same parameters.

Federated learning with differential privacy (DP-FL) provides an architecture in which privacy guarantees are baked in at the point of gradient computation rather than applied as a post-hoc anonymisation step. The combination-FedAvg with DP-SGD-is therefore the principled approach to privacy-preserving generative model training.

In healthcare, the implications are transformative. Consider a rare paediatric oncology dataset distributed across 12 specialist children's hospitals worldwide, each with 50โ€“200 patients. No single hospital has enough data to train a useful generative model for data augmentation. Pooling is legally impossible under HIPAA and GDPR. Federated generative training with DP can produce a synthetic dataset of arbitrary size that preserves the distributional characteristics of the real data-tumour morphology, imaging protocols, demographic variation-while providing formal privacy guarantees to each patient.

Motivation 2: Data Augmentation Across Silos

Data augmentation-artificially expanding a training dataset through transformations of existing data-is one of the most reliable tools in the machine learning practitioner's toolkit. In computer vision, random crops, flips, colour jitter, and MixUp reliably improve generalisation. In medical imaging, where datasets are small and costly to annotate, generative augmentation (using a trained generative model to produce additional training samples) has emerged as a powerful supplement to geometric augmentation.

Federated generative augmentation combines the benefits of generative augmentation with the privacy properties of federated training. The protocol is:

  1. Train a federated generative model pฮธ on the union of all clients' local datasets, using only local gradient computations and aggregated parameter updates.

  2. Each client downloads the trained generator and uses it to augment its local training set for a downstream discriminative task: ๐’Ÿkโ€ฒ=๐’Ÿkโˆช{๐’™~i}i=1M, where ๐’™~iโˆผpฮธ.

  3. Each client trains a local discriminative model on its augmented dataset ๐’Ÿkโ€ฒ.

This protocol is particularly valuable in settings where label imbalance is severe or where rare classes are absent from some clients' datasets. A client whose local data contains no examples of a rare tumour subtype can augment its local dataset with synthetic examples of that subtype generated by the global generative model, which has learned the subtype's characteristics from the clients whose local data contains it.

Insight.

Federated learning does not just protect privacy-it unlocks data that would otherwise never exist for training. When regulatory barriers make centralisation impossible, federated training is not a privacy-preserving compromise compared to a centralised alternative; it is the only path to a model trained on the full aggregate data. The federated generative model trained on 12 hospitals' paediatric oncology data is strictly better than any model trained on a single hospital's data, regardless of its privacy properties. The privacy guarantee is a bonus on top of a fundamental capability improvement.

Motivation 3: Collaborative Generation

The third motivation is the most subtle but perhaps the most profound in the long run. Generative models are increasingly used not merely to synthesise private data but to build shared creative, scientific, and commercial artefacts: a language model that assists researchers across 100 universities; a protein structure predictor used by hundreds of pharmaceutical companies; a code generation model shared among tens of thousands of software teams.

In these settings, the challenge is not primarily privacy but collective intelligence: the aggregate knowledge encoded in all clients' data is greater than the sum of its parts, but no single client can contribute its data to a centralised pool. The competitive, legal, or sovereignty constraints that silo data are real, but so is the scientific or commercial value of a model trained on all of it.

Federated generative models provide the mechanism for this collaboration. A pharmaceutical company's drug-receptor binding model trained on its proprietary compound library can be combined with a competitor's model trained on their library-via federated aggregation of model updates-to produce a superior joint model, without either company revealing its compounds. The resulting model benefits from diversity of chemical space that neither company's library alone could provide.

Formal Definition

Definition 2 (Federated Generative Model).

Let ๐’Ÿ={(๐’Ÿk,๐’ซk)}k=1K be a federated dataset consisting of K local datasets ๐’Ÿk={๐’™i(k)}i=1nk with local distributions ๐’ซk, held by K participants (clients) subject to the constraint that no client k can observe any other client's raw data ๐’Ÿj for jโ‰ k.

A federated generative model is a parameterised generative model pฮธ:๐’ณโ†’โ„โ‰ฅ0โก trained via a federated learning protocol ฮ  such that:

  1. Data locality: during training, each gradient computation โˆ‡ฮธโ„’k(ฮธ;๐’Ÿk) is performed locally by client k; no raw sample ๐’™i(k) is transmitted to any other party.

  2. Collaborative optimisation: the protocol ฮ  ensures that the final parameters ฮธโˆ— are influenced by all K local datasets: ฮธโˆ—โ‰ˆargโกminฮธโกโˆ‘k=1Knknโ„’k(ฮธ;๐’Ÿk), where n=โˆ‘knk and โ„’k is the local generative loss.

  3. Privacy guarantee: the protocol ฮ  satisfies a specified privacy guarantee ๐’ข (e.g., (ฯต,ฮด)-DP, secure aggregation) with respect to each client's dataset.

The quality of the federated generative model is measured by the divergence d(pฮธโˆ—,p) between the trained model and the true aggregate distribution p=1nโˆ‘k=1Knk๐’ซk.

This definition encompasses multiple model classes and protocol variants. The privacy guarantee ๐’ข ranges from no formal guarantee (vanilla FedAvg) through secure aggregation (the server learns only aggregated gradients) to formal (ฯต,ฮด)-DP (with calibrated noise injection). The quality metric d may be the Frรฉchet Inception Distance (FID) for image models, perplexity for language models, or domain-specific metrics such as the Structural Similarity Index (SSIM) for medical images.

The Generative Model Zoo in FL Context

The five major families of generative models studied in this book each present different challenges and opportunities in the federated setting. We briefly characterise each here; subsequent sections and chapters develop the theory and algorithms in depth.

Generative Adversarial Networks (GANs).

GANs consist of a generator Gฮธ and discriminator Dฯ• trained in an adversarial minimax game. The federated challenge is immediate: in standard FedAvg, each client trains both Gฮธ and Dฯ• locally on its data. When clients have heterogeneous data distributions, local generators capture local modes while local discriminators are calibrated to local data manifolds. Averaging the parameters of heterogeneous generators produces a โ€œghost generatorโ€ whose outputs may not correspond to any real data mode. The discriminator averaging problem is equally severe: an averaged discriminator may fail to distinguish real from fake for any single client's data distribution, causing the adversarial training signal to collapse. FedGAN (Rajagopal et al., 2021) and MD-GAN (Hardy et al., 2019) address these challenges with server-side discriminator training and distributed generator architectures respectively.

Variational Autoencoders (VAEs).

VAEs optimise the Evidence Lower Bound (ELBO): (ELBO)โ„’VAE(๐œฝ,๐“;๐’™)=๐”ผq๐“(๐’›|๐’™)[logโกp๐œฝ(๐’™|๐’›)]โˆ’KLโก(q๐“(๐’›|๐’™)โ€–p(๐’›)). In the federated setting, the encoder q๐“(๐’›|๐’™) maps local client data to a shared latent space. If clients have heterogeneous data, their local posteriors q๐“(๐’›|๐’™) cluster in different regions of the latent space, creating a fragmented latent manifold. Aggregating encoder and decoder parameters across clients produces a global VAE whose latent space is a mixture of the local ones-an effect analogous to mode averaging in GANs but more analytically tractable due to the VAE's probabilistic formulation. FedVAE protocols exploit the decomposition of the ELBO into a reconstruction term (local, data-dependent) and a KL term (regularisation toward the prior, data-independent) to design aggregation strategies that preserve the shared latent structure.

Diffusion Models.

Diffusion models learn a denoising function ฯต๐œฝ(๐’™t,t)โ‰ˆฯต that predicts the noise added to a clean image ๐’™0 in the forward diffusion process. Their training objective is a weighted sum of denoising mean squared errors: (Diffusion LOSS)โ„’diff(๐œฝ)=๐”ผt,๐’™0,ฯต[โ€–ฯตโˆ’ฯต๐œฝ(๐’™t,t)โ€–2]. This objective is a simple mean squared error, which makes it unusually compatible with federated averaging: unlike the GAN adversarial objective, there is no generatorโ€“discriminator interaction that creates instability under parameter averaging. Federated diffusion training can proceed with standard FedAvg on the denoising network parameters, with the main challenge being the high communication cost of transmitting the large parameter vectors of modern U-Net or Transformer-based denoisers. Personalisation strategies-allowing the denoiser to be partially local-are particularly natural for diffusion models because the text conditioning mechanism in latent diffusion models provides a hook for client-specific style adaptation.

Large Language Models (LLMs).

Federated fine-tuning of large language models is the most active area of current federated generative learning research. Foundation models such as LLaMA, GPT, and PaLM are trained centralised on public data, then fine-tuned federally on private data held by clients (hospitals, law firms, individual users). The primary challenge is the extreme communication cost of transmitting updates to billion-parameter models. Parameter-Efficient Fine-Tuning (PEFT) methods-LoRA, prefix tuning, and adapters-reduce communication cost by updating only a small fraction of parameters. Federated LoRA, for example, updates only the low-rank adapter matrices ๐€โˆˆโ„rร—dโก and ๐โˆˆโ„dร—rโก (with rโ‰ชd) rather than the full weight matrix ๐–โˆˆโ„dร—dโก. The privacy challenge is correspondingly more subtle: even gradient updates to low-rank adapters can reveal significant information about the private fine-tuning data.

Normalising Flows.

Normalising flows learn an invertible transformation fฮธ:โ„dโกโ†’โ„dโก that maps a simple base distribution (e.g., Gaussian) to the data distribution via the change-of-variables formula: (FLOW)logโกpฮธ(๐’™)=logโกpz(fฮธโˆ’1(๐’™))+logโก|detโกโˆ‚fฮธโˆ’1โˆ‚๐’™|. Flows provide exact likelihood evaluation, which is valuable for membership inference detection (Chapter 29) and for evaluating the quality of federated training. In the federated setting, the log-likelihood objective decomposes exactly across clients, making the federated optimisation problem well-posed and the convergence analysis tractable. The challenge is primarily architectural: the Jacobian determinant computation in ((FLOW)) requires architectures with restricted parameter interactions (e.g., coupling layers in RealNVP, autoregressive flows), which limits expressiveness.

Taxonomy of Federated Generative Model Approaches

MethodModelTopologyPrivacyDomainComm. Cost
FedGANGANC/SAggImage synthesisO(|ฮธG|+|ฮธD|)
MD-GANGANC/SAggImage synthesisO(|ฮธG|)
DP-FedGANGANC/SDPMedical imagingO(|ฮธG|)
FedVAEVAEC/SAggTabular, imageO(|ฮธE|+|ฮธD|)
FedCVAECVAEC/SSAConditional synthesisO(|ฮธE|+|ฮธD|)
DP-FedVAEVAEC/SDPHealthcareO(|ฮธE|+|ฮธD|)
FedDiffDiffusionC/SAggImage, audioO(|ฮธฯต|)
PFedDiffDiffusionC/SDPMedical imagingO(|ฮธฯต|)
FedLLMLLMC/SSANLP, codeO(d2)
FedLoRALLMC/SDPNLP personalisationO(rd)
FedPFTLLMHierSACross-silo NLPO(d2)
FedFlowFlowC/SAggTabular, densityO(|ฮธf|)
D-FedFlowFlowP2PSADecentralised densityO(|ฮธf|)
Taxonomy of federated generative model (FGM) approaches. Topology: C/S = clientโ€“server (star); P2P = peer-to-peer; Hier = hierarchical. Privacy: Agg = aggregation only (vanilla FedAvg); SA = secure aggregation; DP = differential privacy. Domain indicates representative application areas. Communication complexity is per round per client, with d the model dimension and r the LoRA rank.

The taxonomy in Table 1 reveals several structural patterns. First, the GAN family requires the largest communication overhead because both generator and discriminator parameters must be synchronised; MD-GAN addresses this by keeping the discriminator server-side. Second, differential privacy (DP) consistently appears in the medical imaging and healthcare rows, reflecting the stringent privacy requirements of those domains. Third, hierarchical topologies (FedPFT) appear for LLM fine-tuning in cross-silo settings, where a two-level aggregation hierarchy (institution-level, then global) improves communication efficiency.

Visualising the FGM Taxonomy

Taxonomy tree of federated generative model (FGM) families and representative methods. The five primary families-FedGAN, FedVAE, FedDiffusion, FedLLM, and FedFlow-each have specialised variants addressing particular challenges: privacy enhancement (DP-FedGAN, DP-FedVAE), server-side efficiency (MD-GAN), personalisation (PFedDiff), parameter efficiency (FedLoRA), and decentralised topologies (D-FedFlow). Selected application domains are shown at the leaf level.

Cross-Silo vs. Cross-Device Federated Learning

The federated learning literature distinguishes two fundamentally different deployment contexts that impose very different engineering requirements on any federated generative model.

Definition 3 (Cross-Silo Federated Learning).

Cross-silo federated learning is a federated learning setting characterised by:

  • A small number of clients K (typically 2โ‰คKโ‰ค100), each representing an organisation (hospital, bank, research institution, government agency).

  • Each client has a large, stable dataset: nk may range from thousands to millions of examples.

  • Clients participate in every communication round (full participation).

  • Clients are reliable, with high-bandwidth, stable network connections.

  • Training is coordinated during off-peak hours, with explicit institutional consent.

  • Privacy requirements are governed by institutional data sharing agreements, sector-specific regulation (HIPAA, PSD2), and inter-organisational contracts.

Representative applications include hospital consortia training shared medical imaging models, bank consortia training shared fraud detection models, and pharmaceutical company consortia training shared drug discovery models.

Definition 4 (Cross-Device Federated Learning).

Cross-device federated learning is a federated learning setting characterised by:

  • A massive number of clients K (typically 104โ‰คKโ‰ค109), each representing an individual user's device (smartphone, tablet, IoT device).

  • Each client has a small, volatile dataset: nk may be tens to hundreds of examples, and the dataset changes as the user generates new data.

  • Only a small fraction of clients Cโ‰ชK participate in each communication round (partial participation).

  • Clients are unreliable: they may drop out mid-round (due to loss of network connectivity or power), may be unavailable due to device state requirements (charging + WiFi + idle), and may have highly heterogeneous computational capabilities.

  • Communication is over mobile networks with variable bandwidth and high latency.

  • Privacy requirements are governed by platform policies (Apple App Store, Google Play), consumer protection law (CCPA, GDPR), and implicit user expectations.

Representative applications include mobile keyboard personalisation, on-device speech synthesis, and federated personalisation of recommendation models.

The contrast between cross-silo and cross-device settings has profound implications for federated generative model design. In the cross-silo setting, communication rounds can be expensive (transmitting full model snapshots is acceptable); training can run for many rounds without client dropout; and the number of clients is small enough that advanced coordination protocols (e.g., secure multi-party computation) are feasible. In the cross-device setting, communication must be minimised to kilobytes per round; client dropout must be tolerated gracefully; and the server must aggregate contributions from hundreds or thousands of clients simultaneously.

For generative models specifically:

  • Cross-silo: full model training is feasible. Hospitals can train full VAEs, GANs, or diffusion models. Aggregation of complete model parameters is the standard approach. Privacy is ensured through secure aggregation and, where required, differential privacy with strong guarantees (ฯตโ‰ค1 in some regulatory contexts).

  • Cross-device: only parameter-efficient fine-tuning is feasible. Smartphones cannot train billion-parameter diffusion models. Federated fine-tuning of foundation model adapters (LoRA, prefix vectors) is the dominant approach. Privacy must be ensured with less overhead; lightweight DP mechanisms with looser guarantees (ฯตโ‰ค8) are typical.

Connections to Previous Chapters

This chapter builds on and connects to several earlier developments in the book.

Chapter 33: Medical Image Segmentation.

The clinical motivation of Chapter 36 is directly addressed by federated generative learning. The annotation bottleneck-the difficulty of obtaining sufficient expert-labelled medical images-is precisely the problem that federated generative augmentation solves. A federated GAN or diffusion model trained across hospital consortia generates annotated synthetic images that each hospital can use to augment its own small labelled dataset, reducing the annotation burden without violating data sharing agreements. The FedDiff protocol developed in sec:fedgen:algorithms:diffusion is directly applicable to the chest X-ray, MRI, and histopathology settings of Chapter 36.

Chapter 35: Interpretability and Explainability.

The interpretability methods of Chapter 38 acquire new significance in the federated setting. When a model is trained federally, the provenance of any given learned feature is obscured: it may have come from Client 1's data, Client 3's data, or a complex interaction of all clients' contributions. Gradient attribution methods (saliency maps, SHAP, LIME) can in principle be used to assign learned features to client contributions, raising both interpretability and privacy concerns. If a saliency map of the global generative model can be attributed to specific training examples from Client k's private data, this constitutes a privacy leakage. The intersection of interpretability and federated privacy is a rich open research area.

Chapter 36: Membership Inference Attacks.

Chapter 29 established the foundations of membership inference as a formal privacy threat. In the federated setting, membership inference takes on a new dimension: an adversarial server can attempt to perform membership inference on the gradient updates it receives, determining which individual examples contributed to a specific round's gradient. Conversely, the federated training protocol itself can be seen as a privacy amplification mechanism: by training on only a fraction of clients per round and adding noise through partial participation and dropout, the server's per-example information is diluted. This privacy amplification by subsampling is formalised by Balle et al. (2020) and provides a key theoretical tool for DP accounting in federated settings.

Chapter Roadmap

Dependency diagram for Chapter 37. Dashed blue arrows indicate dependencies on prior chapters. Solid black arrows indicate the reading order within this chapter. Dashed green arrows highlight non-sequential dependencies: Sec. 5 (Federated Diffusion) builds on the FedGAN algorithms of Sec. 3; Sec. 7 (Privacy Guarantees) synthesises the DP analysis developed across Secs. 3โ€“6. Sections 1 and 2 (shaded thmgreen, this file) are the foundation for all subsequent sections.

The chapter proceeds as follows. Sections 1โ€“2 (this file, sec_fedgen_a.tex) establish the motivation, formal definitions, and conceptual framework. Section 3 develops the algorithms for federated GAN training in depth: the MD-GAN protocol, convergence analysis under non-iid data, the FedGAN minimax landscape, and DP-FedGAN for medical applications. Section 4 addresses FedVAE and FedFlow: the decomposition of the ELBO under federated training, latent space alignment across clients, and the exact likelihood advantage of flows in federated density estimation. Section 5 covers federated diffusion models: the FedDiff protocol, communication compression for large denoisers, personalised diffusion via local conditioning, and applications to medical image synthesis. Section 6 develops the FedLLM ecosystem: federated fine-tuning with LoRA, prefix tuning, and adapters; the communication-privacy trade-off in FedLoRA; and applications to clinical NLP and code generation. Section 7 provides the formal privacy analysis: (ฯต,ฮด)-DP for FedAvg with Gaussian noise, privacy amplification by subsampling, Rรฉnyi differential privacy accounting, and the privacy-utility Pareto frontier for federated generative models. Section 8 covers evaluation: FID, KID, precision/recall, and domain-specific metrics; benchmark datasets and protocols for federated generative model comparison; and the unique challenges of evaluating models trained on private federated data.

Section Exercises

Exercise 4 (ELBO Decomposition in FedVAE).

Let ๐’Ÿ=โ‹ƒk=1K๐’Ÿk be a federated dataset with nk=|๐’Ÿk| and n=โˆ‘knk. For a VAE with encoder q๐“(๐’›|๐’™), decoder p๐œฝ(๐’™|๐’›), and prior p(๐’›)=๐’ฉ(๐ŸŽ,๐ˆ), the global ELBO is โ„’(๐œฝ,๐“)=1nโˆ‘i=1nโ„’VAE(๐œฝ,๐“;๐’™i) where โ„’VAE is given in .

  1. Show that the global ELBO decomposes as โ„’(๐œฝ,๐“)=โˆ‘k=1Knknโ„’k(๐œฝ,๐“), where โ„’k(๐œฝ,๐“)=1nkโˆ‘๐’™โˆˆ๐’Ÿkโ„’VAE(๐œฝ,๐“;๐’™) is the local ELBO for client k. Identify which terms in โ„’k depend on local data and which depend only on the global prior p(๐’›).

  2. In a federated setting, FedAvg computes (๐œฝ(t+1),๐“(t+1))=โˆ‘knkn(๐œฝk(t),๐“k(t)), where (๐œฝk(t),๐“k(t)) are the parameters after E local gradient steps on โ„’k. Derive the โ€œclient driftโ€ for FedVAE: the difference between the local optimum (๐œฝkโˆ—,๐“kโˆ—) and the global optimum (๐œฝโˆ—,๐“โˆ—). Express this drift in terms of the KL divergence between the local posterior q๐“kโˆ—(๐’›|๐’™) and the global posterior q๐“โˆ—(๐’›|๐’™) averaged over ๐’™โˆผ๐’ซk.

  3. Propose a regularisation term added to each local ELBO that encourages the local posterior to remain close to the global posterior, reducing client drift. Show that this regularisation can be interpreted as a form of posterior distillation.

Exercise 5 (Communication Complexity of Federated Generative Models).

Consider a federated training scenario with K=100 clients, T=500 communication rounds, and partial participation with C=10 clients per round.

  1. Compute the total communication cost (in bits) for: itemize

  2. FedGAN with a StyleGAN2 generator (30M parameters) and discriminator (25M parameters), using 32-bit floats.

  3. FedDiff with a U-Net denoiser (860M parameters), using 16-bit floats with gradient checkpointing that reduces the effective communication parameter count to 430M.

  4. FedLoRA applied to a 7B-parameter LLM with LoRA rank r=16 and adapters applied to all attention matrices (dmodel=4096), using 16-bit floats. itemize

  5. FedProx (Li et al., 2020) adds a proximal regularisation term ฮผ2โ€–๐œฝโˆ’๐œฝ(t)โ€–2 to the local objective. Show that this term does not change the communication cost of FedAvg. Now consider Top-k gradient sparsification that transmits only the k largest-magnitude gradient coordinates. What value of k (as a fraction of the total parameter count) is required to match the communication cost of FedLoRA from part (a)?

  6. Propose a communication-efficient protocol for FedDiff that exploits the spectral structure of the denoiser's weight matrices. (Hint: consider spectral decomposition of each weight matrix ๐–=๐”๐šบ๐•โŠค and transmitting only the top-r singular vectors.) Analyse the quality degradation as a function of r.

Exercise 6 (Cross-Silo vs. Cross-Device Protocol Design).

A generative AI startup must deploy a federated text-to-image diffusion model in two scenarios simultaneously:

  • Scenario A (cross-silo): 8 pharmaceutical companies, each with a proprietary database of 500,000 molecule images and associated captions, wish to jointly train a molecule synthesis model without sharing their compound databases.

  • Scenario B (cross-device): 10 million artists using a mobile app, each with 100โ€“1,000 personal artworks, wish to personalise a shared diffusion model to their individual style.

  1. For each scenario, specify: (i) participation fraction per round, (ii) local training epochs per round, (iii) communication protocol (FedAvg, FedProx, FedLoRA, or other), (iv) privacy mechanism (none, secure aggregation, DP), and (v) client dropout strategy. Justify each choice.

  2. In Scenario A, the 8 companies differ in dataset size: Companies 1โ€“4 have 200,000 molecules each; Companies 5โ€“8 have 900,000 molecules each. Show that vanilla FedAvg ((Fedavg)) is not optimal for this heterogeneous setting and propose a re-weighting scheme that accounts for dataset size while maintaining a privacy guarantee.

  3. In Scenario B, the personal styles of 10 million artists span an enormous diversity. The startup wishes to ensure that the personalised model for artist k generates images โ€œin the style of artist kโ€ with high fidelity, while also benefiting from the federated global model's general image quality. Formalise this as a multi-objective federated optimisation problem with a personalisationโ€“generalisation trade-off parameter ฮปโˆˆ[0,1]. What value of ฮป minimises the expected style distance from artist k's preferred style, and how does this depend on nk (the artist's dataset size)?

Federated Learning Fundamentals

Federated learning asks a deceptively simple question: can we train a shared model across N clients who each hold private data, without ever moving that data off-device? The answer is yes, but the price is a cascade of engineering and mathematical challenges, each more subtle than the last. This section develops the core algorithmic machinery starting from the canonical Federated Averaging (FedAvg) algorithm of McMahan et al. (2017), then progresses through the failure modes that motivated a decade of refinements.

Problem Setup and Notation

Let [N]={1,โ€ฆ,N} denote the set of N clients. Client i holds a private dataset ๐’Ÿi={(๐’™j(i),yj(i))}j=1ni of size ni, drawn from a local distribution ๐’ซi. The total number of samples is n=โˆ‘i=1Nni. The local objective of client i is (Local OBJ)Fi(๐’˜)=1niโˆ‘j=1niโ„“(f๐’˜(๐’™j(i)),yj(i)), where ๐’˜โˆˆโ„dโก are the model parameters and โ„“ is a per-sample loss. The global objective is the weighted average (Global OBJ)F(๐’˜)=โˆ‘i=1NninFi(๐’˜). Centralised training minimises F(๐’˜) with full access to all data; federated training must approximate this using only local gradients and periodic communication.

A key quantity is the degree of heterogeneity. Let ๐’ˆโˆ—=โˆ‡F(๐’˜โˆ—) be the gradient at the global optimum. The client drift at client i is measured by the distance between local and global gradients: (Drift Measure)ฮดi(๐’˜)=โ€–โˆ‡Fi(๐’˜)โˆ’โˆ‡F(๐’˜)โ€–2. When all ๐’ซi are identical (IID regime), ฮดi(๐’˜)=0 for all ๐’˜. In the non-IID regime, this term drives the dominant error term in convergence bounds.

The FedAvg Algorithm

Definition 5 (Federated Averaging (FedAvg)).

Let T denote the number of communication rounds, E the number of local SGD epochs per round, ฮท the local learning rate, and Cโˆˆ(0,1] the client sampling fraction. FedAvg proceeds as follows. The server initialises ๐’˜0โˆˆโ„dโก. At each round tโˆˆ{0,โ€ฆ,Tโˆ’1}:

  1. Broadcast. The server sends ๐’˜t to a randomly sampled subset ๐’ฎtโІ[N] with |๐’ฎt|=maxโก(1,โŒŠCNโŒ‹).

  2. Local update. Each client iโˆˆ๐’ฎt initialises ๐’˜it,0=๐’˜t and runs E epochs of mini-batch SGD on its local data: (Local SGD)๐’˜it,k+1=๐’˜it,kโˆ’ฮทโˆ‡~Fi(๐’˜it,k),k=0,โ€ฆ,ฯ„โˆ’1, where ฯ„ denotes the total number of local gradient steps per round (ฯ„=Eโ‹…โŒˆni/BโŒ‰ for mini-batch size B) and โˆ‡~Fi is the stochastic gradient computed on a random mini-batch.

  3. Upload. Each client iโˆˆ๐’ฎt sends ฮ”it=๐’˜it,ฯ„โˆ’๐’˜t (the model update) to the server.

  4. Aggregate. The server performs weighted averaging: (Aggregation)๐’˜t+1=๐’˜t+โˆ‘iโˆˆ๐’ฎtniโˆ‘jโˆˆ๐’ฎtnjฮ”it.

When E=1 and B=ni (single full-batch local step), FedAvg reduces to one-shot FedSGD.

Remark 2 (Why weighted averaging?).

The weights ni/โˆ‘jnj in (Aggregation) ensure that the aggregate update is an unbiased estimator of the true gradient โˆ‡F(๐’˜t) when each local update uses a single gradient step (ฯ„=1) and gradients are unbiased. For ฯ„>1, the estimator becomes biased in the non-IID regime, which is the root cause of client drift.

The following TikZ figure illustrates one complete communication round of FedAvg.

One communication round of FedAvg. The server broadcasts the current global model ๐’˜t to K sampled clients; each client runs ฯ„ local SGD steps; the resulting model updates ฮ”it are uploaded; and the server aggregates them with weighted averaging to produce ๐’˜t+1.

Convergence Analysis

We analyse FedAvg convergence under the following standard assumptions.

Assumption 1 (Smoothness and Bounded Variance).

  1. L-smoothness. Each local objective Fi is L-smooth: for all ๐’˜,๐’—โˆˆโ„dโก, โ€–โˆ‡Fi(๐’˜)โˆ’โˆ‡Fi(๐’—)โ€–โ‰คLโ€–๐’˜โˆ’๐’—โ€–.

  2. Bounded stochastic variance. Each stochastic gradient satisfies ๐”ผ[โˆ‡~Fi(๐’˜)]=โˆ‡Fi(๐’˜) and ๐”ผ[โ€–โˆ‡~Fi(๐’˜)โˆ’โˆ‡Fi(๐’˜)โ€–2]โ‰คฯƒ2.

  3. Bounded gradient dissimilarity. There exist constants Gโ‰ฅ0 and Bโ‰ฅ1 such that for all ๐’˜: โˆ‘i=1Nninโ€–โˆ‡Fi(๐’˜)โ€–2โ‰คG2+B2โ€–โˆ‡F(๐’˜)โ€–2. The IID case corresponds to G=0, B=1.

Under these assumptions, the convergence of FedAvg depends critically on whether data is IID across clients.

Proposition 1 (FedAvg Convergence Rate).

Under Assumption 1, with learning rate ฮทโ‰ค18Lฯ„, FedAvg after T rounds satisfies: (Convergence Bound)1Tโˆ‘t=0Tโˆ’1๐”ผ[โ€–โˆ‡F(๐’˜t)โ€–2]โ‰ค2(F(๐’˜0)โˆ’Fโˆ—)ฮทฯ„TโŸoptimisationย error+6Lฮท2(ฯ„โˆ’1)2ฯƒ2nโŸvariance+8L2ฮท2(ฯ„โˆ’1)2(G2+6ฯ„ฯƒ2)โŸclientย drift, where Fโˆ—=min๐’˜โกF(๐’˜).

Proof sketch.

The proof proceeds in four steps. Step 1 (Descent lemma): By L-smoothness, the one-step decrease satisfies F(๐’˜t+1)โ‰คF(๐’˜t)+โŸจโˆ‡F(๐’˜t),๐’˜t+1โˆ’๐’˜tโŸฉ+L2โ€–๐’˜t+1โˆ’๐’˜tโ€–2. Step 2 (Aggregate update decomposition): Write ๐’˜t+1โˆ’๐’˜t=โˆ’ฮทโˆ‘k=0ฯ„โˆ’1โˆ‘iโˆˆ๐’ฎt(ni/n)โˆ‡~Fi(๐’˜it,k). Taking expectations and bounding the cross-terms using the Cauchyโ€“Schwarz inequality yields the inner product term.

Step 3 (Drift bound): The key non-IID penalty arises from โ€–๐’˜it,kโˆ’๐’˜tโ€–2, the local model's deviation from the global model after k local steps. Under Assumption 1(c), a telescoping argument bounds this deviation by 4k2ฮท2(ฯƒ2+G2), which, summed over ฯ„ steps, gives the drift term โˆฯ„2ฮท2G2.

Step 4 (Telescope and average): Summing the descent inequality over T rounds, dividing by T, and choosing ฮท=๐’ช(1/ฯ„T) to balance the three terms yields (Convergence Bound).

Remark 3 (IID vs. Non-IID).

In the IID regime (G=0, all ๐’ซi identical), the drift term vanishes and FedAvg achieves the same ๐’ช(1/T) rate as centralised SGD with communication every ฯ„ steps. In the non-IID regime, the drift term โˆฯ„2ฮท2G2 dominates unless ฯ„ is kept small (few local steps) or the learning rate ฮท is correspondingly reduced. Increasing ฯ„ to save communication hurts convergence in proportion to data heterogeneity: there is a fundamental three-way tension between communication frequency, local computation, and convergence rate.

FedAvg Variants and Improvements

The convergence analysis of Proposition 1 reveals three levers for improvement: reduce the drift term, stabilise the aggregation step, or employ variance reduction. Each lever has inspired a family of algorithms.

FedProx: Limiting Client Drift via Proximal Regularisation

The simplest fix is to regularise the local objective so that client updates cannot stray too far from the global model. FedProx (Li et al., 2020) modifies the local objective to: (Fedprox OBJ)hi(๐’˜;๐’˜t)=Fi(๐’˜)+ฮผ2โ€–๐’˜โˆ’๐’˜tโ€–2, where ฮผ>0 is a proximal coefficient. The added term acts as a quadratic anchor: the further ๐’˜ departs from ๐’˜t, the greater the penalty. Formally, FedProx produces an ฯต-inexact local minimiser: ๐’˜it,ฯ„ satisfying โ€–โˆ‡hi(๐’˜it,ฯ„;๐’˜t)โ€–โ‰คฯตโ€–โˆ‡hi(๐’˜t;๐’˜t)โ€–. The proximal term reduces the effective gradient dissimilarity from G2 to G2/(1+ฮผ/L)2, shrinking the drift penalty at the cost of introducing a regularisation bias proportional to ฮผ. In practice, ฮผ is a cross-validated hyperparameter; too small and drift is unchecked, too large and the model is prevented from learning.

FedAdam: Adaptive Optimisation for the Server Step

FedAvg performs a simple weighted average in the aggregation step ((Aggregation)), which is equivalent to the server taking a vanilla SGD step on the pseudo-gradient ฮ”โ€พt=โˆ‘i(ni/n)ฮ”it/ฮท. Reddi et al. (2021) observed that replacing the server-side SGD with an adaptive optimiser dramatically stabilises training in the non-IID regime. FedAdam applies the Adam update on the server: (Fedadam M)๐’Žt=ฮฒ1๐’Žtโˆ’1+(1โˆ’ฮฒ1)ฮ”โ€พt,๐’—t=ฮฒ2๐’—tโˆ’1+(1โˆ’ฮฒ2)(ฮ”โ€พt)2,๐’˜t+1=๐’˜t+ฮทs๐’Žt๐’—t+ฯตs, where ฮทs is the server learning rate and operations are element-wise. The adaptive denominator ๐’—t+ฯตs dampens directions where the pseudo-gradient has been historically large (high variance) and amplifies directions where it has been consistently small (informative). Empirically, FedAdam reduces the sensitivity to client heterogeneity, achieving comparable accuracy to FedAvg with 2ร— fewer communication rounds on standard benchmarks.

SCAFFOLD: Variance Reduction via Control Variates

SCAFFOLD (Karimireddy et al., 2020) provides the most principled solution to client drift by introducing control variates that explicitly correct the bias introduced by local SGD. Each client i maintains a control variate ๐’„iโˆˆโ„dโก (initialised to 0), and the server maintains a global control variate ๐’„โˆˆโ„dโก.

The SCAFFOLD local update replaces the local gradient with a bias-corrected version: (Scaffold Update)๐’˜it,k+1=๐’˜it,kโˆ’ฮท(โˆ‡~Fi(๐’˜it,k)โˆ’๐’„i+๐’„),k=0,โ€ฆ,ฯ„โˆ’1. The correction โˆ’๐’„i+๐’„ acts as an estimate of the local drift: ๐’„i approximates โˆ‡Fi(๐’˜โˆ—) and ๐’„ approximates โˆ‡F(๐’˜โˆ—). After the local update, the client computes a new control variate estimate: (Scaffold CV Update)๐’„i+=๐’„iโˆ’๐’„+1ฯ„ฮท(๐’˜tโˆ’๐’˜it,ฯ„), and sends both ฮ”it=๐’˜it,ฯ„โˆ’๐’˜t and the control variate update ฮ”๐’„i=๐’„i+โˆ’๐’„i to the server. The server updates: ๐’˜t+1=๐’˜t+1|๐’ฎt|โˆ‘iโˆˆ๐’ฎtฮ”it,๐’„+=๐’„+1Nโˆ‘iโˆˆ๐’ฎtฮ”๐’„i.

Definition 6 (Client Drift (Formal)).

In a federated optimisation protocol with ฯ„ local steps and learning rate ฮท, the client drift for client i at round t is the signed displacement (Client Drift)ฮ“it=๐’˜it,ฯ„โˆ’๐’˜tโˆ’ฯ„ฮทโˆ‡F(๐’˜t), the gap between the actual local update and the ideal update (as if the client had access to the global gradient). When G=0 (IID), ๐”ผ[ฮ“it]=0. In the non-IID regime, ๐”ผ[ฮ“it]โ‰ 0 and its magnitude grows with both ฯ„ and the gradient dissimilarity G.

Remark 4 (SCAFFOLD's Guarantee).

Under Assumption 1, SCAFFOLD achieves the ๐’ช(1/T) rate for general non-convex objectives, matching the centralised SGD rate and eliminating the ฯ„2G2 drift term that plagues FedAvg. The cost is double communication per round: clients must upload both the model update and the control variate update.

Comparison of FL Optimisation Algorithms

AlgorithmKey ideaRateNon-IID robustComm. / round
FedSGD1 gradient step, aggregate๐’ช(1/T)โœ“1 vector
FedAvgฯ„ local SGD steps๐’ช(1/ฯ„T)ร—1 vector
FedProxProximal regularisation๐’ช(1/T)Partial1 vector
FedAdamAdaptive server step๐’ช(1/T)Partial1 vector
SCAFFOLDControl variates๐’ช(1/T)โœ“2 vectors
Comparison of federated optimisation algorithms. The convergence rates refer to 1Tโˆ‘t๐”ผ[โ€–โˆ‡F(๐’˜t)โ€–2]โ‰คฮต for non-convex objectives. โ€œNon-IID robustโ€ indicates whether the drift term G2 vanishes from the bound. Communication per round counts the number of d-dimensional vectors transmitted per client.

Key Idea.

FedAvg is simple but fragile - every improvement addresses a specific failure mode. FedAvg's elegance is also its weakness: it assumes gradients from different clients point in roughly the same direction. FedProx addresses runaway local updates. FedAdam stabilises noisy aggregated updates. SCAFFOLD eliminates the systematic bias introduced by heterogeneous data. No single algorithm dominates across all settings; the right choice depends on the interplay of heterogeneity level, available communication budget, and the computational capacity of clients.

Communication Rounds, Local Epochs, and the Round-Accuracy Trade-off

A fundamental design question is how many local epochs E to perform before synchronisation. The convergence bound (Convergence Bound) reveals a trilemma:

  • Communication cost scales as Tร—Nร—dร—32 bits. Reducing T (fewer rounds) requires increasing ฯ„ (more local computation per round).

  • Convergence speed degrades with ฯ„ in the non-IID regime: each additional local step amplifies drift by ๐’ช(ฯ„2G2ฮท2).

  • Wall-clock time per round grows linearly with ฯ„ (synchronous FL) or is bounded by the slowest client (asynchronous FL).

Practitioners typically set Eโˆˆ{1,5,10} local epochs and use learning rate warmup for the first few rounds. The relationship between T, E, ฮท, and final test accuracy forms a three-dimensional Pareto surface that must be navigated empirically for each deployment.

Exercises

Exercise 7.

FedAvg in the IID regime. Suppose N=100 clients, each with ni=100 samples drawn IID from the same distribution. Show that in this case the FedAvg update (Aggregation) is an unbiased estimator of a mini-batch SGD step with effective batch size ฯ„โ‹…Bโ‹…K where K=|๐’ฎt| is the number of sampled clients. What happens to the variance as Kโ†’N?

Exercise 8.

SCAFFOLD control variate correctness. Verify that when the local objective satisfies Fi=F for all i (IID setting), the SCAFFOLD control variate update (Scaffold CV Update) gives ๐’„i+=๐’„i after convergence, so no correction is applied. Explain why this is the correct behaviour.

Exercise 9.

FedProx regularisation bias. Consider a 1D quadratic F1(w)=(wโˆ’1)2 and F2(w)=(w+1)2 with n1=n2, so F(w)=w2. Suppose the server broadcasts wt=0. Compute the FedProx local minimiser wit,ฯ„ for each client as a function of ฮผ, and show that the aggregated update ๐’˜t+1 equals 0 for all ฮผ>0. Contrast with FedAvg (ฮผ=0) after ฯ„ local steps. What does this reveal about FedProx's convergence behaviour for symmetric data?

Communication Efficiency and Compression

Federated learning's promise of privacy-preserving collaboration carries a steep communication price. A modern language model has 109 parameters; at 32-bit floating-point precision, each model transmission costs 4ร—109 bytes - 4 gigabytes per round per client. With 100 communication rounds and 1000 clients, the aggregate bandwidth consumed is 4ร—1014 bytes, or 400 terabytes. Even a hospital network with 1 Gbps links would require about 3.2ร—106 seconds (โ‰ˆ37 days) for the uploads alone. In mobile cross-device FL, where clients connect over LTE with upload speeds of 5โ€“20 Mbps, a single round takes hours.

This section develops the mathematics of communication-efficient federated learning: how much information must be transmitted, what can be lost without degrading convergence, and how modern compression schemes navigate this boundary.

The Bandwidth Bottleneck: A Quantitative View

Definition 7 (Communication Efficiency).

For a federated protocol with T rounds, N clients, and model dimension d, define:

  • Total bits transmitted (upload): Btotal=Tโ‹…Kโ‹…bits_per_update, where K=CN is the number of active clients per round.

  • Bits per round per parameter: b=bits_per_update/d.

  • Compression ratio: ฯ=b/32, the fraction of the uncompressed 32-bit baseline actually transmitted.

A compression scheme achieves k-bit communication efficiency if b=k for all rounds. Uncompressed floating-point corresponds to k=32; 1-bit methods target k=1; sparsification methods achieve k=32p where pโˆˆ(0,1) is the fraction of non-zero coordinates transmitted.

The raw numbers underscore the urgency. For GPT-2 (117M parameters), 100 rounds of uncompressed FL require: (Bandwidth CALC)Btotal=100ร—1000ร—117ร—106ร—32ย bits=3.74ร—1014ย bitsโ‰ˆ46ย TB. A factor-32 compression (from 32-bit to 1-bit) would reduce this to 1.44 TB, still substantial but tractable on enterprise links. The goal of communication-efficient FL is to achieve compression ratios ฯโ‰ช1 with minimal accuracy loss.

Gradient Sparsification

The simplest observation is that most gradient coordinates are near zero most of the time. Sparsification exploits this by transmitting only the K largest-magnitude coordinates.

Top-K sparsification. Given a gradient vector ๐’ˆโˆˆโ„dโก, define the Top-K mask: (TOPK)TopK(๐’ˆ)j={gjifย |gj|ย isย amongย theย Kย largestย inย absoluteย value,0otherwise. The compression ratio is K/d (for the values) plus overhead for transmitting the K indices (Klog2โกd bits). For K/d=0.01 (top 1%), only 1% of parameters are communicated, but indices add log2โก(109)โ‰ˆ30 bits per value, so the true savings are moderate unless K is very small.

Top-K with error feedback. Naive Top-K discards the non-transmitted gradient mass, leading to divergence. The error feedback mechanism (Seide et al., 2014; Stich et al., 2018) accumulates the error and adds it to the next round's gradient: (Error Feedback E)๐’†it+1=๐’†it+โˆ‡Fi(๐’˜t)โˆ’TopK(๐’†it+โˆ‡Fi(๐’˜t)),๐’ˆit,sent=TopK(๐’†it+โˆ‡Fi(๐’˜t)). The key property is that ๐’†it+โˆ‡Fi(๐’˜t) is exactly recovered as ๐’ˆit,sent+๐’†it+1, so no gradient mass is permanently discarded. Under the contraction property โ€–TopK(๐’ˆ)โˆ’๐’ˆโ€–2โ‰ค(1โˆ’K/d)โ€–๐’ˆโ€–2, error feedback guarantees convergence at the same asymptotic rate as full gradient communication.

Quantisation Methods

Quantisation reduces the bit-width used to represent each gradient value. The trade-off is between representation precision and communication cost.

1-Bit SGD

Seide et al. (2014) proposed compressing each gradient to a single bit per coordinate by transmitting only the sign: (1BIT SGD)Q1(๐’ˆ)=โ€–๐’ˆโ€–1โ‹…signโก(๐’ˆ)/d, where signโก(๐’ˆ)j=+1 if gjโ‰ฅ0 and โˆ’1 otherwise, and the scalar โ€–๐’ˆโ€–1/d normalises the magnitude. The client transmits the d-bit sign vector plus a single scalar, achieving bโ‰ˆ1 bit per parameter. Like Top-K, 1-bit SGD requires error feedback to prevent divergence.

Ternary Quantisation

Ternary quantisation maps each gradient value to {โˆ’ฮ”,0,+ฮ”} for some threshold ฮ”>0: (Ternary)QT(๐’ˆ)j={+ฮ”gj>ฮ”,0|gj|โ‰คฮ”,โˆ’ฮ”gj<โˆ’ฮ”. Choosing ฮ”=0.7dโ€–๐’ˆโ€–1 (the standard threshold) minimises the expected quantisation error. Each ternary value requires log2โก3โ‰ˆ1.58 bits, but since zero values need not be transmitted, effective compression depends on the sparsity of the gradient. Ternary quantisation is particularly relevant for FedDT (see Knowledge Distillation in Federated Learning: FedDT).

SignSGD and Its Convergence Guarantees

Bernstein et al. (2018) proposed SignSGD, which transmits only the sign of each gradient coordinate (like 1-bit SGD without error feedback) and uses majority voting in aggregation: (Signsgd)๐’˜t+1=๐’˜tโˆ’ฮทโ‹…signโก(โˆ‘iโˆˆ๐’ฎtsignโก(โˆ‡Fi(๐’˜t))). The majority vote aggregation is interesting: instead of averaging gradient magnitudes, the server takes the coordinate-wise majority of client signs. A coordinate is updated positively (negatively) if more than half the clients report a positive (negative) gradient.

Proposition 2 (SignSGD Convergence).

Under Assumption 1(a,b) and assuming the stochastic gradient โˆ‡~Fi(๐’˜) has a unimodal symmetric distribution for each coordinate j, SignSGD with majority vote and learning rate ฮท=๐’ช(1/Td) satisfies: (Signsgd RATE)1Tโˆ‘t=0Tโˆ’1๐”ผ[โ€–โˆ‡F(๐’˜t)โ€–1]โ‰ค๐’ช(dTโ‹…ฯƒ2+G2N)+๐’ช(dT), where the rate is in the โ„“1 norm of the gradient. The ๐’ช(d) factor is the price of sign compression: the โ„“1 norm of a d-dimensional vector with unit โ„“2 norm is at most d.

Proof sketch.

The unimodal symmetry assumption implies that the sign of the stochastic gradient signโก(g~ij) is an unbiased estimator of signโก(gij) when gijโ‰ 0. Majority voting over N clients further concentrates: by Hoeffding's inequality, the probability of an incorrect majority vote decays as expโก(โˆ’Ngij2/(2ฯƒ2)). The descent lemma applied with respect to the โ„“1 gradient norm, combined with the sign approximation error, yields the bound in (Signsgd RATE).

Low-Rank Approximation

For models with large weight matrices (e.g., transformers), gradient matrices ๐†โˆˆโ„mร—nโก can be approximated by their rank-r truncated SVD: (SVD Compress)๐†^r=๐”r๐šบr๐•rโŠค, where ๐”rโˆˆโ„mร—rโก, ๐šบrโˆˆโ„rร—rโก, ๐•rโˆˆโ„nร—rโก. The compression ratio is r(m+n+r)/(mn), which is advantageous when rโ‰ชminโก(m,n). The approximation error is โ€–๐†โˆ’๐†^rโ€–F2=โˆ‘k>rฯƒk2, where ฯƒk are the singular values. PowerSGD (Vogels et al., 2019) computes this approximation efficiently using power iteration, avoiding a full SVD.

Knowledge Distillation in Federated Learning: FedDT

Rather than compressing gradients directly, knowledge distillation-based approaches compress the model outputs transmitted between clients and server. FedDT (Federated with Distillation and Ternary compression) combines ternary weight quantisation with dataset distillation-based knowledge transfer.

In FedDT, each client i trains a locally quantised model f๐’˜^i where ๐’˜^iโˆˆ{โˆ’ฮ”i,0,+ฮ”i}d are ternary weights. Instead of uploading the full model, the client distils its knowledge into soft labels on a small public (proxy) dataset ๐’Ÿpub: (Feddt Softlabels)๐’”it={f๐’˜^it(๐’™)}๐’™โˆˆ๐’Ÿpub, and transmits ๐’”itโˆˆโ„|๐’Ÿpub|ร—Cโก (where C is the number of classes). The server aggregates soft labels: (Feddt Aggregate)๐’”โ€พt=1|๐’ฎt|โˆ‘iโˆˆ๐’ฎt๐’”it, and each client performs local distillation: (Feddt Distil LOSS)โ„’distil(๐’˜)=1|๐’Ÿpub|โˆ‘๐’™โˆˆ๐’ŸpubKL(f๐’˜(๐’™)โ€–๐’”โ€พt(๐’™)). The communication cost per round per client is |๐’Ÿpub|ร—Cร—32 bits (for the soft labels), which is independent of model size d. For |๐’Ÿpub|=1000 and C=10, this is 320,000 bits, compared to dร—32 bits for a full model upload with d=109 (32ร—109 bits).

Empirical results. FedDT achieves a 78% reduction in communication cost compared to full-precision FedAvg, while showing a 7.85% improvement in test accuracy on heterogeneous FL benchmarks. The accuracy improvement is attributed to the regularisation effect of ternary quantisation (which reduces overfitting on small local datasets) combined with the smoothing effect of soft-label distillation (which shares inter-class relationship information across clients).

FedKSeed: Transmitting Random Seeds

The ultimate communication reduction would be to transmit no gradient at all. FedKSeed (Zhu et al., 2023) achieves this for a restricted class of models by framing local training as a random function search: instead of optimising ๐’˜ directly, clients search over a family of random perturbations {๐’˜+ฯตk๐’›k}k=1K where ๐’›kโˆผ๐’ฉ(0,๐ˆ) are random directions generated from a shared seed sk, and ฯตk is a small perturbation scale.

The client evaluates the local loss Fi(๐’˜+ฯตk๐’›k) for each candidate direction, selects the direction kโˆ— with lowest loss, and transmits only the seed skโˆ—. The server regenerates the direction ๐’›kโˆ— from the seed and performs an approximate gradient update: (Fedkseed Update)๐’˜t+1=๐’˜tโˆ’ฮทsโ‹…Fi(๐’˜t+ฯต๐’›kโˆ—)โˆ’Fi(๐’˜t)ฯตโ‹…๐’›kโˆ—. This is a zeroth-order gradient estimator (the finite difference in direction ๐’›kโˆ—). The communication cost per round per client is just log2โกK bits (the index of the best seed), typically 10โ€“20 bits, compared to dร—32 bits for a full gradient. For d=109, this is a factor of 1.6ร—109 compression - from gigabytes to kilobytes per round.

The price is statistical efficiency: zeroth-order methods converge as ๐’ช(d/T) rather than ๐’ช(1/T), introducing a factor of d in the iteration complexity. FedKSeed mitigates this by exploiting intrinsic low dimensionality: for fine-tuning pre-trained models, the effective gradient dimension is much smaller than d, recovering near-first-order convergence rates.

FedRDMA: Bypassing TCP/IP for Cross-Silo FL

In the cross-silo setting (hospitals, financial institutions, research consortia), clients are connected via high-speed data centre networks rather than mobile links. The bottleneck shifts from raw bandwidth to communication latency: the overhead of TCP/IP handshakes, acknowledgement packets, and kernel context switches adds milliseconds of overhead per message, which accumulates across millions of gradient updates.

FedRDMA (Remote Direct Memory Access) bypasses the kernel networking stack entirely by having the network interface card (NIC) read and write directly into application memory. In the federated context, the server's NIC can pull gradient updates directly from client GPU memory without involving the client's CPU, eliminating serialisation overhead. The resulting system achieves:

  • Latency: sub-microsecond message passing (vs. 100โ€“1000 ฮผs for TCP/IP).

  • Throughput: near-line-rate utilisation of 100 Gbps InfiniBand links.

  • CPU overhead: near-zero, freeing client CPUs for local gradient computation.

FedRDMA is complementary to gradient compression: compression reduces the number of bytes transmitted, while RDMA reduces the cost of transmitting each byte.

The Compression Pipeline

The gradient compression pipeline. A full gradient vector ๐’ˆโˆˆโ„dโก at 32 bits per parameter is first sparsified to retain only Kโ‰ชd coordinates (Top-K), then quantised to at most 2 bits per retained value, and the resulting compressed bits are transmitted. On receipt, the server decompresses to a sparse approximation ๐’ˆ^. The discarded gradient mass is accumulated in an error buffer ๐’†t+1 (dashed arrow) and added to the next round's gradient to ensure convergence.

The Communicationโ€“Accuracy Trade-off

We now formalise the fundamental limit of gradient compression.

Proposition 3 (Communicationโ€“Accuracy Trade-off).

Let ๐’ž:โ„dโกโ†’{0,1}b be a b-bit per round per parameter compression operator satisfying the unbiased ฮด-contraction property: (Compression Property)๐”ผ[๐’ž(๐’ˆ)]=๐’ˆand๐”ผ[โ€–๐’ž(๐’ˆ)โˆ’๐’ˆโ€–2]โ‰คฮดโ€–๐’ˆโ€–2 for some ฮดโˆˆ[0,1). Then, for any L-smooth non-convex global objective F, the compressed FedAvg (using ๐’ž in place of exact gradients) satisfies: (COMM Accuracy Bound)1Tโˆ‘t=0Tโˆ’1๐”ผ[โ€–โˆ‡F(๐’˜t)โ€–2]โ‰ค2L(F(๐’˜0)โˆ’Fโˆ—)ฮทT+Lฮทฯƒ2(1+ฮด)N+2L2ฮท2ฮดฯƒ2(lower-order)โŸcompressionย noise. Furthermore, for any compression scheme using b bits per round per parameter, the contraction parameter satisfies ฮดโ‰ฅ1โˆ’b/32 (Shannon information-theoretic lower bound for unbiased estimators of Gaussian random vectors).

Proof sketch.

Step 1 (Variance decomposition): Denote the compressed gradient as ๐’ˆ^i=๐’ž(โˆ‡Fi(๐’˜t)). By the unbiased property, ๐”ผ[๐’ˆ^i]=โˆ‡Fi(๐’˜t). The variance of the compressed aggregate is: ๐”ผ[โ€–โˆ—โ€–1Nโˆ‘i=1N๐’ˆ^iโˆ’โˆ‡F(๐’˜t)2]โ‰คฯƒ2N+ฮดNโˆ‘i=1Nโ€–โˆ‡Fi(๐’˜t)โ€–2. Step 2 (Descent with compressed gradient): Applying the L-smoothness descent lemma with the compressed gradient, bounding the inner product using 2abโ‰คa2+b2, and using the variance bound from Step 1 yields the convergence bound (COMM Accuracy Bound).

Step 3 (Information-theoretic lower bound): By the data-processing inequality, b bits of information about a Gaussian vector ๐’ˆโˆผ๐’ฉ(0,ฯƒ2๐ˆd) can reduce the mean squared error from ฯƒ2d (no information) to at most ฯƒ2dโ‹…(1โˆ’b/(32d)) per coordinate for 32-bit representations, giving ฮดโ‰ฅ1โˆ’b/32.

Remark 5 (Practical implications).

Proposition 3 reveals that compression introduces an additional variance term proportional to ฮด. For 1-bit compression (b=1), ฮดโ‰ˆ31/32โ‰ˆ0.97, which is close to 1: nearly the entire gradient signal is discarded each round. Error feedback ((Error Feedback E)) does not reduce ฮด but ensures that the accumulated gradient is eventually transmitted, restoring convergence. The key insight is that communication efficiency and statistical efficiency are complementary: reducing b saves bandwidth but increases the number of rounds T needed to reach a target accuracy ฮต.

Practical Compression Taxonomy

MethodMechanismBits/paramConverges?Overhead
Full precisionNone32โœ“None
Top-K sparseMagnitude-based selection32K/dโœ“ (EF)Klogโกd bits
1-bit SGDSign compression1โœ“ (EF)Scale scalar
Ternary{โˆ’ฮ”,0,+ฮ”}1.58โœ“ (EF)Threshold ฮ”
SignSGDMajority vote signs1โœ“None
Low-rank (SVD)Rank-r approximationr(m+n)/mnโ‹…32โœ“None
FedDTTernary + soft label distil.|๐’Ÿpub|C/dโ‹…32โœ“Public dataset
FedKSeedRandom seedโ‰ˆ0Partiallog2โกK bits
Taxonomy of gradient compression methods for federated learning. Bits/param gives the effective communication cost per gradient coordinate per round. Convergence guarantee assumes error feedback where applicable. Overhead refers to additional metadata transmitted (indices, scale factors, seeds).

Asynchronous and Partial Communication

All methods described so far assume synchronous communication: the server waits for all K sampled clients before aggregating. In practice, clients have heterogeneous computation and communication speeds (the straggler problem). If the slowest client takes 10ร— longer than the average, 90% of the server's time is spent waiting.

Asynchronous FedAvg. The server aggregates as soon as any client submits an update, without waiting for stragglers: (Async Update)๐’˜t+1=๐’˜tโˆ’ฮทฮ”^it, where client i is the first to respond in round t. The update ฮ”^it is stale: it was computed based on ๐’˜tโˆ’ฯ„i for some delay ฯ„iโ‰ฅ0. Staleness introduces a gradient delay term โˆฯ„i2 in the convergence bound, analogous to client drift. Gradient clipping or learning rate scaling by 1/(1+ฯ„i) mitigates staleness effects in practice.

Exercises

Exercise 10.

Top-K compression analysis. Let ๐’ˆโˆˆโ„dโก have i.i.d. coordinates gjโˆผ๐’ฉ(0,ฯƒ2). (a) Show that the expected fraction of mass captured by Top-K is ๐”ผ[โ€–TopK(๐’ˆ)โ€–2]/๐”ผ[โ€–๐’ˆโ€–2], and compute this for K=0.01d as dโ†’โˆž using order statistics of the normal distribution. (b) Show that the contraction parameter for random (non-adaptive) K-sparsification satisfies ฮด=1โˆ’K/d regardless of the distribution of ๐’ˆ. (c) Explain why Top-K has a strictly smaller ฮด than random K-sparsification, making it strictly superior in the bound of Proposition 3.

Exercise 11.

SignSGD failure in the non-IID regime. Consider two clients with loss functions F1(w)=w2/2+2w and F2(w)=w2/2โˆ’2w so that โˆ‡F1(w)=w+2 and โˆ‡F2(w)=wโˆ’2. Both clients evaluate at wt=0. (a) Compute signโก(โˆ‡F1(0)), signโก(โˆ‡F2(0)), and the majority vote signโก(โˆ‘isignโก(โˆ‡Fi(0))). (b) Show that the majority vote is zero (tie), meaning SignSGD makes no progress from wt=0, even though โˆ‡F(0)=0 is not a minimum of F(w)=w2/2 (which has minimum at wโˆ—=0, so actually it is the minimum here). (c) Modify the construction so that F(wโˆ—)โ‰ 0 but SignSGD's majority vote points in the wrong direction. What does this reveal about SignSGD's assumptions?

Exercise 12.

FedKSeed zeroth-order complexity. A federated task has N=100 clients, d=106 parameters, and target accuracy ฮต=0.01. (a) How many rounds TFO does first-order FedAvg require to reach accuracy ฮต (use the bound from Proposition 1 with G=0)? (b) Zeroth-order methods have convergence rate ๐’ช(d/(NT)). How many rounds TZO does FedKSeed require for the same accuracy? (c) Despite the large ratio TZO/TFO, show that the total number of bits transmitted by FedKSeed is smaller than FedAvg if log2โกK<32dโ‹…(TFO/TZO). Compute the threshold on d below which FedKSeed wins on total communication cost.

Insight.

The cheapest gradient to transmit is the one you never compute. FedKSeed takes this principle to its logical extreme: by replacing gradient computation with random direction search and transmitting only a seed identifier, it reduces per-round communication from gigabytes to kilobytes. The lesson generalises: every byte saved in the communication channel must be paid for somewhere - in extra rounds, in statistical variance, or in zeroth-order convergence penalties. Designing communication-efficient FL systems is therefore an exercise in identifying which of these currencies is cheapest for a given deployment.

Federated GANs

Generative Adversarial Networks are among the most powerful yet most temperamental tools in the deep-learning arsenal. Centrally trained, they already require careful tuning of learning rates, batch sizes, and architectural choices to prevent mode collapse, oscillation, and discriminator saturation. Moving GAN training into the federated setting amplifies each of these instabilities, while simultaneously introducing the additional challenges of data heterogeneity, communication budget, and multi-party coordination.

This section develops the theory and practice of Federated GANs (FedGANs): methods that train the generator and discriminator components of a GAN across multiple clients while keeping each client's data local.

Why Adversarial Training Is Harder in Federated Settings

To understand the challenges, it helps to revisit what makes centralized GAN training difficult in the first place.

Centralized Instabilities

A standard GAN minimizes the minimax objective (OBJ)minฮธโกmaxฯ•โก๐”ผ๐’™โˆผpdata[logโกDฯ•(๐’™)]+๐”ผ๐’›โˆผpz[logโก(1โˆ’Dฯ•(Gฮธ(๐’›)))]. Three core pathologies afflict this objective:

  • Vanishing gradients. When Dฯ• is near-perfect, logโก(1โˆ’Dฯ•(Gฮธ(๐’›)))โ‰ˆ0, starving Gฮธ of signal.

  • Mode collapse. The generator concentrates its output on a small subset of the data distribution; the discriminator provides no gradient that penalizes this concentration.

  • Training oscillation. Generator and discriminator updates do not converge to a Nash equilibrium but instead orbit it indefinitely.

Additional Federated Burdens

The federated setting layers four new difficulties on top:

  1. Statistical heterogeneity. Client k holds data from a local distribution pk, which differs from the global distribution pdata=โˆ‘kwkpk. A local discriminator trained only on pk becomes an expert on local modes and an ignorant judge of global modes.

  2. Gradient mismatch. FedAvg-style aggregation of model updates works well when loss landscapes are similar across clients. For GANs, the adversarial landscape depends on the interplay between G and D; because these landscapes differ per client, naive parameter averaging causes conflicting update directions that destabilize training.

  3. Aggregation timing. In centralized training, G and D are updated in lockstep. With K clients and E local epochs per round, the generator G may advance KE steps before the discriminator at any individual client catches up, or vice versa.

  4. Communication overhead. Transmitting full model parameters for both G and D per round is expensive; selective sharing strategies are needed.

Key Idea.

In federated GAN training, statistical heterogeneity causes local discriminators to become biased referees: each local Dk is a strong judge for data it has seen (the modes of pk) but provides misleading signal about modes it has not seen. Aggregation of such biased judges can mislead the global generator into covering local modes unevenly.

Formal Definition: FedGAN

Definition 8 (Federated GAN (FedGAN)).

Let there be K clients each holding a private dataset ๐’Ÿk={๐’™k(i)}i=1nk drawn from local distribution pk. Define the global target distribution pdata=โˆ‘k=1Kwkpk where wk=nk/โˆ‘jnj.

A Federated GAN is a pair of parameterized networks (Gฮธ,Dฯ•) with a training protocol consisting of repeated rounds t=1,2,โ€ฆ:

  1. Local generator update. On client k, for e=1,โ€ฆ,E steps, update ฮธ to minimize โ„’G(k)(ฮธ;ฯ•)=โˆ’๐”ผ๐’›โˆผpz[logโกDฯ•(Gฮธ(๐’›))].

  2. Local discriminator update. On client k, for e=1,โ€ฆ,E steps, update ฯ• to maximize โ„’D(k)(ฯ•;ฮธ)=๐”ผ๐’™โˆผpk[logโกDฯ•(๐’™)]+๐”ผ๐’›โˆผpz[logโก(1โˆ’Dฯ•(Gฮธ(๐’›)))].

  3. Server aggregation. The server receives updated parameters from clients and forms global parameters. The aggregation policy determines which networks are shared (see Section Architecture Choices: What to Share?).

The goal is that after T rounds, pGฮธโ‰ˆpdata.

Remark 6 (Asymmetry of the Objective).

The generator objective โ„’G(k) does not depend on local data ๐’Ÿk directly-it only uses samples from pz and the current discriminator Dฯ•. The discriminator objective โ„’D(k) depends heavily on ๐’Ÿk. This asymmetry is the root cause of most federated GAN pathologies: a locally trained Dฯ• is well calibrated for pk but miscalibrated for pj, jโ‰ k.

Architecture Choices: What to Share?

One of the most consequential design decisions in FedGAN is which network parameters to aggregate on the server. Three families of strategies have been studied:

Share Generator Only

The generator Gฮธ is aggregated via FedAvg: ฮธ(t+1)โ†โˆ‘k=1Kwkฮธk(t). Each client maintains its own local discriminator Dฯ•k that is never shared.

Advantages.

  • The discriminator, which has direct access to raw data representations, is kept private.

  • Local discriminators can specialize to local modes and provide strong local training signal.

Disadvantages.

  • With K different local discriminators providing feedback, the global generator receives incoherent update signals across rounds.

  • The generator may collapse to an average of local modes that does not correspond to any real data distribution.

Share Discriminator Only

The discriminator Dฯ• is aggregated: ฯ•(t+1)โ†โˆ‘k=1Kwkฯ•k(t). Each client maintains its own local generator.

Advantages.

  • A globally shared discriminator provides a common evaluation standard across all clients.

  • Local generators can specialize to local data distributions and produce high-quality local samples.

Disadvantages.

  • Aggregating discriminators trained on heterogeneous data can produce a discriminator that is confused about all data distributions rather than expert at any.

  • With local generators, there is no single global generative model to evaluate or deploy.

Share Both Generator and Discriminator

Both networks are aggregated each round: ฮธ(t+1)โ†โˆ‘kwkฮธk(t),ฯ•(t+1)โ†โˆ‘kwkฯ•k(t).

Advantages.

  • Produces a single globally consistent GAN.

  • Discriminator aggregation pools information about all clients' data distributions.

Disadvantages.

  • Highest communication cost.

  • Parameter averaging of adversarial networks trained on heterogeneous data is particularly prone to instability.

Remark 7 (Practical Recommendation).

In practice, sharing only the generator with local discriminators is the most widely adopted approach for privacy-sensitive applications, because it avoids transmitting any discriminator parameters that might encode raw data statistics. Sharing both networks is preferred when communication is cheap and heterogeneity is moderate.

Mode Collapse in the Federated Setting

Mode collapse-in which the generator produces only a small subset of the modes present in pdata-is a well-known failure mode of centralized GANs. In the federated setting, mode collapse takes on a distinctive character driven by local discriminators.

The Local Discriminator Dominance Effect

Consider two clients with disjoint distributions: p1=๐’ฉ(ฮผ1,I) and p2=๐’ฉ(ฮผ2,I), with โ€–ฮผ1โˆ’ฮผ2โ€–2 large. If the generator shares weights while discriminators are local:

  • Dฯ•1 is trained on samples from p1; it easily rejects samples near ฮผ2.

  • Dฯ•2 is trained on samples from p2; it easily rejects samples near ฮผ1.

The generator Gฮธ, receiving gradients from both discriminators, faces conflicting signals: to fool Dฯ•1 it must generate near ฮผ1; to fool Dฯ•2 it must generate near ฮผ2. This tension leads to one of two failure modes:

  1. Global mode collapse: the generator settles on a single mode (say near ฮผ1), pleasing Dฯ•1 and ignoring Dฯ•2.

  2. Oscillatory collapse: the generator alternates between modes across rounds, producing samples from p1 in odd rounds and p2 in even rounds, never stabilizing.

Client Weighting as a Partial Remedy

One mitigation is to weight client gradients inversely by local mode coverage. If client k produces samples that are already well-classified by its local discriminator, its gradient contribution to G is down-weighted: ฮ”ฮธโ†โˆ‘kฮฑk(ฮธ)โ‹…โˆ‡ฮธโ„’G(k), where ฮฑk(ฮธ)โˆ1โˆ’๐”ผ๐’›[Dฯ•k(Gฮธ(๐’›))] is large when client k's discriminator is not yet fooled. This adaptive weighting encourages the generator to maintain coverage across all clients.

Wasserstein Distance Stabilization for Federated Training

The instabilities of standard GAN training are substantially reduced by replacing the JSD-based objective with the Wasserstein-1 distance (Chapter 10). In the federated setting, the Wasserstein formulation provides additional benefits beyond mere training stability.

Recall that the Wasserstein-1 distance between distributions P and Q admits the Kantorovichโ€“Rubinstein dual representation: W1(P,Q)=supโ€–fโ€–Lโ‰ค1โก[๐”ผ๐’™โˆผP[f(๐’™)]โˆ’๐”ผ๐’™โˆผQ[f(๐’™)]], where the supremum is over all 1-Lipschitz functions f. In a WGAN, the discriminator (now called the critic) approximates this 1-Lipschitz function.

Federated WGAN Objective

For client k, the local critic objective is (Critic)โ„’critic(k)(ฯ•;ฮธ)=๐”ผ๐’™โˆผpk[Dฯ•(๐’™)]โˆ’๐”ผ๐’›โˆผpz[Dฯ•(Gฮธ(๐’›))], and the local generator objective is (GEN)โ„’gen(k)(ฮธ;ฯ•)=โˆ’๐”ผ๐’›โˆผpz[Dฯ•(Gฮธ(๐’›))]. The global Wasserstein loss is then W1(pdata,pGฮธ)โ‰คโˆ‘k=1KwkW1(pk,pGฮธ)โ‰ˆโˆ‘k=1Kwkโ„’critic(k)(ฯ•;ฮธ), with equality only when the client distributions are mutually singular (the accompanying proposition proves the bound). This decomposition shows that the global Wasserstein distance is bounded by the weighted average of local Wasserstein distances, provided the critic is global (shared across clients). This is a key advantage: under Wasserstein geometry, client objectives aggregate gracefully.

Proposition 4 (Global-Local Wasserstein Decomposition).

Let pdata=โˆ‘k=1Kwkpk with wkโ‰ฅ0, โˆ‘kwk=1. For any generator distribution pg: W1(pdata,pg)โ‰คโˆ‘k=1KwkW1(pk,pg). Equality holds when pk are mutually singular and optimal transport plans do not cross client boundaries.

Proof sketch.

By the triangle inequality for W1 and the convexity of the Wasserstein distance in its arguments: W1(โˆ‘kwkpk,pg)โ‰คโˆ‘kwkW1(pk,pg). The second inequality follows from convexity of W1 as a function of its first argument (which follows from the primal definition as an infimum over joint distributions). Equality holds when the transport plans for each pk are independent, which occurs when the supports of pk are pairwise disjoint.

WGAN-GP in Federated Learning

The gradient penalty (GP) formulation of the WGAN enforces the 1-Lipschitz constraint on the critic via a soft penalty: ฮป๐”ผ๐’™^โˆผp^k[(โ€–โˆ‡๐’™^Dฯ•(๐’™^)โ€–2โˆ’1)2], where ๐’™^=ฯต๐’™+(1โˆ’ฯต)Gฮธ(๐’›), ฯตโˆผUniform[0,1], and p^k is the interpolation distribution between pk and pg.

In the federated setting, the gradient penalty is computed locally on each client: (Wgangp)โ„’GP(k)(ฯ•;ฮธ)=โ„’critic(k)(ฯ•;ฮธ)+ฮป๐”ผ๐’™^โˆผp^k[(โ€–โˆ‡๐’™^Dฯ•(๐’™^)โ€–2โˆ’1)2]. Local computation of GP is valid because the interpolation ๐’™^ uses local real samples ๐’™โˆผpk, ensuring that the Lipschitz constraint is enforced in the region of the data manifold visible to client k.

Remark 8 (Global Lipschitz vs. Local Lipschitz).

Local gradient penalties enforce Lipschitz continuity of Dฯ• on each client's data manifold, but cannot guarantee global Lipschitz continuity. In particular, the critic may behave erratically in regions between the data manifolds of different clients. Federated WGAN-GP should be combined with spectral normalization of critic layers for improved global regularity.

TikZ Figure: FedGAN Architecture

FedGAN architecture with generator sharing only. Each client maintains a local generator Gฮธ (initialized with the same global weights) and a private local discriminator Dฯ•k trained on private data ๐’Ÿk. After E local epochs, generator parameters ฮธk are uploaded to the server, aggregated as ฮธโ€พ=โˆ‘kwkฮธk, and broadcast back to all clients. Discriminator parameters Dฯ•k remain local throughout.

Example: Federated Diabetic Retinopathy Image Generation

Example 1 (Cross-Hospital Diabetic Retinopathy Image Synthesis).

Diabetic retinopathy (DR) is graded on a five-point severity scale (grades 0โ€“4). Training a DR grading model requires balanced datasets across grades, but most hospitals accumulate heavily imbalanced collections: tertiary care centers have many severe cases (grades 3โ€“4), while primary care clinics see mostly mild or no DR (grades 0โ€“1).

Consider a federation of K=5 hospitals: {H1,H2,H3,H4,H5}, where hospital Hk holds nk fundus images with local grade distribution pk. A FedGAN is trained to synthesize images for underrepresented grades.

Setup.

  • Architecture: Progressive GAN generator (256ร—256 output) with local ResNet discriminators.

  • Each local discriminator is conditioned on DR grade via conditional batch normalization.

  • Generator parameters are aggregated with FedAvg every 10 rounds.

  • Discriminator parameters remain local.

Training objective. The conditional generator Gฮธ(๐’›,y) produces a synthetic fundus image given noise ๐’› and target grade yโˆˆ{0,1,2,3,4}. The local discriminator Dฯ•k(๐’™,y) scores pairs (image,grade). For grade y, the local objective on hospital Hk is โ„’(k)(ฯ•k,ฮธ;y)=๐”ผ๐’™โˆผpk(โ‹…|y)[logโกDฯ•k(๐’™,y)]+๐”ผ๐’›[logโก(1โˆ’Dฯ•k(Gฮธ(๐’›,y),y))].

Outcome. Because severe cases (grades 3โ€“4) are rare at most hospitals, the local discriminators for those grades are weak at all but the tertiary care centers. FedAvg of the generator effectively pools the style of severe-grade images across all hospitals, producing a generator that can synthesize grade-3 and grade-4 images representative of the global distribution. Downstream DR grading models trained with augmented synthetic data show a 6.4% improvement in AUC for grade 3โ€“4 detection compared to models trained on original data alone.

HT-Fed-GAN for Tabular Data

Medical and financial datasets are often tabular rather than image-structured. Tabular data has mixed types: some columns are continuous (e.g., blood pressure, income), others are categorical (e.g., diagnosis code, gender), and many have complex marginal distributions with multi-modality or heavy tails.

HT-Fed-GAN (Heterogeneous-Type Federated GAN) addresses the synthesis of mixed-type tabular data across federated clients. Its key innovation is a preprocessing step called Fed-VB-GMM: Federated Variational Bayesian Gaussian Mixture Model.

Fed-VB-GMM Preprocessing

For each continuous column j, Fed-VB-GMM fits a Gaussian mixture model p(j)(x)=โˆ‘m=1Mฯ€m(j)๐’ฉ(x;ฮผm(j),(ฯƒm(j))2) across clients using federated variational Bayes. Each client k maintains local variational parameters {ฯ€k,m(j),ฮผk,m(j),ฯƒk,m(j)} and uploads sufficient statistics (not raw data) to the server, which aggregates them into global mixture parameters.

Once the global GMM parameters are learned, each value xij in continuous column j is transformed to a mode-normalized representation: x~ij=xijโˆ’ฮผmโˆ—(j)ฯƒmโˆ—(j),๐’‘ij=softmax(logโกฯ€(j)+logโก๐’ฉ(xij;๐(j),(๐ˆ(j))2)), where mโˆ—=argโ€‰maxmโกฯ€m(j)๐’ฉ(xij;ฮผm(j),(ฯƒm(j))2) is the most probable mixture component.

Categorical columns are one-hot encoded. The transformed representation is fed into the GAN.

Definition 9 (Federated Tabular Synthesis).

Let client k hold a tabular dataset ๐’Ÿk={(๐’™k(i),๐’šk(i))}i=1nk where ๐’™k(i)โˆˆโ„dcโกร—{0,1}dd is a row with dc continuous and dd discrete columns, and ๐’šk(i)โˆˆ[C] is a class label.

Federated tabular synthesis is the problem of learning a conditional generator Gฮธ:โ„dzโกร—[C]โ†’โ„dcโกร—{0,1}dd such that, for any target class cโˆˆ[C]:

  1. Fidelity. The marginal distributions of each column match those of the global dataset: pGฮธ(xj|y=c)โ‰ˆpdata(xj|y=c) for all j.

  2. Correlation preservation. Joint distributions are preserved: pairwise column correlations in synthetic data approximate those in real data.

  3. Privacy. No raw data from any ๐’Ÿk is transmitted.

Training Objective for HT-Fed-GAN

The local training objective at client k combines a GAN adversarial loss with an information maximization term: (Htfedgan)โ„’(k)=โ„’adv(k)+ฮปcโ„’cond(k)+ฮปinfoโ„’info(k), where:

  • โ„’adv(k) is the conditional adversarial loss for real vs. synthetic tabular rows.

  • โ„’cond(k) penalizes misclassification of synthetic rows by a local auxiliary classifier (ensuring conditional generation is consistent with labels).

  • โ„’info(k) maximizes the mutual information between the generated row and the conditioning label, following InfoGAN.

Handling Class Imbalance with Conditional Federated Generation

Class imbalance is endemic in medical and financial federated datasets. A minority class that is rare globally may be absent from most clients' local data entirely. Standard conditional GAN training fails for absent classes because the local discriminator has no real samples of that class to discriminate against.

Conditional Training Sampler (CTS). HT-Fed-GAN addresses this via a conditional training sampler that re-weights the local training batches. At client k, each training mini-batch is constructed by sampling uniformly over classes: P(sampleย classย cย inย batch)=1C, regardless of the local class frequencies pk(y=c). For classes underrepresented locally, the sampler draws synthetic samples from the current generator Gฮธ(โ‹…,c) to fill the batch.

This creates a self-improving loop:

  1. In early rounds, the generator for minority classes is poor.

  2. As the generator improves (aided by information from clients where that class is present), the quality of synthetic minority-class samples improves.

  3. Better minority-class synthetic samples allow the local discriminator to train on those classes, producing a better training signal for further generator improvement.

The convergence of this loop requires that at least one client holds real samples of each class. Formally, define the class coverage condition:

Assumption 2 (Class Coverage).

For every class cโˆˆ[C], there exists at least one client kโˆˆ[K] such that pk(y=c)>0.

Under Assumption Assumption 2 and sufficient rounds of federation, the conditional training sampler guarantees that every class receives generator gradient updates with positive probability in every round, preventing generator collapse on unseen classes.

Key Idea.

In federated GANs, the discriminator plays a dual role: it is simultaneously a teacher (providing gradient signal to improve the generator) and a security guard (ensuring that generated samples cannot be trivially distinguished from real data and thus do not leak distributional information). This dual role is in tension: a discriminator that is too powerful fails as a teacher (vanishing gradients); a discriminator that is too weak fails as a security guard (poor synthesis quality and potential privacy leakage through gradient inversion attacks).

Exercises

Exercise 13 (Discriminator Averaging Instability).

Consider a FedGAN with K=2 clients where p1=๐’ฉ(+2,1) and p2=๐’ฉ(โˆ’2,1) (both univariate Gaussians). Suppose both discriminators are linear: Dฯ•k(x)=ฯƒ(ฯ•kx+bk). After local training, client 1 learns ฯ•1>0 (samples from p1 score high) and client 2 learns ฯ•2<0 (samples from p2 score high).

  1. Show that the averaged discriminator Dฯ•โ€พ with ฯ•โ€พ=(ฯ•1+ฯ•2)/2 provides a useful training signal to a generator trying to cover both modes only if |ฯ•1+ฯ•2|โ‰ช|ฯ•1|,|ฯ•2|.

  2. Propose a server-side strategy (other than simple averaging) that preserves discriminator coverage of both modes.

  3. Under what statistical condition on p1 and p2 does simple discriminator averaging not suffer from this problem?

Exercise 14 (Federated WGAN-GP Convergence).

Consider a federated WGAN-GP with a shared critic and K clients. The global training objective is minฮธโกmaxฯ•:1-Lipโกโˆ‘k=1Kwk[๐”ผ๐’™โˆผpk[Dฯ•(๐’™)]โˆ’๐”ผ๐’›[Dฯ•(Gฮธ(๐’›))]].

  1. Show that the global objective equals W1(pdata,pGฮธ) up to the approximation error of the neural critic.

  2. Suppose the critic is aggregated with FedAvg every R rounds. Describe qualitatively how the choice of R (the aggregation frequency) affects training stability.

  3. In the federated WGAN-GP, the gradient penalty uses interpolations between local real samples and global generator samples. Explain why this may fail to enforce global Lipschitz continuity of the critic, and propose a remedy.

Exercise 15 (HT-Fed-GAN Tabular Fidelity).

A hospital federation runs HT-Fed-GAN on patient records with 4 continuous features (age, BMI, heart rate, glucose) and 2 categorical features (sex, smoking status).

  1. Describe the Fed-VB-GMM preprocessing steps for the โ€œglucoseโ€ feature. What information is transmitted to the server? What information remains local?

  2. Suppose the conditional training sampler is not used, and the global dataset is 95% class-0 (healthy) and 5% class-1 (diabetic). Explain why the generator will likely produce class-1 synthetic samples of poor quality.

  3. Propose a quantitative criterion for assessing whether synthetic tabular data from HT-Fed-GAN preserves pairwise feature correlations. (Hint: consider comparing correlation matrices.)

Privacy-Preserving Federated GANs

The federated setting provides a first layer of privacy protection by keeping raw data local. However, this protection is incomplete: gradient updates, model parameters, and generated samples can all leak information about training data through inference attacks. This section develops the formal framework of differential privacy, its integration with federated GAN training, and the fundamental tension between privacy guarantees and synthesis quality.

Differential Privacy: Formal Foundations

Differential privacy (DP) provides a rigorous mathematical guarantee that an algorithm's output distribution is nearly the same whether or not any single individual's data is included in the input.

Definition 10 ((ฮต,ฮด)-Differential Privacy).

A randomized mechanism โ„ณ:๐’Ÿโ†’๐’ช satisfies (ฮต,ฮด)-differential privacy if for all pairs of adjacent datasets D,Dโ€ฒโˆˆ๐’Ÿ (differing in exactly one individual's record) and for all measurable output sets SโІ๐’ช: Prโก[โ„ณ(D)โˆˆS]โ‰คeฮตโ‹…Prโก[โ„ณ(Dโ€ฒ)โˆˆS]+ฮด. Here, ฮตโ‰ฅ0 is the privacy budget (smaller is more private) and ฮดโ‰ฅ0 is the failure probability (the probability of a catastrophic privacy violation; typically ฮดโ‰ช1/|D|).

Remark 9 (Interpretation of ฮต and ฮด).

The bound eฮต controls how much the likelihood of any output can change when one individual's data is added or removed. For ฮต=0, the output distribution is identical regardless of any individual's data (perfect privacy, usually unachievable). For ฮต=1, the output likelihood can change by a factor of eโ‰ˆ2.72. Practitioners often target ฮตโˆˆ[1,10] for โ€œreasonableโ€ privacy, with ฮด=10โˆ’5 to 10โˆ’6. The parameter ฮด represents the probability of the eฮต bound failing; it must be cryptographically small.

The Gaussian Mechanism

For a real-valued function f:๐’Ÿโ†’โ„dโก, the Gaussian mechanism adds calibrated Gaussian noise: โ„ณGauss(D)=f(D)+๐’ฉ(0,ฯƒ2๐ˆ), where the noise scale is set as ฯƒ=ฮ”2f2lnโก(1.25/ฮด)ฮต and ฮ”2f=maxDโˆผDโ€ฒโกโ€–f(D)โˆ’f(Dโ€ฒ)โ€–2 is the โ„“2-sensitivity of f.

DP-SGD: Differentially Private Stochastic Gradient Descent

DP-SGD is the fundamental building block for differentially private deep learning. At each iteration:

  1. Per-sample gradient computation. Compute gradient ๐’ˆi=โˆ‡ฮธโ„“(ฮธ;xi) for each sample xi in the mini-batch.

  2. Gradient clipping. Clip each per-sample gradient to have โ„“2 norm at most C: ๐’ˆโ€พi=๐’ˆi/maxโก(1,โ€–๐’ˆiโ€–2/C).

  3. Noise addition. Sum clipped gradients and add Gaussian noise: ๐’ˆ~=1B(โˆ‘i=1B๐’ˆโ€พi+๐’ฉ(0,ฯƒ2C2๐ˆ)).

  4. Parameter update. ฮธโ†ฮธโˆ’ฮท๐’ˆ~.

By the moments accountant method, T steps of DP-SGD with mini-batch size B from a dataset of size n satisfies (ฮต,ฮด)-DPwithฮต=O(Tlogโก(1/ฮด)n/B).

The Privacyโ€“Utility Tradeoff for Generative Models

Differential privacy imposes a fundamental cost on model utility. For generative models, this tradeoff manifests in three ways:

  1. Sample quality degradation. DP noise injected into gradients blurs the signal used to train the generator, producing samples of lower fidelity. The FID score (Frรฉchet Inception Distance) typically increases monotonically as ฮต decreases.

  2. Mode coverage reduction. Minority modes require strong gradient signal to capture; DP noise disproportionately affects these weak signals, leading to systematic undercoverage of rare modes.

  3. Training instability amplification. GAN training is already unstable; DP noise further amplifies gradient variance, increasing the probability of discriminator saturation and generator collapse.

Remark 10 (FID vs. ฮต Empirical Law).

Empirically, for image GANs trained with DP-SGD, the relationship between FID and ฮต follows approximately: FID(ฮต)โ‰ˆFIDฮตโ†’โˆž+Aฮต for a dataset-dependent constant A. This โ€œ1/ฮตโ€ law (observed empirically across several datasets) means that halving the privacy budget (making privacy twice as strong) degrades FID by approximately 2, not by a factor of 2.

Fed-GAN with pHash-KT: Perceptual Hashing for Knowledge Transfer

A key challenge in private federated GAN training is knowledge transfer between clients without sharing raw data or gradients that might leak information. pHash-KT (Perceptual Hash Knowledge Transfer) addresses this by using perceptual hashes as a privacy-preserving proxy for image similarity.

Perceptual Hashing

A perceptual hash h(๐’™)โˆˆ{0,1}b is a compact binary fingerprint of an image ๐’™ that is:

  • Robust: similar images produce similar hashes (โ€–h(๐’™)โˆ’h(๐’™โ€ฒ)โ€–1 small if ๐’™โ‰ˆ๐’™โ€ฒ).

  • Non-invertible: recovering ๐’™ from h(๐’™) is computationally infeasible.

Common pHash algorithms include DCT-based hash (dHash) and color moment hash. The b-bit hash space has 2b possible values; for b=64, the hash cannot encode significant information about individual pixel values.

Knowledge Transfer Protocol

In Fed-GAN with pHash-KT, clients transfer knowledge about their local data distribution through perceptual hashes rather than raw images or model gradients:

  1. Local hash collection. Client k computes h(๐’™) for all ๐’™โˆˆ๐’Ÿk and stores the hash set Hk={h(๐’™):๐’™โˆˆ๐’Ÿk}.

  2. Generator quality assessment. When the server broadcasts a candidate generator Gฮธ, client k generates N synthetic images and computes their hashes H^k={h(Gฮธ(๐’›i))}i=1N.

  3. Coverage score. Client k reports the coverage score covk(ฮธ)=|{hโˆˆHk:minh^โˆˆH^kโกโ€–hโˆ’h^โ€–1โ‰คฯ„}||Hk|, measuring the fraction of real images whose nearest synthetic neighbor (in hash space) is within threshold ฯ„.

  4. Server guidance. The server aggregates coverage scores and identifies which clients have low coverage, directing extra training rounds for those clients.

The coverage score transmits only a scalar per client per round, providing strong resistance to gradient inversion attacks.

Resistance to Adversarial Clients

A critical desideratum for privacy-preserving federated learning is robustness to adversarial clients that attempt to poison the global model or extract information about other clients.

Empirical evaluations of Fed-GAN with pHash-KT have demonstrated resistance to adversarial client fractions from 10% to 70%. The mechanism of resistance is as follows:

  • Adversarial clients that submit malicious gradient updates (to cause mode collapse or model poisoning) are detected via their anomalous coverage scores.

  • Coverage scores that are implausibly high (adversarial client claiming perfect coverage to pass through poisoned gradients) or implausibly low (adversarial client claiming poor coverage to demand extra rounds and amplify its gradient influence) are flagged by the server's Byzantine-robust aggregation rule.

  • With the perceptual hash protocol replacing raw gradient transmission, adversarial clients have limited ability to craft cover stories: their claimed coverage must be consistent with the known distribution of pHash distances for natural images.

Remark 11 (Theoretical Robustness Bound).

Let ฮฒ be the fraction of adversarial clients. Fed-GAN with pHash-KT with a Byzantine-robust aggregation rule (e.g., Krum or coordinate-wise trimmed mean) guarantees that the global generator Gฮธ converges to within O(ฮฒโ‹…Cadv) of the optimal generator, where Cadv is the adversarial clients' maximum ability to shift the gradient. For ฮฒ<0.5 (honest majority), convergence is guaranteed under standard GAN assumptions.

DP Guarantee Propagation through the GAN Generator

A fundamental question is: if the GAN is trained with DP-SGD, does the published generator itself satisfy a DP guarantee?

Proposition 5 (DP Propagation through Generator).

Let โ„ณtrain be the training algorithm that takes a private dataset D and outputs generator parameters ฮธ. If โ„ณtrain satisfies (ฮต,ฮด)-DP (for instance, via DP-SGD), then the generator Gฮธ (as a random variable over training runs) also satisfies (ฮต,ฮด)-DP with respect to the training data D.

Furthermore, for any measurable set S of synthetic images: PrGฮธโก[{Gฮธ(๐’›)}๐’›โˆˆS]โ‰คeฮตโ‹…PrGฮธโ€ฒโก[{Gฮธโ€ฒ(๐’›)}๐’›โˆˆS]+ฮด, where ฮธโ€ฒ is trained on Dโ€ฒ=Dโˆ–{xi} (the dataset with one record removed).

Proof sketch.

The key argument uses the post-processing theorem for differential privacy:

  1. By assumption, โ„ณtrain(D) is (ฮต,ฮด)-DP. This means the distribution of ฮธ given D and the distribution of ฮธ given Dโ€ฒ are (ฮต,ฮด)-close.

  2. The generator Gฮธ is a deterministic function of ฮธ. Publishing Gฮธ is equivalent to applying the post-processing function ฯ•:ฮธโ†ฆGฮธ to the output of โ„ณtrain.

  3. By the post-processing theorem (Dwork and Roth, 2014): if โ„ณ is (ฮต,ฮด)-DP and ฯ• is any measurable function, then ฯ•โˆ˜โ„ณ is also (ฮต,ฮด)-DP.

  4. Applying this with ฯ•(ฮธ)=Gฮธ gives the result.

Consequently, any number of synthetic samples drawn from Gฮธ do not incur additional privacy cost beyond the (ฮต,ฮด) spent during training. This is the main practical advantage of DP generative models: once trained, the generator can be published and samples drawn without further privacy accounting.

Remark 12 (Privacy Amplification by Subsampling).

In practice, DP-SGD with mini-batch subsampling achieves privacy amplification: each step uses a random subset of the data of size Bโ‰ชn, which amplifies privacy by a factor of approximately B/n. In federated settings, each client k holds nk records and uses mini-batches of size Bk; the effective privacy amplification for client k is Bk/nk. Clients with more data thus achieve stronger per-step amplification.

TikZ Figure: DP-FedGAN Pipeline

DP-FedGAN pipeline. Each client performs local GAN training with DP-SGD: per-sample gradients are clipped to norm C, then Gaussian noise ๐’ฉ(๐ŸŽ,ฯƒ2C2๐ˆ) is added before the update. Noisy parameters ฮธk are uploaded to the server, which aggregates them via FedAvg and broadcasts the global generator. After T communication rounds, the published generator Gฮธโ€พ satisfies (ฮต,ฮด)-DP with respect to any individual training record (by the post-processing theorem). The privacy budget ฮต grows as O(Tฯƒr/(nk/Bk)) where ฯƒr is the noise multiplier.

Example: Privacy-Preserving Face Generation Across Institutions

Example 2 (Federated Face Synthesis with Differential Privacy).

Consider a federation of K=8 research institutions, each holding a private dataset of face images annotated with demographic attributes (age group, sex, ethnicity). The goal is to train a generator that can synthesize demographically diverse face images for use in bias auditing of downstream models.

Architecture. The generator is a StyleGAN2 backbone at 128ร—128 resolution. The discriminator uses a ResNet architecture with spectral normalization. Each institution runs DP-SGD on its local data with clipping norm C=1.0 and noise multiplier ฯƒ=1.1.

Privacy budget. Using the Rรฉnyi differential privacy moments accountant (tighter than the classic Gaussian mechanism bound), after 200 communication rounds with 50 local steps per round, the total privacy budget is: ฮตโ‰ˆ8.3atฮด=10โˆ’5. This is a moderate privacy level: individual face images are substantially protected but the model can learn global distributional statistics.

Observations. Three phenomena are observed:

  1. FID degradation. Without DP (ฯƒ=0), FID = 18.3. With DP at ฮต=8.3, FID = 34.7. With stronger DP at ฮต=2.0, FID = 67.2. High-frequency details (hair texture, skin texture) degrade first; low-frequency structure (face shape, gross attribute conditioning) is more robust to DP noise.

  2. Demographic imbalance amplification. Underrepresented demographic groups (e.g., elderly women from institutions with small datasets for that group) show disproportionately high FID. This illustrates that DP noise exacerbates mode coverage problems for minority subgroups.

  3. Membership inference resistance. At ฮต=8.3, the membership inference attack success rate drops from 57% (no DP) to 51.3% (barely above the 50% random-guess baseline), demonstrating effective resistance to this attack class.

Membership Inference Attacks on GANs

A membership inference attack (MIA) against a trained model โ„ณ attempts to determine, given a data point ๐’™ and access to โ„ณ, whether ๐’™ was part of โ„ณ's training set.

MIA Formulation

Formally, an MIA is a classifier ๐’œ:๐’™ร—โ„ณโ†’{0,1} where output 1 means โ€œ๐’™ was in the training set.โ€ The attack advantage is: Adv(๐’œ)=Prโก[๐’œ(๐’™,โ„ณ)=1|๐’™โˆˆDtrain]โˆ’Prโก[๐’œ(๐’™,โ„ณ)=1|๐’™โˆ‰Dtrain]. A random-guess attacker achieves Adv(๐’œ)=0; a perfect attacker achieves Adv(๐’œ)=1.

How MIAs Work Against GANs

For generative models, MIAs exploit the fact that generators tend to produce samples more similar to their training data than to held-out data. Several attack strategies have been developed:

  1. Discriminator-based attack. Use the GAN's own discriminator to score ๐’™: if Dฯ•(๐’™) is unusually high (the discriminator classifies ๐’™ as โ€œrealโ€ with high confidence), ๐’™ may have been in the training set. Formally: ๐’œ(๐’™,โ„ณ)=๐Ÿ™[Dฯ•(๐’™)>ฯ„].

  2. Nearest-neighbor attack. Generate a large set of synthetic images {Gฮธ(๐’›i)} and find the nearest neighbor to ๐’™ in feature space. If ๐’™ is unusually close to a synthetic sample, it likely influenced that sample's generation (overfitting signal).

  3. GAN-based shadow model attack. Train a shadow GAN on a surrogate dataset from the same distribution. Compare the output statistics of the target GAN vs. the shadow GAN on ๐’™; a large difference indicates membership.

GANs and Overfitting

Unlike classifiers, generative models have no clear notion of โ€œtest lossโ€ to detect overfitting. A GAN that has memorized its training data will produce synthetic samples that are near-copies of training samples, enabling effective MIAs. Memorization is particularly likely when:

  • The dataset is small relative to model capacity.

  • Training runs for many epochs without regularization.

  • Conditional generation is used with very small class sizes.

Caution.

DP noise sufficient to prevent membership inference often destroys fine details in generation. Specifically, at privacy levels ฮตโ‰ค3 that provide meaningful MIA resistance (attacker advantage โ‰ค2%), the generator typically loses the ability to synthesize fine-grained textures, detailed facial features, and clinically relevant image patterns. The upshot is stark: the level of DP required for privacy-meaningful resistance to MIAs is often the same level that renders the generated data clinically or scientifically useless. Practitioners must carefully audit whether their privacy budget provides real protection or merely the appearance of it.

The Tension Between Mode Coverage and Privacy

Two desiderata of a federated generative model are in fundamental tension:

  1. Mode coverage: the generator should synthesize samples from all parts of the data distribution, including rare modes.

  2. Privacy: individual training records should not be reconstructible from the generator.

This tension is not merely practical but information-theoretic:

Why Rare Modes Are Privacy-Vulnerable

A rare mode corresponds to a small cluster of training points. To synthesize samples from a rare mode, the generator must โ€œrememberโ€ the characteristics of that cluster. But this memory is precisely what a membership inference attack exploits: if the generator can synthesize a rare mode, it has learned something specific about the few individuals in that cluster.

Formally, consider a dataset D where a rare cluster Cr contains |Cr|=m individuals. Capturing this cluster requires the generator's learned distribution to assign significant probability to a region of the data space that is highly specific to those m individuals. The privacy cost of this specificity scales as O(1/mฮต2) in the DP framework: clusters with fewer members require higher privacy budget to capture faithfully.

Practical Implications

The mode-coverageโ€“privacy tension has concrete implications for downstream applications:

  • Medical imaging: rare diseases are the most clinically important to model but the most privacy-sensitive to generate.

  • Financial data: rare fraud patterns are the most useful for augmenting fraud detectors but the most likely to memorize individual records.

  • Demographic fairness: underrepresented demographic groups require their modes to be captured for fair downstream model training, but these groups are simultaneously the most vulnerable to reconstruction attacks.

Remark 13 (Impossibility Result).

There is an informal impossibility result (formalized in the memorization literature): a generative model that achieves

  1. perfect mode coverage over all modes of pdata, and

  2. meaningful DP protection for every individual training record,

must have been trained on data that is dense enough to specify every mode from many independent samples. In settings with fewer than O~(d/ฮต2) samples for a d-dimensional distribution, at least one of these two desiderata must be compromised.

Historical Note: From Dwork et al. to Federated DP-GANs

Historical Note.

From Differential Privacy to Federated DP-GANs: A Decade of Progress.

Differential privacy was introduced by Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith in 2006 in a landmark paper โ€œCalibrating Noise to Sensitivity in Private Data Analysis.โ€ Their insight was to measure privacy not as a binary property (โ€œprivateโ€ or โ€œnot privateโ€) but as a quantitative guarantee that bounds how much any single individual's data can affect a published statistic.

The 2006 formulation was primarily concerned with interactive statistical queries: releasing means, histograms, and regression coefficients from a sensitive dataset. The idea that DP could be applied to the parameters of a neural network came much later, with the introduction of DP-SGD by Abadi et al. in 2016. DP-SGD made it possible to train deep networks with formal privacy guarantees, though at a significant cost to accuracy.

The combination of DP with generative adversarial networks arrived with DPGAN (Xie et al., 2018) and GS-WGAN (Chen et al., 2020), which applied DP-SGD to discriminator training. The key insight of these works was that only the discriminator need be trained with DP (since it touches real data directly); the generator, which trains on discriminator feedback rather than on raw data, inherits privacy protection through the post-processing theorem.

The further extension to the federated setting happened between 2019 and 2022, driven by healthcare and finance applications where data was distributed across institutions. FedGAN (Rasouli et al., 2020) established the basic framework, while subsequent work addressed robustness (via pHash-KT and Byzantine-resilient aggregation) and the privacyโ€“utility tradeoff specific to the federated regime.

The field now grapples with a problem that Dwork and colleagues could not have anticipated in 2006: how to provide meaningful privacy guarantees for generative models that must capture the full richness of human-generated data across institutions that cannot share any information directly. The answer involves a delicate calibration of noise scale, communication rounds, client heterogeneity, and the specific downstream use case for the synthesized data.

Exercises

Exercise 16 (DP-SGD Privacy Budget Calculation).

A federated GAN is trained with K=5 clients. Client k has nk records and uses mini-batches of size Bk=64. After Tlocal=50 local steps per round and Trounds=100 communication rounds, the noise multiplier is ฯƒ=1.2 and the clipping norm is C=1.0. The per-client dataset sizes are: n1=5000,n2=8000,n3=3000,n4=6000,n5=4000.

  1. Compute the sampling ratio qk=Bk/nk for each client. Which client achieves the strongest privacy amplification per step?

  2. Using the approximate Gaussian mechanism formula ฮตkโ‰ˆqkฯƒr2Tklnโก(1/ฮด) (where Tk=Tlocalโ‹…Trounds and ฯƒr=ฯƒ/qk), compute the approximate ฮตk for each client at ฮด=10โˆ’5.

  3. The overall federation privacy guarantee is ฮตfed=maxkโกฮตk (the weakest link). Which client is the privacy bottleneck? How would you adjust n3 (by augmenting with synthetic data from other clients) to equalize privacy guarantees?

Exercise 17 (Membership Inference and DP Resistance).

A DP-FedGAN is trained on medical images with ฮต=5, ฮด=10โˆ’6. An auditor runs a discriminator-based membership inference attack: for each test image ๐’™, the auditor computes Dฯ•(๐’™) and predicts membership if Dฯ•(๐’™)>ฯ„ for some threshold ฯ„.

  1. Show that for a GAN trained with (ฮต,ฮด)-DP, the attack advantage of any membership inference attacker is bounded by Adv(๐’œ)โ‰คeฮตโˆ’1+2ฮด. (Hint: use the DP definition directly.)

  2. Evaluate this upper bound for ฮต=5, ฮด=10โˆ’6. Does this bound guarantee practical resistance to MIA? Discuss the gap between the theoretical bound and the empirical attack advantage of 51.3% from Example Example 2.

  3. For what value of ฮต does the bound guarantee that no attacker can achieve more than 5% advantage? Comment on the practical implication for image synthesis quality.

Exercise 18 (Privacyโ€“Utility Tradeoff in Rare Mode Coverage).

Consider a one-dimensional dataset with two modes: a majority mode ๐’ฉ(0,1) with 95% of samples and a minority mode ๐’ฉ(10,0.5) with 5% of samples. Total dataset size is n=2000 samples. A DP-GAN is trained with DP-SGD.

  1. Argue qualitatively why DP-SGD will degrade minority mode coverage more than majority mode coverage. Consider the signal-to-noise ratio of gradients for rare vs. common data points.

  2. Suppose the minority mode contributes samples ๐’™โˆˆ[8,12] and the majority mode contributes ๐’™โˆˆ[โˆ’3,3]. If the generator after DP training produces N=10000 synthetic samples with only pminโ‹…N samples in [8,12], compute the value of pmin for which the FID contribution from the minority mode equals the FID contribution from the majority mode. (Assume FID is proportional to the Wasserstein distance between target and generated distributions for each mode.)

  3. Propose a privacy-preserving over-sampling strategy for the minority mode that maintains (ฮต,ฮด)-DP for the overall training procedure.

Federated Variational Autoencoders

Generative adversarial networks, examined in earlier sections of this chapter, excel at producing high-fidelity samples but are notoriously difficult to train in federated settings: the discriminator must see data from all clients to be meaningful, yet federated learning forbids such centralised inspection. The Variational Autoencoder (VAE) sidesteps this tension by casting generation as variational inference. The encoder and decoder are separate networks with well-defined, aggregatable parameter sets, the training objective decomposes gracefully across independent data batches, and the latent space itself provides a lingua franca through which clients can share structural knowledge without sharing raw examples.

This section develops the federated VAE in four movements. We first recall the classical VAE to fix notation. We then formalise FedVAE, identify the specific challenge of heterogeneous latent spaces, and introduce the dual-encoder architecture with its personalized gating network as the principled remedy. The section concludes with a worked example on movie recommendation, a discussion of posterior collapse under federation, and practical guidance on ฮฒ-VAE scheduling.

VAE Recap: Encoder, Decoder, ELBO, Reparameterisation

A VAE models data ๐’™โˆˆ๐’ณ through a latent variable ๐’›โˆˆโ„dโก governed by a standard Gaussian prior p(๐’›)=๐’ฉ(๐’›;๐ŸŽ,๐ˆ). The generative process is (Generative)๐’›โˆผp(๐’›),๐’™|๐’›โˆผpฮธ(๐’™|๐’›), where pฮธ(๐’™|๐’›) is a decoder with parameters ฮธ. Given observed data, the posterior pฮธ(๐’›|๐’™) is generally intractable, so we introduce an amortised variational posterior (Encoder)qฯ•(๐’›|๐’™)=๐’ฉ(๐’›;๐ฯ•(๐’™),diag[๐ˆฯ•2(๐’™)]), parameterised by an encoder (๐ฯ•,logโก๐ˆฯ•2) with parameters ฯ•.

Definition 11 (Evidence Lower Bound).

The Evidence Lower Bound (ELBO) for a single data point ๐’™ is (ELBO)โ„’ELBO(ฮธ,ฯ•;๐’™)=๐”ผqฯ•(๐’›|๐’™)[logโกpฮธ(๐’™|๐’›)]โŸreconstructionย termโˆ’DKL(qฯ•(๐’›|๐’™)โ€–p(๐’›))โŸregularisationย term. Maximising โ„’ELBO over (ฮธ,ฯ•) is equivalent to maximising a lower bound on the log-likelihood logโกpฮธ(๐’™): (LB)logโกpฮธ(๐’™)โ‰ฅโ„’ELBO(ฮธ,ฯ•;๐’™),โˆ€ฯ•. The gap equals DKL(qฯ•โ€–pฮธ(โ‹…|๐’™))โ‰ฅ0.

The KL term in has a closed form for Gaussian qฯ• and Gaussian prior p: (KL Closed)DKL(๐’ฉ(๐,diag[๐ˆ2])โ€–๐’ฉ(๐ŸŽ,๐ˆ))=12โˆ‘j=1d(ฮผj2+ฯƒj2โˆ’logโกฯƒj2โˆ’1).

Reparameterisation trick.

The expectation in the reconstruction term requires differentiating through a stochastic sampling step. The reparameterisation trick rewrites the sample as a deterministic function of a noise variable: (Reparam)๐’›=๐ฯ•(๐’™)+๐ˆฯ•(๐’™)โŠ™๐,๐โˆผ๐’ฉ(๐ŸŽ,๐ˆ), where โŠ™ denotes elementwise multiplication. The gradient โˆ‚โ„’ELBO/โˆ‚ฯ• now passes through ๐ฯ• and ๐ˆฯ• unobstructed, enabling end-to-end backpropagation.

Remark 14 (Why reparameterisation matters for federation).

In federated training, gradients computed locally are transmitted to a server for aggregation. The reparameterisation trick ensures those gradients are low-variance: the noise ๐ is re-drawn at each forward pass rather than averaged over. This makes federated gradient aggregation as stable as its centralised counterpart, a property not shared by REINFORCE-based estimators, which have O(1) variance that does not decrease with batch size.

For a dataset ๐’Ÿ={๐’™1,โ€ฆ,๐’™N}, the full training objective is (FULL OBJ)maxฮธ,ฯ•โก1Nโˆ‘i=1Nโ„’ELBO(ฮธ,ฯ•;๐’™i). Both the encoder ฯ• and decoder ฮธ receive gradient updates from every data point through the reparameterisation.

FedVAE: Formal Definition

Consider K clients, each holding a local dataset ๐’Ÿk={๐’™1(k),โ€ฆ,๐’™nk(k)} for k=1,โ€ฆ,K. The clients do not share their data; they communicate only via model parameters with a central server.

Definition 12 (Federated VAE).

A Federated VAE (FedVAE) is a VAE trained via a federated protocol in which:

  1. Local ELBO optimisation. In each communication round r, client k receives global parameters (ฮธ(r),ฯ•(r)) from the server and performs ฯ„ local gradient steps: (Local)(ฮธk(r),ฯ•k(r))=LocalOpt(ฮธ(r),ฯ•(r),๐’Ÿk,ฯ„), where LocalOpt denotes ฯ„ steps of stochastic gradient ascent on the local ELBO: (Local ELBO)โ„’k(ฮธ,ฯ•)=1nkโˆ‘i=1nkโ„’ELBO(ฮธ,ฯ•;๐’™i(k)).

  2. Server aggregation. The server aggregates client parameters by weighted averaging: (AGG)ฮธ(r+1)=โˆ‘k=1Kwkฮธk(r),ฯ•(r+1)=โˆ‘k=1Kwkฯ•k(r), where wk=nk/โˆ‘jnj are data-proportional weights.

The global objective solved by FedVAE is: (Global OBJ)maxฮธ,ฯ•โกโˆ‘k=1Kwkโ„’k(ฮธ,ฯ•).

Remark 15 (Relation to FedAvg).

FedVAE is precisely FedAvg applied to the encoderโ€“decoder parameter pair. The ELBO objective decomposes over data points, so the local optimisation step in Definition Definition 12 is identical to FedAvg's local update phase with the only distinction being that the loss function is the ELBO rather than cross-entropy. All convergence guarantees established for FedAvg (under bounded gradient dissimilarity and smoothness assumptions) transfer directly to FedVAE.

The Heterogeneous Latent Space Challenge

When clients hold data from different distributions - a scenario called statistical heterogeneity or non-IID data - a naive FedVAE faces a fundamental difficulty that has no analogue in standard federated classification.

The alignment problem.

Suppose client 1 holds images of cats and client 2 holds images of dogs. After local ELBO optimisation:

  • Client 1's encoder maps cats to region AโŠ‚โ„dโก of the latent space.

  • Client 2's encoder maps dogs to region BโŠ‚โ„dโก disjoint from A.

After server aggregation , the global encoder is an average that maps neither cats nor dogs to either A or B reliably. The global decoder, similarly averaged, cannot reconstruct either class well from any region of the latent space.

More formally, let pk(๐’›) be the aggregate posterior on client k, defined as (AGG Posterior)pk(๐’›)=1nkโˆ‘i=1nkqฯ•k(๐’›|๐’™i(k)). Heterogeneity implies pk(๐’›)โ‰ˆฬธpj(๐’›) for kโ‰ j. Averaging the encoder parameters yields a model that approximates none of the individual posteriors.

Caution.

Latent space misalignment cannot be fixed by running more communication rounds. In federated classification, more communication rounds push the model towards a global optimum that generalises across clients. For generative models, the latent geometry of a Gaussian-prior VAE does not decompose additively over clients: the space of valid latent assignments under one client's data is unrelated to that of another client unless the data distributions share semantic structure. Simply running FedAvg longer exacerbates the mismatch as each client's encoder drifts further from the aggregate.

Why this is worse than the centralised case.

In a centralised VAE trained on heterogeneous data, all data points compete for the same latent space simultaneously, and the KL regulariser forces the aggregate posterior towards the prior. Heterogeneity makes learning harder, but at least all examples see the same encoder during each gradient step.

In FedVAE, clients train independently for ฯ„ steps. The encoder on client k has no gradient signal from client jโ‰ k, so it specialises aggressively to local data. After aggregation, the global encoder is a parameter average of K specialised encoders - a combination that satisfies none of the individual ELBO objectives. The magnitude of the degradation grows with:

  • the number of local steps ฯ„ (more drift),

  • the Wasserstein distance between the data distributions p1(๐’™),โ€ฆ,pK(๐’™) (more heterogeneity), and

  • the latent dimensionality d (more room to misalign).

FedCF: Federated Collaborative Filtering with VAEs

Collaborative filtering - the backbone of recommendation systems - is a natural application domain for federated VAEs. Each user (client) holds their own rating history, which is private. A central server wishes to learn a generative model of user preferences that enables personalised recommendations without ever seeing individual ratings.

Setup.

Let there be K users (clients) and M items. User k has rated a subset โ„kโІ{1,โ€ฆ,M} of items, producing a sparse rating vector ๐’™(k)โˆˆโ„Mโก with entries (Ratings)xm(k)={rkmifย userย kย ratedย itemย m,0otherwise. The goal is to learn a VAE over rating vectors such that the decoder pฮธ(๐’™|๐’›) can impute missing ratings and thus generate personalised recommendations.

Local ELBO for collaborative filtering.

Each client optimises a masked reconstruction loss that evaluates only on observed ratings: (ELBO)โ„’kCF(ฮธ,ฯ•)=๐”ผqฯ•(๐’›|๐’™(k))[โˆ‘mโˆˆโ„klogโกpฮธ(xm(k)|๐’›)]โˆ’DKL(qฯ•(๐’›|๐’™(k))โ€–p(๐’›)). Crucially, only the mask โ„k and the aggregated gradients leave the client, never the raw ratings ๐’™(k).

Sparsity and the prior mismatch.

Rating vectors are extremely sparse (a user rates O(102) of O(105) available items). The encoder therefore sees many zeros during local training, which can push the latent code to a degenerate region of the prior. FedCF addresses this with a dropout-augmented encoder: during training, additional ratings are randomly masked to prevent the encoder from simply memorising the sparsity pattern.

Remark 16 (Communication efficiency in FedCF).

A user's rating vector ๐’™(k)โˆˆโ„Mโก for M=105 items is large. FedCF never transmits this vector. It transmits only the encoder and decoder parameter gradients, whose size is determined by the neural network architecture and is typically orders of magnitude smaller than M. This asymmetry is a principal advantage of VAE-based collaborative filtering over methods that transmit perturbed rating vectors directly.

Dual Encoder Architecture

The heterogeneous latent space challenge motivates an architectural solution: equip each client with two encoders that decompose the latent representation into a shared global component and a private local component.

Global knowledge encoder.

The global encoder Eฯ•G:โ„dโกโ†’โ„dz/2โกร—โ„dz/2โก is shared across all clients and aggregated by the server at every round. Its output (๐G,๐ˆG) captures shared structure present in all clients' data: coarse semantic features, domain-invariant factors of variation, and patterns that transfer across heterogeneous distributions.

Formally, the global encoder's parameters ฯ•G are updated by FedAvg: (Global AGG)(ฯ•G)(r+1)=โˆ‘k=1Kwk(ฯ•kG)(r), exactly as in standard FedVAE.

Local personalised encoder.

The local encoder Eฯ•kL:โ„dโกโ†’โ„dz/2โกร—โ„dz/2โก is not shared: its parameters ฯ•kL remain on client k throughout training. It captures client-specific factors: local vocabulary in NLP, local imaging protocol artefacts in medical imaging, or personal taste in recommendation. Because these parameters never leave the client, there is no aggregation-induced misalignment for the local component.

Personalised Gating Network

Having two encoders raises the question of how to combine their outputs. A fixed split (use half the latent dimensions for global, half for local) is inflexible: some inputs may need more global context, others more local specialisation. A personalised gating network resolves this adaptively.

Architecture.

Let the global and local encoders produce means and log-variances: (Global ENC)(๐G,logโก๐ˆ2,G)=Eฯ•G(๐’™),(๐L,logโก๐ˆ2,L)=Eฯ•kL(๐’™). The gating network Gฯˆk:โ„dโกโ†’[0,1]dz produces a per-dimension gate vector: (GATE)๐’ˆ=ฯƒ(Gฯˆk(๐’™))โˆˆ[0,1]dz, where ฯƒ is the sigmoid function. The fused latent distribution has parameters: (MEAN)๐=๐’ˆโŠ™๐G+(๐Ÿโˆ’๐’ˆ)โŠ™๐L,logโก๐ˆ2=๐’ˆโŠ™logโก๐ˆ2,G+(๐Ÿโˆ’๐’ˆ)โŠ™logโก๐ˆ2,L. The fused sample ๐’›=๐+๐ˆโŠ™๐ is then decoded by the shared decoder pฮธ(๐’™|๐’›).

Remark 17 (Gating parameter treatment).

The gating network parameters ฯˆk are client-local: they are not aggregated by the server. This allows each client to learn how much to rely on shared versus personal knowledge, without that preference being averaged away. The only parameters transmitted to the server are (ฯ•kG,ฮธk), i.e., the global encoder and decoder.

The gating mechanism has an appealing interpretation: when ๐’ˆโ‰ˆ๐Ÿ, the client defers entirely to the global model (appropriate for common patterns); when ๐’ˆโ‰ˆ๐ŸŽ, the client uses its local model exclusively (appropriate for idiosyncratic local features). In practice, gates settle at intermediate values that vary by latent dimension and input.

Personalised Federated VAE: Formal Definition

We now formalise the complete personalised federated VAE.

Definition 13 (Personalised Federated VAE).

A Personalised Federated VAE (pFedVAE) is a tuple (ฯ•G,{ฯ•kL}k=1K,{ฯˆk}k=1K,ฮธ) trained by the following protocol:

  1. Local step. Client k minimises the negative personalised ELBO for ฯ„ gradient steps: (Local ELBO)โ„’kpFed=1nkโˆ‘i=1nk๐”ผqฯ•k(๐’›|๐’™i(k))[logโกpฮธ(๐’™i(k)|๐’›)]โˆ’ฮฒDKL(qฯ•k(๐’›|๐’™i(k))โ€–p(๐’›)), where qฯ•k(๐’›|๐’™)=๐’ฉ(๐’›;๐ฯ•k(๐’™),diag[๐ˆฯ•k2(๐’™)]) uses the gated fusion โ€“. Gradients update all client-side parameters (ฯ•kG,ฯ•kL,ฯˆk,ฮธk).

  2. Server aggregation. Only the global encoder and decoder are aggregated: (AGG ENC)(ฯ•G)(r+1)=โˆ‘k=1Kwk(ฯ•kG)(r),ฮธ(r+1)=โˆ‘k=1Kwkฮธk(r). The local encoder parameters ฯ•kL and gating parameters ฯˆk remain on client k.

  3. New client initialisation. A new client kโ€ฒ receives (ฯ•G,ฮธ) from the server and initialises ฯ•kโ€ฒL randomly. After a few local steps, ฯˆkโ€ฒ learns appropriate gates.

Key Idea.

The latent space is the meeting ground. In pFedVAE, clients share abstract representations, not raw data. The global encoder learns a universal compression of the shared structure; the local encoder captures idiosyncrasy; the gating network arbitrates the balance. Privacy is preserved because only averaged gradient signals, never individual data points, traverse the network boundary.

TikZ Figure: FedVAE with Dual Encoders and Gating

pFedVAE dual-encoder architecture with personalised gating. The global encoder (green) captures shared structure and is aggregated by the server. The local encoder (orange) captures client-specific features and remains on-device. The gating network (purple) produces per-dimension gates ๐’ˆโˆˆ[0,1]dz that interpolate between global and local representations before sampling ๐’›. Dashed arrows indicate gradient communication; only global parameters ฯ•G and ฮธ traverse the server.

Example: Federated Movie Recommendation

Example 3 (Federated Movie Recommendation with pFedVAE).

Consider K=10,000 streaming platform users (clients) and M=50,000 movies. Each user k has rated a sparse subset โ„k of movies (|โ„k|โ‰ˆ200 on average). The platform cannot centralise ratings due to privacy regulations.

Representation. User k's data is the sparse vector ๐’™(k)โˆˆโ„50,000โก. We treat each user as a โ€œdataset of oneโ€ for the gating architecture: the encoder maps their complete rating history to a latent code ๐’›โˆˆโ„64โก.

Dual encoder design.

  • Global encoder Eฯ•G: a 3-layer MLP with hidden sizes (1024,512,256), ending in a 64-dimensional mean and log-variance. This encoder learns genre preferences, seasonal trends, and franchise fandom that are shared across users.

  • Local encoder Eฯ•kL: a 2-layer MLP with hidden sizes (256,128). This encoder captures idiosyncratic taste: a user who always rates classic films highly regardless of genre, or one who rates animated films across all genres.

  • Gating network Gฯˆk: a 1-layer MLP mapping the rating vector to 64 gate logits. After sigmoid, gate values near 1 indicate dimensions where global knowledge dominates; values near 0 indicate locally personalised dimensions.

Federated training. In each round, a random subset of 100 users is selected. Each user performs ฯ„=5 local gradient steps on their masked reconstruction loss . The server aggregates global encoder and decoder gradients. Local encoder and gating parameters remain on-device.

Inference / recommendation. To generate recommendations for user k:

  1. Encode: ๐’›โˆผqฯ•k(๐’›|๐’™(k)) using the gated fusion.

  2. Decode: obtain ๐’™^(k)=pฮธ(๐’™|๐’›), the estimated full rating vector.

  3. Recommend: return the top-n unrated movies by predicted score x^m(k).

Why federation helps beyond privacy. Even if all ratings were available centrally, training a single VAE on 10,000ร—200 sparse observations is challenging. The global encoder in pFedVAE effectively shares statistical strength across 10,000 users' rating patterns without seeing any individual's data, achieving a form of collaborative filtering with provable privacy guarantees (differential privacy can be added via noisy aggregation on the server side).

Observed behaviour. In practice, users with niche tastes (rare genre combinations) exhibit gate vectors ๐’ˆ with many values near 0, relying heavily on the local encoder. Users with mainstream tastes show ๐’ˆ near ๐Ÿ, deferring to the global encoder. The gating thus acts as an automatic personalisation dial, requiring no manual per-user configuration.

Posterior Collapse in Federated VAEs

Posterior collapse occurs when the variational posterior qฯ•(๐’›|๐’™) collapses to the prior p(๐’›), rendering the latent code uninformative: (Collapse)qฯ•(๐’›|๐’™)โ‰ˆp(๐’›)=๐’ฉ(๐ŸŽ,๐ˆ). When this happens, the decoder pฮธ(๐’™|๐’›) learns to ignore ๐’› entirely and generates samples from the marginal pฮธ(๐’™)=โˆซpฮธ(๐’™|๐’›)p(๐’›)d๐’› which, for a sufficiently powerful decoder, may reproduce training examples but fails to provide meaningful latent structure.

Why collapse is worse under federation.

In a centralised VAE, collapse is already a known failure mode when the decoder is too powerful or the KL weight too high. Under federation, three additional forces push towards collapse:

  1. Local data scarcity. Each client has nkโ‰ชN examples. With few data points, the reconstruction term โˆ‘i๐”ผ[logโกpฮธ(๐’™i|๐’›)] is small in absolute magnitude relative to the KL penalty, tipping the ELBO balance towards collapse.

  2. Gradient noise amplification. After ฯ„ local steps, the accumulated gradient contains a component pointing towards collapse for each client (the KL gradient always pushes qฯ• towards p). Server averaging reinforces this component across all K clients.

  3. Decoder exploitation of heterogeneity. If clients hold different data distributions, the decoder learns to generate plausible samples for each distribution from nearby latent regions. A decoder that โ€œfills inโ€ heterogeneous data without using ๐’› achieves low reconstruction loss, rewarding collapse.

Diagnostic.

The active units metric Au counts dimensions j for which the variance of the posterior mean is non-negligible: (Active Units)Au=|{j:Var๐’™โˆˆ๐’Ÿ[(ฮผฯ•(๐’™))j]>ฯตu}|, for a small threshold ฯตu>0. A collapsed VAE has Auโ‰ˆ0. Federated training commonly reduces Au by 30โ€“60% compared to centralised training on the same total data.

Beta-VAE Scheduling in the Federated Context

The ฮฒ-VAE modifies the ELBO by up-weighting the KL term: (Betavae)โ„’ฮฒ(ฮธ,ฯ•;๐’™)=๐”ผqฯ•(๐’›|๐’™)[logโกpฮธ(๐’™|๐’›)]โˆ’ฮฒDKL(qฯ•(๐’›|๐’™)โ€–p(๐’›)), with ฮฒโ‰ฅ1 encouraging a more disentangled, better-regularised latent space at the cost of some reconstruction quality.

In the federated context, a fixed ฮฒ>1 exacerbates collapse: the KL penalty already wins on small local datasets, and multiplying it by ฮฒ makes collapse even more attractive. Conversely, ฮฒ<1 risks memorisation of local data with no information sharing through the latent space.

Warm-up schedule.

A standard remedy is a linear warm-up: begin training with ฮฒ0=0 (pure reconstruction) and anneal to the target ฮฒT over T rounds: (BETA Schedule)ฮฒ(r)=minโก(ฮฒT,rTฮฒT). In the federated setting, this schedule must be applied at the server level to remain consistent across clients. If each client independently anneals ฮฒ, the annealing may proceed at different rates due to partial participation (not every client participates in every round), creating inconsistent ฮฒ values at aggregation time.

Federated cyclical annealing.

An alternative is cyclical annealing: ฮฒ follows a sawtooth schedule that periodically returns to 0. Each cycle allows the decoder to exploit the reconstruction signal without KL pressure, while the subsequent rise of ฮฒ forces the encoder to re-regularise. Cyclical annealing has been shown empirically to reduce collapse in both centralised and federated settings compared to monotone annealing.

Remark 18 (Synchronised vs. unsynchronised annealing).

In synchronous federated learning (all clients participate in every round), implementing a global ฮฒ schedule is straightforward: the server broadcasts ฮฒ(r) alongside the model parameters. In asynchronous settings (clients participate sporadically), clients may receive models trained under different ฮฒ values. The recommended approach is to treat ฮฒ as a hyperparameter of the server protocol, not a trainable parameter, and broadcast its value explicitly with each round's model download.

Exercises

Exercise 19 (ELBO Decomposition under Data Heterogeneity).

Let K clients hold datasets ๐’Ÿ1,โ€ฆ,๐’ŸK drawn from distributions p1(๐’™),โ€ฆ,pK(๐’™). Define the global objective โ„’global=โˆ‘kwkโ„’k(ฮธ,ฯ•) and the centralised objective โ„’central(ฮธ,ฯ•)=1Nโˆ‘kโˆ‘iโˆˆ๐’Ÿkโ„’ELBO(ฮธ,ฯ•;๐’™i).

  1. Show that โ„’global=โ„’central exactly when wk=nk/N.

  2. Under ฯ„>1 local steps, FedAvg does not minimise โ„’central exactly. Describe the objective that ฯ„-step FedVAE does minimise (in terms of the local objectives and the distance penalty induced by parameter drift).

  3. For K=2 clients with p1=๐’ฉ(0,1) and p2=๐’ฉ(5,1) on scalar data, sketch the aggregate posterior p1(๐’›)+p2(๐’›) after FedVAE with a single Gaussian encoder. What happens to the global latent space?

Exercise 20 (Gating Network Analysis).

Consider a pFedVAE with a scalar latent space (dz=1) and two clients. Client 1 has data ๐’Ÿ1 drawn from ๐’ฉ(ฮผ1,ฯƒ12) and client 2 from ๐’ฉ(ฮผ2,ฯƒ22) with ฮผ1โ‰ ฮผ2.

  1. Suppose the global encoder has learned to map data to a single mode near (ฮผ1+ฮผ2)/2, and the local encoders have learned the individual modes. For what data point would you expect the gate g to be closest to 1 on client 1? Closest to 0?

  2. Show that if the gating network Gฯˆk is a linear map with scalar output, the fused mean is equivalent to a weighted interpolation between the two posterior means. What is the weight?

  3. Suppose the gating network is removed and instead a fixed gate g=0.5 is used. Derive the fused ELBO in terms of โ„’kG and โ„’kL, the ELBOs obtained by using only the global and local encoders respectively. Is the fused ELBO always at least as large as maxโก(โ„’kG,โ„’kL)? Justify your answer.

Exercise 21 (Posterior Collapse Bound).

Let AuFL be the number of active units achieved by FedVAE with K clients, nk=n data points each, and ฯ„ local steps. Let AuC be the number of active units for a centralised VAE trained on Kn data points for the same total number of gradient steps.

  1. Explain intuitively why AuFLโ‰คAuC is expected to hold in the non-IID setting.

  2. Assume that each client's data is drawn IID from the same distribution. Does the gap AuCโˆ’AuFL vanish as Kโ†’โˆž for fixed n and ฯ„=1? What about for ฯ„>1?

  3. Propose a modification to the FedVAE training procedure (other than reducing ฮฒ) that you predict will increase AuFL, and justify your prediction.

VAEs as Privacy Shields

Federated learning was designed with privacy in mind: by keeping raw data on-device and transmitting only model updates, it avoids the most obvious privacy risk of centralised machine learning. Yet in 2019, Zhu et al. demonstrated that model gradients can be inverted to reconstruct training data with pixel-level fidelity. This gradient inversion attack shattered the assumption that gradient communication is inherently private.

In response, researchers proposed VAEFL: using the VAE's stochastic latent encoding as a principled privacy defense. Rather than applying statistical noise (as in differential privacy) or cryptographic machinery (as in homomorphic encryption), VAEFL exploits the VAE's inherent randomness to obfuscate the data geometry visible in transmitted gradients. The key insight is:

โ€œThe VAE doesn't just generate - it encrypts, for free.โ€

This section develops the attack model, formalises the defense, proves a lower bound on reconstruction error under VAEFL, and compares it to competing privacy mechanisms.

Deep Leakage from Gradients

The Deep Leakage from Gradients (DLG) attack demonstrates that a client's private training data can be reconstructed from the gradients it transmits to the server.

Setup.

Client k holds a batch {๐’™1(k),โ€ฆ,๐’™B(k)} of B data points (images, in the canonical formulation). It computes gradients โˆ‡ฮธโ„“(ฮธ;โ„ฌk) of a loss โ„“ with respect to model parameters ฮธ, and transmits these gradients to the server.

The DLG attacker - who controls the server - has access to ฮธ (the current model) and the transmitted gradients ๐’ˆ^=โˆ‡ฮธโ„“(ฮธ;โ„ฌk). They do not have access to โ„ฌk.

Attack procedure.

The attacker initialises a dummy batch โ„ฌโ€ฒ={๐’™1โ€ฒ,โ€ฆ,๐’™Bโ€ฒ} of random images and a dummy label set {y1โ€ฒ,โ€ฆ,yBโ€ฒ}, and minimises the gradient matching loss: (Attack)โ„ฌโˆ—=argโ€‰minโ„ฌโ€ฒโกโ€–โˆ‡ฮธโ„“(ฮธ;โ„ฌโ€ฒ)โˆ’๐’ˆ^โ€–22. This optimisation is solved by gradient descent on the dummy images, treating them as free variables. Under favourable conditions (small batch size, smooth loss landscape, sufficient gradient signal), the dummy batch converges to a close approximation of โ„ฌk.

Definition 14 (Gradient Inversion Attack).

A gradient inversion attack is any procedure ๐’œ:โ„|ฮธ|โกโ†’๐’ณB that maps transmitted gradients ๐’ˆ^โˆˆโ„|ฮธ|โก to a reconstructed data batch โ„ฌ^=๐’œ(๐’ˆ^)โˆˆ๐’ณB. The attack is characterised by its reconstruction error (Error)Err(๐’œ,โ„ฌk)=minฯ€โก1Bโˆ‘i=1Bd(๐’™^ฯ€(i),๐’™i(k)), where d:๐’ณร—๐’ณโ†’โ„โ‰ฅ0โก is a perceptual distance metric and the minimum is taken over all permutations ฯ€ of {1,โ€ฆ,B} (to handle label permutation ambiguity).

Why DLG works.

The gradient of a cross-entropy loss with respect to the final linear layer encodes exactly the activation pattern of the penultimate layer for each training example. For image classifiers, this activation pattern is a high-fidelity representation of the image. Inverting it through the network is a well-posed optimisation problem with a unique solution in the low-batch regime.

Severity.

DLG reconstructs individual images with near-perfect visual fidelity for B=1. Extensions (R-GAP, iDLG, GradInversion) scale to batches of B=8โ€“32 with high success rates. The attack works equally well against convolutional and transformer architectures.

VAEFL: VAE Latent Sampling as Privacy Defense

VAEFL (VAE Federated Learning) interposes a VAE encoder between the raw data and the rest of the model. Rather than computing gradients with respect to the original input ๐’™, clients first encode ๐’™ to a stochastic latent code ๐’› and train the downstream model on ๐’›.

Architecture.

The client model in VAEFL has two components:

  1. A VAE module (Eฯ•,Dฮธ) that maps inputs ๐’™โ†’๐’›โ†’๐’™^. This module is optionally pre-trained (on public data or via federated VAE training) and then frozen during the downstream task.

  2. A downstream model fฯ‰:โ„dzโกโ†’๐’ด (e.g., a classifier) trained on the latent codes.

Communication protocol.

  1. Client k samples a mini-batch โ„ฌk from ๐’Ÿk.

  2. For each ๐’™โˆˆโ„ฌk, draw ๐’›=๐ฯ•(๐’™)+๐ˆฯ•(๐’™)โŠ™๐ with ๐โˆผ๐’ฉ(๐ŸŽ,๐ˆ).

  3. Compute the downstream loss โ„“k=โ„“(fฯ‰(๐’›),y) and transmit gradients ๐’ˆ^k=โˆ‡ฯ‰โ„“k to the server.

The server never sees ๐’™ and never sees the mean ๐ฯ•(๐’™) or variance ๐ˆฯ•(๐’™) - only the loss gradient with respect to ฯ‰. Because ๐’› is a stochastic function of ๐’™, reconstructing ๐’™ from ๐’ˆ^k requires inverting both the downstream model and the stochastic encoding.

Obfuscation of data geometry.

In the standard (non-VAE) gradient inversion, the reconstruction succeeds because the gradient โˆ‡ฯ‰โ„“ encodes a deterministic, invertible representation of ๐’™. Under VAEFL:

  • The latent code ๐’› is a lossy compression of ๐’™: fine-grained spatial details discarded by the encoder cannot be recovered from ๐’›.

  • The sampling step adds stochastic noise: ๐’›=๐ฯ•(๐’™)+๐ˆฯ•(๐’™)โŠ™๐ with ๐ drawn fresh at inference time. Even if the attacker recovers ๐’›, they see the noise-perturbed code, not ๐ฯ•(๐’™).

  • The KL regularisation ensures that the aggregate posterior over many inputs is close to ๐’ฉ(๐ŸŽ,๐ˆ), so individual codes are difficult to distinguish from prior samples.

Reconstruction Error Lower Bound under VAEFL Defense

We now establish a formal lower bound on the reconstruction error any gradient inversion attack can achieve when VAEFL is deployed.

Proposition 6 (Reconstruction Error Lower Bound under VAEFL).

Let (Eฯ•,Dฮธ) be a VAE with encoder qฯ•(๐’›|๐’™)=๐’ฉ(๐’›;๐ฯ•(๐’™),diag[๐ˆฯ•2(๐’™)]) and let fฯ‰ be the downstream model. Let ๐’œ be any gradient inversion attack. For any input ๐’™ and any perceptual distance d that satisfies the data-processing inequality, the expected reconstruction error satisfies (Bound)๐”ผ๐[d(๐’œ(โˆ‡ฯ‰โ„“(fฯ‰(๐’›),y)),๐’™)]โ‰ฅdโˆ—(๐’™,๐’ฉ(๐ŸŽ,๐ˆ))โˆ’Cฯ•DKL(qฯ•(๐’›|๐’™)โ€–p(๐’›))1/2, where dโˆ—(๐’™,p) is the minimum distance between ๐’™ and any point in the support of p(๐’›) under the decoder, and Cฯ•>0 is a constant depending on the Lipschitz constant of ๐ฯ•.

Proof sketch.

By the data-processing inequality, applying any deterministic function ๐’œ to the gradient cannot increase the mutual information between the output and the original data ๐’™ beyond the mutual information already present in the gradient.

Step 1: Gradient contains information about ๐’›, not ๐’™. The gradient โˆ‡ฯ‰โ„“(fฯ‰(๐’›),y) depends on ๐’™ only through ๐’›. Hence ๐’œ must first invert fฯ‰ to estimate ๐’›, and then invert the encoder to estimate ๐’™ from ๐’›.

Step 2: Stochastic sampling adds irreducible noise. Given the transmitted gradient, the attacker can at best recover the noisy sample ๐’›=๐ฯ•(๐’™)+๐ˆฯ•(๐’™)โŠ™๐. Without knowing ๐, recovering ๐ฯ•(๐’™) requires averaging over realisations of ๐, introducing an estimation error proportional to โ€–๐ˆฯ•(๐’™)โ€–.

Step 3: Latent-to-data inversion error. Even if the attacker recovers ๐ฯ•(๐’™) exactly, they must invert the encoder to recover ๐’™. For a well-trained VAE with KL-regularised latent space, the minimum distance from any point in the support of qฯ•(๐’›|๐’™) to the bulk of the prior is bounded below by a term involving DKL(qฯ•โ€–p). When this KL is small (good regularisation), latent codes are indistinguishable from prior samples, and any inversion attempt cannot identify ๐’™ uniquely.

Combining Steps 1โ€“3 via the triangle inequality for d gives the bound .

Remark 19 (Bound interpretation).

The bound says: the better the VAE is at regularising the latent space (smaller DKL(qฯ•โ€–p)), the harder it is for any attacker to reconstruct ๐’™. This creates a direct link between VAE training quality (measured by the ELBO) and privacy guarantee (measured by reconstruction error). A ฮฒ-VAE with higher ฮฒ achieves a tighter bound at the cost of higher reconstruction distortion.

TikZ Figure: DLG Attack vs VAEFL Defense

Comparison of the DLG gradient inversion attack (left) against the VAEFL defense (right). Without VAE (left): the gradient ๐’ˆ^ encodes a nearly invertible representation of ๐’™; the attacker minimises a gradient-matching loss and reconstructs ๐’™ with high fidelity. With VAE (right): the gradient is computed on the stochastic latent code ๐’›โˆผqฯ•(๐’›|๐’™), not on ๐’™ directly. Reconstruction requires inverting both the downstream model and the stochastic encoder, leading to high reconstruction error (Proposition Proposition 6). The gradient transmitted under VAEFL reveals the latent geometry of the prior ๐’ฉ(๐ŸŽ,๐ˆ), not the input data manifold.

Computational Advantage over Competing Privacy Methods

VAEFL is not the first proposed defense against gradient leakage. We compare it against three established alternatives: differential privacy (DP), secure multi-party computation (SMPC), and homomorphic encryption (HE).

Differential privacy.

DP defends against gradient inversion by adding calibrated Gaussian or Laplace noise to the transmitted gradients: (DP Noise)๐’ˆ^DP=โˆ‡ฯ‰โ„“+๐’ฉ(๐ŸŽ,ฯƒDP2๐ˆ). The privacy guarantee is (ฮต,ฮด)-DP: the probability that an adversary can distinguish whether a particular data point was included in training is bounded by eฮต with failure probability ฮด.

The principal cost is utility: for strong privacy (ฮตโ‰ค1), the noise variance ฯƒDP2 must be large relative to the gradient magnitude, significantly degrading model accuracy. The noise also scales with the model dimensionality |ฯ‰|, making DP expensive for large models.

Secure multi-party computation.

SMPC allows K parties to jointly compute a function of their private inputs without revealing those inputs to each other. In the FL context, SMPC enables secure aggregation: the server learns only the sum of gradients โˆ‘k๐’ˆ^k, not individual ๐’ˆ^k.

SMPC provides strong cryptographic privacy guarantees but has high communication overhead: each pair of clients must exchange cryptographic masks, scaling as O(K2|ฯ‰|) per round. Computational overhead at each client is also significant.

Homomorphic encryption.

HE allows computation on encrypted data: clients encrypt their gradients before transmission, the server aggregates ciphertexts, and the result is decrypted by the clients. This guarantees that the server never sees plaintext gradients.

HE provides the strongest cryptographic guarantees but incurs massive computational overhead. State-of-the-art HE schemes (BFV, CKKS) add a factor of 103โ€“106ร— to computation and communication compared to plaintext operations. Deployment on resource-constrained devices is currently infeasible.

VAEFL advantages.

VAEFL uses the VAE's inherent stochasticity and lossy compression as the privacy mechanism, with no additional computation beyond running the frozen encoder. The latent space naturally satisfies a soft privacy property: the transmitted gradients carry information about the prior, not the individual data point.

Comparison Table: VAEFL vs. DP vs. SMPC vs. HE

MethodComputeCommunicationUtilityPrivacy typeIoT-feasible?
Vanilla FL1ร—1ร—highnoneyes
DP (Gaussian)1.1ร—1ร—mediumโ€“lowโ€ (ฮต,ฮด)-DPyes
SMPC2ร—โ€“10ร—O(K2)highcryptographicno
HE103ร—โ€“106ร—10ร—โ€“100ร—highcryptographicno
VAEFL1.2ร—โ€“2ร—1ร—mediumโ€“highIT (informal)yes
โ€  Utility drop of DP grows with |ฯ‰| (model size); large transformers require ฮต>10 for acceptable accuracy.
Comparison of privacy mechanisms for federated learning. Costs are relative to vanilla federated learning (no privacy). โ€œPrivacy typeโ€ indicates whether the guarantee is information-theoretic (IT), (ฮต,ฮด)-differential (DP), or cryptographic (C). โ€œUtility dropโ€ is qualitative across typical settings. VAEFL overhead assumes a frozen, lightweight encoder.

Insight.

VAEFL occupies a favourable middle ground: it imposes modest computational overhead (run the encoder, sample ๐’›, proceed as normal), requires no change to the communication protocol, and maintains good utility because the latent representation retains the semantically important structure of the input. The privacy guarantee is softer than DP or HE - it is a statistical obfuscation rather than a formal bound - but Proposition Proposition 6 provides a quantitative lower bound on attacker reconstruction error.

IoT Deployment: VAEFL on Resource-Constrained Devices

A compelling application domain for VAEFL is the Internet of Things (IoT): sensor networks, wearable health monitors, smart-home devices, and industrial edge nodes. These devices are characterised by:

  • Limited compute: microcontrollers with <1 GFLOP/s, no GPU, often no floating-point unit.

  • Limited memory: 64โ€“512 KB RAM, 1โ€“16 MB flash.

  • Constrained communication: duty-cycled radio with low bandwidth (<1 Mbit/s) and high latency.

  • High privacy sensitivity: health data, location trajectories, personal activity patterns.

SMPC and HE are entirely infeasible on such devices. DP is feasible but degrades model utility severely at the small batch sizes available on IoT devices (a wearable may have only B=1โ€“4 samples per training step). VAEFL is uniquely compatible with the IoT setting for the following reasons.

Encoder compression.

The VAE encoder used in VAEFL can be heavily compressed without losing privacy properties. A dz=16-dimensional latent space with an encoder implemented as a 3-layer MLP with {64,32,16} hidden units requires fewer than 104 parameters and fits comfortably in 40 KB of flash memory. For sensor data (accelerometer, ECG, temperature), such a network captures sufficient structure for the downstream task.

One-time encoder training.

The encoder need not be trained on-device. It can be trained centrally on a public proxy dataset (or via federated VAE training on a powerful subset of clients), then deployed frozen to all IoT devices. Each device runs only a forward pass through the encoder - a few hundred multiplications - before transmitting gradients.

Quantisation compatibility.

Integer quantisation (8-bit or 4-bit weights and activations) is standard for IoT deployment. The stochastic sampling step ๐’›=๐+๐ˆโŠ™๐ remains valid after quantisation: ๐ can be drawn from a uniform distribution approximating the Gaussian (which requires only a pseudorandom number generator, available on all microcontrollers) and ๐, ๐ˆ are stored as quantised tensors. The privacy guarantee degrades gracefully with quantisation precision.

Example: federated activity recognition.

Consider N=104 smartwatches, each holding <100 labelled activity samples (walking, running, sleeping). Each watch runs a frozen 3-layer MLP encoder on raw 3-axis accelerometer windows of length 128 samples, producing a 16-dimensional latent code per window. A lightweight classifier fฯ‰:โ„16โกโ†’{1,โ€ฆ,5} is trained federatedly on these codes. Gradient transmission per round requires |ฯ‰|โ‰ˆ500 floats, well within the radio bandwidth. The frozen encoder prevents DLG from inverting the gradient back to raw accelerometer readings, protecting the user's health data.

Summary Insight

Insight.

โ€œThe VAE doesn't just generate - it encrypts, for free.โ€ The stochastic encoder of a well-trained VAE transforms raw data into a compact, regularised, noisy latent code. When gradients are computed on this code rather than on the original input, the information available to an attacker is limited to what the latent space contains - which, by design, is a smooth neighbourhood of the prior rather than a precise copy of the input. This is not a side-effect of the VAE; it is a direct consequence of the ELBO's KL term, which penalises the encoder for placing probability mass far from the prior. Training a good generative model and defending against gradient attacks are, in this precise sense, the same objective.

Exercises

Exercise 22 (DLG Attack Analysis).

Consider a single-layer linear model fฮธ(๐’™)=ฮธโŠค๐’™ trained with mean squared error โ„“(ฮธ;๐’™,y)=12(ฮธโŠค๐’™โˆ’y)2.

  1. Show that the gradient โˆ‡ฮธโ„“=(ฮธโŠค๐’™โˆ’y)๐’™ reveals ๐’™ up to a scalar multiple, given ฮธ and the gradient direction.

  2. For a batch โ„ฌ={๐’™1,๐’™2} with ๐’™1,๐’™2โˆˆโ„dโก and labels y1,y2, write the gradient โˆ‡ฮธโ„’โ„ฌ and determine under what conditions on ๐’™1,๐’™2,y1,y2 the DLG attack can recover ๐’™1 and ๐’™2 individually.

  3. Now suppose VAEFL is applied: ๐’›i=ฮผฯ•(๐’™i)+ฯƒฯ•(๐’™i)โ‹…ฯตi with ฯตiโˆผ๐’ฉ(0,1). The model becomes fฯ‰(๐’›)=ฯ‰โŠค๐’› and gradients are โˆ‡ฯ‰โ„“. Show that even if the attacker recovers ๐’›i from the gradient, they cannot recover ๐’™i unless they know ฯตi exactly.

Exercise 23 (Bound Tightness for Beta-VAE Defense).

Recall the VAEFL reconstruction error lower bound (Proposition Proposition 6).

  1. For a ฮฒ-VAE trained to convergence, the expected KL term satisfies ๐”ผ๐’™[DKL(qฯ•(๐’›|๐’™)โ€–p(๐’›))]=c/ฮฒ for some constant c>0 (assuming the model capacity is sufficient to achieve the ฮฒ-ELBO optimum). Express the lower bound on reconstruction error as a function of ฮฒ.

  2. Is the bound monotone increasing in ฮฒ? What happens to model utility (reconstruction quality) as ฮฒโ†’โˆž? Describe the privacyโ€“utility trade-off curve.

  3. Suppose an attacker has access to the VAE encoder Eฯ• but not the downstream model fฯ‰. Can they recover ๐’™ from the mean ฮผฯ•(๐’™) alone? What additional information would the attacker need, and can the server provide it?

Exercise 24 (IoT Encoder Design).

You are deploying VAEFL on a sensor network of N=5000 environmental monitors. Each monitor collects a window of T=64 temperature readings per round. Privacy requirement: the reconstruction error lower bound in Proposition Proposition 6 must be at least 0.1โ€–๐’™โ€–2 for any input ๐’™.

  1. Given that the encoder is a 2-layer MLP with hidden size h and latent dimension dz, derive an approximate expression for the number of floating-point parameters in terms of T, h, and dz. For T=64, h=32, dz=8, compute this number.

  2. The monitor has 256 KB of flash memory. Assuming 4-byte (single-precision) parameters, what is the maximum encoder size (in number of parameters) that fits? Does your encoder from part (a) fit?

  3. The privacy requirement translates to a minimum KL DKL(qฯ•(๐’›|๐’™)โ€–p(๐’›))โ‰คฮบ for some ฮบ depending on Cฯ• and โ€–๐’™โ€–2. Describe how you would verify this requirement empirically for a trained encoder, without centralising the raw sensor data.

Federated Continuous Diffusion Models

Diffusion models have displaced GANs as the dominant paradigm for high-fidelity image synthesis, reaching state-of-the-art quality on benchmarks from natural photographs to medical scans. Their success rests on a deceptively simple idea: gradually corrupt data with Gaussian noise across T timesteps, then train a neural network to reverse that process. Yet this simplicity conceals two formidable challenges when applied in a federated setting.

First, parameter scale. Modern denoising networks, typically U-Nets with attention or transformer-based denoisers, carry hundreds of millions to billions of parameters. Transmitting full model updates at every round imposes bandwidth costs that overwhelm many federated deployments. Second, denoising trajectory divergence. Every client executes a Markov chain ๐’™Tโ†’๐’™Tโˆ’1โ†’โ‹ฏโ†’๐’™0 whose statistical structure depends on the local data distribution. Under severe statistical heterogeneity (non-IID data), these trajectories diverge: a client that sees only portrait photographs will learn a denoiser tuned to faces, while a client with landscape photographs learns an orthogonal denoiser. When the server aggregates these via FedAvg-style averaging, the resulting global model satisfies neither client's trajectory.

This section develops the mathematics of federated diffusion and presents three landmark systems that address the twin challenges: FedDifRC (ICCV 2025) with its text-driven contrastive regularisation and noise-driven consistency; HyFLM with multidimensional trajectory optimisation for personalised federated diffusion; and the FedDDPM family, which turns the diffusion model's own generative capacity into a remedy for data heterogeneity.

The Federated Diffusion Challenge

We begin by quantifying exactly how non-IID data damages a federated diffusion model. Let there be N clients, each holding a local dataset ๐’Ÿk drawn from distribution pk(๐’™0). The global distribution is the mixture p(๐’™0)=1Nโˆ‘k=1Npk(๐’™0), but no client observes this mixture directly.

Denoising Score Matching and Its Federated Analogue

A diffusion model defines a forward process (Forward PROC)q(๐’™t|๐’™0)=๐’ฉ(๐’™t;ฮฑโ€พt๐’™0,(1โˆ’ฮฑโ€พt)๐ˆ), where ฮฑโ€พt=โˆs=1t(1โˆ’ฮฒs) and {ฮฒt}t=1T is a variance schedule. The reverse process is learned by minimising the denoising score matching (DSM) objective (DSM)โ„’DSM(๐œฝ)=๐”ผt,๐’™0,๐[โ€–๐โˆ’๐๐œฝ(๐’™t,t)โ€–2], where ๐โˆผ๐’ฉ(๐ŸŽ,๐ˆ), ๐’™t=ฮฑโ€พt๐’™0+1โˆ’ฮฑโ€พt๐, and ๐๐œฝ is the denoising network.

In a centralised setting, all data are pooled and (DSM) is minimised directly. In a federated setting, client k minimises its local analogue (DSM Local)โ„’k(๐œฝ)=๐”ผt,๐’™0โˆผpk,๐[โ€–๐โˆ’๐๐œฝ(๐’™t,t)โ€–2].

Definition 15 (Federated Diffusion Model).

A federated diffusion model is a tuple ({๐’Ÿk}k=1N,๐๐œฝ,T,{ฮฒt}t=1T,๐’œfed) where:

  1. ๐’Ÿk is the private local dataset at client k, with ๐’Ÿkโˆฉ๐’Ÿj=โˆ… for kโ‰ j.

  2. ๐๐œฝ:โ„dโกร—{1,โ€ฆ,T}โ†’โ„dโก is a denoising network with shared parameters ๐œฝโˆˆโ„Pโก.

  3. T is the number of diffusion timesteps and {ฮฒt} the noise schedule.

  4. ๐’œfed is a federated aggregation algorithm (e.g. FedAvg, FedProx) that at each communication round r collects local gradient updates {ฮ”๐œฝk(r)} and produces a new global model ๐œฝ(r+1)โ†๐’œfed(๐œฝ(r),{ฮ”๐œฝk(r)}).

The objective is to minimise the global DSM loss โ„’(๐œฝ)=1Nโˆ‘k=1Nโ„’k(๐œฝ) without any client ever sharing raw data ๐’Ÿk.

Why Non-IID Data Is Catastrophic for Diffusion

The harm caused by data heterogeneity in federated diffusion goes beyond the gradient divergence familiar from discriminative models. In diffusion, each training example contributes a trajectory of T denoising problems, one per timestep. When client k's distribution pk concentrates on a subset of the semantic space, its local model ๐๐œฝk specialises to that subset at every timestep.

To formalise this, define the denoising trajectory for client k as the sequence of conditional distributions (TRAJ)๐’ฏk={pk(๐’™tโˆ’1|๐’™t)}t=1T. After federated aggregation, the global model implicitly assumes the averaged trajectory ๐’ฏโ€พ=1Nโˆ‘k๐’ฏk. The mismatch between ๐’ฏโ€พ and any individual ๐’ฏk can be quantified by the expected KL divergence

(TRAJ Mismatch)ฮ”traj=1Nโˆ‘k=1N1Tโˆ‘t=1TKLโก(pk(๐’™tโˆ’1|๐’™t)โ€–pโ€พ(๐’™tโˆ’1|๐’™t)).

Proposition 7 (Trajectory Mismatch Amplification).

Under mild regularity conditions, the FID of the federated model's generated samples satisfies (FID Bound)FIDfedโ‰ฅFIDcentral+ฮฉ(Tโ‹…ฮ”traj), where T is the number of diffusion timesteps. That is, quality degradation grows linearly in T.

Proof sketch.

Each denoising step applies the learned reverse kernel. An error at step t propagates to all subsequent steps, accumulating at least additively over T steps. Since the trajectory mismatch ฮ”traj contributes at every step, the total accumulated error grows as ฮฉ(Tโ‹…ฮ”traj). Converting error accumulation to FID uses standard relationships between score estimation error and sample quality.

Caution.

Proposition Proposition 7 implies that the widely used T=1000 schedule typical of DDPM makes non-IID damage one thousand times worse than a single-step model. Practitioners who simply apply FedAvg to a DDPM will observe severe mode collapse or blurring even at modest heterogeneity levels.

FedDifRC: Text-Driven Contrasting and Noise Consistency

FedDifRC (Federated Diffusion with Regularisation and Consistency, ICCV 2025) addresses trajectory divergence through two synergistic mechanisms applied during local training: (i) text-driven diffusion contrasting, which exploits pre-trained visionโ€“language semantics to pull semantically similar representations together across clients; and (ii) noise-driven consistency regularisation, which aligns each client's denoising path to a global reference trajectory.

Text-Driven Diffusion Contrasting

The key insight is that although raw images differ dramatically across clients, their textual semantic embeddings are comparatively stable. A pre-trained text encoder ftxt (e.g. CLIP) maps class labels or captions to a semantic space that is largely domain-invariant.

Definition 16 (Text-Driven Diffusion Contrasting Loss).

Let {(๐’™i,ci)} be a local mini-batch where ci is the class label or caption for image ๐’™i. Define the class-related semantic embedding of a noisy sample as (Semantic Embed)๐’”i(t)=ฯ•๐œฝ(๐’™t(i),t,ftxt(ci)), where ฯ•๐œฝ is a semantic projection head attached to the denoising U-Net's bottleneck. The text-driven diffusion contrasting (TDDC) loss is the symmetric cross-entropy over a batch โ„ฌ: (TDDC LOSS)โ„’TDDC=โˆ’1|โ„ฌ|โˆ‘iโˆˆโ„ฌlogโกexpโก(๐’”i(t)โŠค๐’‡i/ฯ„)โˆ‘jโˆˆโ„ฌexpโก(๐’”i(t)โŠค๐’‡j/ฯ„), where ๐’‡i=ftxt(ci) is the text feature for sample i and ฯ„>0 is a temperature hyperparameter.

The TDDC loss achieves two goals simultaneously. Within a client, it encourages samples of the same class to cluster in the semantic space regardless of their noise level t. Across clients, because the text encoder is frozen and shared, it creates a common semantic coordinate system: two clients that hold different image styles but share class labels will produce compatible semantic embeddings, enabling meaningful model aggregation at the server.

Noise-Driven Consistency Regularisation

The second component aligns local denoising instances to a global reference. After each communication round, the server broadcasts the global model ๐๐œฝg. During local training at client k, each noisy sample ๐’™t is passed through both the local model ๐๐œฝk and the frozen global model, producing a global denoising representation ๐’“g(๐’™t,t)=ฯˆ๐œฝg(๐’™t,t), where ฯˆ is a projection of the network's intermediate features.

Definition 17 (Noise-Driven Consistency Loss).

The noise-driven consistency (NDC) loss enforces that local feature representations match global ones: (NDC LOSS)โ„’NDC=1|โ„ฌ|โˆ‘iโˆˆโ„ฌโ€–ฯˆ๐œฝk(๐’™t(i),t)โˆ’ฯˆ๐œฝg(๐’™t(i),t)โ€–2.

The NDC loss acts as a knowledge distillation objective at the representation level: local models are prevented from drifting too far from the global trajectory even while adapting to local data. Crucially, it operates on noisy samples ๐’™t rather than clean images ๐’™0, so it regularises behaviour at every point in the denoising chain.

FedDifRC Training Objective and Algorithm

The complete FedDifRC local objective at client k combines the standard DSM loss with both regularisation terms:

(Feddifrc OBJ)โ„’kFedDifRC(๐œฝk)=โ„’DSM(๐œฝk)+ฮป1โ„’TDDC(๐œฝk)+ฮป2โ„’NDC(๐œฝk), where ฮป1,ฮป2โ‰ฅ0 are balancing hyperparameters. Setting ฮป1=ฮป2=0 recovers vanilla FedAvg applied to the diffusion model.

Algorithm 1 (FedDifRC).

  1. Input: N clients, global model ๐œฝ(0), rounds R, local steps E, weights ฮป1,ฮป2, frozen text encoder ftxt.
  2. for round r=1,โ€ฆ,R
  3. Server broadcasts ๐œฝ(rโˆ’1) to all clients.
  4. for client k=1,โ€ฆ,N in parallel
  5. ๐œฝkโ†๐œฝ(rโˆ’1)
  6. for local step e=1,โ€ฆ,E
  7. Sample mini-batch โ„ฌโŠ‚๐’Ÿk, timesteps tโˆผUniform(1,T), noise ๐โˆผ๐’ฉ(๐ŸŽ,๐ˆ).
  8. Compute ๐’™t via forward process (Forward PROC).
  9. Compute โ„’DSM, โ„’TDDC (using ftxt), โ„’NDC (using frozen ๐œฝ(rโˆ’1)).
  10. ๐œฝkโ†๐œฝkโˆ’ฮทโˆ‡๐œฝkโ„’kFedDifRC(๐œฝk)
  11. Send ฮ”๐œฝk=๐œฝkโˆ’๐œฝ(rโˆ’1) to server.
  12. ๐œฝ(r)โ†๐œฝ(rโˆ’1)+1Nโˆ‘k=1Nฮ”๐œฝk
  13. return ๐œฝ(R)

Architecture: The FedDifRC System

Figure fig:fedgen:feddifrc-arch gives an overview of the FedDifRC system. Each client runs a denoising U-Net augmented with (i) a lightweight semantic projection head ฯ• fed by the frozen text encoder and (ii) a feature projection ฯˆ that exposes intermediate U-Net features to the NDC objective. Gradients from all three loss terms update only the U-Net parameters and the projection heads; the text encoder is never modified.

FedDifRC architecture. Each client trains a denoising U-Net with two auxiliary objectives: a text-driven diffusion contrasting (TDDC) head ฯ• that uses a frozen CLIP-style text encoder to cluster semantically related noisy samples, and a noise-driven consistency (NDC) head ฯˆ that aligns local intermediate features with those from the broadcast global model. Only U-Net parameters and the lightweight projection heads are communicated to the server; the text encoder is never shared.

Theorem 1 (FedDifRC Convergence Bound).

Assume each local loss โ„’k is L-smooth and that stochastic gradients have variance bounded by ฯƒ2. Let ฮ”k be the gradient divergence between client k and the global objective. After R rounds of FedDifRC with step size ฮท=O(1/RE), the global model satisfies (Feddifrc CONV)1Rโˆ‘r=0Rโˆ’1๐”ผ[โ€–โˆ‡โ„’(๐œฝ(r))โ€–2]โ‰คC1RE+C2(ฮป1+ฮป2)Nโˆ‘k=1Nฮ”k, where C1,C2>0 are constants depending on L and ฯƒ. The regularisation terms reduce the effective divergence ฮ”k by promoting consistent feature representations.

HyFLM: Personalised FL with Multidimensional Trajectory Optimisation

FedDifRC improves the global model. HyFLM (Hybrid Federated Large Model) instead embraces heterogeneity as a feature: it learns a family of personalised diffusion models, one per client, each optimised to its own distribution while sharing a common global backbone. The core innovation is a multidimensional trajectory optimisation that simultaneously controls the diffusion trajectory, the noise schedule, and a low-rank personalisation adapter.

Personalisation via Trajectory Hypernetworks

HyFLM assigns each client a learnable trajectory vector ๐œธkโˆˆโ„mโก that encodes the client's distributional identity. A lightweight hypernetwork h๐“, shared across clients, maps trajectory vectors to personalised noise schedule adjustments: (Hyflm Sched)ฮฒ^t(k)=ฯƒ(h๐“(๐œธk,t)),t=1,โ€ฆ,T, where ฯƒ is the sigmoid function ensuring ฮฒ^t(k)โˆˆ(0,1). Each client therefore runs a distinct forward process calibrated to its own data, but the hypernetwork parameters ๐“ are aggregated globally, encoding the space of all client trajectories.

Low-Rank Personalisation Adapters

In addition to personalised noise schedules, HyFLM attaches LoRA-style low-rank adapters to the global denoising network. Each client k maintains adapter matrices ๐€kโˆˆโ„dร—rโก and ๐kโˆˆโ„rร—dโก (rank rโ‰ชd) that modify the weight matrices of the U-Net attention layers: (Hyflm LORA)๐–k=๐–g+๐€k๐k, where ๐–g is the globally shared weight and ๐€k๐k is the client-specific residual. Only ๐–g and ๐“ are communicated; the adapters ๐€k,๐k remain on-device.

Definition 18 (HyFLM Personalised Objective).

Client k minimises the personalised DSM objective (Hyflm Local)โ„’kHyFLM(๐–g,๐“,๐€k,๐k,๐œธk)=๐”ผt,๐’™0โˆผpk,๐[โ€–๐โˆ’๐๐–k(๐’™t(k),t)โ€–2], where ๐’™t(k) uses the personalised schedule {ฮฒ^t(k)}, and ๐๐–k uses the composed weight ๐–k=๐–g+๐€k๐k. The server aggregates only {๐–g,๐“}; adapters and trajectory vectors are client-private.

Remark 20 (Multidimensionality of HyFLM optimisation).

HyFLM simultaneously optimises three orthogonal dimensions: (1) the global backbone ๐–g, which learns shared low-level statistics; (2) the hypernetwork ๐“, which learns the manifold of valid diffusion trajectories; and (3) the local adapters (๐€k,๐k,๐œธk), which learn each client's position on that manifold. This decomposition cleanly separates what is shared (the backbone and trajectory space) from what is private (the individual position within that space).

FedDDPM and FedDDPM++: Synthetic Data as a Remedy

A recurring theme in federated learning is the use of a small public dataset at the server to regularise aggregation. The FedDDPM family inverts this idea: instead of requiring a pre-collected public dataset, it generates one using the federated diffusion model itself.

The Self-Correcting Data Heterogeneity Mechanism

The core observation is that a federated diffusion model, even one partially damaged by non-IID training, can still generate approximately diverse samples by sampling from different random seeds. These generated samples, while imperfect, capture a broader mixture distribution than any single client's local data.

Definition 19 (Synthetic Auxiliary Dataset).

After round r, the server uses the current global model ๐๐œฝ(r) to generate M synthetic images: (SYN AUX)๐’Ÿ^(r)={๐’™0(i)โˆผp๐œฝ(r)(๐’™0)}i=1M, where p๐œฝ(r)(๐’™0) is the distribution defined by the reverse diffusion chain starting from ๐’™Tโˆผ๐’ฉ(๐ŸŽ,๐ˆ). This dataset ๐’Ÿ^(r) is distributed to all clients as an auxiliary training resource.

FedDDPM: Basic Protocol

In the basic FedDDPM protocol, each client augments its local dataset with a copy of ๐’Ÿ^(r) before running local diffusion training. The combined objective is

(Fedddpm OBJ)โ„’kFedDDPM(๐œฝk)=(1โˆ’ฮผ)โ„’k(๐œฝk)+ฮผโ„’๐’Ÿ^(r)(๐œฝk), where โ„’๐’Ÿ^(r) is the DSM loss evaluated on synthetic data and ฮผโˆˆ[0,1] is a mixing coefficient. Training on ๐’Ÿ^(r) acts as a coverage corrective: clients learn to denoise images from distributions they do not hold locally, reducing the specialisation that causes aggregation misalignment.

FedDDPM+: Iterative Refinement

FedDDPM+ iterates the synthetic data mechanism more aggressively. At round r, rather than simply mixing synthetic data into local training, the server runs a distillation pass: the global model is fine-tuned on ๐’Ÿ^(r) for Es steps before broadcasting, ensuring that the broadcast model is already biased toward the mixture distribution.

Algorithm 2 (FedDDPM+).

  1. Input: N clients, global model ๐œฝ(0), rounds R, synthetic set size M, mixing coefficient ฮผ, server fine-tuning steps Es.
  2. for round r=1,โ€ฆ,R
  3. Server generates: ๐’Ÿ^(r)โ†{๐’™0โˆผp๐œฝ(rโˆ’1)(๐’™0)}i=1M
  4. Server fine-tunes: ๐œฝ(rโˆ’1)โ† run Es gradient steps on โ„’๐’Ÿ^(r)(๐œฝ(rโˆ’1))
  5. Broadcast refined ๐œฝ(rโˆ’1) and ๐’Ÿ^(r) to all clients.
  6. for client k=1,โ€ฆ,N in parallel
  7. ๐œฝkโ†๐œฝ(rโˆ’1)
  8. Run E local steps minimising โ„’kFedDDPM(๐œฝk) using (Fedddpm OBJ).
  9. Send ฮ”๐œฝk to server.
  10. ๐œฝ(r)โ†๐œฝ(rโˆ’1)+1Nโˆ‘k=1Nฮ”๐œฝk
  11. return ๐œฝ(R)

Remark 21 (Privacy of synthetic data).

Transmitting ๐’Ÿ^(r) from server to clients does not violate the federated privacy contract: ๐’Ÿ^(r) is synthetic, generated by the model, and contains no real client data. Clients never share their private ๐’Ÿk upward; they only receive synthetic data downward.

Lemma 1 (Coverage Improvement).

Let p(r) be the distribution of the global model's samples after round r. If the trajectory mismatch ฮ”traj(r) (defined in (TRAJ Mismatch)) is bounded above by ฮด<1/(2T), then the total variation distance satisfies (Coverage Improvement)TV(p(r)(๐’™0),p(๐’™0))โ‰คTV(p(rโˆ’1)(๐’™0),p(๐’™0))โ‹…(1โˆ’cฮผ), for some constant c>0 depending on the mixing coefficient and the synthetic data quality. That is, FedDDPM+ drives exponential convergence of the generated distribution toward the true global data distribution.

Example: Federated Text-to-Image Generation Across Art Studios

Example 4 (Cross-Studio Text-to-Image Diffusion).

Consider five digital art studios that wish to collaboratively train a text-to-image diffusion model. Each studio holds a proprietary dataset of (prompt, image) pairs reflecting its house style: Studio 1 specialises in photorealism, Studio 2 in watercolour illustration, Studio 3 in 3D renders, Studio 4 in pixel art, and Studio 5 in pencil sketches. No studio will share its images due to intellectual property concerns.

Without any correction.

A naive FedAvg run over 50 communication rounds produces a global model whose generated images suffer from style collapse: outputs are blurry, washed-out composites that satisfy no studio's aesthetic. By Proposition 7, with T=1000 and style distributions that are nearly disjoint (ฮ”trajโ‰ˆ0.04), the FID inflation is ฮฉ(40) points, confirmed empirically.

With FedDifRC.

Adding the TDDC loss requires each studio to have access to a shared caption vocabulary (easily standardised across studios) but not to exchange images. After 50 rounds, the global model achieves FID within 8 points of a centralised baseline, accurately generating photorealistic portraits, watercolour landscapes, and pixel-art characters from text prompts.

With FedDDPM+.

The server generates M=10,000 synthetic images each round, covering the five styles through diverse prompt sampling. By round 30, the FID gap reduces to 3 points. Each studio's adapter (in the HyFLM variant) enables the personalised model to generate images in its own style while still benefiting from cross-studio knowledge of anatomy, composition, and colour theory.

Communication cost.

Under FedDifRC with a 860M-parameter denoising transformer, only the U-Net parameters (โˆผ650M) and two tiny projection heads (โˆผ2M each) are communicated per round. Under HyFLM, only the global backbone and hypernetwork parameters are sent; per-studio LoRA adapters (rank 8, โˆผ1M parameters each) stay on-device, reducing uplink bandwidth by 60% compared to full-parameter FedAvg.

Summary and Key Idea

Key Idea.

Diffusion models in federated learning face a compounding challenge: non-IID data does not merely produce gradient divergence - it produces trajectory divergence that amplifies over T denoising steps. The three techniques presented in this section address this at complementary levels: FedDifRC regularises representations during local training; HyFLM personalises the trajectory itself; and FedDDPM turns the generative model's own output into a diversity corrective. Taken together, they realise an elegant self-healing property: diffusion models in FL can generate synthetic data to fix the very non-IID problem that degrades their own training.

Remark 22 (Comparison of approaches).

FedDifRC is well-suited when clients share a common label space and a text encoder is available. HyFLM is preferred when client distributions are genuinely disjoint and personalisation is the primary goal. FedDDPM and FedDDPM+ require no label alignment and are the simplest to implement, but incur server-side generation cost each round. In practice, FedDDPM+ combined with NDC-style consistency achieves the best trade-off between global quality and communication efficiency.

Exercises

Exercise 25 (Trajectory mismatch and timestep sensitivity).

Consider N=4 clients where client k has data concentrated on class kโˆˆ{1,2,3,4} of a four-class dataset. The global distribution is the uniform mixture.

  1. Compute the trajectory mismatch ฮ”traj (defined in (TRAJ Mismatch)) for early timesteps (tโ‰ค100, low noise) versus late timesteps (tโ‰ฅ900, high noise), assuming Gaussian class conditional distributions with means {ยฑ1,ยฑ2} and unit variance. Which regime suffers more mismatch?

  2. Suppose you could train with only half the timesteps (Tโ€ฒ=500) but preserve the same noise schedule endpoints. Using the bound in (FID Bound), estimate the FID improvement over T=1000 as a function of ฮ”traj.

  3. Propose a timestep-adaptive weighting scheme for the FedAvg aggregation that down-weights gradient contributions from high-mismatch timesteps. Write the modified aggregation rule and argue why it reduces ฮ”traj.

Exercise 26 (FedDifRC hyperparameter sensitivity).

In FedDifRC, the total objective is โ„’kFedDifRC=โ„’DSM+ฮป1โ„’TDDC+ฮป2โ„’NDC.

  1. Show that as ฮป2โ†’โˆž, FedDifRC reduces to a feature distillation method where local models are forced to match the global model's representations exactly. What is the effective number of training rounds in this limit?

  2. The temperature ฯ„ in the TDDC loss controls the sharpness of the contrastive distribution. Derive the gradient of โ„’TDDC with respect to a single embedding ๐’”i(t) and show that as ฯ„โ†’0, the gradient degenerates (only the nearest negative sample contributes).

  3. Suppose clients operate in a label-free setting where text labels ci are unavailable. Propose an alternative to ftxt that still provides a semantic anchor for the TDDC loss. Justify your choice and discuss any privacy implications.

Exercise 27 (FedDDPM+ convergence and privacy).

In FedDDPM+, the server generates M synthetic images per round and fine-tunes on them for Es steps.

  1. Using Lemma 1, determine the minimum number of rounds Rโˆ— such that the TV distance to the global distribution satisfies TV(p(Rโˆ—),p)โ‰คฯต, as a function of ฯต, the initial TV distance TV(p(0),p), and the constant cฮผ.

  2. Argue that the synthetic images ๐’Ÿ^(r) transmitted from server to clients do not constitute a privacy breach under the differential privacy post-processing theorem. State the conditions under which this argument holds.

  3. Construct a scenario where FedDDPM+ fails to improve coverage and instead reinforces mode collapse. Describe a practical safeguard that detects and mitigates this failure mode.

Discrete Diffusion for Federated Text Generation

The preceding section treated diffusion in its classical continuous-space form: noise is Gaussian, the data space is โ„dโก, and the denoising network operates on real-valued latent representations. This formulation is powerful for image synthesis but sits awkwardly with natural language. Text is fundamentally discrete: tokens drawn from a finite vocabulary ๐’ฑ. Injecting Gaussian noise into token embeddings is possible but severs the tight correspondence between the forward process and the data modality.

This section develops the discrete masked diffusion paradigm, exemplified by LLaDA (Large Language Diffusion with Masking, NeurIPS 2025), which replaces Gaussian noise with random token masking. We then study why discrete diffusion is particularly advantageous for federated text generation: it avoids sequential token exposure, enables full bidirectional context, and provides stronger privacy guarantees than autoregressive alternatives. The section closes with a treatment of the hybrid CON-PREDIFF model that combines discrete and continuous diffusion backbones.

From Autoregressive to Discrete Masked Diffusion

A standard large language model (LLM) is an autoregressive (AR) model: it factorises the probability of a sequence ๐’™=(x1,โ€ฆ,xL) as

(AR Factorisation)p๐œฝ(๐’™)=โˆโ„“=1Lp๐œฝ(xโ„“|x1,โ€ฆ,xโ„“โˆ’1).

This left-to-right factorisation has two consequences that are particularly problematic in a federated text generation setting.

Sequential token exposure.

During training, the loss at position โ„“ requires the model to process the prefix x1,โ€ฆ,xโ„“โˆ’1. Even when training is distributed, gradient computation necessarily involves the full token sequence. In a federated setup where clients hold private text corpora (e.g. clinical notes, legal documents, personal messages), every training forward pass exposes the entire sequence to the model, increasing membership inference attack surface.

Unidirectional context.

The factorisation (AR Factorisation) means that predictions at position โ„“ are conditioned only on the left context. This limits the model's ability to perform backward generation (generating text given the end of a sequence), infilling (completing a gap in the middle of a sequence), and reasoning tasks that require bidirectional context before committing to any token.

Discrete masked diffusion addresses both limitations by replacing the sequential factorisation with a global masking-and-recovery process.

LLaDA: Large Language Diffusion with Masking

LLaDA defines two processes over token sequences: a forward masking process that randomly corrupts the sequence, and a reverse demasking process learned by the model.

Forward Process: Random Token Masking

Let ๐’™0=(x10,โ€ฆ,xL0)โˆˆ๐’ฑL be a clean token sequence of length L. The forward process at masking ratio ฮฑโˆˆ[0,1] independently replaces each token with a special [MASK] token with probability ฮฑ:

(Llada Forward)q(๐’™ฮฑ|๐’™0)=โˆโ„“=1Lq(xโ„“ฮฑ|xโ„“0), where (Llada Token MASK)q(xโ„“ฮฑ|xโ„“0)={[๐™ผ๐™ฐ๐š‚๐™บ]withย probabilityย ฮฑ,xโ„“0withย probabilityย 1โˆ’ฮฑ.

This is the absorbing state diffusion process in token space: tokens transition irreversibly to [MASK], and the masking ratio ฮฑ plays the role of noise level in continuous diffusion. At ฮฑ=0 the sequence is clean; at ฮฑ=1 all tokens are masked.

Reverse Process: Simultaneous Token Recovery

The key departure from autoregressive generation is that the reverse process recovers all masked tokens simultaneously, not one at a time. Given a masked sequence ๐’™ฮฑ, the model p๐œฝ predicts the full clean sequence:

(Llada Reverse)p๐œฝ(๐’™0|๐’™ฮฑ)=โˆโ„“:xโ„“ฮฑ=[๐™ผ๐™ฐ๐š‚๐™บ]p๐œฝ(xโ„“0|๐’™ฮฑ).

Note that each position is conditioned on the entire masked sequence ๐’™ฮฑ (including unmasked tokens), enabling full bidirectional attention. The model architecture is a standard bidirectional transformer (without causal masking in the attention layers), a direct replacement for the unidirectional transformers used in autoregressive LLMs.

Definition 20 (Discrete Masked Diffusion Language Model).

A discrete masked diffusion language model is a tuple (๐’ฑ,L,p๐œฝ,q,{ฮฑs}s=1S) where:

  1. ๐’ฑ is a finite token vocabulary.

  2. L is the sequence length.

  3. The forward process q(๐’™ฮฑ|๐’™0) is the independent absorbing masking process (Llada Forward).

  4. p๐œฝ(๐’™0|๐’™ฮฑ) is a bidirectional masked language model (a transformer with full attention, no causal mask) that predicts all masked positions simultaneously.

  5. {ฮฑs}s=1S is a monotone decreasing sequence ฮฑ1>ฮฑ2>โ‹ฏ>ฮฑS=0 used at inference time, starting from a fully masked sequence and progressively demasking.

The training objective is the masked diffusion loss: (Llada LOSS)โ„’MDiff(๐œฝ)=โˆ’๐”ผ๐’™0โˆผpdata,ฮฑโˆผUniform(0,1)[โˆ‘โ„“:xโ„“ฮฑ=[๐™ผ๐™ฐ๐š‚๐™บ]logโกp๐œฝ(xโ„“0|๐’™ฮฑ)].

Remark 23 (Relation to BERT-style masked language modelling).

LLaDA's training objective resembles BERT's masked language modelling, but there is a crucial distinction: BERT masks a fixed fraction (โˆผ15%) of tokens and focuses on fine-tuning for downstream tasks, not on learning a generative model. LLaDA samples ฮฑ uniformly from (0,1), covering the full spectrum from nearly clean to fully masked sequences, and is trained exclusively as a generative model. This uniform coverage endows LLaDA with the ability to generate complete sequences from scratch (starting at ฮฑ=1), which BERT cannot do.

Inference: Iterative Demasking

At inference, LLaDA starts from a fully masked sequence ๐’™ฮฑ1=([๐™ผ๐™ฐ๐š‚๐™บ],โ€ฆ,[๐™ผ๐™ฐ๐š‚๐™บ]) and iteratively demasks using a schedule ฮฑ1>ฮฑ2>โ‹ฏ>ฮฑS=0:

  1. Given the current sequence ๐’™ฮฑs, run the bidirectional transformer to obtain p๐œฝ(xโ„“0|๐’™ฮฑs) for all masked positions โ„“.

  2. Sample token predictions from this distribution.

  3. Re-mask a proportion ฮฑs+1/ฮฑs of the newly predicted tokens (keeping the most confident predictions unmasked).

  4. Repeat until ฮฑS=0 (no masked positions remain).

This iterative refinement allows the model to revise its initial token predictions in light of context revealed by other positions, a form of global coherence correction impossible in autoregressive generation.

Performance: Matching GPT-4 Forward, Surpassing AR on Backward

LLaDA at 8B parameters achieves performance on standard forward-generation benchmarks (GSM8K, MATH, HumanEval) comparable to GPT-4-level autoregressive baselines, demonstrating that non-autoregressive generation does not sacrifice forward capability. On backward-generation tasks, where the model must generate a sequence given only its ending, LLaDA achieves 42% accuracy versus 32% for autoregressive models, a 31% relative improvement. This advantage arises directly from bidirectional context: LLaDA can reason from the end constraint forward (and from the beginning backward) simultaneously.

The Discrete Diffusion Forward and Reverse Processes

Figure fig:fedgen:disc-diff-proc illustrates the discrete diffusion pipeline.

Discrete masked diffusion pipeline. Top row (forward process): A clean token sequence is progressively masked at increasing rates ฮฑ, with tokens replaced by [M] = [MASK]. At ฮฑ=1 all tokens are masked. Bottom row (reverse process): Starting from the fully masked sequence, a bidirectional transformer p๐œฝ simultaneously predicts all masked tokens using full bidirectional attention. The most confident predictions are retained at each step; the rest are re-masked and refined. This iterative demasking produces a coherent output sequence ๐’™^0 without any sequential left-to-right exposure.

Why Discrete Diffusion Is Advantageous for Federated Learning

The discrete masked diffusion paradigm offers three structural advantages over autoregressive models in federated text generation.

No Sequential Token Exposure

In an autoregressive model, computing the loss at position โ„“ requires feeding the prefix x1,โ€ฆ,xโ„“โˆ’1 through the model. Intermediate activations correlate with the prefix tokens. Gradient-based membership inference attacks can reconstruct significant portions of the training text from model updates.

In LLaDA, each training example contributes a loss term โˆ‘โ„“:xโ„“ฮฑ=[๐™ผ๐™ฐ๐š‚๐™บ]logโกp๐œฝ(xโ„“0|๐’™ฮฑ). The unmasked tokens in ๐’™ฮฑ appear as context, but they constitute only a fraction (1โˆ’ฮฑ) of the sequence, and the masking ratio ฮฑ is sampled uniformly, so no single ordering of tokens is ever presented to the model. This disrupts the prefix structure that sequential gradient reconstruction exploits.

Proposition 8 (Masking Disrupts Gradient Leakage).

Let ๐’œ be a gradient inversion attack that achieves reconstruction error ฯตAR on an autoregressive LLM. Under the same attack applied to a discrete masked diffusion model trained with masking ratio ฮฑโˆผUniform(0,1), the expected reconstruction error satisfies (Masking Privacy)๐”ผฮฑ[ฯตdisc]โ‰ฅฯตAR+ฮฉ(๐–งโก(x1,โ€ฆ,xL|๐’™ฮฑ)), where ๐–งโก(x1,โ€ฆ,xL|๐’™ฮฑ) is the conditional entropy of the full sequence given the masked version.

Proof sketch.

The gradient of โ„’MDiff with respect to model parameters depends on the masked sequence ๐’™ฮฑ. To reconstruct ๐’™0 from gradients, an attacker must additionally infer the masked tokens. The conditional entropy ๐–งโก(๐’™0|๐’™ฮฑ)=ฮฑLโ‹…๐–งโก(token) gives the irreducible uncertainty about masked positions, which any gradient inversion attack must overcome.

Full Bidirectional Context

In federated settings where clients generate completions from partial contexts (e.g. a medical assistant completing a clinical note, or a legal model completing a contract clause), the ability to condition on both left and right context is critical. LLaDA's bidirectional attention over the masked sequence provides this naturally without any architectural modifications to the federated protocol.

Communication-Efficient Federated Training

Because LLaDA is trained with a single forward pass per example (predicting all masked positions simultaneously), the gradient complexity per training step is O(L2) (dominated by attention), identical to a standard transformer. There is no need for teacher forcing, scheduled sampling, or special treatment of prefix gradients. This makes the local training loop at each federated client identical to standard transformer fine-tuning, facilitating plug-and-play integration with existing federated optimisers (FedProx, SCAFFOLD, FedNova).

Federated Training with Discrete Diffusion

We now describe how LLaDA-style discrete diffusion is adapted to the federated setting.

Federated Masked Diffusion Protocol

Each client k holds a private text corpus ๐’Ÿk and trains a local denoising model p๐œฝk using the masked diffusion loss (Llada LOSS). Gradients are aggregated at a central server using FedAvg or a privacy-amplified variant.

Definition 21 (Federated Discrete Diffusion Model).

A federated discrete masked diffusion model is a tuple ({๐’Ÿk}k=1N,๐’ฑ,L,p๐œฝ,q,{ฮฑs},๐’œfed) where all quantities are as in Definition Definition 20, clients train on private corpora ๐’Ÿk, and ๐’œfed aggregates updates {ฮ”๐œฝk} without exchanging raw text. The global training objective is (FED DISC DIFF OBJ)โ„’(๐œฝ)=1Nโˆ‘k=1N๐”ผ๐’™0โˆผpk,ฮฑโˆผU(0,1)[โˆ’โˆ‘โ„“:xโ„“ฮฑ=[๐™ผ]logโกp๐œฝ(xโ„“0|๐’™ฮฑ)].

Handling Non-IID Text Corpora

Non-IID corpora in text generation manifest as vocabulary skew (different clients use different rare words) and syntactic style skew (different sentence structures). Under discrete diffusion, vocabulary skew affects the prediction distribution for masked tokens. Averaging model weights across clients with different vocabulary distributions can produce a global model that is competent at no client's vocabulary.

A natural remedy is mask-rate personalisation: each client learns a personalised masking schedule ฮฑs(k) while sharing the denoising transformer. This is the discrete analogue of HyFLM's noise schedule personalisation (HyFLM: Personalised FL with Multidimensional Trajectory Optimisation).

(DISC PERS Sched)ฮฑs(k)=ฯƒ(g๐“(๐œธk,s)),s=1,โ€ฆ,S, where g๐“ is a shared lightweight schedule network, ๐œธk is a client-specific trajectory vector, and ฯƒ ensures values in (0,1). The schedule network g๐“ is aggregated globally; ๐œธk remains on-device.

Privacy-Preserving Federated Text Generation

Theorem 2 (Differential Privacy for Federated Masked Diffusion).

Let client k apply Gaussian noise ๐’ฉ(๐ŸŽ,ฯƒdp2๐ˆ) to its clipped gradient ฮ”๐œฝk/maxโก(1,โ€–ฮ”๐œฝkโ€–/C) before transmitting. If ฯƒdp=cC2logโก(1.25/ฮด)/ฯต for constants c,C>0, then each client's contribution is (ฯต,ฮด)-differentially private with respect to any single training sequence.

Furthermore, because the masked diffusion loss aggregates over random masking realisations, the effective sensitivity of a single sequence is reduced by a factor of about ฮฑ (the fraction of unmasked positions) compared to an autoregressive model trained on the same sequence.

Proof sketch.

The gradient sensitivity measures how much a single sequence changes the gradient. In an autoregressive model, one sequence contributes gradients at all L positions. Under masked diffusion with ratio ฮฑ, only ฮฑL positions are masked and contribute to the gradient; the remaining (1โˆ’ฮฑ)L unmasked positions contribute no loss gradient. Averaging over ฮฑโˆผU(0,1) gives expected fraction ๐”ผ[ฮฑ]=1/2, reducing sensitivity by 2 in the โ„“2 norm and allowing a proportionally smaller ฯƒdp for the same (ฯต,ฮด) guarantee.

CON-PREDIFF: Hybrid Discrete-Continuous Diffusion

LLaDA operates purely in token space. A complementary line of work recognises that language has both discrete structure (token identities) and continuous structure (semantic embeddings, syntactic parse trees, prosodic features). CON-PREDIFF (Context-Aware Pre-Diffusion) hybridises discrete and continuous diffusion into a single backbone.

Architecture

CON-PREDIFF operates in two stages:

  1. Context encoding. A bidirectional context encoder Enc๐“ maps the unmasked tokens ๐’™ฮฑโˆ–{[๐™ผ๐™ฐ๐š‚๐™บ]} to a continuous context representation ๐’„=Enc๐“(๐’™ฮฑ)โˆˆโ„Lร—dโก.

  2. Continuous diffusion over masked positions. A continuous-space denoising network ๐๐œฝ operates on the embedding vectors of the masked positions, conditioned on ๐’„: (Conprediff Denoise)๐๐œฝ(๐’†ฮฑ,t,๐’„), where ๐’†ฮฑโˆˆโ„ฮฑLร—dโก is the Gaussian-noised embedding of the masked tokens, and t is the continuous diffusion timestep. After the continuous denoising step, a softmax projection head maps recovered embeddings back to token distributions.

The combined loss is (Conprediff LOSS)โ„’CON-PREDIFF=โ„’MDiff(๐“,๐œฝ)+ฮปโ„’DSM(๐œฝ), where โ„’MDiff acts on the discrete token reconstruction and โ„’DSM acts on the continuous embedding denoising.

CON-PREDIFF in Federated Settings

The hybrid architecture is particularly suited for federated deployment because:

  • The context encoder Enc๐“ captures client-specific discourse structure and can be personalised via LoRA adapters analogous to those in HyFLM (HyFLM: Personalised FL with Multidimensional Trajectory Optimisation).

  • The continuous denoising head ๐๐œฝ operates in embedding space and is shared globally, benefiting from cross-client diversity.

  • The two-stage architecture allows staged aggregation: the context encoder can be fine-tuned locally for more rounds while the continuous head is aggregated every round, reflecting their different sensitivities to data heterogeneity.

Algorithm 3 (Federated CON-PREDIFF).

  1. Input: N clients, parameters (๐“(0),๐œฝ(0)), rounds R, encoder local rounds Eฯ•, denoiser local rounds Eฮธ.
  2. for round r=1,โ€ฆ,R
  3. Broadcast (๐“(rโˆ’1),๐œฝ(rโˆ’1)) to clients.
  4. for client k=1,โ€ฆ,N in parallel
  5. Initialise (๐“k,๐œฝk)โ†(๐“(rโˆ’1),๐œฝ(rโˆ’1)).
  6. for e=1,โ€ฆ,Eฯ• Fine-tune encoder on local data
  7. Gradient step on โ„’kCON-PREDIFF w.r.t. ๐“k
  8. for e=1,โ€ฆ,Eฮธ Fine-tune denoiser on local data
  9. Gradient step on โ„’kCON-PREDIFF w.r.t. ๐œฝk
  10. Send (ฮ”๐“k,ฮ”๐œฝk) to server.
  11. ๐“(r)โ†๐“(rโˆ’1)+1Nโˆ‘kฮ”๐“k
  12. ๐œฝ(r)โ†๐œฝ(rโˆ’1)+1Nโˆ‘kฮ”๐œฝk
  13. return (๐“(R),๐œฝ(R))

Comparison: Discrete vs. Autoregressive Federated Text Generation

Table Table 5 summarises the key distinctions between autoregressive and discrete diffusion approaches to federated text generation.

PropertyAutoregressive (AR)Discrete Diffusion
ContextUnidirectional (left only)Bidirectional (full)
Token exposureSequential prefix exposedRandom subset masked
Backward gen. accuracy32%42%
Gradient sensitivityO(L) positions/sequenceO(ฮฑL), avg. O(L/2)
InfillingRequires retrainingNative capability
Inference speedO(L) sequential stepsO(S) parallel steps
FL aggregationStandard FedAvgStandard FedAvg
Non-IID remedyFedProx, SCAFFOLDMask-rate personalisation
Model scale7Bโ€“175B+ typical1Bโ€“8B current SOTA
Training stabilityHigh (causal mask)Moderate (schedule tuning)
Comparison of autoregressive and discrete diffusion models for federated text generation. Advantages of discrete diffusion are highlighted in green.

Remark 24 (Inference speed trade-off).

Discrete diffusion with S demasking steps generates a sequence of length L in O(Sโ‹…L2) operations (each step is a full transformer forward pass). Autoregressive generation requires O(Lโ‹…L2)=O(L3) operations. For typical Sโ‰ชL (e.g. S=32 steps, L=512 tokens), discrete diffusion is substantially faster at inference. However, each demasking step requires attending over the full masked sequence, so the constant factor is larger than in the KV-cache-accelerated autoregressive regime.

Example: Federated Clinical Note Generation

Example 5 (Privacy-Preserving Clinical Note Completion).

Consider ten hospitals collaborating to train a clinical text generation model. Each hospital holds discharge summaries in its own electronic health records (EHR) system. Regulations prohibit sharing of raw patient notes.

Task.

Given a partially written discharge summary (admission diagnosis, treatment course, but missing the follow-up instructions), generate a contextually appropriate completion.

Autoregressive baseline.

A federated GPT-style model is trained with FedAvg. Gradient leakage analysis shows that an adversary observing a single round's gradient update can reconstruct โˆผ23% of training tokens on average. With (ฯต,ฮด)-DP at ฯต=4, perplexity degrades by 8.2 points.

Federated LLaDA.

Training a 1.3B LLaDA model with the same federated protocol reduces gradient reconstruction to โˆผ11% of tokens (consistent with Proposition Proposition 8). Infilling quality (ROUGE-L on follow-up instructions) improves by 12% over the AR baseline because LLaDA conditions on both the preceding text and any tokens that appear later in the template. With the same (ฯต=4,ฮด)-DP budget, LLaDA's perplexity degrades by only 4.1 points, benefiting from the reduced gradient sensitivity established in Theorem Theorem 2.

Personalisation.

Using mask-rate personalisation (DISC PERS Sched), each hospital learns a schedule tuned to its note length distribution (rural hospitals write shorter summaries; academic medical centres write longer, more detailed ones). This improves ROUGE-L by a further 6% at each hospital without any additional communication cost.

Summary and Insight

Insight.

Discrete diffusion gives federated learning something that autoregressive models fundamentally cannot provide: bidirectional reasoning without sequential data exposure. Because LLaDA predicts all masked tokens simultaneously using full context, it neither exposes token prefixes nor enforces a left-to-right information bottleneck. In federated settings where both privacy and task quality matter, this bidirectionality translates directly to lower gradient leakage, stronger differential privacy guarantees for the same noise budget, and better performance on tasks requiring global context such as infilling and backward generation. The hybrid CON-PREDIFF architecture further shows that the boundary between discrete and continuous diffusion is a design choice, not a constraint: combining both within a single federated backbone yields a model that exploits token-level discreteness for privacy and embedding-space continuity for semantic richness.

Remark 25 (Open questions in federated discrete diffusion).

Three significant open problems remain. First, the optimal masking schedule for federated non-IID settings is not yet characterised: the uniform distribution over ฮฑ is natural for i.i.d. data but may be suboptimal when clients have heterogeneous vocabulary distributions. Second, the interaction between mask-rate personalisation and differential privacy amplification is incompletely understood: personalised schedules change the effective batch-size over token positions, altering the privacy amplification factor. Third, scaling discrete diffusion to GPT-4 scale (โ‰ฅ175B parameters) remains unexplored; the current SOTA (LLaDA 8B) is competitive with models an order of magnitude larger for forward generation, but the scaling exponent for discrete diffusion may differ from the Chinchilla law governing autoregressive models.

Exercises

Exercise 28 (Masked diffusion loss and entropy).

Consider a vocabulary of size |๐’ฑ|=V and a sequence of length L where each token is drawn i.i.d. from a distribution ptok over ๐’ฑ.

  1. Show that the masked diffusion loss โ„’MDiff(๐œฝ) (defined in (Llada LOSS)) is an upper bound on the negative log-likelihood โˆ’๐”ผ๐’™0[logโกp๐œฝ(๐’™0)] under the token independence assumption in (Llada Reverse).

  2. Compute the minimum achievable โ„’MDiff when p๐œฝ=pdata exactly. Express your answer in terms of the per-token entropy ๐–งโก(ptok).

  3. For a federated setting with N clients each holding tokens from different distributions ptok(k), derive the minimum โ„’MDiff of the globally aggregated model as a function of the Jensen-Shannon divergence among {ptok(k)}. Interpret the result: does greater client divergence always increase the minimum loss?

Exercise 29 (Bidirectional context and backward generation).

Let ๐’™=(x1,โ€ฆ,xL) with L=20. Suppose the first 10 tokens are unmasked (observed) and the last 10 are masked. Compare the following settings:

  1. Left-context only (AR model): the model can attend to x1,โ€ฆ,x10 when predicting x11,โ€ฆ,x20. Write the factorisation of p๐œฝ(x11,โ€ฆ,x20|x1,โ€ฆ,x10) under the AR assumption.

  2. Bidirectional context (LLaDA): the model attends to all 20 positions (with positions 11โ€“20 replaced by [MASK]). Write the joint prediction p๐œฝ(x11,โ€ฆ,x20|๐’™0.5) under the independence assumption of (Llada Reverse).

  3. Now suppose the last token x20 is also revealed (known endpoint). An AR model must be retrained or prompted; a LLaDA model simply treats x20 as unmasked. Formalise this difference and argue why LLaDA's 42% vs. AR's 32% backward generation accuracy is a direct consequence.

  4. Federated extension. In a federated setting where each client holds text with different ending distributions (client 1: formal English, client 2: informal English), argue qualitatively whether the bidirectional advantage is preserved, amplified, or diminished under FedAvg aggregation.

Exercise 30 (CON-PREDIFF staged aggregation).

In the federated CON-PREDIFF protocol (Algorithm Algorithm 3), the context encoder ๐“ and continuous denoiser ๐œฝ can be aggregated at different frequencies.

  1. Suppose Eฯ•=5Eฮธ (the encoder trains five times longer locally per round than the denoiser). Describe the qualitative effect on the global model: which component is more personalised, and which is more general?

  2. Define a heterogeneity-aware aggregation weight wkฯ• for the encoder that is inversely proportional to client k's KL divergence from the mixture distribution. Write the weighted aggregation rule ๐“(r)=โˆ‘kwkฯ•๐“k(r) and show that when all clients are i.i.d. it reduces to standard FedAvg.

  3. Combine the staged aggregation of Algorithm Algorithm 3 with LoRA-style personalisation of the context encoder (analogous to (Hyflm LORA)). Write the decomposed parameter structure ๐“k=๐“g+๐€kฯ•๐kฯ• and identify which quantities are communicated to the server and which remain client-private. What is the total per-round communication cost in terms of rank r and encoder dimension dฯ•?

Federated Large Language Models

Large language models have transformed the landscape of natural language processing. A model with 70 billion parameters can perform clinical reasoning, draft legal documents, and write executable code, all from a single checkpoint. Yet the very scale that makes these models remarkable renders them nearly incompatible with the federated learning paradigm as we have studied it so far. FedAvg was designed for models whose gradients can be sent over a hospital's internet connection in seconds. Sending the gradients of a 70B model would require transmitting roughly 280 gigabytes of floating-point data per round, assuming 32-bit precision. Across hundreds of communication rounds and dozens of clients, the cumulative bandwidth cost reaches petabytes.

This section confronts that mismatch directly. We develop the theory and practice of federated fine-tuning for large language models, with parameter-efficient adapters as the central tool. By transmitting only a tiny fraction of a model's parameters, we recover the original promise of federated learning: privacy-preserving collaboration without prohibitive communication cost.

The Scale Challenge

To appreciate the scale mismatch, consider the three fundamental resources that federated learning must manage: communication bandwidth, client memory, and compute. For modern LLMs, each resource presents a distinct obstacle.

Communication bandwidth.

Standard FedAvg uploads the full gradient (or model delta) at every round. For a model with P parameters stored in 16-bit precision, each upload requires 2P bytes. The table below shows how this scales:

ModelParametersUpload sizeTime at 10 Mb/s
BERT-base110M220 MB3 min
GPT-21.5B3.0 GB41 min
LLaMA-7B7B14 GB3.2 h
LLaMA-13B13B26 GB5.9 h
LLaMA-70B70B140 GB31.5 h
GPT-4 classโˆผ100B+>200 GB>44 h
Communication cost per client per round for FedAvg applied to models of increasing scale. Assumes 16-bit precision and a typical uplink bandwidth of 10 Mb/s typical of a hospital network.

A federated learning system running 100 communication rounds with LLaMA-7B would require each client to upload 1.4 TB per training run, taking over 13 days of continuous transmission. For a 70B model, the numbers are simply not viable on any realistic deployment infrastructure.

Client memory.

Standard fine-tuning requires storing the model weights, optimizer states (two momentum vectors for Adam, each the same size as the model), and gradient activations. For a 7B model with Adam, this amounts to roughly 4ร—28GB=112GB in 32-bit (the 14 GB figure above is the 16-bit model), or โ‰ˆ56GB in 16-bit mixed precision, exceeding the memory of any consumer GPU and straining professional-grade hardware.

Local compute.

A single forward-backward pass through a 7B transformer on a consumer GPU may take tens of seconds. Multiplied by hundreds of local steps per round and dozens of rounds, local training cost becomes prohibitive on the edge devices and hospital workstations that federated learning targets.

Remark 26.

In practice, federated LLM training is almost exclusively concerned with fine-tuning a pre-trained foundation model, not pre-training from scratch. Pre-training requires trillions of tokens and enormous compute; it is not meaningfully distributable in a federated setting. Fine-tuning adapts a frozen or near-frozen foundation to a specific task or domain, and it is here that federated approaches are valuable and practical.

Why Full-Model FedAvg Is Impossible

Let us be precise about why naively applying FedAvg to LLMs fails. Recall that FedAvg aggregates client model deltas: ๐œฝ(t+1)=โˆ‘k=1Knkn๐œฝk(t), where ๐œฝk(t) is the model returned by client k after local fine-tuning. Three compounding issues arise.

Communication. Even with gradient compression (e.g., top-k sparsification), transmitting 0.1% of a 7B model's gradients requires 14 MB per client per round. Scaling to 100 clients and 500 rounds gives 700 GB of aggregate traffic. For a 70B model, even 0.1% is 140 MB per client per round.

Heterogeneous memory. A hospital may deploy the federated client on a workstation with a single 16 GB GPU. Full fine-tuning of a 7B model simply does not fit. Memory-efficient fine-tuning techniques (gradient checkpointing, 8-bit quantization) help but do not close the gap.

Statistical divergence. Fine-tuning a large model for many local steps on non-IID data causes severe client drift: the local models diverge from each other, and their average no longer represents a coherent model. This is the standard problem of client drift in FedAvg, now amplified by the expressiveness of the model.

Insight.

The solution is not to send less of the full model, but to restructure what is being trained. If only a small, structured subset of parameters is trainable, then only that subset needs to be communicated, and only that subset needs optimizer states or gradient storage on the client. This is the insight that makes parameter-efficient fine-tuning the linchpin of federated LLM research.

Parameter-Efficient Fine-Tuning as the Solution

Parameter-efficient fine-tuning (PEFT) methods fine-tune a large model by introducing a small number of new or modified parameters while leaving the vast majority of the original weights frozen. This is beneficial in the centralized setting for memory and storage reasons; in the federated setting it is additionally transformative for communication and privacy.

The family of PEFT methods includes:

  • Adapter layers (Houlsby et al., 2019): small bottleneck layers inserted between transformer sublayers.

  • Prefix tuning (Li and Liang, 2021): learnable vectors prepended to key-value sequences in each attention layer.

  • Prompt tuning: soft prompt tokens appended to the input embedding.

  • Low-Rank Adaptation (LoRA) (Hu et al., 2022): the weight update is constrained to a low-rank matrix product.

  • IA3 (Liu et al., 2022): element-wise rescaling of activations with few learned vectors.

Among these, LoRA has become the dominant approach in federated settings, for reasons we now develop in detail.

LoRA: Low-Rank Adaptation

LoRA, introduced by Hu et al. (2022), is a surprisingly elegant solution to the fine-tuning efficiency problem. Its core observation is that the change in model weights during fine-tuning has low intrinsic rank. Rather than learning a full doutร—din weight update, we can learn two small matrices whose product approximates the update.

Definition 22 (Low-Rank Adaptation (LoRA)).

Let ๐–0โˆˆโ„doutร—dinโก be a frozen pre-trained weight matrix. A LoRA adapter introduces two trainable matrices ๐€โˆˆโ„rร—dinโก,๐โˆˆโ„doutร—rโก, where rโ‰ชminโก(din,dout) is the rank. The forward pass through the adapted weight is (Forward)๐–โ€ฒ=๐–0+ฮฑr๐๐€, where ฮฑ>0 is a scaling hyperparameter. The matrices ๐€ and ๐ are initialized as ๐€โˆผ๐’ฉ(0,1) and ๐=๐ŸŽ, so that at the start of training ๐–โ€ฒ=๐–0. Only ๐€ and ๐ are updated during training; ๐–0 is frozen.

The number of trainable parameters per layer is r(din+dout), compared to dindout for a full update. For a typical transformer attention projection with din=dout=4096 and r=8, this is 8ร—8192=65,536 versus 16,777,216: a compression factor of 256.

Why low rank suffices.

The empirical observation supporting LoRA is that the weight matrices in transformer models lie near a low-dimensional subspace throughout training. This intrinsic dimensionality hypothesis, supported by analysis of the singular values of weight updates, suggests that fine-tuning moves models along a manifold of far lower dimension than the full parameter space. LoRA leverages this by restricting the update to an explicit rank-r subspace.

The scaling factor ฮฑ/r.

The choice to scale by ฮฑ/r (rather than simply learning the magnitude within ๐๐€) decouples the rank from the effective learning rate. When r is doubled, the scaling factor halves, keeping the effective step size constant. A common choice is ฮฑ=2r, giving a scaling of 2, though ฮฑ=r (scaling 1) is also used.

Which layers to adapt?

LoRA is typically applied to the query (๐–Q), key (๐–K), value (๐–V), and output (๐–O) projection matrices of each attention head, and sometimes to the feed-forward layers (๐–up, ๐–down). The choice of which layers to adapt significantly affects downstream performance: attention layers tend to capture task-specific reasoning, while feed-forward layers encode factual knowledge.

LoRA in the Federated Setting

In the federated setting, each client k holds frozen ๐–0 (the global pre-trained model, distributed once) and trains its own adapter matrices (๐€k,๐k). At the end of local training, the client uploads only (๐€k,๐k), and the server aggregates: ๐€โ€พ(t+1)=โˆ‘k=1Knkn๐€k(t),๐โ€พ(t+1)=โˆ‘k=1Knkn๐k(t).

Definition 23 (Federated LoRA Fine-Tuning).

Given K clients, a shared frozen model ๐–0, and local datasets {๐’Ÿk}k=1K, federated LoRA fine-tuning solves min{๐€(l),๐(l)}lโกโˆ‘k=1Knknโ„’k({๐–0(l)+ฮฑr๐(l)๐€(l)}l;๐’Ÿk), where l indexes the layers and โ„’k is the local loss on client k. At each communication round, only the adapter matrices {(๐€k(l),๐k(l))}l are transmitted.

The communication savings are dramatic. For LLaMA-7B with LoRA rank r=16 applied to attention projections in all 32 layers:

  • Number of adapted parameters: 32ร—4ร—16ร—(4096+4096)=16,777,216โ‰ˆ16.8M.

  • Fraction of total parameters: 16.8M/7Bโ‰ˆ0.24%.

  • Upload size per client per round (16-bit): โ‰ˆ33.5 MB.

  • Time at 10 Mb/s: โ‰ˆ26 seconds.

Compare this to 14 GB and 3.2 hours for full-model FedAvg.

Key Idea.

LoRA turns the impossible (federating a 70B model) into the practical (federating a 70M adapter). The frozen backbone is distributed once at the start; only the lightweight adapters travel across the network each round.

LoRA Variants for Federated Settings

The basic FedLoRA scheme has several known weaknesses that motivated a family of variants:

SLoRA (Sparse LoRA).

SLoRA combines LoRA with sparse masking. Each client learns not only the low-rank matrices (๐€,๐) but also a binary mask ๐Œ identifying which entries of ๐๐€ to activate. The effective update is ฮฑr(๐ŒโŠ™๐๐€). By sharing masks across clients (e.g., through a lottery-ticket style pre-selection), SLoRA concentrates capacity in the most informative directions and resists overfitting on small local datasets.

FlexLoRA (Heterogeneous Ranks).

In cross-device federated learning, clients have heterogeneous computational capabilities. A powerful workstation may afford rank r=64, while a mobile device is limited to r=4. FlexLoRA allows each client to choose its own rank rk and resolves the aggregation mismatch by projecting all client adapters into a common rank-rmaxโก space before averaging: ๐โ€พ๐€โ€พ=1Kโˆ‘k=1KProjrmaxโก(๐k๐€k). This requires a singular value decomposition at the server but adds no overhead at the clients.

FFA-LoRA (Frozen-A Low-Rank Adaptation).

In standard LoRA, both ๐€ and ๐ are trainable. FFA-LoRA (Frozen-A LoRA) fixes ๐€ to its random initialization and trains only ๐. The matrix ๐€ acts as a fixed random projection of the weight space, and ๐ learns to combine these projections. This has two advantages in the federated setting: (i) clients do not need to transmit ๐€ at all, halving communication; and (ii) the server can pre-share a common fixed ๐€ initialization, so that all clients' updates live in the same subspace and aggregate coherently.

Federated Prompt Tuning

Prompt tuning is an even more parameter-efficient approach. Rather than modifying weight matrices, prompt tuning prepends a small set of learned soft prompt vectors to the input embedding sequence. These vectors are not discrete tokens; they are continuous embeddings optimized by gradient descent.

Definition 24 (Federated Prompt Tuning).

Let f๐œฝ be a frozen pre-trained language model with embedding dimension d. A soft prompt is a matrix ๐โˆˆโ„sร—dโก, where s is the prompt length (typically sโˆˆ{10,50,100}). For input tokens ๐’™=(x1,โ€ฆ,xL) with embeddings ๐„๐’™โˆˆโ„Lร—dโก, the prompted model computes f๐œฝ([๐;๐„๐’™]) where [โ‹…;โ‹…] denotes concatenation along the sequence dimension. Only ๐ is trained. Federated prompt tuning aggregates the soft prompts across clients: ๐โ€พ(t+1)=โˆ‘k=1Knkn๐k(t).

The number of trainable parameters for prompt tuning is just sร—d. For s=100 and d=4096 (LLaMA-7B), this is 409,600 parameters, or about 0.006% of the full model. The upload cost per round is under 0.8 MB. At 10 Mb/s, this is under one second.

Prompt tuning achieves performance close to full fine-tuning when models are large enough (above โˆผ10B parameters) but degrades significantly on smaller models or tasks requiring structural changes to the model's reasoning. In federated settings, the extreme parameter efficiency makes it attractive for communication-constrained environments.

Remark 27.

Prompt tuning and LoRA represent different points on the efficiency-performance tradeoff. Prompt tuning transmits 0.006% of parameters and is nearly free in communication cost, but its expressiveness is limited by the soft prompt's capacity to influence attention across layers. LoRA transmits 0.1โ€“1% of parameters and achieves consistently strong performance across model scales. For most federated NLP applications, LoRA is the preferred choice.

TikZ: LoRA Injection into Transformer Layers

LoRA injection into a transformer weight matrix. The frozen pre-trained weight ๐–0 performs the main linear transformation. The LoRA adapter, consisting of two small trainable matrices ๐€ and ๐ of rank r, adds a low-rank correction scaled by ฮฑ/r. In the federated setting, only the adapter matrices are transmitted between clients and server; ๐–0 is distributed once at initialization and never updated or retransmitted.

Example: Federated Instruction Tuning for Clinical NLP

Example 6 (Federated Instruction Tuning Across Hospitals).

Consider a consortium of K=12 hospitals seeking to fine-tune a LLaMA-13B model for clinical note summarization. Each hospital holds its own proprietary dataset of de-identified patient notes and physician summaries; sharing raw data across institutions is prohibited by data governance agreements.

Setup. The pre-trained LLaMA-13B checkpoint (26 GB in 16-bit) is distributed to all hospitals at the start of the project. Each hospital's fine-tuning infrastructure consists of two NVIDIA A100 80 GB GPUs. LoRA is applied to all attention projection layers with rank r=32 and ฮฑ=64.

Parameter counts. LLaMA-13B has 40 transformer layers. Each layer has four attention projection matrices (๐–Q,๐–K,๐–V,๐–O), each of size 5120ร—5120. The LoRA adapter per layer has 4ร—32ร—(5120+5120)=1,310,720 parameters. Across 40 layers, the total adapter size is 40ร—1,310,720=52,428,800โ‰ˆ52.4M parameters, or about 0.40% of the 13B total.

Communication cost. Each hospital uploads 52.4M ร— 2 bytes โ‰ˆ100 MB per round. Across 50 rounds, the total upload per hospital is 5 GB; across all 12 hospitals, 60 GB in aggregate, compared to about 15.6 TB for full-model FedAvg (roughly 1.3 TB per hospital).

Local training. With LoRA, local training requires storing the frozen 13B backbone in 16-bit (26 GB), the adapter matrices (โ‰ˆ100 MB), and adapter gradients (โ‰ˆ100 MB). The total memory footprint is approximately 26.2 GB, fitting comfortably on two A100 80 GB GPUs with room for activations.

Result. After 50 rounds with 5 local epochs per round, the federated LoRA model achieves a ROUGE-L score within 2.1 points of a centrally trained baseline (trained on the pooled dataset), while no patient data ever leaves any hospital. Privacy analysis under the moments accountant with noise multiplier ฯƒ=1.1 and clipping norm C=1.0 yields ฮต=4.7 at ฮด=10โˆ’5 over the full training run.

Exercises for Section Federated Large Language Models

Exercise 31 (LoRA Rank Selection).

Consider federating a LLaMA-7B model across K=20 clients with an uplink bandwidth of 5 Mb/s each. You require that each communication round completes within 60 seconds (i.e., the upload takes at most 60 seconds).

  1. LoRA is applied to the query and value projection matrices of all 32 transformer layers (each has dimension 4096ร—4096). Derive the maximum allowable rank r as a function of bandwidth, communication time budget, and layer dimensions. What is the maximum rank for this setup?

  2. For the rank found in (a), compute the ratio of trainable parameters to total parameters. Compare the communication cost per round to full-model FedAvg.

  3. Suppose a subset of 5 clients have bandwidth 100 Mb/s (data-center clients) and the remaining 15 have bandwidth 5 Mb/s (hospital clients). Propose a FlexLoRA strategy that assigns different ranks to different clients and derive the aggregated effective rank at the server.

Exercise 32 (FFA-LoRA Communication Savings).

In FFA-LoRA, the matrix ๐€ is fixed at initialization and only ๐ is trained and transmitted.

  1. Show that FFA-LoRA reduces the number of transmitted parameters by exactly a factor of 2 compared to standard LoRA.

  2. A concern with FFA-LoRA is that different clients may use different random seeds for ๐€, causing their ๐ matrices to project into incompatible subspaces. Propose a protocol for the server to ensure all clients use the same ๐€ initialization without transmitting ๐€ explicitly each round.

  3. Empirically, FFA-LoRA is reported to match the performance of standard LoRA on most tasks. Provide an intuitive explanation for why freezing ๐€ does not significantly hurt performance, using the singular value decomposition of ๐๐€.

Exercise 33 (Prompt Tuning vs. LoRA Tradeoff).

A medical AI startup must choose between federated prompt tuning and federated LoRA for deploying a clinical QA assistant. The model is LLaMA-13B. The network constraints are severe: each client has only 2 Mb/s uplink and must complete a round within 120 seconds.

  1. Compute the maximum number of LoRA rank-r adapter parameters that can be transmitted in 120 seconds at 2 Mb/s, using 16-bit precision. What is the maximum rank r?

  2. For prompt tuning with prompt length s, derive the communication cost per round. What is the maximum s at the same bandwidth constraint?

  3. The startup observes that prompt tuning with s=200 achieves a ROUGE-L score of 41.3, while LoRA with the maximum rank from (a) achieves 44.7, and centralized full fine-tuning achieves 47.2. Construct a decision framework that the startup could use to choose between the two methods, considering bandwidth, performance gap, and privacy implications.

Optimization for Federated LLMs

Even with LoRA reducing the number of transmitted parameters by a factor of 100 or more, federated LLM training faces a second barrier: the cost of backpropagation itself. Computing gradients through a billion-parameter transformer requires storing intermediate activations at every layer, consuming memory proportional to the model depth, sequence length, and batch size. On a device with 16 GB of GPU memory, this often exceeds capacity even when the model itself fits.

This section develops a family of optimization algorithms that attack this problem at its root by eliminating or radically restructuring the computation of gradients. We begin with zeroth-order optimization, which estimates gradient directions from loss values alone, and show how it reduces memory from O(P) to O(1) additional storage. We then study FedKSeed, which takes communication efficiency to an extreme by transmitting only a random seed and a scalar. Finally, we examine infrastructure-level solutions (RDMA) and personalized fine-tuning.

FedMeZO: Zeroth-Order Optimization Without Backpropagation

The key insight behind zeroth-order (ZO) methods is: we can estimate the gradient of a loss function without computing a gradient at all, using only function evaluations. The price we pay is statistical efficiency: ZO gradient estimates are noisier than exact gradients. The reward is dramatic: no backpropagation means no activation storage, reducing memory overhead from O(P) to O(1) beyond the model itself.

The MeZO algorithm.

MeZO (Memory-Efficient Zeroth-Order, Zhang et al., 2024) applies zeroth-order gradient estimation directly to the model parameters using a simultaneous perturbation stochastic approximation (SPSA)-style estimator.

Definition 25 (Zeroth-Order Gradient Estimation).

Let โ„’(๐œฝ) be a differentiable loss function. Given a perturbation scale ฯต>0 and a random direction ๐’›โˆผ๐’ฉ(๐ŸŽ,๐ˆ), the zeroth-order gradient estimate is (ZO Estimate)๐’ˆ^(๐œฝ;๐’›,ฯต)=โ„’(๐œฝ+ฯต๐’›)โˆ’โ„’(๐œฝโˆ’ฯต๐’›)2ฯต๐’›. This is an unbiased estimator of the directional derivative in direction ๐’›, and a biased estimator of the gradient: ๐”ผ๐’›[๐’ˆ^(๐œฝ;๐’›,ฯต)]=โˆ‡๐œฝโ„’(๐œฝ)+O(ฯต2). The bias vanishes as ฯตโ†’0, but variance grows as ฯตโ†’0.

Remark 28.

The zeroth-order estimate requires only two forward passes and no backward pass. During a forward pass, activations can be computed sequentially and immediately discarded, so the activation memory overhead is O(1) rather than O(Lโ‹…P) where L is sequence length. This is the central memory saving.

MeZO implementation.

The MeZO algorithm exploits a key trick to avoid storing the perturbation vector ๐’› explicitly, which would itself require O(P) memory. By resetting a pseudo-random number generator (PRNG) to a stored seed s before each perturbation, the same ๐’› can be regenerated on demand. Only the seed s and two scalar loss values โ„’+,โ„’โˆ’ need to be retained.

Algorithm 4 (MeZO: Memory-Efficient Zeroth-Order Fine-Tuning).

  1. Input: Model ๐œฝ, local data ๐’Ÿ, perturbation scale ฯต, learning rate ฮท, steps T
  2. Output: Fine-tuned parameters ๐œฝT
  3. for t=1,โ€ฆ,T
  4. Sample a random seed sโˆผUniform({1,โ€ฆ,232})
  5. Sample batch โ„ฌโŠ‚๐’Ÿ
  6. // Forward pass 1: positive perturbation
  7. PRNG.seed(s); ; ๐’›โ†PRNG.randn(|๐œฝ|)
  8. โ„’+โ†โ„’(๐œฝ+ฯต๐’›;โ„ฌ) one forward pass; no activations stored
  9. // Forward pass 2: negative perturbation
  10. PRNG.seed(s); ; ๐’›โ†PRNG.randn(|๐œฝ|) regenerate same ๐’›
  11. โ„’โˆ’โ†โ„’(๐œฝโˆ’ฯต๐’›;โ„ฌ)
  12. // Compute scalar gradient signal
  13. g^โ†(โ„’+โˆ’โ„’โˆ’)/(2ฯต)
  14. // Apply update (regenerate ๐’› to compute update)
  15. PRNG.seed(s); ; ๐’›โ†PRNG.randn(|๐œฝ|)
  16. ๐œฝโ†๐œฝโˆ’ฮทg^๐’›
  17. return ๐œฝT

Note that the update ๐œฝโ†๐œฝโˆ’ฮทg^๐’› modifies all parameters. When combined with LoRA, the perturbation is applied only to the adapter matrices (๐€,๐), further reducing the scope of computation.

FedMeZO.

FedMeZO integrates MeZO into the federated learning loop. Each client runs MeZO locally for several steps and then uploads the delta of its adapter parameters. The server aggregates and distributes the updated adapter.

Definition 26 (FedMeZO).

FedMeZO is the algorithm that runs MeZO local optimization at each client and aggregates via FedAvg. At round t, client k:

  1. Initializes adapter ๐œฝkโ†๐œฝโ€พ(t) (the global adapter from the server).

  2. Runs ฯ„ steps of MeZO on local data ๐’Ÿk using zeroth-order gradient estimation on ๐œฝk.

  3. Returns the delta ฮ”k=๐œฝkโˆ’๐œฝโ€พ(t).

The server updates ๐œฝโ€พ(t+1)=๐œฝโ€พ(t)+โˆ‘k(nk/n)ฮ”k.

Memory Analysis of FedMeZO

Proposition 9 (FedMeZO Memory Reduction).

Let P denote the total number of parameters, L the sequence length, and d the model dimension. Standard backpropagation-based fine-tuning requires O(P+Lโ‹…d) memory for activation storage. FedMeZO requires only O(P) memory (for the model weights) plus O(1) additional working memory per step (for two scalar loss values and a PRNG seed). The activation memory O(Lโ‹…d) is entirely eliminated.

Proof.

In a standard forward-backward pass, intermediate activations must be retained for use during the backward pass. For a transformer with depth D and sequence length L, the per-layer activation memory is O(Lโ‹…d), giving total activation storage O(Dโ‹…Lโ‹…d)=O(Lโ‹…P/d) in rough terms. In MeZO, the forward pass computes only the final scalar loss โ„’+=โ„’(๐œฝ+ฯต๐’›;โ„ฌ). No gradients are backpropagated; thus no intermediate activations need to be retained beyond the current layer being computed. Each layer's activations can be discarded immediately after the layer's contribution to the loss is accumulated. The working memory per forward pass is therefore O(d) (current layer activations only) plus O(P) for the model. The two scalar losses โ„’+ and โ„’โˆ’ and the PRNG seed s add only O(1). This gives total memory O(P), compared to O(P+DLd) for backpropagation.

MethodAdapter memoryActivation mem.Comm./roundConv.
Full FedAvg14 GB (full)โˆผ40 GB14 GBYes
FedLoRA (standard)32 MB (adapter)โˆผ8 GB32 MBYes
FedLoRA + FFA16 MB (adapter)โˆผ8 GB16 MBPartial
FedMeZO32 MB (adapter)โˆผ0 GB32 MBYes (ZO)
FedKSeed32 MB (adapter)โˆผ0 GB<1 KBYes (ZO)
FedP2EFT32 MB (personal)โˆผ8 GB32 MBYes
Comparison of memory and communication costs for FedLLM optimization methods applied to LLaMA-7B with LoRA rank 16. Activation memory is per forward-backward pass on a sequence of length 512. Communication cost is per client per round in 16-bit. โ€œConv.โ€ indicates whether proven convergence guarantees exist.

FedKSeed: Transmitting Seeds Instead of Gradients

FedKSeed (Xu et al., 2024) pushes the communication efficiency of zeroth-order methods to its logical extreme. In MeZO, the client updates its parameters locally and transmits the delta. FedKSeed observes that because the update direction is entirely determined by the PRNG seed and the scalar gradient signal, the client need not transmit the parameter delta at all. Instead, it transmits just:

  1. The PRNG seed s used in each step (4 bytes each).

  2. The scalar gradient signal g^=(โ„’+โˆ’โ„’โˆ’)/(2ฯต) for each step (4 bytes each).

For ฯ„ local steps, the total transmission is 8ฯ„ bytes. With ฯ„=100 steps, this is 800 bytes, or under 1 KB.

Definition 27 (FedKSeed).

In FedKSeed, each client k at round t:

  1. Receives the global adapter ๐œฝโ€พ(t) from the server (this download happens once per round and is unavoidable).

  2. Runs ฯ„ steps of MeZO, recording the sequence of (si,g^i)i=1ฯ„.

  3. Transmits only {(si,g^i)}i=1ฯ„ to the server.

The server reconstructs the client's full parameter update by re-running the MeZO update rule: ๐œฝkโ†๐œฝโ€พ(t)โˆ’ฮทโˆ‘i=1ฯ„g^i๐’›i,whereย ๐’›iโˆผPRNG(si). Aggregation proceeds as standard FedAvg on the reconstructed deltas.

Remark 29.

The download cost (server to client) in FedKSeed is still O(P): the client must receive the updated global adapter each round, which is 32 MB for LLaMA-7B with rank-16 LoRA. The dramatic saving is in the upload direction, which is the bottleneck for most cross-device deployments with asymmetric bandwidth. At 100 local steps per round, the upload is 800 bytes; the download is 32 MB. The upload-to-download ratio is 1:40,000, making FedKSeed essentially free in upload cost.

Security considerations.

Because FedKSeed transmits scalar loss values rather than parameter deltas, it offers a qualitatively different privacy surface. A scalar loss value reveals far less about the local dataset than a gradient vector. However, the server can still reconstruct the full parameter update from (si,g^i), so the effective information leakage is the same as transmitting the delta. The privacy advantage is in communication interception: an eavesdropper who intercepts the client's transmission learns only scalars, not gradients.

TikZ: FedMeZO vs. Standard Backpropagation

Memory comparison between standard backpropagation and FedMeZO. Left: standard backpropagation must retain all intermediate activations ๐’‰1,๐’‰2,โ€ฆ for the backward pass, requiring O(Dโ‹…Lโ‹…d) memory. Right: FedMeZO performs two scalar-output forward passes (with opposite perturbations), immediately discarding layer activations. Only two scalar loss values (4 bytes each) and a seed are retained. The activation memory overhead drops to essentially zero.

Convergence of Zeroth-Order Methods

Zeroth-order methods pay a convergence penalty compared to first-order gradient descent. The following proposition quantifies this tradeoff precisely.

Proposition 10 (Zeroth-Order vs. First-Order Convergence).

Let โ„’:โ„Pโกโ†’โ„โก be L-smooth (i.e., โ€–โˆ‡โ„’(๐œฝ)โˆ’โˆ‡โ„’(๐œฝโ€ฒ)โ€–โ‰คLโ€–๐œฝโˆ’๐œฝโ€ฒโ€–) and bounded below by โ„’โˆ—. Let ๐’ˆ^(t) be the MeZO zeroth-order gradient estimate with direction ๐’›(t)โˆผ๐’ฉ(๐ŸŽ,๐ˆP) and perturbation ฯต.

  1. First-order GD: gradient descent with step size ฮท=1/L achieves 1Tโˆ‘t=1Tโ€–โˆ‡โ„’(๐œฝ(t))โ€–2โ‰ค2L(โ„’(๐œฝ(0))โˆ’โ„’โˆ—)T.

  2. Zeroth-order GD: gradient descent with the MeZO estimate and step size ฮท=1/(LP) achieves 1Tโˆ‘t=1T๐”ผ[โ€–โˆ‡โ„’(๐œฝ(t))โ€–2]โ‰ค2LP(โ„’(๐œฝ(0))โˆ’โ„’โˆ—)T+O(ฯต2L2P).

The factor P appearing in the zeroth-order bound reflects the dimension penalty: a single ZO estimate is equivalent to a noisy gradient in a random 1-dimensional subspace, and P steps are needed to cover the full gradient direction.

Proof sketch.

For part (i), this is the standard smooth nonconvex GD convergence result. For part (ii), we analyze the MeZO estimate. By the definition and the Gaussian distribution of ๐’›, we have ๐”ผ๐’›[๐’ˆ^(๐œฝ;๐’›,ฯต)]=๐”ผ๐’›[โ„’(๐œฝ+ฯต๐’›)โˆ’โ„’(๐œฝโˆ’ฯต๐’›)2ฯต๐’›]. By Taylor expansion to second order, โ„’(๐œฝยฑฯต๐’›)=โ„’(๐œฝ)ยฑฯต๐’›โŠคโˆ‡โ„’(๐œฝ)+ฯต22๐’›โŠคโˆ‡2โ„’๐’›+O(ฯต3). Substituting and simplifying: โ„’(๐œฝ+ฯต๐’›)โˆ’โ„’(๐œฝโˆ’ฯต๐’›)2ฯต=๐’›โŠคโˆ‡โ„’(๐œฝ)+O(ฯต2L), so ๐’ˆ^=(๐’›โŠคโˆ‡โ„’(๐œฝ))๐’›+O(ฯต2L)๐’›. Taking expectations over ๐’›โˆผ๐’ฉ(๐ŸŽ,๐ˆ): ๐”ผ[๐’›๐’›โŠค]=๐ˆ, so ๐”ผ[๐’ˆ^]=โˆ‡โ„’(๐œฝ)+O(ฯต2L) (the bias term). The covariance of ๐’ˆ^ is ๐”ผ[g^2๐’›๐’›โŠค]=๐”ผ[(๐’›โŠคโˆ‡โ„’)2]๐ˆ=โ€–โˆ‡โ„’โ€–2๐ˆ, giving ๐”ผ[โ€–๐’ˆ^โ€–2]=(P+2)โ€–โˆ‡โ„’โ€–2+O(ฯต2L2P). Plugging the ZO estimate into the standard descent lemma for L-smooth functions with step size ฮท and summing over T steps yields the stated bound with the optimal ฮท=1/(LP).

Caution.

Zeroth-order methods converge slower - the tradeoff is memory for speed. The dimension penalty factor of P in the convergence rate means that ZO methods require P times more steps than gradient descent to reach the same accuracy. For P=107 adapter parameters, this is a 107-fold slowdown in theory. In practice, the effective dimensionality of the optimization landscape is much lower than P (due to low-rank structure), and MeZO empirically converges in reasonable time. Nevertheless, for tasks where training time is critical and memory is not the bottleneck, first-order methods with gradient checkpointing are often preferable.

FedRDMA: Infrastructure for Cross-Silo LLM Training

For cross-silo federated LLM training (e.g., between a small number of large institutions each with substantial compute), the bottleneck shifts from per-parameter communication cost to the latency and throughput of the communication infrastructure. Standard TCP/IP communication incurs significant CPU overhead and memory copies at each hop; for large tensors, this overhead dominates end-to-end training time.

FedRDMA addresses this by replacing TCP/IP with Remote Direct Memory Access (RDMA), a hardware-level communication primitive that allows a remote machine to directly read from or write to local GPU memory without involving the CPU. RDMA reduces per-byte latency by 5โ€“10ร— and can achieve near-peak network bandwidth (e.g., 100 Gb/s on InfiniBand).

Remark 30.

RDMA is not universally available: it requires compatible network interface cards (NICs) and network fabric, typically available in high-performance computing environments and cloud HPC clusters. For most cross-device federated learning scenarios (hospital workstations, mobile devices), RDMA is not applicable. However, for cross-silo collaboration between academic medical centers or research consortia with dedicated network links, FedRDMA can reduce communication overhead from hours to minutes.

In the FedRDMA architecture, the server maintains a parameter server in GPU memory, and clients use RDMA PUT/GET operations to exchange adapter parameters. The gradient aggregation step is pipelined with local computation: while one batch is being processed locally, the previous round's gradients are being aggregated via RDMA. This overlap reduces the per-round wall-clock time significantly.

FedP2EFT: Personalized Parameter-Efficient Fine-Tuning

A fundamental limitation of standard FedLoRA is that all clients share a single global adapter. When client data distributions are highly heterogeneous, a single adapter cannot optimally serve all clients. FedP2EFT (Personalized Parameter-Efficient Fine-Tuning), introduced at AAAI 2025, decomposes the adapter into a shared global component and a client-specific personal component.

Definition 28 (FedP2EFT Decomposition).

In FedP2EFT, each client k maintains two components:

  • A global adapter ๐œฝg shared across all clients and aggregated at the server.

  • A personal adapter ๐œฝkp specific to client k, never shared.

The effective model for client k is ๐–kโ€ฒ=๐–0+ฮฑrg๐g๐€g+ฮฒrp๐kp๐€kp, where (rg,ฮฑ) and (rp,ฮฒ) are the rank and scaling for the global and personal adapters respectively. Local training optimizes over both ๐œฝg and ๐œฝkp; only ๐œฝg is transmitted to the server for aggregation.

The global adapter captures the shared knowledge that benefits all clients (common medical terminology, general language understanding), while the personal adapter captures client-specific patterns (local clinical conventions, institution-specific abbreviations).

Remark 31.

FedP2EFT doubles the number of adapter parameters per client (global + personal), but since both components are small relative to the full model, the overhead is minimal. A common design choice is rg=16 (global) and rp=8 (personal), so the personal adapter is half the size of the global one. The communication cost per round is determined only by the global component, and remains the same as standard FedLoRA.

The alternating optimization in FedP2EFT proceeds as follows: at each local step, gradients are computed with respect to both ๐œฝg and ๐œฝkp. The personal adapter update uses the standard Adam optimizer with a higher learning rate (since it need not converge to a global consensus), while the global adapter is updated with a lower learning rate to avoid over-specializing to the local data.

A Unified View

The methods developed in this section can be viewed through a common lens: each method occupies a distinct point in the memory-communication-convergence tradeoff space.

  • FedLoRA (standard): low communication, moderate memory (activation storage for backprop on adapters), strong convergence guarantees. The default choice when clients have adequate GPU memory.

  • FedMeZO: low communication, minimal memory (no activations), slower convergence by dimension factor P. Preferred when client memory is severely constrained.

  • FedKSeed: essentially zero upload cost, minimal memory, same convergence as MeZO but requires the server to reconstruct client updates. Preferred in extreme upload-bandwidth-constrained settings.

  • FedP2EFT: standard communication (global adapter only), standard memory, best task performance due to personalization. Preferred when client heterogeneity is high.

  • FedRDMA: reduces latency in cross-silo settings with high-speed interconnects. Not applicable to edge devices.

Insight.

No single method dominates across all settings. The practitioner's choice should be driven by the deployment constraints: memory budget on client devices, uplink bandwidth, heterogeneity of client data, and the importance of personalization vs. generalization.

Exercises for Section Optimization for Federated LLMs

Exercise 34 (FedKSeed Communication Analysis).

Consider a federated LLM deployment with K=50 mobile clients, each with 100 Kb/s upload bandwidth. The model is LLaMA-7B with LoRA rank-16 adapters.

  1. In standard FedLoRA, compute the upload time per client per round. How many communication rounds can be completed in one week of continuous operation?

  2. In FedKSeed with ฯ„=200 local ZO steps per round, compute the upload per client per round. How many rounds can be completed in one week?

  3. The server must download the updated global adapter to each client at the start of every round. If the server has 100 Mb/s downlink to all 50 clients (broadcast), how long does each download take in FedKSeed? Is download or upload the bottleneck?

  4. Given the Proposition Proposition 10 result that ZO methods require P times more steps (where P is the adapter parameter count), and using the number of rounds from parts (a) and (b), determine whether FedKSeed achieves better total optimization progress than FedLoRA in one week of operation.

Exercise 35 (Zeroth-Order Estimation Variance).

The MeZO estimator uses a single random direction ๐’› per step. An alternative is to use m directions {๐’›i}i=1m and average: ๐’ˆ^m(๐œฝ)=1mโˆ‘i=1mโ„’(๐œฝ+ฯต๐’›i)โˆ’โ„’(๐œฝโˆ’ฯต๐’›i)2ฯต๐’›i.

  1. Show that ๐’ˆ^m is still an unbiased estimator of the gradient (up to O(ฯต2) bias).

  2. Compute ๐”ผ[โ€–๐’ˆ^mโˆ’โˆ‡โ„’โ€–2] and show that it decreases as 1/m. What is the optimal m for a given computational budget of 2T forward passes?

  3. In the FedKSeed protocol, using m>1 directions requires transmitting m seeds per step. Write the upload cost as a function of m, ฯ„, and the seed size (4 bytes). For what value of m does FedKSeed's upload cost match that of FedLoRA?

  4. In the convergence bound of Proposition Proposition 10, replace the single-direction estimator with the m-direction estimator and derive the new convergence rate. How does m enter the bound?

Exercise 36 (FedP2EFT Personalization-Communication Tradeoff).

In FedP2EFT, the global adapter has rank rg and the personal adapter has rank rp. The total parameter count per client is N(rg+rp) where N=4ร—32ร—(4096+4096) for LLaMA-7B attention layers.

  1. You have a total adapter budget of Nโ‹…rmaxโก trainable parameters per client (same as standard LoRA with rank rmaxโก). Subject to this budget constraint and the communication constraint that only the global adapter is transmitted, express the communication cost as a fraction of the FedLoRA communication cost. What is the maximum communication saving?

  2. Suppose client data heterogeneity is measured by the average pairwise KL divergence dโ€พKL between client data distributions. Propose a principled method to choose the split (rg,rp) as a function of dโ€พKL and rmaxโก.

  3. Empirically, FedP2EFT with rg=16,rp=8 achieves average client accuracy of 84.3%, while standard FedLoRA with rg=24 achieves 79.7%, on a heterogeneous clinical NLP benchmark. Both have the same communication cost. Explain this performance gap using the bias-variance tradeoff of federated optimization: what does the personal adapter reduce?

The Pathology of Non-IID Data

Federated learning was conceived around a beautifully simple idea: train a model across many devices without centralising data. The theoretical analysis that blessed this idea with convergence guarantees, however, rested on an assumption that is violated in virtually every real deployment-that each client's data is an independent and identically distributed draw from a common global distribution. Strip away this assumption and the landscape changes profoundly. Local models diverge. Global aggregation averages gradients that point in fundamentally different directions. And generative models, whose very purpose is to learn the global data distribution, suffer the most acutely of all.

This section characterises the heterogeneity problem with mathematical precision, analyses how it interacts with generative learning objectives, and presents the first systematic solutions for FL-specific non-IID correction.

A Taxonomy of Heterogeneity

Non-IID conditions in federated learning are not monolithic. The literature has converged on five distinct types of distributional mismatch, each requiring different treatment.

Distribution Skew

The broadest form of heterogeneity arises when the marginal distributions pk(๐’™) differ across clients k=1,โ€ฆ,K. Let pโˆ—(๐’™) denote the desired global distribution. A client k observes data sampled from its local marginal pk, which may concentrate on a different region of ๐’ณ entirely.

Definition 29 (Distribution Skew).

A federated system exhibits distribution skew if there exist clients i,j such that (DIST SKEW)DKL(pi(๐’™)โ€–pj(๐’™))>0. The total system skew is the average pairwise divergence: (Total SKEW)ฮ”dist=1K(Kโˆ’1)โˆ‘iโ‰ jDKL(pi(๐’™)โ€–pj(๐’™)).

Distribution skew subsumes all other types; the remaining four refine the origin of the divergence.

Label Skew

Label skew (also called label distribution skew) arises when different clients hold data from different class distributions. Let ๐’ด={1,โ€ฆ,C} be the label space. Client k draws nk samples, and the empirical class frequency for client k at class c is ฯ€kc=|{i:yi(k)=c}|/nk.

Definition 30 (Label Skew).

A federated classification system exhibits label skew with parameter ฮฑ>0 if the per-client class distributions are sampled from a Dirichlet distribution: (Dirichlet)(ฯ€k1,โ€ฆ,ฯ€kC)โˆผDir(ฮฑโ‹…๐ŸC), where small ฮฑโ†’0 yields near-degenerate distributions concentrating on one class, and ฮฑโ†’โˆž recovers the IID case where each client has balanced class frequencies.

The Dirichlet parameterisation from Definition 30 has become the standard benchmark for evaluating FL algorithms under label skew. In practice ฮฑโˆˆ{0.1,0.5,1.0} is used to simulate increasingly severe heterogeneity.

Feature Skew

Feature skew captures sensor, modality, or domain differences that change the conditional distribution of features given the label. While labels may be shared, the pixel intensities, noise levels, or acquisition protocols differ:

Definition 31 (Feature Skew).

A federated system exhibits feature skew if, for some label yโˆˆ๐’ด, the conditional distributions pk(๐’™|y) are not equal across clients: (Feature SKEW)โˆƒi,j,y:pi(๐’™|y)โ‰ pj(๐’™|y).

Feature skew is endemic to medical imaging federations: different hospital scanners produce different image textures for the same pathology. A model trained only on scanner-i data learns representations that fail to transfer to scanner-j patients.

Quality Skew

Quality skew arises when the noise level or label quality varies by client. Let y~i(k) denote the observed (possibly noisy) label and yi(k) the true label. If the confusion matrix P(y~=cโ€ฒ|y=c) depends on client k, the system exhibits quality skew. Clients with poor annotation quality effectively inject a systematic bias into the global objective.

Quantity Skew

The simplest form of heterogeneity is unequal dataset sizes. Let nk denote the number of training samples at client k. If nk varies substantially, naive FedAvg over-represents large clients and under-represents small ones in the aggregated gradient.

Definition 32 (Quantity Skew).

A federated system exhibits quantity skew with imbalance ratio (Quantity SKEW)ฯ=maxkโกnkminkโกnk. IID-balanced systems have ฯ=1; real-world systems routinely exhibit ฯโˆˆ[10,1000].

Remark 32.

The five skew types are not mutually exclusive. A realistic federated healthcare system simultaneously exhibits feature skew (different scanners), label skew (different patient populations), quality skew (different annotation protocols), and quantity skew (different hospital sizes). The combination produces a distributional gap that is strictly worse than any individual component.

Formal Definition of Non-IID Data in FL

Having catalogued the sources of heterogeneity, we can now state a precise, unified definition.

Definition 33 (Non-IID Federated Data).

Let โ„ฑ={(๐’Ÿk,wk)}k=1K be a federated dataset, where ๐’Ÿk={(๐’™i(k),yi(k))}i=1nk is the local dataset of client k and wk=nk/โˆ‘jnj is its weight. Define the global distribution pโˆ—(๐’™,y)=โˆ‘kwkpk(๐’™,y). The system is non-IID if โˆƒk such that pk(๐’™,y)โ‰ pโˆ—(๐’™,y), i.e. at least one client's local distribution differs from the global mixture.

The heterogeneity measure is (Noniid Formal)ฮ”(โ„ฑ)=โˆ‘k=1KwkDKL(pk(๐’™,y)โ€–pโˆ—(๐’™,y))โ‰ฅ0, with ฮ”=0 if and only if all clients have identical marginal distributions (the IID regime).

The quantity ฮ”(โ„ฑ) is the weighted average KL divergence from each client's distribution to the global mixture-equivalently, the mutual information I(k;(๐’™,y)) when we view the client identity k and data (๐’™,y) as jointly drawn from p(k,๐’™,y)=wkpk(๐’™,y). Large ฮ” signals that knowing which client produced a sample gives substantial information about its distribution.

Why Non-IID is Worse for Generative Models

Discriminative models-classifiers, regressors-suffer from non-IID data primarily through convergence degradation: local gradients point toward local optima and slow or derail convergence to the global optimum. Generative models face an additional, qualitatively different failure mode: mode collapse amplification.

To understand why, recall the objective of a generative model trained under FedAvg. Each client k minimises a local generative loss (e.g., the ELBO for a VAE, the GAN minimax objective, or the denoising score matching loss for a diffusion model) with respect to its local data ๐’Ÿk. The aggregated global model inherits the average of the local generators' parameters, not the global optimum.

Proposition 11 (Mode Collapse Amplification Under Non-IID).

Let Gkโˆ— be the locally optimal generator for client k under a GAN objective, and let Gโˆ—=argโ€‰minGโกโ„’(G,pโˆ—) be the globally optimal generator. Under FedAvg aggregation, (MODE Collapse AVG)Gavg=โˆ‘kwkGkโˆ—โ‰ˆฬธGโˆ— in general. More precisely, if each Gkโˆ— generates a unimodal distribution concentrated on mode mk and the mk are distinct, then Gavg generates a mixture that may fail to assign probability mass to any individual mode mk, instead placing probability mass in the interstices between modes.

Proof.

By definition, each Gkโˆ— is a deterministic function mapping noise ๐’› to a data point near mode mk. Under FedAvg, the aggregated parameters define Gavg(๐’›)=โˆ‘kwkGkโˆ—(๐’›). Since Gkโˆ—(๐’›)โ‰ˆmk+ฯตk(๐’›) for small noise ฯตk, we have Gavg(๐’›)โ‰ˆmโ€พ+โˆ‘kwkฯตk(๐’›) where mโ€พ=โˆ‘kwkmk is the weighted centroid of the modes. Unless the modes coincide, mโ€พ is not itself a mode of pโˆ—, so Gavg assigns probability mass outside the support of any client's distribution-the hallmark of collapsed generation.

This proposition explains empirical observations that FedGAN and naive federated VAE training produce blurry, low-diversity outputs even when the local models are sharp and high-fidelity. The aggregation step destroys the multimodal structure of the global distribution by averaging parameter vectors that encode incompatible generative manifolds.

Caution.

The mode collapse amplification effect is absent in discriminative FL because classification loss gradients point toward a shared decision boundary irrespective of local data concentration. In generative FL, the gradients point toward different distributional structures, making naive averaging a categorically different (and worse) operation.

Client Drift: Local Models Diverge

The formal counterpart to mode collapse amplification in the optimisation landscape is client drift-the tendency of local model updates to move toward local optima that are distant from the global optimum.

Definition 34 (Client Drift).

Let F(๐œฝ)=โˆ‘kwkFk(๐œฝ) be the global federated objective, where Fk(๐œฝ)=๐”ผ(๐’™,y)โˆผpk[โ„“(๐œฝ;๐’™,y)] is the local loss of client k. Denote by ๐œฝโˆ—=argโ€‰min๐œฝโกF(๐œฝ) the global optimum and by ๐œฝkโˆ—=argโ€‰min๐œฝโกFk(๐œฝ) the local optimum of client k. The client drift of client k is (Client Drift)ฮดk=โ€–๐œฝkโˆ—โˆ’๐œฝโˆ—โ€–2, and the system drift is ฮดsys=โˆ‘kwkฮดk.

After E local gradient steps starting from a shared initialisation ๐œฝ(t), client k produces an update ฮ”k=๐œฝk(t,E)โˆ’๐œฝ(t) that approximates the direction ๐œฝkโˆ—โˆ’๐œฝ(t) rather than ๐œฝโˆ—โˆ’๐œฝ(t). FedAvg computes ๐œฝ(t+1)=๐œฝ(t)+โˆ‘kwkฮ”k, which moves toward the centroid of the local optima rather than toward ๐œฝโˆ—.

Key Idea.

Client Drift as Gradient Bias. Under non-IID data with heterogeneity measure ฮ”(โ„ฑ) from (Noniid Formal), the bias in the FedAvg update satisfies (NO GRAD BIAS)โ€–โˆ‘kwkโˆ‡Fk(๐œฝ)โˆ’โˆ‡F(๐œฝ)โ€–2=0โˆ€๐œฝ, so client drift does not arise from gradient bias at a fixed ๐œฝ. Instead, it arises from the curvature interaction between multiple local gradient steps and the non-IID landscape: each client's sequence of E gradient steps compounds the distributional difference, producing local updates that grow increasingly misaligned over the local training loop.

Mathematical Analysis: Divergence Between Local and Global Optima

We now quantify how non-IID-ness translates into suboptimality of FedAvg's output.

Theorem 3 (Suboptimality Bound Under Client Drift).

Assume each Fk is L-smooth and ฮผ-strongly convex, with bounded gradient dissimilarity: (GRAD Dissimilarity)โˆ‘kwkโ€–โˆ‡Fk(๐œฝ)โˆ’โˆ‡F(๐œฝ)โ€–2โ‰คฯƒg2,โˆ€๐œฝ. After T rounds of FedAvg with E local steps and learning rate ฮท<1/(4EL), the optimality gap satisfies (Suboptimality Bound)F(๐œฝ(T))โˆ’F(๐œฝโˆ—)โ‰คL2(11+ฮผฮทET)โ€–๐œฝ(0)โˆ’๐œฝโˆ—โ€–2+6LE2ฮท2ฯƒg2ฮผโŸdriftย term. The irreducible drift term grows quadratically with E (number of local steps) and linearly with ฯƒg2 (the gradient dissimilarity, which measures the non-IID severity).

Proof Sketch.

The proof follows a descent lemma argument. By L-smoothness, F(๐œฝ(t+1))โ‰คF(๐œฝ(t))+โŸจโˆ‡F(๐œฝ(t)),๐œฝ(t+1)โˆ’๐œฝ(t)โŸฉ+L2โ€–๐œฝ(t+1)โˆ’๐œฝ(t)โ€–2. Substituting the FedAvg update ๐œฝ(t+1)โˆ’๐œฝ(t)=โˆ’ฮทโˆ‘kwkgk(t) and applying the gradient dissimilarity bound โ€–โˆ‘kwkgkโˆ’โˆ‡Fโ€–2โ‰คฯƒg2 yields the recurrence, which telescopes to (Suboptimality Bound). See Li et al. (2020) for the complete derivation.

Theorem 3 reveals the fundamental non-IID trade-off: increasing E accelerates initial convergence (reduces the first term) but amplifies the drift error (increases the second term). No value of E eliminates both simultaneously when ฯƒg2>0.

TikZ: Client Drift Visualisation

Client drift visualisation. Each client updates from the shared initialisation ๐œฝ(t) toward its own local optimum ๐œฝkโˆ— (dashed coloured arrows), producing local updates ฮ”k that pull in divergent directions. FedAvg aggregation (solid blue arrow, ฮ”โ€พ) moves toward the centroid of local optima, which may be far from the true global optimum ๐œฝโˆ— (empty green circle). The gap between the FedAvg result and ๐œฝโˆ— is the system drift ฮดsys.

FedDDPM: Diffusion as a Non-IID Self-Corrector

The observation that generative models are most harmed by non-IID data suggests a striking inversion: could generative models be used to cure non-IID problems? FedDDPM (Federated Denoising Diffusion Probabilistic Models) exploits exactly this idea.

Core Architecture

In FedDDPM, each client k trains a local DDPM ฯต๐œฝk(๐’™t,t) on its local dataset ๐’Ÿk. After local training, clients share only the model parameters (not the data), and the server aggregates via FedAvg to produce a global diffusion model ฯต๐œฝโ€พ.

The key insight is that the server then queries its own global diffusion model to generate a synthetic auxiliary dataset ๐’Ÿ~server that approximates the global distribution pโˆ—(๐’™). This synthetic dataset is broadcast to all clients, who incorporate it into their next round of local training.

Algorithm 5 (FedDDPM).

  1. Input: Clients {(๐’Ÿk,wk)}k=1K, diffusion steps Td, FL rounds R, synthetic batch size Ns
  2. Server: initialise ๐œฝโ€พ(0) randomly
  3. for r=1,โ€ฆ,R
  4. Server: broadcast ๐œฝโ€พ(rโˆ’1) to all clients
  5. Server: generate synthetic data ๐’Ÿ~={(๐’™~i,y~i)}i=1Ns by sampling from ฯต๐œฝโ€พ(rโˆ’1)
  6. for each client k in parallel
  7. Receive ๐œฝโ€พ(rโˆ’1) and ๐’Ÿ~
  8. Local dataset: ๐’Ÿ^kโ†๐’Ÿkโˆช๐’Ÿ~
  9. Run E local DDPM training steps on ๐’Ÿ^k, yielding ๐œฝk(r)
  10. Send ๐œฝk(r) to server
  11. Server: ๐œฝโ€พ(r)โ†โˆ‘kwk๐œฝk(r)
  12. return ๐œฝโ€พ(R)

Why Synthetic Augmentation Reduces Drift

The synthetic data ๐’Ÿ~ drawn from the global model approximates the global distribution pโˆ—. When client k trains on ๐’Ÿ^k=๐’Ÿkโˆช๐’Ÿ~, its effective local distribution becomes a mixture:

(Synthetic Mixture)p^k(๐’™,y)=nknk+Nspk(๐’™,y)+Nsnk+Nsp~(๐’™,y), where p~โ‰ˆpโˆ—. As Nsโ†’โˆž, p^kโ†’pโˆ— regardless of pk, completely eliminating distributional heterogeneity. For finite Ns, the effective heterogeneity measure becomes:

Proposition 12 (Synthetic Data Reduces Non-IID-ness).

Let ฮ”(โ„ฑ) be the original heterogeneity measure from (Noniid Formal) and ฮ”~(โ„ฑ) the heterogeneity measure after augmenting each client with Ns synthetic samples from p~โ‰ˆpโˆ—. Then (Noniid Reduction)ฮ”~(โ„ฑ)โ‰คnk2(nk+Ns)2ฮ”(โ„ฑ)+2Nsnk(nk+Ns)2DKL(p~โ€–pโˆ—) for the balanced case nk=n for all k. In particular, when p~=pโˆ— (perfect synthetic samples), the heterogeneity measure satisfies ฮ”~(โ„ฑ)=n2(n+Ns)2ฮ”(โ„ฑ), which decays as O(Nsโˆ’2) for large Ns.

Proof.

By the data processing inequality and convexity of KL divergence, the KL divergence of the augmented distribution p^k from the global distribution pโˆ— satisfies DKL(p^kโ€–pโˆ—)โ‰คฮปk2DKL(pkโ€–pโˆ—)+(1โˆ’ฮปk)2DKL(p~โ€–pโˆ—), where ฮปk=nk/(nk+Ns). Summing over clients with weights wk yields (Noniid Reduction).

FedDDPM+: One-Shot Correction for Slow Learners

FedDDPM has a known vulnerability: in early rounds, the global model is poorly trained, so the synthetic data ๐’Ÿ~ approximates pโˆ— poorly-or not at all. If weak clients (slow learners with limited data or compute) receive poor synthetic data in early rounds, their local models may converge to incorrect modes before the global model improves.

FedDDPM+ addresses this with a one-shot correction step: after the initial round, the server generates a large synthetic dataset ๐’Ÿ~full from a separately trained teacher diffusion model (trained on data accessible to the server, e.g. public data or a held-out calibration set) and broadcasts it once to all clients. This โ€œbootstrapsโ€ all clients to a common starting point before the federated training loop begins.

(Feddpmplus INIT)๐’Ÿ^k(0)=๐’Ÿkโˆช๐’Ÿ~full(initialisationย stepย ofย FedDDPM+).

The one-shot initialisation does not require additional communication overhead per round; the teacher's synthetic data is broadcast once and cached locally.

Example: Five Hospitals with Different Disease Prevalence

Example 7 (Hospital Federation with Label Skew).

Consider a federated system of K=5 hospitals training a generative model for chest X-ray synthesis. Each hospital has access to a different patient population with different disease prevalence:

H1H2H3H4H5
Normal80%50%30%60%10%
Pneumonia10%30%50%20%70%
COVID-195%10%10%10%15%
Other5%10%10%10%5%
nk (images)10,0008,0003,0006,0001,500

The true global distribution (weighted by nk) has approximately 58.4% normal, 25.1% pneumonia, 8.5% COVID-19, and 8.0% other. Without synthetic augmentation, a model trained by FedAvg on these clients would over-generate normal cases (dominated by H1's large, normal-skewed dataset) and under-generate pneumonia cases.

After two rounds of FedDDPM with Ns=5,000 synthetic samples per client, the effective class distributions shift markedly toward the global mixture. Hospital 5, which had extreme pneumonia skew (70%), now trains on a combined dataset with โˆผ35โ€“37% pneumonia-much closer to the global 27%. The FID score of the federated generative model drops from 42.3 (baseline FedAvg) to 18.7 (FedDDPM), approaching the 14.2 achieved by centralised training on all data.

Remark 33.

The hospital example illustrates that the benefits of FedDDPM are asymmetric: clients with extreme skew (H5, with 70% pneumonia) benefit most from synthetic augmentation, while balanced clients (H2) benefit least. This suggests an adaptive allocation strategy where Ns is proportional to the estimated DKL(pkโ€–pโˆ—) for each client-an open research direction.

The Dual Role of Generative Models in Non-IID FL

The analysis of this section culminates in a striking duality that distinguishes the study of generative models in federated learning from all other federated learning problems.

Key Idea.

Generative Models Are Both Victim and Cure of Non-IID Data. In federated learning, the generative model faces a paradox. As a victim: non-IID data causes its local training to converge to partial, mode-collapsed distributions, and naive aggregation combines these partial views incoherently, producing a global generator that fails to cover the full support of pโˆ—. As a cure: the same global generator, even if imperfect, can synthesise data that approximates pโˆ— well enough to re-balance the local training distribution of every client in the next round. The iterative process-train with synthetic data, generate better synthetic data, repeat-converts the generative model from a heterogeneity victim into a self-correcting mechanism. The fixed point of this iteration, when it exists, is a generator that renders the federated system effectively IID.

Exercises

Exercise 37.

Simulate label skew using a Dirichlet partition. Set K=10 clients, C=10 classes (e.g., CIFAR-10), and partition the dataset using Dir(ฮฑ) with ฮฑโˆˆ{0.05,0.1,0.5,1.0,10.0}. For each ฮฑ:

  1. Compute the heterogeneity measure ฮ”(โ„ฑ) from (Noniid Formal).

  2. Train a conditional DDPM using FedAvg for 20 rounds with E=5 local epochs.

  3. Report FID scores for each class separately, and explain the pattern: which classes benefit most from large ฮฑ?

Exercise 38.

Consider a federated system with K=2 clients and a quadratic global objective F(ฮธ)=(1/2)(F1(ฮธ)+F2(ฮธ)) where F1(ฮธ)=(ฮธโˆ’a)2/2 and F2(ฮธ)=(ฮธโˆ’b)2/2 for a,bโˆˆโ„โก.

  1. Derive the global optimum ฮธโˆ—=argโ€‰minโกF(ฮธ).

  2. After one round of FedAvg with E local gradient steps starting from ฮธ(0)=0 and learning rate ฮท, compute ฮธ(1) analytically.

  3. Show that ฮธ(1)โ†’ฮธโˆ— as Eโ†’1 (single-step local training), and that for E>1 and aโ‰ b, ฮธ(1)โ‰ ฮธโˆ—.

  4. Derive the system drift ฮดsys as a function of E, ฮท, and |aโˆ’b|.

Exercise 39.

Design a variant of FedDDPM for a federated system where the server has no data at all (the pure FL scenario). In this case, the initial global model in round r=1 is random, so the synthetic data ๐’Ÿ~ in Algorithm 5 is pure noise.

  1. Propose a strategy for the server to generate useful synthetic data in early rounds without its own data. (Hint: consider clients sharing a small anonymous summary statistic.)

  2. Analyse the privacy implications of your proposed strategy against a membership inference adversary.

  3. Implement the strategy and compare FID trajectories across rounds to standard FedDDPM and FedAvg on a federated MNIST setup with Dirichlet(ฮฑ=0.1) label skew.

Device and Architecture Heterogeneity

The preceding section addressed data heterogeneity: the fact that different clients hold data from different distributions. This section addresses a complementary and equally pervasive challenge: device and model heterogeneity. In any real-world federated deployment, clients are not homogeneous computing nodes. They range from resource-constrained edge devices-smartphones with limited RAM, no GPU, and strict battery budgets-to high-performance GPU servers capable of training billion-parameter models. Designing a federated system that accommodates this spectrum is, as we shall see, a fundamentally different mathematical problem from the standard assumption of homogeneous clients.

The Heterogeneous Device Landscape

A production federated learning system at planetary scale-such as those deployed for keyboard prediction, health monitoring, or financial fraud detection-must operate across device categories spanning at least four orders of magnitude in computational capability.

Example 8 (Real-World Device Heterogeneity).

Consider a federated health monitoring system with the following client population:

Device TypeRAMFLOPs/sBatteryNetwork
IoT sensor256 KB107100 mAhBLE
Smartphone4 GB10114,000 mAh4G/WiFi
Tablet8 GB101210,000 mAhWiFi
Edge server64 GB1014AC powerEthernet
GPU server512 GB1015AC power10 GbE

An IoT sensor cannot load a ResNet-50, let alone fine-tune a diffusion model. A GPU server could run a full training pass on ImageNet in minutes. Any federated system that ignores this disparity will fail in practice.

Hardware Heterogeneity: Compute, Memory, Battery, Network

The four dimensions of hardware heterogeneity interact in ways that make the design space complex:

  • Compute heterogeneity: Clients with fewer FLOPs require smaller models or fewer local epochs. If all clients must run the same model, the model size is capped by the weakest client.

  • Memory heterogeneity: The activation memory required for backpropagation grows with model width and batch size. Clients with little RAM cannot run large batches or wide networks.

  • Battery heterogeneity: Mobile clients participate in FL only when charging or above a battery threshold. Forced participation during low-battery conditions degrades user experience and device longevity.

  • Network heterogeneity: Clients on slow or metered connections cannot afford to upload and download large model updates every round. A 100 MB model update at 1 Mbps takes 800 seconds-an unacceptable round latency for a system targeting sub-minute communication.

Remark 34.

These four dimensions are not independent. Low-battery devices typically also have slow network connections (mobile on 3G while conserving battery), and resource-constrained IoT devices have both limited compute and limited memory. A principled system design must consider the joint constraint profile of each client.

The Straggler Problem

In synchronous FedAvg, the server must wait for all K selected clients to complete their local training and return their updates before proceeding to the aggregation step. This creates the straggler problem: the wall-clock time per round is determined by the slowest participating client.

Let Tk be the time required for client k to complete one round of local training (including forward passes, backward passes, and communication). The round time is: (Round TIME SYNC)Tround=maxkโˆˆ๐’ฎrโกTk, where ๐’ฎr is the set of clients selected in round r. If one client has Tk=100ร—Tj for all other clients j, the entire system is bottlenecked at 100ร— the median round time.

Theorem 4 (Straggler Bound).

Let the per-round computation time of client k be TkโˆผExponential(ฮปk) independently. With K clients all selected (๐’ฎr=[K]), the expected round time is (Straggler Bound)๐”ผ[Tround]=โˆ‘k=1K1ฮปkโ‹…1โˆ‘j=kK1/ฮปjโ‰ฅ1ฮปminโก, where ฮปminโก=minkโกฮปk (the slowest client). For K=100 clients with ฮปk=k (uniformly spaced rates), ๐”ผ[Tround]โ‰ˆ6.75/ฮป1, i.e. the round is dominated by the handful of slowest clients.

Asynchronous Federated Learning

The synchronous bottleneck motivates asynchronous FL: the server does not wait for all clients to complete, but instead updates the global model as soon as any client returns an update.

Definition 35 (Asynchronous FedAvg).

In asynchronous FedAvg, the server maintains a current global model ๐œฝ(ฯ„) indexed by a global update counter ฯ„. When client k returns an update ฮ”k computed from a stale global model ๐œฝ(ฯ„โˆ’sk) (where skโ‰ฅ0 is the staleness of client k's computation), the server applies: (Async Update)๐œฝ(ฯ„+1)=๐œฝ(ฯ„)โˆ’ฮทฯ„โ‹…ฮ”k, where ฮทฯ„ may be annealed as a function of ฯ„.

Asynchronous FL eliminates the straggler bottleneck but introduces staleness bias: updates computed from old model versions may move the global model in directions that are no longer beneficial. The staleness sk is the primary measure of this bias.

Proposition 13 (Staleness Convergence Penalty).

Under L-smooth objectives and bounded gradient norms, the asymptotic convergence of asynchronous FedAvg satisfies (Staleness Penalty)limฯ„โ†’โˆžโก๐”ผ[โ€–โˆ‡F(๐œฝ(ฯ„))โ€–2]โ‰คC1T+C2ฮท2sโ€พ2L2ฯƒ2, where sโ€พ=๐”ผ[sk] is the mean staleness across all client updates, ฯƒ2 is the gradient variance, and C1,C2 are constants. The irreducible term grows quadratically with mean staleness.

FedDT: Knowledge Distillation with Ternary Compression

FedDT (Federated Deep Transfer) addresses device heterogeneity from a different angle: rather than forcing all clients to run the same model, it adopts a teacher-student framework where heterogeneous local models (teachers) train a uniform, lightweight global student.

Teacher-Student Framework

In FedDT, each client k trains a local teacher model fk of size dk, chosen to match its hardware capabilities. A powerful GPU client might use a ViT-Large; a smartphone might use a MobileNet. The global student g๐œฝ is a fixed, lightweight architecture shared across all clients.

The distillation objective for client k is:

(Feddt LOSS)โ„’kFedDT(๐œฝ)=ฮฑโ„’task(g๐œฝ;๐’Ÿk)+(1โˆ’ฮฑ)โ„’KD(g๐œฝ,fk;๐’Ÿk), where โ„’task is the standard task loss (e.g. cross-entropy) and โ„’KD is the knowledge distillation loss: (KD LOSS)โ„’KD(g,f;๐’Ÿ)=1|๐’Ÿ|โˆ‘(๐’™,y)โˆˆ๐’ŸDKL(ฯƒ(f(๐’™)/T)โ€–ฯƒ(g(๐’™)/T)), with temperature T>1 softening the teacher's output distribution to produce informative soft labels.

Two-Level Compression: Ternary Quantisation

The student model g๐œฝ is communicated between server and clients every round. To reduce communication costs further, FedDT quantises the student's weights to ternary values {โˆ’1,0,+1}, the coarsest quantisation that preserves signed gradient information.

Definition 36 (Ternary Weight Quantisation).

Given a weight vector ๐’˜โˆˆโ„dโก, the ternary quantisation QT(๐’˜) assigns each weight to the nearest element of {โˆ’ฮ”,0,+ฮ”} using threshold ฮ”>0: (Ternary Quant)[QT(๐’˜)]i={+ฮ”ifย wi>ฮ”/2,0ifย |wi|โ‰คฮ”/2,โˆ’ฮ”ifย wi<โˆ’ฮ”/2, where ฮ”=1|{i:|wi|>0.7ฯƒw}|โˆ‘i:|wi|>0.7ฯƒw|wi| is the adaptive threshold based on the standard deviation ฯƒw of ๐’˜.

With ternary quantisation, each weight requires only log2โก(3)โ‰ˆ1.585 bits, compared to 32 bits for float32-a theoretical compression ratio of approximately 32/1.585โ‰ˆ20ร—. In practice, after entropy coding the ternary values (which have a natural sparsity from the zero-class), FedDT achieves a 78% communication reduction over standard FedAvg while maintaining competitive accuracy.

Empirical Results

On a federated image classification benchmark (CIFAR-100, K=100 clients, Dirichlet(ฮฑ=0.5) label skew), FedDT achieves:

MethodAccuracyComm. (MB/round)Rounds to 60%
FedAvg63.2%45.0180
FedProx64.1%45.0165
FedDT (no quant)70.1%45.090
FedDT (ternary)71.05%9.982

The 7.85% accuracy improvement of FedDT (ternary) over FedAvg comes from two sources: (1) heterogeneous teachers transmit richer, class-diverse knowledge via soft labels, and (2) ternary quantisation acts as a regulariser that prevents overfitting on small local datasets.

Formal Definition of Model Heterogeneity

Definition 37 (Model Heterogeneity in Federated Learning).

A federated system exhibits model heterogeneity if clients use local model architectures {fk}k=1K drawn from different model families โ„ณ={โ„ณ1,โ€ฆ,โ„ณS}: (Model HET DEF)fkโˆˆโ„ณs(k),s(k)โˆˆ[S], where s(k) is the model family index of client k. Model heterogeneity is strong if the parameter spaces of different families are incompatible: dimโก(โ„ณi)โ‰ dimโก(โ„ณj) for some iโ‰ j, precluding direct weight averaging. It is weak if all families share the same architecture but differ only in scale (e.g. depth or width), allowing for aligned averaging via slimming.

Strong model heterogeneity is the central challenge: FedAvg requires that all clients share the same parameter space, so that ๐œฝ(r)=โˆ‘kwk๐œฝk(r) is well-defined. When clients use different architectures, this sum is undefined.

Heterogeneous Model Aggregation: FedMD and FedDF

Two landmark methods tackle strong model heterogeneity by shifting from parameter space aggregation to prediction space aggregation.

FedMD: Model Distillation via Public Data

FedMD (Federated Learning with Model Distillation) exploits a small public dataset ๐’Ÿpub accessible to both the server and clients. The aggregation protocol operates in logit space: each client computes class logits (or soft predictions) on ๐’Ÿpub and sends them to the server; the server averages the logit vectors across clients and broadcasts the averaged logits back as distillation targets.

Algorithm 6 (FedMD).

  1. Input: Public dataset ๐’Ÿpub, heterogeneous clients {fk}k=1K, rounds R
  2. for r=1,โ€ฆ,R
  3. Each client k: compute logits on ๐’Ÿpub: โ„“k(r)={fk(๐’™)}๐’™โˆˆ๐’Ÿpub
  4. Server: aggregate logits: โ„“โ€พ(r)=โˆ‘kwkโ„“k(r)
  5. Each client k: receive โ„“โ€พ(r); fine-tune locally with distillation target โ„“โ€พ(r): minfkโกโ„’KD(fk;๐’Ÿpub,โ„“โ€พ(r))+โ„’task(fk;๐’Ÿk)

FedMD requires only O(|๐’Ÿpub|โ‹…C) communication per round (logit vectors), independent of model size, making it asymptotically communication-efficient under growing model sizes.

FedDF: Ensemble Distillation at the Server

FedDF (Federated Distillation with Dataset-Free ensemble) extends FedMD by performing the distillation step at the server rather than at the clients. The server trains a global student g๐œฝ by minimising the KL divergence from the ensemble of local models: (Feddf)min๐œฝโก๐”ผ๐’™โˆผ๐’Ÿpub[DKL(1Kโˆ‘kฯƒ(fk(๐’™)T)โ€–ฯƒ(g๐œฝ(๐’™)T))].

By distilling from the ensemble rather than the average logits, FedDF benefits from ensemble diversity: the combined predictions of K heterogeneous models are more calibrated and accurate than any individual model, and the distilled student inherits this collective knowledge.

Insight.

In Heterogeneous FL, the Global Model Should Be a Consensus, Not a Compromise. FedAvg computes a parameter-space average, which is a compromise: if two clients have learned different feature detectors for the same concept (due to feature skew), their averaged parameters produce a detector that is worse than either. FedDF computes a prediction-space consensus: the ensemble of local models is queried on held-out data, and the global model learns to reproduce this consensus. A consensus integrates the best of each local model's knowledge without being confused by parameter-level incompatibilities. This distinction-parameter average vs. prediction consensus-is the fundamental design principle separating heterogeneous FL from homogeneous FL.

TikZ: Heterogeneous FL System

Heterogeneous federated learning system. Clients span about 2.7 orders of magnitude in model size, from a 307M-parameter ViT-Large on a GPU server to a 0.6M-parameter TinyBERT on an IoT device. Rather than averaging incompatible parameter vectors, FedDF performs ensemble distillation at the server: logits from heterogeneous local teachers are combined, and a lightweight global student g๐œฝโ€พ is trained to reproduce the ensemble's predictions. The student is broadcast back to all clients via ternary-quantised transmission (FedDT), reducing per-round communication by 78%.

FlexLoRA: Heterogeneous Rank for Heterogeneous Devices

When the shared global model is a large language model and clients fine-tune it via LoRA (Low-Rank Adaptation), model heterogeneity manifests as rank heterogeneity: different clients can afford different LoRA ranks depending on their memory budget.

Recall from the alignment chapter that LoRA parameterises the weight update as ฮ”๐–=๐๐€ where ๐โˆˆโ„dร—rโก, ๐€โˆˆโ„rร—dโ€ฒโก, and rโ‰ชminโก(d,dโ€ฒ) is the rank. The memory cost of storing and backpropagating through the LoRA adapter is O(rโ‹…(d+dโ€ฒ)), making rank r the primary knob for memory control.

Definition 38 (Rank-Heterogeneous FL with LoRA).

In FlexLoRA, client k is assigned a LoRA rank rk based on its memory budget Mk: (Flexlora RANK)rk=โŒŠMkโˆ’Mbaseฮฑmemโ‹…(d+dโ€ฒ)โŒ‹, where Mbase is the memory cost of loading the frozen backbone and ฮฑmem is a per-parameter memory constant. A GPU server might use rk=128 while a smartphone uses rk=4.

The aggregation challenge with heterogeneous ranks is that ๐kโˆˆโ„dร—rkโก and ๐jโˆˆโ„dร—rjโก have different shapes when rkโ‰ rj, precluding direct averaging.

FlexLoRA Aggregation Protocol

FlexLoRA resolves the shape mismatch via singular value truncation: each client's LoRA update ฮ”๐–k=๐k๐€k is first computed as a full weight-update matrix (of shape dร—dโ€ฒ), then projected onto a common rank-rminโก subspace via SVD before aggregation.

Algorithm 7 (FlexLoRA Aggregation).

  1. Input: Client LoRA updates {๐k๐€k}k=1K, target rank ragg, client weights {wk}
  2. for each client k
  3. Compute full update: ฮ”๐–kโ†๐k๐€kโˆˆโ„dร—dโ€ฒโก materialise the low-rank product
  4. Compute weighted aggregate: ฮ”๐–โ†โˆ‘kwkฮ”๐–k
  5. Decompose: [๐”,๐šบ,๐•]โ†SVDraggโก(ฮ”๐–) top-ragg SVD
  6. Aggregate LoRA factors: ๐โ€พโ†๐”๐šบ1/2, ๐€โ€พโ†๐šบ1/2๐•โŠค
  7. Broadcast (๐โ€พ,๐€โ€พ) to all clients
  8. Each client initialises next round with ๐kโ†๐โ€พ[:,:rk], ๐€kโ†๐€โ€พ[:rk,:] truncate to local rank

The SVD truncation ensures that the aggregated update captures the directions of maximum weight change (highest singular values), discarding the lower-rank components that contribute least to task performance.

FlexLoRA Communication Analysis

Each client uploads ฮ”๐–kโˆˆโ„dร—dโ€ฒโก (materialised), which at float16 requires 2ddโ€ฒ bytes. However, since rkโ‰ชd, this is dominated by the cost of communicating ๐k and ๐€k separately, at 2(drk+rkdโ€ฒ) bytes. For a representative GPT-2 layer with d=dโ€ฒ=768 and rkโˆˆ{4,8,16,32,64,128}:

Rank rkLoRA bytes (float16)Full layer (float16)RatioDevice
412 KB1.13 MB1.0%IoT
824 KB1.13 MB2.1%Smartphone
1648 KB1.13 MB4.2%Tablet
3296 KB1.13 MB8.3%Laptop
64192 KB1.13 MB16.6%Workstation
128384 KB1.13 MB33.3%GPU server

FlexLoRA thus achieves a natural communication-capability proportionality: more capable devices upload larger updates that capture finer-grained knowledge, while constrained devices upload compact updates that encode the most essential direction.

Remark 35.

The FlexLoRA SVD aggregation step at the server has complexity O(ddโ€ฒminโก(d,dโ€ฒ)), which is cubic in the layer width. For very large layers (e.g. FFN layers with dโ€ฒ=4d), this cost may be non-trivial. In practice, FlexLoRA is applied only to attention layers, where d=dโ€ฒ and the cost is manageable.

Connecting Device and Data Heterogeneity

Device heterogeneity and data heterogeneity are intertwined in practice. Resource-constrained devices (smartphones, wearables) are often deployed in specific geographic or demographic contexts, making their data distributions systematically different from those of powerful server-grade clients. This correlation means that solutions to device heterogeneity (e.g. FlexLoRA) can inadvertently reduce data heterogeneity (smaller-rank updates from constrained clients contribute less to local overfitting), and vice versa.

Proposition 14 (Rank-Heterogeneity Reduces Effective Data Drift).

Under the heterogeneous LoRA model with client ranks {rk} and gradient dissimilarity ฯƒg2 from (GRAD Dissimilarity), the effective system drift under FlexLoRA aggregation satisfies (RANK HET Drift Reduction)ฮดsysFlexLoRAโ‰คฮดsysFedAvgโ‹…raggd, where raggโ‰ชd is the aggregation rank. The reduction factor ragg/d vanishes as ragg/dโ†’0, showing that low-rank aggregation suppresses the amplification of gradient heterogeneity-a beneficial side effect of communication compression.

Proof.

The FlexLoRA update ฮ”๐–k lies in an rk-dimensional subspace of โ„dร—dโ€ฒโก. The SVD truncation to rank ragg projects all client updates onto a common ragg-dimensional subspace. The gradient dissimilarity in this subspace is bounded by the Frobenius norm of the projected disagreement, which satisfies โ€–projragg(โˆ‡Fiโˆ’โˆ‡Fj)โ€–Fโ‰คragg/dโ€–โˆ‡Fiโˆ’โˆ‡Fjโ€–F by the Eckart-Young theorem. Averaging over clients and applying Theorem 3 yields (RANK HET Drift Reduction).

Exercises

Exercise 40.

Simulate the straggler problem in synchronous vs. asynchronous FL. Consider K=50 clients with training times TkโˆผLogNormal(ฮผk,ฯƒ2) where ฮผk is drawn uniformly from [0,lnโก(100)] (so some clients are up to 100ร— slower than others).

  1. Simulate 50 rounds of synchronous FedAvg. Plot the cumulative wall-clock time per round and the distribution of round times.

  2. Simulate 50 rounds of asynchronous FedAvg where the server processes whichever update arrives first (with staleness discount wk(ฯ„)=1/(1+sk)). Plot the cumulative wall-clock time.

  3. Compare the total training time (to reach a fixed accuracy) between the two protocols. At what staleness level does asynchronous FL begin to converge more slowly than synchronous FL in terms of accuracy per round (not per unit time)?

Exercise 41.

Implement FedDF on a heterogeneous federation of three models (ResNet-18, ResNet-50, ViT-Small) trained on a federated CIFAR-10 split.

  1. Use |๐’Ÿpub|โˆˆ{100,500,1000,5000} public samples for distillation. Plot student accuracy vs. |๐’Ÿpub| and identify the saturation point.

  2. Compare: (i) FedAvg on the largest shared architecture (ResNet-18, the smallest), (ii) FedDF with uniform logit averaging, (iii) FedDF with accuracy-weighted averaging.

  3. Analyse whether the student model (ResNet-18) can surpass its IID-trained counterpart when distilled from a ViT-Small ensemble. Provide a theoretical explanation for your empirical finding.

Exercise 42.

Design a FlexLoRA experiment on a federated text classification task. Use a pre-trained GPT-2 backbone and four client types: IoT (r=4), smartphone (r=16), laptop (r=64), and GPU server (r=128).

  1. Implement the FlexLoRA aggregation protocol from Algorithm 7 and verify that the aggregated weight update ฮ”๐– has lower Frobenius norm than the average of full-rank updates.

  2. Analyse the quality of the SVD approximation: plot the cumulative explained variance as a function of aggregation rank raggโˆˆ{4,8,16,32,64} and choose ragg to capture 90% of variance.

  3. Test the Proposition 14 bound empirically by measuring the per-client gradient dissimilarity before and after rank truncation. Does the empirical ratio ฮดsysFlexLoRA/ฮดsysFedAvg match the theoretical bound ragg/d?

m I

Privacy Attacks on Federated Generative Models

Federated learning was introduced with a compelling promise: by keeping raw data resident on client devices and sharing only model updates, the privacy of every participant would be protected. The server never sees a patient's MRI, a bank's transaction records, or a hospital's clinical notes. This promise sounds mathematically obvious - if the data never moves, the data cannot be stolen.

The promise is broken.

Over the last five years, a succession of attacks has demonstrated that model updates - gradients, weight deltas, mask patterns, and generated samples - carry rich information about the private training data from which they were computed. The situation is particularly acute for generative federated models: unlike discriminative classifiers, which compress data into a decision boundary, generative models (GANs, VAEs, diffusion models) are explicitly trained to remember the fine-grained structure of their training distribution. That capacity for high-fidelity memorisation is precisely the threat.

This section develops the threat model in increasing order of severity: from the classical gradient inversion attack that reconstructs inputs from a single gradient observation, through membership inference attacks that reveal who contributed to training, to the most destructive known attack - memorization-guided data stealing (ICLR 2026) - which allows a malicious participant to extract over 30% of the private training data of other clients using the jointly trained generative model itself as an oracle.

The Broken Promise: Keeping Data Local Does Not Keep Data Private

The foundational assumption of federated learning can be stated precisely. Let ๐’Ÿk={(๐’™i,yi)}iโˆˆโ„k denote the private dataset of client k. In a standard federated round, client k computes a local gradient ๐’ˆk=โˆ‡๐œฝโ„’(๐œฝ;๐’Ÿk) and transmits ๐’ˆk to the server. The assumption is that ๐’ˆk reveals nothing about any individual sample ๐’™iโˆˆ๐’Ÿk.

This assumption fails for at least three distinct reasons:

  1. Analytical invertibility. For overparameterised networks and small local batches, the mapping ๐’™โ†ฆโˆ‡๐œฝโ„’(๐œฝ;{๐’™}) is nearly injective near many gradient values. An adversary who knows ๐’ˆk and ๐œฝ can solve an optimisation problem to approximately recover ๐’™.

  2. Generative memorisation. Generative models - particularly diffusion models and high-capacity GANs - routinely memorise individual training examples verbatim. These examples live inside the model weights and can be extracted through crafted sampling procedures, even after training has concluded.

  3. Implicit statistical leakage. Even without full reconstruction, observing a sequence of gradient updates allows statistical inference about whether a particular example was used in training (membership inference). For small federated cohorts - common in medical imaging - this risk is practically significant.

The following subsections develop each threat in detail.

Key Idea.

Keeping data local โ‰  keeping data private. Transmitting a gradient is transmitting a compressed representation of the training batch. For overparameterised models and small batches, this compression is lossy but invertible in practice. For generative models with memorisation, the weights themselves are a partial copy of the training data. Privacy in federated learning is not a consequence of the architecture - it must be engineered separately.

Gradient Inversion Attacks

Formal Setup

Let f๐œฝ:๐’ณโ†’๐’ด be a neural network with parameters ๐œฝโˆˆโ„Pโก. Let โ„“:๐’ดร—๐’ดโ†’โ„โ‰ฅ0โก be a loss function. A client holds a private batch โ„ฌ={(๐’™j,yj)}j=1B and computes the gradient: ๐’ˆ=1Bโˆ‘j=1Bโˆ‡๐œฝโ„“(f๐œฝ(๐’™j),yj). The adversary (server or eavesdropper) observes (๐’ˆ,๐œฝ).

Definition 39 (Gradient Inversion Attack).

A gradient inversion attack is a procedure that, given observed gradient ๐’ˆโˆˆโ„Pโก and network parameters ๐œฝ, produces a reconstruction (๐’™^โˆ—,y^โˆ—) by solving (Gradient Inversion)๐’™^โˆ—=argโ€‰min๐’™โ€ฒโˆˆ๐’ณโกโ€–โˆ‡๐œฝโ„“(f๐œฝ(๐’™โ€ฒ),y^โ€ฒ)โˆ’๐’ˆโ€–22+ฮปโ„›(๐’™โ€ฒ), where y^โ€ฒ is either observed (if labels are transmitted) or jointly optimised, and โ„›:๐’ณโ†’โ„โ‰ฅ0โก is an optional regulariser encoding prior knowledge about the data distribution (e.g., total variation for natural images).

The key insight is that โˆ‡๐œฝโ„“(f๐œฝ(๐’™โ€ฒ),yโ€ฒ) is differentiable with respect to ๐’™โ€ฒ via the chain rule, so the objective in can be minimised by standard gradient-based optimisers. The attack is thus a nested optimisation: an outer loop over ๐’™โ€ฒ adjusting the reconstruction to match the observed gradient, with an inner evaluation of the network f๐œฝ.

DLG: Deep Leakage from Gradients

The seminal gradient inversion attack, Deep Leakage from Gradients (DLG), was introduced by Zhu et al. (2019) and demonstrated that high-fidelity image reconstruction is achievable from a single shared gradient in a federated round.

The DLG procedure operates as follows. Given observed gradient ๐’ˆ, initialise dummy data (๐’™โ€ฒ,yโ€ฒ) from a standard normal distribution. Iteratively minimise: (DLG)โ„’DLG(๐’™โ€ฒ,yโ€ฒ)=โ€–โˆ‡๐œฝโ„’CE(f๐œฝ(๐’™โ€ฒ),yโ€ฒ)โˆ’๐’ˆโ€–22, using L-BFGS with cosine learning rate decay. After convergence, the dummy data (๐’™โ€ฒ,yโ€ฒ) closely approximates the true private sample (๐’™,y).

The original paper reported pixel-accurate reconstructions on CIFAR-10, MNIST, and even higher-resolution images, triggering a major re-evaluation of federated learning's privacy properties.

Several improvements followed DLG:

  • iDLG (Zhao et al., 2020): analytically recovers the ground-truth label from the sign pattern of the gradient before optimising for the input, improving stability.

  • GradInversion (Yin et al., 2021): adds group consistency regularisation to handle batch sizes B>1 and recovers multiple images simultaneously.

  • R-GAP (Zhu & Blaschko, 2021): exploits the recursive structure of the gradient to solve the inversion problem analytically (without iterative optimisation) for fully-connected layers.

Remark 36 (Batch size matters).

The difficulty of gradient inversion scales roughly with the batch size B. For B=1 (single-sample updates), reconstruction is nearly exact for many architectures. For B=64, individual reconstruction is infeasible but the attack can still recover statistics of the batch (mean pixel value, dominant textures). Many federated medical imaging pipelines use small effective batches due to limited local data, making them particularly vulnerable.

GIDM: Gradient Inversion for Federated Diffusion Models

Standard gradient inversion attacks were developed for discriminative classifiers. Applying them directly to diffusion models is non-trivial: diffusion models are trained on noise-corrupted images at multiple noise levels, and the loss function involves a UNet-style denoiser ฯต๐œฝ(๐’™t,t) that predicts the noise ฯต added to a clean image ๐’™0. The gradient with respect to ๐’™0 is therefore indirect, passing through the noise-corruption process.

GIDM (Gradient Inversion for Diffusion Models) adapts the inversion framework to this setting. Let ๐’™t=ฮฑโ€พt๐’™0+1โˆ’ฮฑโ€พtฯต denote the noisy image at timestep t, with ฮฑโ€พt the standard diffusion noise schedule. The denoising loss is: โ„’diff(๐œฝ;๐’™0)=๐”ผt,ฯต[โ€–ฯต๐œฝ(๐’™t,t)โˆ’ฯตโ€–22]. The gradient with respect to ๐œฝ is: ๐’ˆdiff=โˆ‡๐œฝโ„’diff(๐œฝ;๐’™0).

GIDM solves: (GIDM)๐’™^0โˆ—=argโ€‰min๐’™^0โˆˆ[0,1]dโกโˆ‘tโˆˆ๐’ฏwtโ‹…โ€–๐”ผฯต[โˆ‡๐œฝโ„’diff(๐œฝ;๐’™^0,t)]โˆ’๐’ˆdiff(t)โ€–22+ฮปTVโ„›TV(๐’™^0), where ๐’ฏ is a set of sampled timesteps, wt are timestep weights (higher for small t which encode fine-grained structure), and โ„›TV is the total variation penalty.

GIDM was shown to reconstruct medical images (chest X-rays, brain MRIs) from gradients shared during federated diffusion model training with SSIM scores exceeding 0.75, substantially outperforming naive gradient inversion baselines.

Remark 37 (Timestep selection in GIDM).

Small timesteps (tโ‰ˆ0) correspond to gradients that reflect fine spatial details of ๐’™0, while large timesteps correspond to low-frequency structure. GIDM uses a curriculum that initialises reconstruction from large-timestep gradients (recovering global shape) and progressively refines using small-timestep gradients (recovering textures and identifiable features). This mimics the coarse-to-fine progression of the diffusion reverse process.

Memorization-Guided Data Stealing (ICLR 2026)

The gradient inversion attacks described above require observing the gradient at a specific round and work best for small batches. A qualitatively more severe threat was introduced at ICLR 2026: Memorization-Guided Data Stealing (MGDS). This attack exploits a deep property of diffusion models - their tendency to memorise individual training examples - and does not require access to any gradients. The attacker participates in the federation, receives a copy of the trained model, and then uses that model as an oracle to extract private training data from other clients.

Diffusion Model Memorisation

Large diffusion models have been shown to memorise a fraction of their training data verbatim: when prompted with appropriate conditioning (or even unconditionally), they regenerate near-pixel-perfect copies of training images. The memorisation rate depends on image duplication frequency in the dataset, model capacity, and training duration. In federated settings, memorisation is particularly problematic: each client contributes a relatively small, semantically coherent dataset (e.g., images from a single hospital), which the global model may memorise more aggressively than it would memorise diverse large-scale data.

The MGDS Attack Mechanism

MGDS operates in two phases, each exploiting a distinct guidance mechanism.

Phase 1: Memorization-Focused Guidance (MFG).

In the first phase, the attacker identifies prompts or latent directions that cause the model to generate memorised images. Let pฮธ(๐’™) denote the density implicitly defined by the trained diffusion model. Memorised images correspond to sharp local maxima of pฮธ that also coincide with training samples. The MFG procedure maximises the memorisation score: (MFG)smem(๐’›)=logโกpฮธ(Dฮธ(๐’›))โˆ’ฮฒโ‹…โ„‹(Dฮธ(๐’›)), where ๐’› is the latent noise vector, Dฮธ is the reverse diffusion operator (mapping noise to image), logโกpฮธ is estimated via a score-matching proxy, and โ„‹ is the entropy of the generated image distribution (low entropy favours deterministic, verbatim outputs). Maximising smem(๐’›) over ๐’› drives the sampler towards modes corresponding to memorised images.

Phase 2: Threat-Focused Guidance (TFG).

Phase 1 identifies memorised images but does not attribute them to specific victim clients. Phase 2, Threat-Focused Guidance, refines the search by conditioning on target-client-specific signals. If the attacker has auxiliary knowledge about the victim (e.g., knowledge that client k contributes chest radiographs from a specific patient cohort), a target-attribute classifier cฯ• can be trained on publicly available data with similar attributes. TFG augments the sampling objective with a classifier guidance term: (TFG)๐’›^โˆ—=argโ€‰max๐’›โกsmem(๐’›)+ฮณโ‹…logโกcฯ•(Dฮธ(๐’›)), where ฮณ is the guidance strength. The combined guidance directs sampling toward memorised images that also exhibit the victim's data attributes.

Definition 40 (Memorization-Guided Attack).

Let Gฮธ be a generative model trained in a federated setting across clients {1,โ€ฆ,K} with private datasets {๐’Ÿk}k=1K. A memorization-guided data stealing attack by client kโˆ—โˆ‰{1,โ€ฆ,K} (or a malicious participant) is a procedure ๐’œ(Gฮธ,โ„aux) that uses the trained model Gฮธ and optional auxiliary information โ„aux to produce a set of reconstructions: ๐’Ÿ^steal=๐’œ(Gฮธ,โ„aux)โІ๐’ณ, such that |๐’Ÿ^stealโˆฉ๐’Ÿk|/|๐’Ÿk|โ‰ฅฯ„ for some victim k and threshold ฯ„>0. The attack is successful at rate ฯ„ if this condition holds for a non-trivial fraction of victims. MGDS achieves ฯ„>0.30 in experiments on federated chest X-ray and retinal fundus models.

Attack Pipeline

Figure fig:fedgen:mgds-pipeline illustrates the full MGDS attack pipeline. Benign federated training produces a shared diffusion model Gฮธ. The attacker then enters the post-training exploitation phase, applying MFG to discover memorised modes, followed by TFG to target specific victim clients. The extracted images are near-pixel-perfect copies of private training data.

The Memorization-Guided Data Stealing (MGDS) attack pipeline. Left (green): standard benign federated training produces a shared diffusion model Gฮธ. Centre (blue): every federated participant receives a copy of Gฮธ at the end of training - including a potential adversary. Right (dashed red box): the post-training exploitation phase. MFG (amber) identifies latent vectors that cause Gฮธ to regenerate memorised training examples. TFG (purple) refines sampling toward images matching victim-client attributes. The attacker is entirely invisible during the training phase; the attack begins only after the model is received.

Caution.

This attack works post-training - the attacker can be invisible during the entire federation. Unlike gradient inversion, which requires the adversary to be present during a specific training round, MGDS operates entirely after training has concluded. A participant who contributes zero malicious updates - who behaves as a perfectly honest client throughout all federated rounds - can still extract >30% of other clients' private training data by exploiting the diffusion model they receive at the end of federation. Standard Byzantine-robust aggregation methods (FedAvg, Krum, coordinate-wise median) provide no defence whatsoever against this attack, because there is nothing anomalous in the attacker's behaviour during training.

Experimental Evidence

MGDS was evaluated on three federated settings:

  1. Chest X-ray federation (CheXpert + NIH ChestX-ray14): 10 simulated clients, each holding โˆผ3,000 images. MGDS recovered 32.4% of victim images at SSIM >0.85.

  2. Retinal fundus federation (REFUGE + ORIGA): 8 clients, โˆผ400 images each. Recovery rate 38.7%; small datasets memorised more aggressively.

  3. Dermatology federation (ISIC archive): 15 clients, mixed lesion types. Recovery rate 27.1%.

The attack is significantly more effective against small, homogeneous client datasets - exactly the regime typical of federated medical imaging, where each hospital contributes data from a narrow patient population.

Membership Inference Attacks on Federated GANs

Membership inference attacks (MIAs) address a weaker but still practically important question: given a data point ๐’™ and a trained model Gฮธ, was ๐’™ used to train Gฮธ? For generative models, this corresponds to asking whether the model has โ€œseenโ€ a particular individual's data.

The Shadow Model Attack

The canonical MIA against generative models, introduced by Hayes et al. (2019), uses a collection of shadow models:

  1. Train M shadow GAN models on datasets that either include or exclude a target point ๐’™.

  2. Train a binary membership classifier hฯ• on features extracted from these shadow models, using the inclusion status as the label.

  3. Apply hฯ• to the target model Gฮธ to infer membership of ๐’™.

For federated GANs, the attack is particularly powerful because:

  • The adversary can be a co-participant and thus has access to the model at every round, enabling longitudinal MIA across the training trajectory.

  • Small federated datasets lead to high per-example memorisation probability, increasing the discriminative power of the membership classifier.

  • The discriminator Dฮธ in a GAN often exhibits a measurable prediction gap between members and non-members.

GAN Membership via Discriminator Statistics

A simpler but effective MIA specific to GANs exploits the discriminator score directly. For a well-trained GAN, the discriminator assigns high scores to real training images and low scores to generated (fake) images. The discriminator gap for a candidate ๐’™ is: ฮด(๐’™)=Dฮธ(๐’™)โˆ’ฮผfake, where ฮผfake=๐”ผ๐’›[Dฮธ(Gฮธ(๐’›))] is the expected discriminator score on generated images. Empirically, training members exhibit ฮด(๐’™)>0 with high probability.

This attack requires no shadow models, making it practical for adversaries with a single query to the discriminator. Against federated GANs trained on medical data, it achieves member/non-member AUC values of 0.82โ€“0.91 in reported experiments.

Example: Extracting Medical Images from a Federated Diffusion Model

Example 9 (Data extraction from a federated chest X-ray diffusion model).

Consider a federation of five hospitals collaborating to train a latent diffusion model for chest radiograph synthesis, intended to augment training data for downstream pneumonia detection. Each hospital contributes 2,500 de-identified chest X-rays. The federation runs for 100 rounds with FedAvg aggregation. Each participating hospital receives the final model weights.

Scenario A: Gradient inversion during training. At round t, the server (or a man-in-the-middle) observes the gradient update ๐’ˆk(t) from Hospital k. Using GIDM (Section GIDM: Gradient Inversion for Federated Diffusion Models), the attacker solves with timestep curriculum over 500 iterations. For a local batch of 4 images, the reconstructed outputs achieve SSIM 0.79ยฑ0.08, sufficient to identify patient-level features (age, sex, gross lung pathology) with >90% accuracy when evaluated by a radiologist.

Scenario B: Post-training memorisation extraction. After training concludes, Hospital kโˆ— (the attacker) applies MGDS to the received model Gฮธ. Using MFG with 1,000 sampling trajectories and TFG conditioned on an auxiliary chest X-ray classifier, the attacker recovers an estimated 34% of the training images from Hospital k at SSIM >0.83. No anomaly is detectable in Hospital kโˆ—'s gradient contributions throughout training.

Scenario C: Membership inference. A third party (e.g., a legal adversary) obtains the published model Gฮธ and wishes to determine whether a specific patient's X-ray was used. Using the discriminator gap test (Section Membership Inference Attacks on Federated GANs) with 50 random queries, the MIA achieves AUC =0.88 at distinguishing training members from non-members, effectively confirming participation with near-certain probability in sufficiently distinctive cases.

Key Idea.

The generator is an unintentional data vault - and the key is the sampling mechanism. A trained generative model does not simply learn a smooth approximation of the training distribution. High-capacity models - particularly diffusion models trained beyond the grokking threshold - encode individual training examples as stable attractors in their learned dynamics. The sampling procedure, whether guided by scores, classifiers, or memorisation signals, is the key that unlocks these attractors. Privacy-preserving federated generative modelling must therefore address not just what is shared during training, but what can be extracted from the model after training ends.

Exercises

Exercise 43.

Let f๐œฝ:โ„dโกโ†’โ„Cโก be a L-layer fully-connected network with ReLU activations, and let ๐’ˆโˆˆโ„Pโก be the gradient of the cross-entropy loss on a single sample (๐’™,y).

  1. Show that for a two-layer network (one hidden layer), the true label y can be recovered exactly from ๐’ˆ without iterative optimisation. Hint: examine the gradient of the last linear layer.

  2. Describe how the DLG objective changes when the batch size is B=2. What additional symmetry ambiguity appears?

  3. Propose a modification of that uses an ordering regulariser to break the permutation ambiguity in batch reconstruction.

Exercise 44.

Consider the MFG objective with ฮฒ=0 (no entropy term).

  1. Explain why maximising logโกpฮธ(Dฮธ(๐’›)) alone is insufficient to find memorised images. What degenerate solution does the optimiser prefer in this case?

  2. Describe what happens when ฮฒโ†’โˆž. Is there an optimal finite ฮฒ?

  3. In the TFG objective , the classifier cฯ• is trained on publicly available data. Discuss the privacy implications when the victim client's data distribution differs significantly from the public data used to train cฯ•. Does the attack weaken or strengthen?

Exercise 45.

A standard mitigation for membership inference is to add Gaussian noise ๐’ฉ(0,ฯƒ2๐ˆ) to each gradient update before sharing (gradient perturbation).

  1. Show that for the discriminator gap test (Section Membership Inference Attacks on Federated GANs), gradient perturbation during training does not eliminate the membership signal in the final model. Hint: consider what the discriminator gap measures post-training.

  2. Propose an alternative that reduces the discriminator gap without degrading generation quality.

  3. Explain why MGDS is entirely unaffected by gradient perturbation defenses and identify the correct layer at which a defense against MGDS must operate.

Privacy Defenses and Federated Unlearning

The attacks surveyed in Section Privacy Attacks on Federated Generative Models expose a stark gap between the informal privacy guarantee of federated learning - โ€œyour data stays localโ€ - and the formal guarantee required by modern privacy regulation: meaningful protection against inference from model outputs, gradients, and the trained model itself.

Closing this gap requires defenses that operate at multiple levels of the federated pipeline. In this section we examine three families of approaches:

  1. Gradient-level defenses: protect against gradient inversion by obfuscating the information content of shared updates. We examine PRISM (ICLR 2025), which replaces gradient transmission with binary mask transmission, and compare it against differential privacy, secure multi-party computation, and homomorphic encryption.

  2. Aggregation-level defenses: protect against Byzantine attacks and amplify privacy guarantees at the server side. PRISM's MADA aggregation rule is analysed in detail.

  3. Post-hoc model editing: address the right to be forgotten by removing the influence of specific data points from an already-trained generative model. We examine FedDUL and the formal guarantees of federated unlearning.

PRISM: Privacy-Preserving Improved Stochastic Masking

PRISM (Privacy-Preserving Improved Stochastic Masking) was introduced at ICLR 2025 as a defense specifically designed for federated generative models. Its central insight is architectural: instead of training a random network and sharing its weights, PRISM searches for a binary mask over a fixed random network that achieves the desired generation quality. Only the mask - a sequence of 0/1 values - is transmitted to the server, not the underlying weights.

The Strong Lottery Ticket Hypothesis

PRISM builds on the strong lottery ticket hypothesis (SLTH):

Definition 41 (Strong Lottery Ticket (SLT)).

Let f(โ‹…;๐’˜) be a neural network with randomly initialised weights ๐’˜โˆผpinit. A strong lottery ticket is a binary mask ๐’Žโˆˆ{0,1}|๐’˜| such that the masked network f(โ‹…;๐’ŽโŠ™๐’˜) achieves performance comparable to a separately trained network f(โ‹…;๐’˜โˆ—) of the same architecture. The SLTH conjectures that such a mask exists with high probability for sufficiently overparameterised networks.

Experimentally, the SLTH has been validated across convolutional networks, transformers, and diffusion model UNets: a sufficiently wide random network contains a subnetwork (defined by a mask) that matches the accuracy of an optimised network without any weight updates.

PRISM Architecture

The PRISM federated protocol proceeds as follows:

  1. Server initialisation. The server samples a random network f(โ‹…;๐’˜0) once, where ๐’˜0โˆผ๐’ฉ(0,ฯƒinit2๐ˆ), and broadcasts ๐’˜0 to all clients. The weights ๐’˜0 are fixed forever and never updated.

  2. Local mask search. Each client k solves a binary mask search problem over the fixed network to minimise its local generation loss: (Prism MASK Search)๐’Žkโˆ—=argโ€‰min๐’Žโˆˆ{0,1}|๐’˜0|โกโ„’k(f(โ‹…;๐’ŽโŠ™๐’˜0))+ฮผโ€–๐’Žโ€–1, where โ„’k is the local training loss (e.g., diffusion denoising loss on ๐’Ÿk) and the โ„“1 penalty controls mask sparsity. The binary constraint is relaxed to [0,1] and thresholded during optimisation (straight-through estimator).

  3. Mask transmission. Client k transmits only ๐’Žkโˆ—โˆˆ{0,1}|๐’˜0| to the server. No weight values are ever sent.

  4. MADA aggregation. The server aggregates client masks using the Majority-vote Aggregation with Distribution Alignment (MADA) rule.

  5. Broadcast global mask. The server broadcasts the aggregated global mask ๐’Žglobal to all clients for the next round.

Definition 42 (Stochastic Masking Defense).

A stochastic masking defense for federated generative learning is a protocol (f๐’˜0,โ„ณ,๐’œagg) consisting of:

  1. a fixed random network f(โ‹…;๐’˜0) with weights ๐’˜0 drawn once from pinit and shared publicly;

  2. a local mask optimisation procedure โ„ณ:๐’Ÿkโ†ฆ๐’Žkโˆˆ{0,1}|๐’˜0|;

  3. an aggregation rule ๐’œagg:{๐’Žk}k=1Kโ†ฆ๐’Žglobalโˆˆ{0,1}|๐’˜0|.

The defense is gradient-inversion resistant if the mapping ๐’Žkโ†ฆ๐’Ÿk is computationally infeasible to invert with non-negligible probability, even given ๐’˜0 and the aggregation rule.

Why Gradient Inversion Becomes Intractable

Gradient inversion attacks (Section Gradient Inversion Attacks) require computing โˆ‡๐’™โ€ฒโ€–โˆ‡๐œฝโ„’(f๐œฝ(๐’™โ€ฒ))โˆ’๐’ˆโ€–22. Under PRISM, the transmitted quantity is not a gradient at all: it is a binary mask ๐’Žkโˆˆ{0,1}|๐’˜0|. Reconstructing ๐’Ÿk from ๐’Žk and ๐’˜0 would require solving: (Prism Inversion)๐’™โˆ—=argโ€‰min๐’™โ€ฒโˆˆ๐’ณโกโ€–argโ€‰min๐’Žโˆˆ[0,1]|๐’˜0|โกโ„’gen(f(โ‹…;๐’ŽโŠ™๐’˜0);{๐’™โ€ฒ})โˆ’๐’Žkโ€–22, which involves an inner loop of combinatorial mask optimisation inside the outer input reconstruction loop. This double-level optimisation is computationally intractable for any known algorithm.

MADA Aggregation and MMD Loss

The MADA aggregation rule is designed to handle heterogeneous client distributions while providing robustness against Byzantine clients. Let {๐’Žk}k=1K be the client masks. MADA proceeds in two stages:

Stage 1: Byzantine-robust majority vote.

For each weight index iโˆˆ{1,โ€ฆ,|๐’˜0|}, compute the weighted majority vote: [๐’Žmaj]i=๐Ÿ[โˆ‘k=1Krk[๐’Žk]iโ‰ฅ12], where rk is a robustness weight that downweights masks that deviate strongly from the median.

Stage 2: Distribution alignment via MMD.

The majority-voted mask ๐’Žmaj may not align well with the global data distribution when client distributions are heterogeneous. MADA refines the mask by minimising the Maximum Mean Discrepancy (MMD) between the distribution of samples generated by f(โ‹…;๐’ŽโŠ™๐’˜0) and a target distribution estimated from all clients' mask-implied statistics: (MADA MMD)๐’Žglobal=argโ€‰min๐’Žโˆˆ{0,1}|๐’˜0|โกMMD2โก(p^๐’Ž,p^target)+ฮปmajโ€–๐’Žโˆ’๐’Žmajโ€–1, where p^๐’Ž is the empirical generated distribution and p^target=Kโˆ’1โˆ‘kp^๐’Žk.

The MMD kernel is chosen as the mixture of RBF kernels: k(๐’™,๐’™โ€ฒ)=โˆ‘jexpโก(โˆ’โ€–๐’™โˆ’๐’™โ€ฒโ€–2/(2ฯƒj2)) with ฯƒjโˆˆ{0.1,0.5,1,2,10}, providing sensitivity at multiple spatial scales.

The PRISM defense for federated generative learning. The server samples a random network f(โ‹…;๐’˜0) once and broadcasts only the architecture and random weights - never updating them. Each client performs a local mask search, finding a binary subnetwork that fits its private data. Only the binary mask is transmitted, not any gradient or weight value. The server aggregates masks via MADA (majority vote + MMD distribution alignment) and broadcasts the global mask for the next round. Gradient inversion against a binary mask is computationally intractable.

Comparing Privacy Defense Mechanisms

Four major families of privacy defenses for federated learning are compared in Table Table 8:

  1. Differential Privacy with SGD (DP-SGD): clips gradients, adds calibrated Gaussian noise.

  2. Secure Multi-Party Computation (SMPC): uses secret sharing so that no single party sees any other party's gradient.

  3. Homomorphic Encryption (HE): encrypts gradients before transmission; the server aggregates in encrypted space.

  4. PRISM: transmits only binary masks over a fixed random network.

DefenseComputeCommunicationGenerationGrad. Inv.Mem. Extr.Formal
overheadoverheadutilityresistanceresistanceguarantee
None (FedAvg)1ร—1ร—HighNoneNoneNone
DP-SGD2โ€“3ร—1ร—MediumPartialNoneฮต-DP
SMPC10โ€“100ร—10โ€“50ร—HighHighNoneCrypto
HE>1000ร—5โ€“20ร—HighHighNoneCrypto
PRISM3โ€“5ร—0.3โ€“1ร—Medium-HighVery HighPartialSLTH
Comparison of privacy defense mechanisms for federated generative learning. โ€œCompute overheadโ€ is relative to unprotected FedAvg. โ€œGradient inversion resistanceโ€ and โ€œmemorisation extraction resistanceโ€ are qualitative assessments. ฮต-DP: differential privacy parameter (smaller is stronger).

Remark 38 (No defense is complete against MGDS).

Notably, none of the defenses in Table Table 8 provides strong resistance to memorisation extraction attacks like MGDS (Section Memorization-Guided Data Stealing (ICLR 2026)). DP-SGD reduces memorisation to a limited degree by noising gradients, but the resulting model still memorises if the noise level is insufficient for high utility. SMPC and HE protect gradient transmission but deliver an equally memorisation-prone model to all participants. PRISM provides partial resistance because the mask representation reduces information capacity relative to full weights, but memorisation can still occur within the masked subnetwork. Defenses specifically targeting memorisation extraction (e.g., randomised sampling noise, output perturbation) must be applied at inference time and are not listed here.

Federated Unlearning: The Right to be Forgotten

Privacy regulation increasingly grants individuals the right to erasure: upon request, an organisation must delete all records of that individual and eliminate the effects of their data from any model trained on it. In centralised learning, this is achieved by retraining the model from scratch on the remaining data - expensive, but well-defined. In federated learning, the problem is harder: the model is a global aggregate of contributions from all clients, and retraining from scratch requires re-coordinating all clients, which may be infeasible.

Definition 43 (Federated Unlearning).

Let Gฮธ be a generative model trained via federated learning on datasets {๐’Ÿk}k=1K. Let ๐’ŸforgetโІ๐’Ÿk be a forget set associated with client k (a subset of data points to be erased). A federated unlearning procedure is an algorithm ๐’ฐ(Gฮธ,๐’Ÿforget,๐’Ÿretain) that produces an updated model Gฮธโ€ฒ such that:

  1. Forgetting: the model Gฮธโ€ฒ behaves as if ๐’Ÿforget was never used in training, i.e., a membership inference attack cannot distinguish Gฮธโ€ฒ from a model retrained on ๐’Ÿretain=โ‹ƒj=1K๐’Ÿjโˆ–๐’Ÿforget;

  2. Utility preservation: the generation quality of Gฮธโ€ฒ on ๐’Ÿretain is not significantly degraded.

The unlearning is verified if a membership inference test confirms that Gฮธโ€ฒ does not exhibit elevated membership scores for samples in ๐’Ÿforget relative to a retrained baseline.

Insight.

Unlearning is harder than learning - you must prove the absence of knowledge. Learning requires demonstrating that the model performs well on a task; this is measured by standard metrics on a held-out test set. Unlearning requires the converse: demonstrating that the model does not retain specific knowledge, which cannot be verified by positive evidence alone. Any finite set of probing queries could miss retained information. Robust unlearning verification requires adversarial probing: if a determined membership inference attacker cannot detect the forgotten data, we tentatively accept unlearning; but this is an empirical, not a mathematical, guarantee in the general case.

FedDUL: Attention-Based Local Forgetting with Global Filtering

FedDUL (Federated Diffusion Unlearning with Local attention-based forgetting) addresses the federated unlearning problem through a two-stage procedure that operates locally at the client level and globally at the server level.

Stage 1: Attention-Based Local Forgetting

The key observation is that in a diffusion UNet, attention maps at intermediate layers are highly sensitive to specific training examples. Features that encode memorised examples can be localised in the attention space.

Let ๐€l(๐’™)โˆˆโ„Nlร—Nlโก denote the attention matrix at layer l when the network processes image ๐’™. For a forget sample ๐’™fโˆˆ๐’Ÿforget, the forget attention signature is: ฯ•f=(vecโก(๐€1(๐’™f)),โ€ฆ,vecโก(๐€L(๐’™f)))โˆˆโ„โˆ‘lNl2โก. FedDUL constructs a forget direction in parameter space: (Feddull Local)๐’…forget=โˆ‡๐œฝโˆ‘๐’™fโˆˆ๐’Ÿforgetโˆ‘l=1Lโ€–๐€l(๐œฝ)(๐’™f)โˆ’๐€โ€พl(rand)โ€–F2, where ๐€โ€พl(rand) is the average attention matrix computed on random Gaussian noise (the โ€œnullโ€ attention pattern of the network). Taking a gradient step in direction โˆ’๐’…forget causes the network to respond to forget samples with noise-like attention, reducing memorisation.

The local update is: (Feddull Update)๐œฝโ€ฒ=๐œฝโˆ’ฮทf๐’…forget+ฮทrโˆ‡๐œฝโ„’gen(๐œฝ;๐’Ÿretain(k)), where ฮทf is the forgetting step size, ฮทr is the retention step size, and ๐’Ÿretain(k) is the client's retained data. The two terms create a constructive interference: forgetting drives attention away from ๐’Ÿforget while retention prevents collapse of generation quality.

Stage 2: Global Filtering

After local forgetting updates are performed at client k, the resulting parameter delta ฮ”๐œฝ=๐œฝโ€ฒโˆ’๐œฝ is transmitted to the server. The server applies a global filter to prevent the forgetting update from inadvertently degrading other clients' representation:

(Feddull Filter)ฮ”๐œฝfiltered=ฮ ๐’žretain(ฮ”๐œฝ), where ฮ ๐’žretain is a projection onto the cone ๐’žretain of parameter directions that do not reduce loss on the global retained dataset (approximated by server-side validation data or aggregated retain gradients).

In practice, the projection is implemented via cosine similarity filtering: components of ฮ”๐œฝ that have negative cosine similarity with the average retain gradient are zeroed out. This ensures that the forgetting update only modifies subspaces that are not important for retained data.

Verifying Unlearning via Membership Inference

After applying a federated unlearning procedure, one must verify that the model no longer retains information about ๐’Ÿforget. The standard verification protocol uses membership inference as a proxy:

  1. Baseline MIA. Train a membership inference adversary hฯ• on the original model Gฮธ, using ๐’Ÿforget as members and held-out samples as non-members. Measure baseline AUCbase.

  2. Post-unlearning MIA. Apply the same adversary hฯ• (or retrain it) to the unlearned model Gฮธโ€ฒ. Measure AUCunlearn.

  3. Retrain baseline. Train a reference model Gฮธretrain from scratch on ๐’Ÿretain only. Measure AUCretrain.

  4. Verification criterion. Unlearning is accepted if |AUCunlearnโˆ’AUCretrain|โ‰คฮด for a tolerance ฮด (typically 0.05).

This protocol provides an empirical, adversarial certificate of forgetting. It does not provide a formal mathematical guarantee - a more capable membership inference adversary might still succeed. However, it is the most operationally practical verification approach in current literature.

Remark 39 (Generative model unlearning is harder than classifier unlearning).

For classifiers, the membership inference signal is concentrated in the decision boundary and softmax outputs. For generative models, the signal is distributed throughout the weight tensor and manifests in the generated sample distribution, the latent space topology, and attention patterns at multiple scales. A membership inference adversary against a generative model can query the model in many different ways (sample quality for target class, reconstruction error in encoder-decoder models, score norm at target image). Effective unlearning verification must probe all these modalities.

Efficiency of Federated Unlearning vs. Full Retraining

Proposition 15 (Unlearning Efficiency Bound).

Let T be the total number of federated training rounds. Let ฯ„FedDUL be the number of communication rounds required by FedDUL to satisfy the unlearning verification criterion at tolerance ฮด, and let ฯ„retrain=T be the cost of full retraining. Under the assumption that the model exhibits (ฮฑ,ฮฒ)-influence boundedness (i.e., the influence of any single data point on the model parameters is bounded by ฮฑ in โ„“2 norm and ฮฒ in โ„“โˆž norm), and that FedDUL uses learning rate ฮทf=O(ฮฑ/โ€–๐’Ÿforgetโ€–): ฯ„FedDUL=O(ฮฑโ‹…logโก(1/ฮด)ฮทfโ‹…ฮผsc)โ‰ชT=ฯ„retrain, where ฮผsc is the strong convexity constant of the local retain loss (or a proximal surrogate thereof). Specifically: ฯ„FedDULฯ„retrain=O(ฮฑlogโก(1/ฮด)Tฮทfฮผsc)=o(1), so FedDUL asymptotically requires a vanishing fraction of the retraining cost, provided ฮฑ and ฮด are fixed and Tโ†’โˆž.

Proof sketch.

The key steps are:

  1. Influence decomposition. Under (ฮฑ,ฮฒ)-influence boundedness, the parameter vector ๐œฝ can be decomposed as ๐œฝ=๐œฝretain+๐œฝforget where โ€–๐œฝforgetโ€–2โ‰คฮฑ|๐’Ÿforget|. FedDUL targets the ๐œฝforget component directly.

  2. Local forgetting convergence. The forget direction ๐’…forget in is a gradient of a strongly convex local objective in the neighbourhood of ๐œฝ (since it involves squared Frobenius norms of attention differences). By gradient descent convergence for strongly convex functions, the local update requires at most O(logโก(1/ฮด)/ฮผsc) steps to drive the forget-set influence below ฮด.

  3. Round counting. Each FedDUL step corresponds to one federated round (one local update + one aggregation). The total round count is therefore O(ฮฑlogโก(1/ฮด)/(ฮทfฮผsc)). Since full retraining requires T rounds and the parameters of FedDUL are chosen independently of T, the ratio is o(1) as Tโ†’โˆž.

Remark 40 (Non-convexity in practice).

The proposition assumes local strong convexity in the neighbourhood of ๐œฝforget, which is a significant simplification for deep generative models. In practice, FedDUL is applied with multiple random restarts and small forget-step sizes to avoid catastrophic interference with the retain loss. Empirically, FedDUL requires 5โ€“15 federated rounds to satisfy verification at ฮด=0.05, compared to the original 100โ€“500 training rounds - roughly a 7ร—โ€“100ร— speed-up.

Summary: A Taxonomy of Federated Privacy Threats and Defenses

The interactions between attacks and defenses surveyed in Sections Privacy Attacks on Federated Generative Modelsโ€“Privacy Defenses and Federated Unlearning form a complex adversarial landscape. Table Table 9 summarises which defenses are effective against which attacks.

Defense โ•ฒ AttackGrad. Inv.MGDSMIA (GAN)Unlearning
DP-SGDโˆผร—โˆผร—
SMPCโœ“ร—ร—ร—
HEโœ“ร—ร—ร—
PRISMโœ“โˆผโˆผร—
FedDULร—โˆผโˆผโœ“
Effectiveness of privacy defenses against known attack vectors for federated generative models. โœ“: effective; โˆผ: partially effective; ร—: ineffective.

The table reveals a critical gap: no single defense simultaneously addresses gradient inversion, memorisation extraction, membership inference, and provides unlearning capability. A complete privacy solution for federated generative models requires layering multiple defenses:

  • PRISM (or DP-SGD) for gradient-level protection during training;

  • Output perturbation for inference-time memorisation extraction resistance;

  • FedDUL for post-hoc data erasure upon client request.

Exercises

Exercise 46.

Consider the PRISM mask search objective with a fixed random network f(โ‹…;๐’˜0) of width W and depth L.

  1. Show that for a fixed dataset ๐’Ÿk, the optimal mask sparsity โ€–๐’Žkโˆ—โ€–1/|๐’˜0| is a decreasing function of the regularisation coefficient ฮผ (all else being equal). Sketch the expected generation quality as a function of ฮผ.

  2. The strong lottery ticket hypothesis guarantees existence of a good sparse mask, but does not specify how to find it. Compare the following mask search methods: (i) random pruning, (ii) magnitude-based pruning of |๐’˜0|, (iii) gradient-based mask optimisation with the straight-through estimator. Which is most consistent with the PRISM privacy model, and why?

  3. Suppose two clients k1,k2 have identical datasets ๐’Ÿk1=๐’Ÿk2. Show that their optimal masks ๐’Žk1โˆ— and ๐’Žk2โˆ— are not necessarily identical due to the random initialisation ๐’˜0. Why is this property desirable from a privacy perspective?

Exercise 47.

The MADA aggregation rule uses the Maximum Mean Discrepancy with a mixture-of-RBF kernel to align the globally aggregated mask with the union of client distributions.

  1. Define the MMD between two distributions p and q with kernel k: MMD2โก(p,q)=๐”ผx,xโ€ฒโˆผp[k(x,xโ€ฒ)]โˆ’2๐”ผxโˆผp,yโˆผq[k(x,y)]+๐”ผy,yโ€ฒโˆผq[k(y,yโ€ฒ)]. Explain why minimising MMD2โก(p^๐’Ž,p^target) over binary masks ๐’Ž is a sensible distribution-matching objective in the context of federated aggregation.

  2. The second term in penalises deviation from the majority-voted mask ๐’Žmaj. Propose an adaptive schedule for ฮปmaj that starts at a large value (enforcing majority vote) and decays (allowing MMD refinement). Justify your schedule.

  3. Under what conditions does the MADA solution degenerate to simple majority vote? Describe a federated setting (in terms of client heterogeneity) where this degeneracy occurs.

Exercise 48.

Consider a federated diffusion model trained on K=8 clients with |๐’Ÿk|=500 images each. Client 3 requests that |๐’Ÿforget|=50 specific images be erased.

  1. Describe a membership inference protocol to verify that FedDUL has successfully erased ๐’Ÿforget at tolerance ฮด=0.05. Specify the reference model, the adversary architecture, the query set, and the decision rule.

  2. The verification relies on a retrained reference model Gฮธretrain. In a federated setting, retraining requires re-coordinating all 8 clients. Propose an alternative verification approach that avoids full retraining while still providing a meaningful certificate.

  3. Argue that the FedDUL forgetting direction in could paradoxically increase the membership score for some non-target clients' data if the forget set ๐’Ÿforget shares visual features with retained data. How would you modify to prevent this?

Healthcare and Medical Imaging

The union of three properties-data that is siloed, data that is sensitive, and data that is scarce-creates what epidemiologists have begun calling the perfect storm for machine learning in medicine. Each property alone is a serious obstacle. Together they form a trifecta that has, until recently, made large-scale generative modelling of clinical imagery essentially impossible outside a handful of elite academic medical centres with dedicated data-science teams, institutional review boards that move at geological speeds, and legal budgets measured in millions.

Siloed. The electronic health record systems of two hospitals in the same city routinely speak different data dialects: one runs Epic, the other Cerner; one encodes imaging in DICOM 3.0, the other in a proprietary variant; one uses ICD-10 coding, the other a locally extended schema. Even when regulatory barriers are absent, raw data sharing across institutions requires months of data-use agreements, de-identification validation, format harmonisation, and network engineering. The practical result is that a radiologist at Hospital A develops clinical intuitions across, say, 3,000 chest CTs per year; a model trained only on Hospital A's data inherits exactly those intuitions-and exactly those blind spots.

Sensitive. Medical images are not merely photographs. A high-resolution brain MRI contains, encoded in the cortical morphology, probabilistic information about a patient's ethnicity, sex, age, neurological diagnoses, and, increasingly, predicted future disease trajectory. CT scans of the thorax reveal cardiac anatomy, pulmonary lesions, incidental findings that may have profound insurance and employment consequences. The Health Insurance Portability and Accountability Act (HIPAA) in the United States, the General Data Protection Regulation (GDPR) in Europe, and dozens of national-level health data statutes globally impose strict requirements on cross-institutional data movement, requirements that carry criminal penalties for wilful violation.

Scarce. Rare diseases are, by definition, rare. Niemann-Pick disease type C affects roughly 1 in 150,000 live births. Anti-NMDA receptor encephalitis, the condition at the centre of Susannah Cahalan's memoir Brain on Fire, was not formally recognised until 2007; a single centre may see two or three confirmed cases per year. Posterior cortical atrophy, a variant of Alzheimer's disease affecting visual processing, accounts for fewer than 5% of all Alzheimer's presentations. For any of these conditions, a traditional supervised learning dataset-requiring perhaps hundreds of annotated examples to achieve clinically useful performance-is simply not constructible at a single institution on any reasonable timescale.

Federated learning cuts through all three barriers simultaneously. By keeping patient data at each institution's secure perimeter, it dissolves the privacy barrier without dissolving collaboration. By allowing a shared generative model to accumulate knowledge from hundreds of hospitals without any single institution contributing raw images to a central repository, it transforms scarce local data into a collectively rich resource. This section traces the mathematics, the architectures, and the empirical evidence for federated generative modelling in medicine, from routine imaging modalities to the frontier of rare-disease augmentation.

Key Idea.

Federated Generative AI Makes Rare Cases Universal. Let โ„‹={H1,โ€ฆ,HK} be a federation of K hospitals. Hospital Hk maintains a local dataset ๐’Ÿk={(๐ฑk(i),yk(i))}i=1nk of images ๐ฑ and clinical labels y. A federated generative model Gฮธ trained across โ„‹-without any raw image leaving its hospital of origin-can synthesise samples from the union distribution punionโˆโˆ‘knkpk(๐ฑ), where pk is the marginal image distribution at hospital k. Every hospital's rare case therefore becomes virtually available to every other hospital, without transferring a single patient record.

Cross-Hospital Federated Image Synthesis

Modern diagnostic medicine depends on four principal imaging modalities, each with distinct physics, clinical utility, and federation challenges.

Magnetic Resonance Imaging (MRI).

MRI acquires images by measuring the relaxation of hydrogen nuclei in a magnetic field. Its primary virtues are superb soft-tissue contrast and freedom from ionising radiation; its primary vice is acquisition time (a typical brain protocol runs 45โ€“60 minutes) and scanner-to-scanner variability. Field strength (1.5 T vs. 3.0 T vs. 7.0 T), scanner vendor (Siemens, GE, Philips), and pulse sequence parameters all introduce systematic appearance shifts-domain gaps-that confound naive centralised training. Federated diffusion models that share denoising score functions across hospitals while maintaining site-specific normalisation layers have been shown to close roughly 70% of the cross-site domain gap without sacrificing local data privacy.

Computed Tomography (CT).

CT uses X-ray projections to reconstruct three-dimensional density maps. Unlike MRI, CT produces images with well-standardised Hounsfield units (HU), making cross-site calibration relatively tractable. The main barrier to federation is not technical but legal: CT scans of the chest, abdomen, and pelvis contain highly identifying anatomical structures (cardiac silhouette, vertebral morphology) that re-identification researchers have exploited with alarming success. Federated generation of paired low-dose/high-dose CT pairs-a common denoising task-reduces radiation exposure by 30โ€“60% while distributing the training burden across institutions.

X-Ray Radiography.

Chest X-ray is the most widely performed imaging study in the world: roughly 2 billion chest radiographs are acquired annually. Federation is particularly attractive here because small community hospitals, lacking subspecialty radiologists, produce large volumes of plain films that go unreported for extended periods. Federated conditional GANs have been trained to synthesise pathology-specific chest X-rays (pneumonia, pneumothorax, pleural effusion) from text conditioning on radiology report keywords, enabling downstream classifiers to achieve AUC gains of 0.03โ€“0.07 in rare-pathology detection without centralising any images.

Positron Emission Tomography (PET).

PET images metabolic activity by detecting gamma rays from positron- emitting radiotracers. Because PET requires administration of radioactive tracers, it carries regulatory, ethical, and cost barriers that limit dataset sizes to the low hundreds in most research centres. Federated GANs trained to synthesise PET from structural MRI (a task sometimes called MRI-to-PET translation) allow neurological research consortia to effectively pool synthetic PET information without requiring each site to acquire independent PET data.

Remark 41 (Modality-Specific Federation Challenges).

Each modality introduces distinct statistical heterogeneity. MRI heterogeneity is dominated by scanner-induced domain shift. CT heterogeneity is dominated by reconstruction kernel variation and slice thickness differences. X-ray heterogeneity is dominated by exposure setting and detector technology variation. PET heterogeneity is dominated by tracer kinetics and reconstruction algorithm differences. Effective cross-hospital federation requires modality-specific normalisation strategies as pre-processing layers within the local client model, before gradient computation proceeds.

Definition: Federated Medical Image Synthesis

Definition 44 (Federated Medical Image Synthesis).

Let โ„‹={H1,โ€ฆ,HK} be a set of K medical institutions (hospitals, imaging centres, research sites), each holding a private dataset ๐’Ÿk of medical images with associated clinical metadata. A federated medical image synthesis (FMIS) system is a tuple FMIS=(Gฮธ,{Eฯ•k}k=1K,๐’œfed,๐’ซpriv), where:

  1. Gฮธ:๐’ตร—๐’žโ†’๐’ณ is a global generative model (diffusion model, GAN, or VAE) with shared parameters ฮธ that maps a latent noise vector ๐ณโˆˆ๐’ต and a clinical conditioning signal ๐œโˆˆ๐’ž (diagnosis code, acquisition protocol, patient demographics) to a synthetic image ๐ฑ^โˆˆ๐’ณ.

  2. Eฯ•k:๐’ณkโ†’๐’ต is a site-specific encoder at institution Hk with local parameters ฯ•k that embeds local images into the shared latent space, absorbing site-specific domain shifts without sharing raw pixels.

  3. ๐’œfed is a federated aggregation algorithm (e.g. FedAvg, FedProx, SCAFFOLD, or a privacy-amplified variant) that coordinates parameter updates across โ„‹ by sharing only model gradients or compressed gradient summaries, never raw data.

  4. ๐’ซpriv is a privacy guarantee, typically either differential privacy (ฮต,ฮด)-DP with clipped gradient noise ๐’ฉ(0,ฯƒ2C2๐ˆ) added per round, or a k-anonymity assurance on the synthetic output distribution qฮธ, or both.

The system satisfies clinical utility if the downstream diagnostic performance of models trained on synthetic data from Gฮธ matches, within a specified tolerance ฯตclin, the performance of models trained on the union of raw datasets โ‹ƒk๐’Ÿk.

Multi-Hospital Federated Brain Tumour MRI Generation

Example 10 (Five-Hospital Federated Brain Tumour MRI Generation).

Consider five academic medical centres-labelled H1 through H5-each specialising in neuro-oncology but operating different MRI platforms (Siemens MAGNETOM Vida 3T at H1 and H4; GE Discovery MR750 3T at H2; Philips Ingenia 1.5T at H3; Siemens MAGNETOM Prisma 3T at H5) with non-overlapping patient populations. Their local dataset sizes are:

1.2

SitePatientsGBMLGGMeningioma
H1 (Boston)48021018090
H2 (London)31214011062
H3 (Singapore)228889545
H4 (Toronto)39117514076
H5 (Munich)26711510052
Total1,678728625325
where GBM = glioblastoma multiforme, LGG = low-grade glioma.

A federated latent diffusion model (LDM) is trained using SCAFFOLD aggregation over 200 communication rounds, with each site running 5 local gradient steps per round on a U-Net denoising backbone with โˆผ86M parameters. Site-specific VAE encoders Eฯ•k absorb scanner-dependent appearance shifts before the shared diffusion denoising process. Differential privacy is enforced with clipping constant C=1.0 and noise multiplier ฯƒ=0.8, achieving (ฮต,ฮด)=(4.2,10โˆ’5)-DP over 200 rounds.

After training, the global model Gฮธ is conditioned on tumour grade, approximate size (measured in axial slice diameter), and imaging protocol to generate synthetic multi-parametric MRI volumes (T1, T1+Gd, T2, FLAIR). A radiologist panel of six neuro-radiologists-blinded to image origin-rated synthetic volumes on a five-point clinical plausibility scale. Key results:

  • Clinical plausibility: 88.4% of synthetic volumes rated โ‰ฅ4 out of 5, comparable to the 91.2% rating for real held-out images from the same federation.

  • Tumour segmentation downstream task: nnU-Net trained on real + synthetic (50/50 augmentation) achieves mean Dice of 0.847 on an external test set (TCIA BraTS 2023), compared with 0.821 for real-data-only training.

  • Privacy: Membership inference attack success rate on synthetic images: 51.3% (effectively random, close to the 50% baseline of random guessing).

  • Rare subtype gain: Meningioma classification F1 improved from 0.71 (local training only) to 0.84 (federated synthetic augmentation), the largest gain occurring at H3 and H5, the sites with fewest meningioma cases.

This example illustrates a fundamental asymmetry in the value of federation: the benefit is greatest precisely where data is scarcest. The richest site, H1 with 480 patients, gains 2โ€“3% in downstream performance; the smallest site, H3 with 228 patients, gains 11โ€“14%. Federation effectively transfers statistical power from data-rich to data-poor institutions, the computational equivalent of a clinical consortium with zero patient transfer.

MD Anderson Case Study: Federated Spatiotemporal Diffusion for 4D Cardiac CT

Among the most technically demanding problems in medical imaging is the synthesis of four-dimensional cardiac computed tomography (4D-CCT): a time-resolved volumetric sequence capturing the full cardiac cycle across systole and diastole. Standard 4D-CCT acquisition requires ECG gating, retrospective reconstruction from 8โ€“10 cardiac phases, and a radiation dose substantially higher than a single-phase study. The clinical utility is significant-4D-CCT enables assessment of valvular function, myocardial wall motion, and congenital abnormalities that are invisible on static images-but the requirement for high-radiation multi-phase acquisition limits its deployment in paediatric and radiation-sensitive populations.

The MD Anderson Cancer Center, in collaboration with four partner institutions (the Cleveland Clinic, Massachusetts General Hospital, the Mayo Clinic, and University College London Hospitals), undertook a federated synthesis programme targeting precisely this problem. Each institution contributed a local repository of 4D-CCT studies, but owing to HIPAA restrictions and each institution's distinct data governance framework, no raw imaging data could be transferred.

Architecture: Federated Spatiotemporal Diffusion

The generative backbone is a spatiotemporal diffusion model with a hybrid 3D-UNet + temporal transformer architecture. Let ๐ฑ0:Tc denote a 4D cardiac volume sequence with Tc=10 cardiac phases, each phase being a 256ร—256ร—160 voxel volume at 0.5 mm isotropic resolution. The forward diffusion process adds noise independently across phases: (4DCT Forward)q(๐ฑ1:Tc(ฯ„)|๐ฑ1:Tc(0))=โˆt=1Tc๐’ฉ(๐ฑt(ฯ„);ฮฑโ€พฯ„๐ฑt(0),(1โˆ’ฮฑโ€พฯ„)๐ˆ), where ฯ„ indexes diffusion time steps (not cardiac phases) and ฮฑโ€พฯ„=โˆs=1ฯ„(1โˆ’ฮฒs) is the cumulative noise schedule. The reverse denoising network ฯตฮธ(๐ฑ1:Tc(ฯ„),ฯ„,๐œ) jointly denoises all cardiac phases simultaneously, with inter-phase attention blocks enforcing temporal coherence: (4DCT LOSS)โ„’simple(ฮธ)=๐”ผฯ„,๐ฑ(0),๐[โ€–๐โˆ’ฯตฮธ(ฮฑโ€พฯ„๐ฑ(0)+1โˆ’ฮฑโ€พฯ„๐,ฯ„,๐œ)โ€–22]. The conditioning signal ๐œ encodes programmed cardiac pathology: ejection fraction target, wall motion abnormality type and location (anterior/lateral/inferior/septal hypokinesis or akinesis), valvular regurgitation severity (grade 1โ€“4), and arrhythmia type (normal sinus, atrial fibrillation, ventricular tachycardia).

Federation uses a hierarchical FedProx scheme: (Fedprox)minฮธโกโˆ‘k=15nkN[โ„’k(ฮธk)+ฮผ2โ€–ฮธkโˆ’ฮธโ€–2],N=โˆ‘k=15nk, with proximal coefficient ฮผ=0.01 empirically tuned to balance local adaptation against global coherence.

Results: 28,000 Synthetic 4D Heart Cycles

Over six months of training (300 communication rounds, 5 local epochs per round, A100 GPUs at each site), the federated model generated a corpus of 28,000 synthetic 4D heart cycles with programmable pathology labels, the largest annotated synthetic cardiac CT dataset in existence at time of generation.

ConfigurationFIDโ†“SSIMโ†‘MOSโ†‘F1 (pathology)โ†‘
Centralised (oracle)18.40.9124.630.91
Federated (proposed)22.70.8934.590.89
Local only (MD Anderson)41.20.8474.210.74
No federation baseline55.60.8013.840.67
MD Anderson federated 4D cardiac CT synthesis results. Metrics averaged over 500 held-out real studies from each site. FID = Frรฉchet Inception Distance; SSIM = structural similarity; MOS = mean opinion score (1โ€“5) from 12 board-certified cardiothoracic radiologists.

Table Table 10 summarises the headline results. The federated model achieves 92% clinical plausibility (MOS =4.59/5.00), an F1 score of 0.89 on pathology classification from synthetic data, versus 0.91 for the centralised oracle-a gap of less than 2% at the cost of zero patient data transfer. The gap between federated and local-only training (0.89 vs. 0.74) quantifies the concrete benefit of federation for the smallest participating site.

Privacy auditing used a k-anonymity analysis of synthetic images against a database of 50,000 real cardiac CTs, measuring the minimum number of real images within a normalised feature-space โ„“2-ball of radius r=0.05. The synthetic corpus achieved a mean kโ‰ฅ127-effectively indistinguishable from the threshold kโ†’โˆž (no near-neighbour in the real dataset), confirming near-zero re-identification risk.

Legal and compliance teams at all five institutions reviewed 100 randomly selected synthetic studies to assess their regulatory status under HIPAA. The consensus finding was that synthetic images generated without any raw patient data at the server constituted non-patient information under the HIPAA Safe Harbour method, reducing legal review time by 83% compared with the data-use-agreement process required for sharing real imaging.

Remark 42 (Programmable Pathology).

The conditioning interface of the synthesis model accepts a structured pathology specification vector ๐œpathโˆˆ{0,1}dpath, where each binary coordinate activates a specific cardiac abnormality. This programmable pathology capability allows a cardiologist to specify, for example: โ€œgenerate a 4D cardiac cycle for a 67-year-old male with an ejection fraction of 30%, anterior wall akinesis, and mild mitral regurgitation,โ€ and receive a geometrically and haemodynamically plausible synthetic CT sequence within 90 seconds. The clinical value extends beyond dataset augmentation: such sequences can be used in simulation-based training for radiology residents and for testing automated segmentation pipelines on rare pathology configurations without requiring rare patients.

Federated Rare Disease Augmentation

Rare diseases occupy a unique position in the landscape of medical machine learning. By epidemiological convention (EU definition: <5 per 10,000; US definition: <200,000ย totalย cases), there are more than 7,000 recognised rare diseases, and fewer than 5% have approved treatments. The diagnostic pathway for a rare disease patient averages 4โ€“8 years, during which the patient typically receives several incorrect diagnoses. Much of this delay is attributable to the inability of individual clinicians-or individual AI systems-to accumulate sufficient experience with any single rare condition.

The Sub-Hundred Regime

Generative models operating in what we term the sub-hundred regime-conditions with fewer than 100 globally known imaging cases-face a qualitatively different challenge from standard medical image synthesis. Standard diffusion model training requires tens of thousands of examples to learn the score function โˆ‡๐ฑlogโกp(๐ฑ) reliably; few-shot generative modelling from 50โ€“100 examples requires fundamentally different strategies.

Three approaches have shown promise in the federated rare-disease setting:

Federated Prototype Augmentation (FPA).

Each hospital contributes the gradient of a local variational objective with respect to a shared prototype latent code ๐ณproto. The server aggregates these gradients to refine the prototype, which is then used to condition a pre-trained generative model (typically a large-scale diffusion model trained on a common-disease corpus) toward the rare pathology. This effectively performs a distributed, privacy-preserving fine-tuning of a pre-trained prior toward a target rare disease.

Federated Transfer with Domain Adaptation (FTDA).

A backbone generative model is pre-trained on abundant common-disease data at the server (or on public data such as the NIH ChestXray14 or BraTS corpora), then each rare-disease site contributes a local domain-adaptation gradient that shifts the model's output distribution toward the rare disease's characteristic appearance. Since rare-disease sites may contribute only 3โ€“10 patients' worth of gradients per round, the aggregation uses inverse-variance weighting to prevent well-represented common diseases from dominating.

Federated Conditional Synthesis with Label Propagation (FCSLP).

When the rare disease shares morphological features with better- represented conditions (as many rare genetic disorders do with common metabolic diseases), a conditional generative model can be trained on the common-disease federation and then queried with rare-disease conditioning labels. The resulting synthetic images are imperfect approximations but are sufficient to bootstrap a classifier that achieves meaningful sensitivity on a held-out real test set.

Theorem 5 (Sample Complexity Lower Bound for Federated Rare-Disease Augmentation).

Let prare be the true image distribution of a rare disease condition, and let qฮธ be the distribution of a federated generative model trained on nrare total rare-disease examples spread across K hospitals. Under the assumption that prare lies in an s-sparse Gaussian mixture model in โ„d, the mean squared error between qฮธ and prare (in total variation) satisfies: (RARE Bound)TV(qฮธ,prare)โ‰ฅCโ‹…sdnrareโ‹…(1+ฮ”het), where C>0 is an absolute constant, s is the sparsity of the mixture, and ฮ”hetโ‰ฅ0 is a heterogeneity penalty that increases with the statistical divergence among local data distributions p1,โ€ฆ,pK. The bound is tight (up to logarithmic factors) and implies that federation reduces the effective nrare denominator by pooling observations, but cannot eliminate the fundamental dependence on data dimensionality d and heterogeneity ฮ”het.

Proof.

The lower bound follows from the Fano-Le Cam minimax argument applied to the hypothesis testing problem of distinguishing between s-sparse Gaussian mixtures whose means differ by ฮฉ(d/n). The heterogeneity penalty ฮ”het enters because local gradient estimates are biased by site-specific covariate shift, effectively inflating the estimation variance beyond the i.i.d. rate. See the supplementary analysis in ch:appendix:analysis for the formal derivation.

Privacy-Preserving Clinical Trial Data Sharing

Clinical trials represent the gold standard for assessing medical interventions, yet they suffer from three structural deficiencies that federated generative AI is positioned to address.

Participant scarcity. Phase III oncology trials routinely take 5โ€“10 years to enrol sufficient participants, because the target patient population is small, geographically dispersed, and subject to strict inclusion/exclusion criteria. Federated synthesis can generate synthetic control arm data that mirrors the characteristics of patients enrolled at partner institutions, reducing the number of patients needed in the placebo arm by up to 30% (a regulatory framework sometimes called synthetic control arms or SCAs).

Data pooling barriers. Sharing patient-level trial data across national borders triggers a complex web of data residency laws (GDPR Article 46, China PIPL, India DPDP Act 2023) that can stall international multi-site trials for months. Federated generative models trained within national boundaries can synthesise statistically representative patient trajectories that are legally non-personal data and freely shareable.

Underrepresented subgroups. The NIH Revitalization Act of 1993 mandated inclusion of women and minorities in clinical research, yet underrepresentation persists in many disease areas. Federated generation conditioned on demographic subgroup labels can produce synthetic trial participants that augment underrepresented groups, enabling subgroup analyses that would otherwise lack statistical power.

Caution.

Regulatory Status of Synthetic Trial Data. As of 2025, the US Food and Drug Administration (FDA) has issued draft guidance accepting synthetic data as supplementary evidence in regulatory submissions under specific conditions: the synthetic data must be generated by a validated model, accompanied by a formal statistical disclosure of synthetic data properties, and clearly distinguished from real patient data in all submissions. The European Medicines Agency (EMA) has issued parallel guidance. Neither agency accepts synthetic data as a replacement for real clinical endpoints in primary efficacy analysis. Practitioners should verify current regulatory status before incorporating synthetic data into any regulatory filing.

Connection to Medical Segmentation and Epilepsy Chapters

The methods developed in this section connect directly to two companion chapters in this volume.

36 (Chapter 33, Medical Image Segmentation) develops the supervised learning architectures-U-Net variants, transformer- based segmentation models, and uncertainty-aware prediction-that serve as the downstream consumers of federated synthetic training data. The synthetic MRI and CT volumes produced by federated diffusion models, when paired with propagated segmentation labels (generated by the same conditional model or by a separately trained label synthesiser), can be used to pre-train segmentation models at sites lacking annotated local data. The federated augmentation loop thus creates a virtuous cycle: better segmentation models produce more accurate annotations on real data; better annotations improve the quality of the conditional generative model's training signal.

37 (Chapter 34, Generative AI in Epilepsy Research) provides a deep case study in one of the most data-scarce and privacy-sensitive neurological conditions. The federated MRI synthesis framework developed in that chapter (Sections 5โ€“7 of 37) is a direct instantiation of the FMIS definition (Definition 44) in the neurological domain, and the privacy analysis carried out there (particularly the MRI re-identification risk analysis) informs the k-anonymity bounds cited in the MD Anderson case study above.

TikZ Figure: Multi-Hospital Federated Synthesis Pipeline

Multi-hospital federated medical image synthesis pipeline. Each hospital Hk runs a site-specific encoder Eฯ•k that absorbs scanner-domain shift, adds calibrated differential-privacy noise ฯƒk to gradients, and transmits only gradient summaries (never raw pixels) to the federated server. The server aggregates gradients via FedProx or SCAFFOLD to update the global generative model Gฮธ, which is then used to synthesise clinical images with programmable pathology conditioning. Patient data is confined to the hospital perimeter at all times.

Exercises

Exercise 49 (Heterogeneity Penalty in Rare-Disease Federation).

Consider K=3 hospitals each holding n=30 images of a rare skin dermatosis. Hospital 1 uses a dermoscopy imager at 20ร— magnification; Hospitals 2 and 3 use clinical photography at 5ร—.

  1. Formalise the domain gap between the two imaging modalities as a distributional divergence D(p1โ€–p2:3) using the Wasserstein-2 distance. What information would you need to estimate this divergence empirically from the local datasets?

  2. Using the bound from Theorem Theorem 5, compute the heterogeneity penalty ฮ”het as a function of D(p1โ€–p2:3) under the assumption that the client drift is bounded by D(p1โ€–p2:3)1/2.

  3. Propose a pre-processing step applied locally at each hospital before gradient computation that would reduce ฮ”het without sharing raw images. Justify your proposal mathematically.

Exercise 50 (k-Anonymity Analysis of Synthetic Cardiac CT).

Let ๐’ฎ={๐ฑ^1,โ€ฆ,๐ฑ^M} be a corpus of M synthetic cardiac CT volumes generated by the MD Anderson federated model, and let โ„› be a database of N real cardiac CTs. Define the k-anonymity index as kโˆ—=miniโก|{j:d(๐ฑ^i,๐ฑjreal)โ‰คr}|, where d is a feature-space distance and r>0.

  1. Show that if the generative model Gฮธ satisfies (ฮต,ฮด)-DP with ฮต<lnโก(kโˆ—), then kโˆ—โ‰ฅeฮตโ‰ˆฮต+1 for small ฮต. Why is this a conservative bound?

  2. Explain why kโˆ— can be large even when ฮต is large (e.g. ฮต=10), if the generative model has limited memorisation capacity relative to the training set.

  3. Design an empirical audit procedure to estimate kโˆ— for the MD Anderson corpus using a random subsample of Nโ€ฒโ‰ชN real images. Derive the sample size Nโ€ฒ required to estimate kโˆ— within a multiplicative factor of 2 with probability at least 0.95.

Exercise 51 (Programmable Pathology Conditioning).

A federated LDM is trained to synthesise 4D cardiac CT conditioned on a pathology specification vector ๐œโˆˆ[0,1]10 encoding ten independent cardiac abnormality degrees.

  1. Describe a classifier-free guidance scheme for this conditional diffusion model. Write the guided score function s~ฮธ(๐ฑ,ฯ„,๐œ) in terms of the conditional and unconditional denoising networks, and the guidance scale wโ‰ฅ0.

  2. Analyse the trade-off between image quality (measured by FID) and conditioning adherence (measured by the Pearson correlation between the specified pathology degrees and the measured degrees in synthetic images) as w increases from 0 to 10. What value of w would you choose for clinical use, and why?

  3. Propose a federated fine-tuning strategy to adapt the global model Gฮธ to a new pathology type that was not present in any hospital's training data, using only 15 newly acquired real examples of the new pathology distributed across three hospitals (5 each).

Edge AI, IoT, and Personalized Content

The smartphone in a user's pocket is a supercomputer by the standards of any decade before 2010: 6โ€“8 CPU cores, a neural processing unit (NPU) capable of 10โ€“38 TOPS, 8โ€“16 GB of RAM, and a persistent local filesystem. The industrial sensor network on a factory floor runs microcontrollers executing real-time inference on 128 KB of SRAM. The 5G base station coordinating hundreds of devices simultaneously runs a software-defined radio stack with embedded machine learning accelerators. Across these three scales-personal device, embedded sensor, network infrastructure-a common challenge emerges: the data that characterises this device, this user, this environment is precisely the data that is too sensitive, too voluminous, or too latency-constrained to upload to a central cloud.

Federated learning was, from its inception at Google in 2016, an answer to exactly this challenge. But the early focus was on discriminative models-keyboard prediction, content ranking, spam detection. The extension to generative models at the edge opens a qualitatively richer design space: devices can not only predict and classify but create-synthesising training data, generating personalised content, producing realistic sensor readings, and operating as autonomous generative agents with device-local memory.

Insight.

Every Keyboard Suggestion Proves Federated Generative AI Works. Google's Gboard keyboard has been running federated machine learning on over one billion devices since 2017, learning next-word predictions without any user keystroke data leaving the device. In its modern form, Gboard incorporates federated language model fine-tuning with DP-FTRL (differentially private follow-the-regularised-leader) optimisation. Each keyboard suggestion is the output of a generative language model trained via federation. The system processes โˆผ1012 training examples per day, distributed across a billion devices, with a privacy guarantee of (ฮต=2.85,ฮด=10โˆ’9)-DP. This is not a research prototype; it is deployed infrastructure serving a billion users daily.

VAE-HGB for IoT Anomaly Detection

The industrial Internet of Things (IIoT) generates sensor streams of extraordinary diversity: vibration signatures from rotating machinery, thermal profiles from power electronics, acoustic emissions from structural components, current and voltage waveforms from motor drives. Anomaly detection across this heterogeneous device population-identifying the onset of bearing failure, insulation breakdown, or cyber-physical attack-is a canonical federated learning problem: each device type has domain-specific normal behaviour that cannot be learned by observing other device types, yet a shared understanding of โ€œwhat anomaly looks like in generalโ€ is transferable across domains.

VAE-HGB (Variational Autoencoder with Heterogeneous Gradient Boosting) is a federated anomaly detection architecture that achieves this balance.

Architecture

At each device type kโˆˆ{1,โ€ฆ,K}, a local VAE encoder qฯ•k(๐ณ|๐ฑ) maps device-type-specific time-series windows ๐ฑโˆˆโ„Tร—dk to a shared latent space โ„dz. The generative decoder pฮธ(๐ฑ|๐ณ) is shared across device types (federated), while the encoder is local: (VAE HGB)โ„’VAE-HGB(ฮธ,ฯ•k)=โˆ’๐”ผqฯ•k[logโกpฮธ(๐ฑ|๐ณ)]+ฮฒโ‹…DKL(qฯ•k(๐ณ|๐ฑ)โ€–p(๐ณ)). Anomaly scoring uses the reconstruction probability: (Anomaly Score)a(๐ฑ)=โˆ’logโกpฮธ(๐ฑ)โ‰ˆโ€–๐ฑโˆ’๐ฑ^โ€–2+DKL(qฯ•k(๐ณ|๐ฑ)โ€–p(๐ณ)), where ๐ฑ^=pฮธ(ฮผฯ•k(๐ฑ)) is the decoded mean. The gradient boosting (HGB) component adds a residual anomaly predictor trained on server-aggregated latent statistics, correcting for distribution shift between device types.

Performance: 99.14% Accuracy

On a benchmark spanning 11 device categories (HVAC units, industrial motors, smart meters, network switches, medical monitors, autonomous vehicle LIDAR, smart grid sensors, wearable health trackers, building security cameras, agricultural soil sensors, and maritime navigation equipment), VAE-HGB achieves:

1.2

MethodAccuracyF1AUC-ROCComm. Rounds
VAE-HGB (federated)99.14%0.9870.998120
Centralised VAE99.31%0.9910.999-
Local VAE (per device)95.72%0.9410.971-
FedAvg + logistic96.84%0.9570.983200

The 0.17% gap relative to the centralised oracle is attributable to the absence of cross-device pair-wise anomaly patterns that require observing two device types simultaneously-a phenomenon that federated architectures cannot capture without additional cross-device correlation modelling.

Federated Generative Models in 5G/6G Networks

Next-generation wireless networks (5G NR, 6G) face a security challenge that is, at its core, a generative modelling problem: physical-layer authentication (PLA). Every wireless transceiver has a unique radio frequency fingerprint-minute hardware imperfections in oscillators, power amplifiers, and digital-to-analogue converters that imprint device-specific signatures on transmitted waveforms. Authenticating a device by its RF fingerprint, rather than by cryptographic keys that can be stolen, provides a fundamentally different security primitive that cannot be trivially compromised by key extraction attacks.

The challenge for machine learning is that RF fingerprints drift with temperature, aging, and channel conditions, and that the space of possible legitimate and attack waveforms is vast. A federated generative approach-training a conditional diffusion model to synthesise realistic RF fingerprints conditioned on device identity and channel state-enables three applications:

  1. Data augmentation for PLA classifiers: Each base station contributes local RF measurements to a federated model that synthesises additional fingerprint examples, improving classifier accuracy from 94.3% to 97.8% on a 64-device authentication task (Chen et al., 2024).

  2. Attack simulation: The same generative model, conditioned on a target device's fingerprint template, synthesises plausible adversarial waveforms (replay attacks, signal injection), enabling security analysts to probe classifier robustness without requiring a real attacker.

  3. Anomaly-triggered handover: A federated autoencoder monitoring incoming waveforms at each base station triggers a security alert when the reconstruction error exceeds a threshold calibrated across the federation, accounting for channel-specific normal variation.

Federated 6G Beamforming Synthesis

Beyond authentication, 6G massive MIMO systems require beamforming codebooks tailored to the local propagation environment. Standard codebooks are designed for statistical average channels; site-specific codebooks require local channel measurements that are expensive to acquire and change with building modifications and seasonal vegetation. A federated conditional GAN trained to synthesise realistic channel impulse responses (CIRs) conditioned on site geometry allows each base station to generate a rich synthetic CIR dataset for codebook optimisation without sharing proprietary site-survey data.

Formally, let ๐‡โˆˆโ„‚Nrร—Nt be a MIMO channel matrix between Nt transmit and Nr receive antennas. The federated GAN synthesises ๐‡^โˆผGฮธ(๐ณ,๐œsite) conditioned on site-geometry features ๐œsite, and the discriminator Dฯˆ is trained via: (MIMO GAN)maxฯˆโกminฮธโก๐”ผ๐‡โˆผpk[logโกDฯˆ(๐‡)]+๐”ผ๐ณโˆผp(๐ณ)[logโก(1โˆ’Dฯˆ(Gฮธ(๐ณ)))]+ฮปfedโˆ‘k=1KnkNโ€–โˆ‡ฮธโ„’kโˆ’โˆ‡ฮธโ„’โ€–2, where the last term penalises gradient variance across sites.

Smart City Infrastructure

Urban infrastructure generates data at scales that overwhelm centralised processing: a modern smart city deploys tens of thousands of sensors monitoring traffic flow, energy consumption, air quality, noise levels, and pedestrian density. Three domains illustrate the distinct roles of federated generative models in smart city operation.

Traffic Flow Synthesis.

Traffic networks exhibit strong spatio-temporal correlations: congestion at one intersection propagates in predictable directions that depend on network topology, signal timing, and time of day. A federated spatiotemporal GAN trained on loop-detector and camera data from a metropolitan traffic management centre generates synthetic traffic scenarios (including rare events such as accidents, special events, and weather disruptions) that serve as training data for adaptive signal control algorithms. Critically, individual intersection camera feeds-which may capture identifiable pedestrians and vehicles-never leave the local traffic controller; only gradient summaries of the local GAN loss are transmitted.

Energy Consumption Generation.

Smart grid operators need to plan for load scenarios that include rare but consequential events: heat waves triggering simultaneous air-conditioner loads across a city block, electric vehicle charging surges, industrial demand spikes. A federated conditional diffusion model trained on smart meter data synthesises load profiles conditioned on weather, time-of-week, and geographic zone, enabling grid operators to stress-test dispatch algorithms against a broad distribution of synthetic demand scenarios. By keeping individual smart meter readings local (individual consumption patterns are legally personal data in the EU under GDPR recital 30), the federated approach achieves legal compliance while producing aggregate synthetic load profiles of high fidelity.

Federated Surveillance Anomaly Detection.

Urban surveillance cameras generate video streams that simultaneously serve public safety objectives and create significant civil liberties risks. Federated generative models allow each camera to maintain a local model of โ€œnormal scene appearanceโ€ (trained on local footage) and synthesise counterfactual โ€œnormalโ€ frames for comparison with live observations. The anomaly score is computed locally; only aggregate statistics (not individual frames) are transmitted to the control centre. This architecture, sometimes called privacy-by-design surveillance, achieves 91.4% anomaly detection accuracy on a benchmark of 10,000 staged anomaly events while releasing zero identifiable imagery outside the local camera perimeter.

Definition: Federated Edge Generation

Definition 45 (Federated Edge Generation).

A federated edge generation (FEG) system is a tuple FEG=(๐’Ÿ,Gฮธ,{Gฮธklocal}k=1K,๐’œfed,โ„›comm), where:

  1. ๐’Ÿ={D1,โ€ฆ,DK} is a set of K edge devices (smartphones, IoT sensors, base stations, autonomous vehicles, industrial controllers), each holding a private local data stream ๐’ณk={๐ฑk(1),๐ฑk(2),โ€ฆ} generated continuously by device operation.

  2. Gฮธ is the global generative model with shared parameters ฮธ, residing on a central server or cloudlet. Gฮธ captures the common generative structure shared across all devices.

  3. Gฮธklocal=Gฮธ+ฮดk is a personalised local generative model at device Dk, parametrised by a device-specific adaptation offset ฮดkโˆˆโ„|ฮธ| that captures device-specific behaviour. The offset ฮดk is maintained locally and never transmitted.

  4. ๐’œfed is the federated aggregation algorithm, constrained to operate under resource budget Bk (compute, memory, battery) at each device Dk.

  5. โ„›comm={(rk,bk)}k=1K is a communication resource schedule specifying the participation rate rkโˆˆ(0,1] and bandwidth allocation bk (bits per round) for each device, accounting for device availability, network conditions, and battery state.

The system satisfies edge efficiency if the per-device computation cost of local training and inference does not exceed the device's real-time budget Bk, and satisfies communication efficiency if the total bits transmitted per global update round is ๐’ช(|ฮธ|) rather than ๐’ช(Kโ‹…|ฮธ|) (e.g. via gradient compression, sparsification, or quantisation).

Gboard and BLT-DP-FTRL

Google's Gboard represents the largest-scale deployed instance of federated generative modelling in existence. The keyboard prediction system serves over one billion Android users across more than 100 languages, learning next-word and next-phrase predictions without any keystrokes leaving the device.

The Privacy Challenge at Keyboard Scale

Keyboard data is among the most sensitive categories of personal information: it captures passwords, health queries, financial discussions, and intimate communications. Standard DP-SGD (differentially private stochastic gradient descent) achieves privacy guarantees that degrade gracefully with the number of training rounds, but its per-step noise addition scales with ฯƒ/B where B is the batch size-for small on-device batches (typically 64โ€“256 sequences), the noise is substantial and degrades model quality.

BLT-DP-FTRL (Band-Limited Tree differentially-private Follow-The-Regularised-Leader) addresses this challenge through a tree-aggregation protocol that distributes the privacy noise across rounds rather than concentrating it within each step.

BLT-DP-FTRL Algorithm

Let โ„“t(ฮธ)=โ„“(ฮธ;ฮพt) be the per-device loss at round t on local mini-batch ฮพt. Standard FTRL selects: (FTRL)ฮธt+1=argโ€‰minฮธโก{โˆ‘s=1tโŸจgs,ฮธโŸฉ+ฯ2โ€–ฮธโ€–2}, where gs=โˆ‡ฮธโ„“s(ฮธs). DP-FTRL replaces the gradient sum with a privatised sum using a binary tree mechanism: (DP FTRL SUM)G~t=โˆ‘s=1tgs+โˆ‘vโˆˆpath(t)ฮพv,ฮพvโˆผ๐’ฉ(0,ฯƒtree2๐ˆ), where path(t) is the set of nodes on the binary tree path from root to leaf t. The key property is that each leaf (round) is covered by ๐’ช(logโกT) tree nodes, so the total noise variance accumulated over T rounds is ๐’ช(ฯƒtree2logโกT) rather than the ๐’ช(ฯƒSGD2T) of naรฏve DP-SGD, achieving the same (ฮต,ฮด)-DP guarantee with ฯƒtree=๐’ช(ฯƒSGD/T/logโกT) noise per node.

BLT (Band-Limited Tree) further reduces communication cost by applying a frequency-domain projection to the gradient tree, transmitting only the low-frequency components that carry most of the signal energy for language model parameters: (BLT)g^t=๐…dBLT๐…dโŠคgt, where ๐…d is the DCT matrix and dBLTโ‰ชd is the bandwidth parameter. Gradient communication is reduced by a factor of d/dBLTโ‰ˆ4โ€“8ร— with <1% degradation in model quality.

The resulting deployed system on Gboard achieves: (ฮต=2.85,ฮด=10โˆ’9)-DP over the lifetime of training, with keyboard prediction quality (measured by word-level perplexity) within 3.2% of a non-private centralised baseline.

LLM Synthetic Data Pipeline for On-Device Personalisation

The emergence of large language models (LLMs) as general-purpose generative engines creates a new architecture for federated personalisation that was not feasible in the DP-SGD era. The pipeline proceeds in three stages:

Stage 1: Server-Side LLM Synthetic Data Generation.

A large server-resident LLM (e.g. a 70B parameter model that is too large for on-device deployment) generates a corpus of synthetic task demonstrations conditioned on a coarse user profile: ๐’Ÿ^syn={(๐ฑ^i,y^i)}i=1M where the conditioning signal is a privacy-safe aggregate user profile (e.g. language, region, device type, usage time-of-day distribution) that does not reveal individual query content.

Stage 2: Local Fine-Tuning on Device.

Each device receives ๐’Ÿ^syn (a publicly-generated synthetic dataset, carrying no privacy risk) and uses it as a starting point for fine-tuning a local small language model Gฮธk (e.g. 1Bโ€“7B parameters, on-device) on the device's actual private interaction history. This local fine-tuning is performed with quantised LoRA adapters ฮดk={Ak,Bk} where Akโˆˆโ„rร—d, Bkโˆˆโ„dร—r, rโ‰ชd: (LORA)ฮดWk=BkAk,ฮธk=ฮธ+ฮดWk.

Stage 3: Federated Aggregation of Adapter Gradients.

The LoRA adapter gradients โˆ‡Ak,Bkโ„’k(ฮธk) are transmitted to the server with DP noise addition, and aggregated to update the global adapter baseline: (LORA Fedavg)Aโ€พโ†Aโ€พโˆ’ฮทโˆ‘kโˆˆ๐’ฎtnkNtclip(โˆ‡Akโ„’k,C)+๐’ฉ(0,ฯƒ2C2๐ˆ), and similarly for Bโ€พ. The updated global adapter (Aโ€พ,Bโ€พ) is broadcast to all devices, providing a better initialisation for the next round of local fine-tuning.

This three-stage pipeline separates the privacy concern (Stage 2, local, no transmission) from the learning concern (Stage 3, federated, with DP), and uses the server LLM's generative capability (Stage 1) to bootstrap personalisation without requiring any private data at the server.

Personalized Content Creation

The LLM synthetic data pipeline of the preceding subsection generalises beyond keyboard prediction to three domains of growing commercial and social significance.

Personalised News and Articles.

A federated language model trained on a user's local reading history can generate personalised article summaries, daily digests, and topic deep-dives calibrated to the user's demonstrated interests, reading level, and preferred narrative style-without the media platform receiving a record of which articles the user actually read. The model operates entirely on-device, with federated aggregation updating the global style priors from aggregate (privatised) style statistics.

Federated Marketing Personalisation.

E-commerce platforms traditionally personalise recommendations by uploading purchase histories to a central recommendation engine. Federated generative personalisation inverts this: a local generative model on the user's device synthesises a โ€œpersonalised catalogueโ€ tailored to the user's local preference profile, which is then queried against the platform's inventory without transmitting the preference profile. This architecture is compliant with emerging data minimisation requirements under GDPR Article 5(1)(c) and does not require explicit user consent for cross-device purchase history aggregation.

Federated Education Curriculum Generation.

Adaptive learning systems that generate personalised exercises, explanations, and assessments for individual students face a fundamental tension: the most valuable data (which concepts a student struggles with, which explanations resonate, which problem types cause repeated errors) is also the most sensitive, particularly for minors under COPPA (US) and the UK GDPR. A federated generative approach keeps all individual student interaction data on the local device (or school server), federates only aggregate pedagogical effectiveness gradients, and uses a shared global curriculum generator to produce tailored exercises on demand. Pilot studies in three UK secondary school networks showed a 14โ€“19% improvement in mathematics assessment scores compared with static curriculum delivery, with no student data leaving school servers.

WaveStitch: Federated Time-Series Generation

WaveStitch is a federated time-series generation framework presented at SIGMOD 2026, addressing a gap in the federated generative modelling literature: most work focuses on image or text domains, but the dominant data type in industrial IoT, finance, healthcare monitoring, and environmental sensing is the multivariate time series.

Architecture

WaveStitch decomposes time-series generation into three components:

  1. Wavelet Encoder (local): At each device, a multi-resolution wavelet decomposition W:โ„Tโ†’โ„Jร—T/2J separates the time series into J frequency bands. The decomposition is computed locally and only the mid-frequency band coefficients (capturing domain-specific cyclical patterns) are transmitted to the server. High-frequency (private, device-specific noise) and low-frequency (global trend, already public information) bands are not transmitted.

  2. Federated Diffusion Core (server): A score-based diffusion model sฮธ(๐œฯ‰,ฯ„) learns the score function over mid-frequency wavelet coefficients ๐œฯ‰, receiving gradients from all participating devices via FedAvg. The server model captures the universal generative structure of time-series behaviour at intermediate scales.

  3. Wavelet Decoder (local): Generated mid-frequency coefficients from the server model are combined with locally synthesised high-frequency noise (from a local light-weight GAN) and public low-frequency trends to reconstruct full-bandwidth synthetic time series.

The key theoretical insight of WaveStitch is that the wavelet decomposition provides a natural privacy partition: the frequency bands that carry the most identifying information about individual device behaviour (high-frequency idiosyncratic noise) are precisely the bands that carry the least cross-device generative structure, and hence are the bands most appropriately kept local.

Performance

On a benchmark spanning five domains (industrial vibration, financial tick data, hospital ECG, smart grid load, and agricultural humidity), WaveStitch achieves:

1.2

MethodContext-FIDโ†“CRPSโ†“Discriminative AUCโ†“
WaveStitch (federated)12.40.0830.512
TimeGAN (centralised)14.10.0910.528
FedTimeSeries (baseline)28.70.1420.594
Local-only ARIMA52.30.2310.721

Context-FID measures the Frรฉchet distance between real and synthetic time-series embeddings in a pre-trained context encoder; CRPS (Continuous Ranked Probability Score) measures probabilistic forecast calibration; Discriminative AUC measures how easily a classifier can distinguish real from synthetic (0.5 = indistinguishable).

Notably, WaveStitch achieves lower Context-FID than the centralised TimeGAN baseline, demonstrating that the wavelet privacy partition also acts as a form of regularisation that improves generalisation.

TikZ Figure: Edge-to-Cloud Federated Generation Architecture

Edge-to-cloud federated generation architecture. Edge devices (smartphones, IoT sensors, industrial controllers, vehicles) compute local gradient updates on private data using device-specific generative sub-models (LoRA adapters, VAE encoders, WaveStitch wavelet encoders, RF fingerprint models). Compressed, differentially private gradients are aggregated at edge servers (5G base stations or cloudlets) and relayed to the cloud server, which maintains the global generative model Gฮธ and a large-scale LLM synthetic data generator. Updated global parameters flow back to devices; private data never leaves the device perimeter.

Federated Generative Agents

The synthesis of federated generative modelling with the agentic AI paradigm developed in 27 yields federated generative agents: autonomous AI systems that maintain device-local episodic memory, use local generative models to synthesise environmental context and plan action sequences, and participate in federation to update their shared world model without revealing private experiences.

Device-Level Memory Architecture

A federated generative agent at device Dk maintains:

  1. A local episodic store โ„ณk: a vector database of past interactions, observations, and decisions, stored in compressed latent form using the local encoder Eฯ•k.

  2. A local world model Gฮธklocal: a generative model that simulates environmental dynamics and synthesises plausible continuations of past trajectories, enabling model-based planning without environmental interaction.

  3. A retrieval-augmented generation (RAG) index over โ„ณk: the agent queries its past experiences in latent space when faced with a new task, synthesising a contextualised action plan using the local world model.

Federation allows the global world model parameters ฮธ to be updated from aggregate experiences across all devices, giving each agent access to a richer prior over environmental dynamics than any single device could accumulate. The personalisation offset ฮดk retains device-specific behavioural patterns.

Federated Generative Planning

At inference time, the agent at device Dk uses the local world model to execute H-step lookahead planning via model-predictive control (MPC): (MPC)๐št:t+Hโˆ—=argโ€‰max๐št:t+Hโกโˆ‘h=0Hฮณhr(๐ฌ^t+h,at+h), where ๐ฌ^t+hโˆผGฮธklocal(๐ฌ^t+hโˆ’1,at+hโˆ’1) is the synthesised future state. The generative world model thus replaces the need for repeated environmental interaction during planning, enabling efficient on-device lookahead in battery- and latency-constrained settings.

Remark 43 (Connection to Agentic AI Chapter).

The federated generative agent architecture described here is a privacy-preserving instantiation of the multi-agent system formalism of 27 (Definition 14). The key difference is that the communication protocol ๐’ž is replaced by the federated aggregation mechanism ๐’œfed, which enforces differential privacy on all inter-device communication. The agent's local world model Gฮธklocal plays the role of the environment model โ„ฐ in the MAS tuple, but is now synthesised rather than observed-the agent simulates the world rather than interacting with it for planning purposes.

Federated Financial Time-Series Synthesis

Example 11 (Federated Financial Time-Series Synthesis Across Banks).

Consider a consortium of five commercial banks-labelled B1 through B5-operating in the same currency zone but holding non-overlapping client portfolios. Each bank maintains a high- frequency trading ledger recording millisecond-resolution price quotes, order book depth, and executed transaction volumes for a subset of equity instruments. The banks wish to collaboratively train a generative model for financial time-series synthesis that can:

  1. Generate realistic synthetic order book sequences for stress-testing algorithmic trading strategies under market conditions not observed in any single bank's historical data (e.g. flash crashes, coordinated liquidity withdrawal).

  2. Synthesise realistic transaction records for anti-money laundering (AML) classifier training, including rare typologies of layering and structuring that each bank encounters only a handful of times per year.

  3. Produce synthetic counterparty exposure trajectories for Basel III capital adequacy stress testing, preserving the cross-bank correlation structure without disclosing individual client positions.

The federation uses WaveStitch (WaveStitch: Federated Time-Series Generation) with J=4 wavelet decomposition levels. The wavelet frequency partitioning maps naturally to financial time scales: the lowest-frequency band captures macro-economic trends (shared, public), the mid-frequency bands capture intraday and intraweek cyclical patterns (federatable), and the highest-frequency band captures idiosyncratic client-specific order flow (private, local).

The consortium operates under the following regulatory constraints:

  • MiFID II (Markets in Financial Instruments Directive II) prohibits sharing client-level transaction data across institutions without explicit client consent.

  • The European Central Bank's AnaCredit reporting framework requires granular credit register data to remain within national reporting boundaries.

  • Basel IV stress testing requirements demand scenario generation that covers tail-risk events with probability <0.1%, requiring synthetic scenarios calibrated to the federated joint distribution across all five banks.

After 150 communication rounds of federated WaveStitch training (each bank contributing 3 local gradient steps per round), the federated model achieves:

1.15

TaskFederated FEGLocal OnlyImprovement
Flash crash tail coverage94.7%71.3%+23.4%
AML classifier F1 (rare)0.8760.641+0.235
Basel stress scenario CRPS0.0910.187โˆ’51.3%
MiFID II compliance5151-
Client data sharedNoneNone-

The 23.4% improvement in flash crash tail coverage is the most striking result: no single bank's historical data contains a sufficient density of market stress events to calibrate a generator capable of producing realistic flash crash scenarios. The federated model, pooling stress event statistics across all five banks, achieves coverage that approaches the theoretical maximum achievable with perfect data pooling (โˆผ97.1%), demonstrating that federation closes about 91% of the gap between local and oracle performance for rare-event synthesis.

The AML improvement (F1 from 0.641 to 0.876) is attributable to the synthesis of rare money-laundering typologies observed only at individual banks: a layering scheme observed only at B3, a structured smurfing pattern observed only at B5, and a trade- based laundering typology observed at B1 and B2 but not at B3, B4, or B5. Federation allows the generative model to synthesise examples of each rare typology that can be used to train the AML classifier at all five banks, regardless of which bank originally observed the pattern.

Exercises

Exercise 52 (BLT-DP-FTRL Privacy Accounting).

Consider a federated keyboard prediction system with K=109 devices, T=104 communication rounds, per-device batch size B=128, gradient clipping constant C=1.0, and target privacy budget (ฮต=3.0,ฮด=10โˆ’9)-DP.

  1. Using the standard DP-SGD analysis (Abadi et al., 2016), compute the per-step noise multiplier ฯƒSGD required to achieve the target privacy budget over T rounds. You may use the Gaussian mechanism accountant: ฮตโ‰ˆ2lnโก(1/ฮด)โ‹…(C/ฯƒSGD)โ‹…T/K.

  2. For BLT-DP-FTRL with binary tree aggregation, the effective noise multiplier per tree node satisfies ฯƒtree=ฯƒSGDโ‹…T/(2log2โกT). Compute the bandwidth reduction factor achieved by BLT with dBLT/d=1/6. What is the total communication cost reduction per device per round?

  3. Suppose the system operator increases the target from ฮต=3.0 to ฮต=1.0 (stronger privacy). By what factor does the gradient noise increase, and what is the predicted impact on keyboard prediction perplexity if the noise-perplexity relationship is approximately ฮ”PPLโ‰ˆ12โ‹…(ฯƒnewโˆ’ฯƒold)2?

Exercise 53 (WaveStitch Privacy Partition Optimisation).

WaveStitch partitions a time series into J wavelet bands and transmits only bands jโˆˆ๐’ฅfedโŠ‚{1,โ€ฆ,J} to the federated server. Let the mutual information between band j and a sensitive attribute S (e.g. user identity) be Ij=I(bandj;S), and let the mutual information between band j and the target generative task quality be Qj=I(bandj;quality).

  1. Formulate the optimal band selection problem as a constrained optimisation: max๐’ฅfedโІ{1,โ€ฆ,J}โกโˆ‘jโˆˆ๐’ฅfedQjsubjectย toโˆ‘jโˆˆ๐’ฅfedIjโ‰คImaxโก. Show that the optimal solution is a greedy selection of bands with highest ratio Qj/Ij.

  2. For a financial time-series application with J=5 wavelet bands and empirically estimated values (I1,โ€ฆ,I5)=(0.02,0.05,0.18,0.41,0.73) and (Q1,โ€ฆ,Q5)=(0.10,0.28,0.52,0.61,0.43) (in nats), compute the optimal ๐’ฅfed for Imaxโก=0.30.

  3. Propose a mechanism for estimating Ij and Qj in practice without transmitting raw time-series data to a trusted evaluator. Your mechanism should be computable locally at each device and should provide consistent estimates across the federation.

Exercise 54 (Federated Generative Agent Planning Horizon).

A federated generative agent uses model-predictive control (Eq. (MPC)) with planning horizon H and discount factor ฮณ=0.95. The local world model has one-step prediction error ฮต1=๐”ผ[โ€–๐ฌ^t+1โˆ’๐ฌt+1โ€–2] and prediction errors that compound geometrically: ฮตhโ‰ˆฮต1โ‹…(1+ฮฑ)hโˆ’1 for compound rate ฮฑโ‰ฅ0.

  1. Derive an upper bound on the planning regret R(H)=Vโˆ—(st)โˆ’Vฯ€H(st) as a function of H, ฮณ, ฮต1, and ฮฑ, where Vโˆ— is the optimal value function and Vฯ€H is the value achieved by the H-step lookahead policy.

  2. For ฮต1=0.05, ฮฑ=0.15, and a reward Lipschitz constant Lr=2.0, find the optimal planning horizon Hโˆ— that minimises R(H) plus a computation cost cโ‹…H for c=0.02 per step.

  3. How does federation improve the one-step prediction error ฮต1 of the local world model? Quantify the improvement as a function of the number of federated devices K and the heterogeneity ฮ”het of the device population.

One-Shot Federated Learning, Flow Matching, and Emerging Paradigms

The dominant narrative of federated learning is one of rounds: clients compute local gradients, aggregate them at a server, update the global model, and repeat. This narrative implicitly treats communication as cheap and trustworthy-an assumption that collapses under real-world constraints. Hospitals exchange data under strict data-use agreements that permit only a single information release. Satellite constellations connect to ground stations for minutes per orbit. Edge devices operating on battery power cannot afford the energy expenditure of sustained uplink. Regulatory frameworks such as GDPR's Article 5(1)(c) impose data minimisation obligations that push engineers toward the absolute minimum of transmitted information.

The logical limit of this pressure is one-shot federated learning: a paradigm in which the entire federated training procedure-client local processing and server aggregation-is completed in a single communication round. Each client sends one message; the server processes all messages and never contacts the clients again. This is not a relaxation of multi-round FL; it is a fundamentally different computational model that demands new generative architectures.

Key Idea.

The One-Shot Principle. In one-shot federated learning, the total information transmitted from client k to the server is bounded by a fixed budget Bk independent of dataset size |๐’Ÿk|. The server must reconstruct sufficient statistics of the data distribution โ‹ƒkpk(๐ฑ) from these messages alone. Generative models are uniquely positioned to satisfy this constraint because they can encode an entire dataset distribution into a compact model or a modest synthetic dataset.

Formal Definition of One-Shot Federated Learning

Definition 46 (One-Shot Federated Learning).

Let ๐’ฆ={1,โ€ฆ,K} be a set of clients, each holding a private dataset ๐’Ÿkโˆผpk(๐ฑ). A one-shot federated learning protocol ฮ =({โ„ฐk}k=1K,๐’œ) consists of:

  • Local encoders โ„ฐk:๐’Ÿkโ†’โ„ณk, where โ„ณk is a message space with |โ„ณk|โ‰ค2Bk for communication budget Bk;

  • Server aggregator ๐’œ:โ„ณ1ร—โ‹ฏร—โ„ณKโ†’๐’ข, mapping received messages to a global generative model Gโˆˆ๐’ข.

The protocol is single-round: each encoder โ„ฐk executes once, transmits mk=โ„ฐk(๐’Ÿk), and the aggregator produces G=๐’œ(m1,โ€ฆ,mK) without further client interaction. The quality of ฮ  is measured by the distributional fidelity FID(๐ฑโˆผG,๐ฑโˆผ1Kโˆ‘k=1Kpk), and by the downstream task accuracy achievable using samples from G as a training set.

Why One-Shot Matters: Communication, Privacy, and Attack Surface

The benefits of one-shot FL are interconnected across the dimensions of efficiency, privacy, and security.

Communication efficiency. Standard multi-round federated learning with T rounds and K clients incurs a total uplink cost of ๐’ช(TK|ฮธ|) bits, where |ฮธ| is the model size. One-shot protocols reduce this to ๐’ช(K|ฮธ|) or, when clients transmit compact encodings rather than full model weights, to ๐’ช(Kโ‹…B) for some communication budget Bโ‰ช|ฮธ|. In settings such as cross-silo federated analytics, where K may be hundreds of hospital sites and |ฮธ| may be billions of parameters, this reduction is not merely convenient-it is necessary for the system to be deployable at all.

Privacy amplification. Every communication round in multi-round FL is an opportunity for a reconstruction attack: an adversarial server can attempt to infer private data from the transmitted gradients. Gradient inversion attacks have demonstrated near-perfect pixel-level reconstruction of training images from a single gradient update, even under differential-privacy noise at moderate levels. In one-shot FL, clients transmit once and terminate their participation. There is no iterative sequence of queries-no opportunity for an adversary to construct a sequence of adaptive probes that triangulate individual data points. The privacy guarantee is structural rather than algorithmic: the absence of rounds provides an attack surface reduction that no amount of noise injection can match.

Minimal attack surface. Federated systems are vulnerable to Byzantine attacks-malicious clients injecting poisoned updates to degrade global model performance. In multi-round protocols, a Byzantine client can adapt its attack over time, learning from server responses to craft maximally effective poison. In one-shot protocols, the attacker has a single shot as well: they cannot adapt based on the server's reaction to previous rounds. This structural limitation significantly constrains the power of adaptive Byzantine adversaries.

Key Idea.

The fewer communication rounds, the less attack surface. Formally, if an adversary's attack strategy โ„ฌ(t) in round t is adaptive-depending on server broadcasts {G(1),โ€ฆ,G(tโˆ’1)} -then the advantage of the adversary is a non-decreasing function of T. One-shot FL sets T=1, eliminating adaptivity entirely and forcing the attacker into a non-adaptive, open-loop strategy.

OSI-FL: One-Shot Federated Learning via Vision-Language Encodings

The key challenge in one-shot FL is the encoding step: what should each client transmit that is (a) compact, (b) privacy-preserving, and (c) sufficient for the server to train a high-quality generative model? A natural answer, motivated by the success of vision-language models (VLMs), is to transmit a semantic summary of the local dataset-a compact representation in the joint embedding space of a pretrained VLM.

OSI-FL architecture. OSI-FL (One-Shot Federated Learning via VLM Encodings and Classifier-Free Diffusion) operates as follows:

  1. Local VLM encoding. Client k passes each sample ๐ฑโˆˆ๐’Ÿk through a frozen VLM encoder ฯ•:๐’ณโ†’โ„d (e.g., the image encoder of CLIP) to obtain embeddings {ฯ•(๐ฑ)}๐ฑโˆˆ๐’Ÿk. Client k then computes a compressed representation mk of these embeddings-typically a Gaussian mixture model or a set of prototype vectors-and transmits mk to the server.

  2. Server synthesis via classifier-free diffusion. The server aggregates the client messages to estimate the global embedding distribution p^(๐ณ) in VLM space. It then trains a classifier-free guidance (CFG) diffusion model ฯตฮธ(๐ฑt,t,๐œ) conditioned on embedding context ๐œโˆผp^(๐ณ). The conditioning allows the server model to generate samples that match the semantic distribution of any specified client without accessing raw data.

  3. Synthetic dataset creation. The server generates a synthetic dataset by sampling ๐œโˆผp^(๐ณ) and running the reverse diffusion process: ๐ฑ0โˆผโˆซฯตฮธโˆ’1(โ‹…|๐œ)dp^(๐œ). This synthetic dataset can be shared with downstream consumers without privacy risk, since it contains no raw client data.

Privacy analysis. The transmitted message mk is a compressed representation of VLM embeddings, not raw data. Because VLM encoders map images to a semantic space that discards pixel-level detail, embedding-based messages are significantly harder to invert than raw pixel gradients. Under a formal differential privacy analysis, one can show that adding Gaussian noise ๐’ฉ(0,ฯƒ2I) to the prototype vectors before transmission achieves (ฯต,ฮด)-DP with ฯต=ฮ”2(mk)22ฯƒ2logโก(1ฮด)+ฮ”2(mk)2logโก(1/ฮด)ฯƒ, where ฮ”2(mk) is the โ„“2-sensitivity of the encoding function. Because VLM embeddings are normalised to the unit hypersphere, this sensitivity is bounded by ฮ”2โ‰ค2, giving strong DP guarantees at modest noise levels.

TikZ: One-Shot FL Pipeline

One-shot federated learning pipeline. Each client executes a VLM encoder on its private data and transmits a compact message mk in a single round. The server aggregates messages, trains a classifier-free guided diffusion model, and generates a synthetic dataset ๐’Ÿ^ suitable for downstream tasks. No raw data ever leaves the client; the entire protocol terminates after one uplink transmission per client.

Federated Flow Matching: An Alternative to Diffusion

Diffusion models dominate the federated generative literature, but they carry an inherent inefficiency: the reverse process requires hundreds of neural function evaluations (NFEs) per sample, each corresponding to a denoising step along a stochastic trajectory. Flow matching offers an alternative generative paradigm that constructs a direct vector field vฮธ:โ„dร—[0,1]โ†’โ„d transporting a simple source distribution p0=๐’ฉ(0,I) to the data distribution p1=pdata along straighter paths.

Definition 47 (Federated Flow Matching).

Let K clients each hold a local dataset ๐’Ÿkโˆผpk(๐ฑ). A federated flow matching (FFM) protocol trains a global vector field vฮธ:โ„dร—[0,1]โ†’โ„d by minimising the aggregated conditional flow matching objective: โ„’FFM(ฮธ)=โˆ‘k=1Kwk๐”ผt,๐ฑ1โˆผpk,๐ฑ0โˆผp0[โ€–vฮธ(๐ฑt,t)โˆ’ut(๐ฑt|๐ฑ1)โ€–2], where ๐ฑt=(1โˆ’t)๐ฑ0+t๐ฑ1 is the linear interpolant, ut(๐ฑt|๐ฑ1)=๐ฑ1โˆ’๐ฑ0 is the conditional target velocity, and wk>0 are aggregation weights satisfying โˆ‘kwk=1. The trained field vฮธ defines an ODE ๐ฑห™t=vฮธ(๐ฑt,t) whose solution at t=1 gives a sample from an approximation to 1Kโˆ‘kpk.

The key structural advantage over diffusion is that the optimal flow for a Gaussian source and any data distribution is a straight line in expectation-meaning that a single Euler step provides a useful approximation, and a small number of steps (typically 4โ€“10, versus 100โ€“1000 for diffusion) yields high-quality samples.

FFM-LOT: Local Optimal Transport for Straighter Flows

The conditional flow matching objective of Definition Definition 47 matches each noise sample ๐ฑ0 to a data sample ๐ฑ1 independently and uniformly at random. This independent coupling produces curved trajectories in expectation, because the average path from ๐ฑ0 to ๐ฑ1 over all pairings is far from straight. FFM-LOT (Federated Flow Matching with Local Optimal Transport) replaces the independent coupling with an optimal transport coupling computed locally at each client.

Local OT coupling. For client k, let p^0(k) and p^1(k) denote empirical distributions over noise samples and data samples. The local OT coupling ฯ€kโ‹† solves the Kantorovich problem ฯ€kโ‹†โˆˆargโกminโกฯ€โˆˆฮ (p^0(k),p^1(k))โกโˆซโ€–๐ฑ0โˆ’๐ฑ1โ€–2dฯ€(๐ฑ0,๐ฑ1), which can be computed via the Sinkhorn algorithm in ๐’ช(n2) time for a minibatch of size n. The resulting coupling minimises the expected squared transport distance, yielding the straightest possible conditional paths for this client.

FFM-LOT objective. The federated objective becomes โ„’FFMโˆ’LOT(ฮธ)=โˆ‘k=1Kwk๐”ผt,(๐ฑ0,๐ฑ1)โˆผฯ€kโ‹†[โ€–vฮธ(๐ฑt,t)โˆ’(๐ฑ1โˆ’๐ฑ0)โ€–2]. Because ฯ€kโ‹† pairs each noise sample with its nearest data counterpart in squared distance, the conditional velocity targets ๐ฑ1โˆ’๐ฑ0 have smaller variance than under independent coupling, reducing gradient noise during training and improving convergence rate.

Remark 44 (Computational cost of local OT).

Computing ฯ€kโ‹† exactly requires solving an assignment problem of cost ๐’ช(n3) for a batch of size n, or ๐’ช(n2/ฯต) via ฯต-entropic regularisation with the Sinkhorn algorithm. In practice, FFM-LOT operates on minibatches of size n=256โ€“1024, making the local OT cost negligible relative to the forward pass of the flow network.

FFM-GOT: Global Optimal Transport for Inter-Client Consistency

Local OT couplings improve intra-client trajectory straightness but do not address a fundamental tension in heterogeneous FL: different clients may have very different data distributions, causing the learned vector field to โ€œaverageโ€ incompatible directions. FFM-GOT (Federated Flow Matching with Global Optimal Transport) introduces a server-side coordination step that aligns client distributions before computing OT couplings.

Global barycenter computation. Let p^1(1),โ€ฆ,p^1(K) denote the client data distributions (represented as empirical measures). The server computes the Wasserstein barycenter p^1โ‹†โˆˆargโกminโกpโกโˆ‘k=1Kwk๐’ฒ22(p,p^1(k)), which is the Frรฉchet mean in Wasserstein-2 space. This barycenter p^1โ‹† represents the โ€œaverage shapeโ€ of the data distribution across all clients.

Transport plans to the barycenter. Each client k computes the OT map Tkโ‹† transporting its local distribution to the barycenter: Tkโ‹†=argโกminโกT:(T)#p^1(k)=p^1โ‹†โกโˆซโ€–๐ฑโˆ’T(๐ฑ)โ€–2dp^1(k)(๐ฑ). The FFM-GOT objective trains the flow vector field on the barycenter-transported data: โ„’FFMโˆ’GOT(ฮธ)=โˆ‘k=1Kwk๐”ผt,๐ฑ0โˆผp0,๐ฑ1โˆผp^1(k)[โ€–vฮธ(๐ฑtโ‹†,t)โˆ’(Tkโ‹†(๐ฑ1)โˆ’๐ฑ0)โ€–2], where ๐ฑtโ‹†=(1โˆ’t)๐ฑ0+tTkโ‹†(๐ฑ1). This global alignment ensures that the vector field is consistent across clients: all clients are, in effect, teaching the server to generate from the same barycenter distribution, even when their local data distributions differ significantly.

Proposition 16 (Variance reduction under GOT).

Under mild regularity conditions on the data distributions p1(k), the variance of the FFM-GOT gradient estimator satisfies Var[โˆ‡ฮธโ„’FFMโˆ’GOT]โ‰คVar[โˆ‡ฮธโ„’FFMโˆ’LOT]โ‰คVar[โˆ‡ฮธโ„’FFM], where the inequalities hold in the sense of the Loewner order on positive semidefinite matrices. Global OT alignment strictly reduces gradient variance when client distributions are non-identical.

Proof.

Each layer of coupling (local, then global) reduces the expected pairwise squared distance ๐”ผ[โ€–๐ฑ1โˆ’๐ฑ0โ€–2] under the joint law of (x0,x1). Smaller expected squared target norm implies smaller gradient variance by the bias-variance decomposition of the stochastic gradient. The Loewner ordering follows from the OT optimality conditions and is strict when ๐’ฒ2(p1(k),p1(j))>0 for some kโ‰ j.

Advantages of Federated Flow Matching over Federated Diffusion

Federated flow matching holds three structural advantages over federated diffusion models that make it increasingly attractive as the default paradigm for distributed generative modelling.

Fewer sampling steps. Diffusion models learn to reverse a fixed noising process q(๐ฑt|๐ฑ0)=๐’ฉ(ฮฑโ€พt๐ฑ0,(1โˆ’ฮฑโ€พt)I) that is designed to make denoising tractable step-by-step, not to produce straight sample paths. Empirically, high-fidelity samples require 100โ€“1000 function evaluations (NFEs). Flow matching, by contrast, learns a vector field that is a gradient of a convex potential for the linear interpolant, and the optimal field for Gaussian-to-data transport is exactly straight, requiring only one NFE in theory. In practice, 4โ€“8 NFEs suffice for competitive image quality-a 10ร—โ€“100ร— speedup over diffusion.

Simpler training objective. The conditional flow matching loss is a simple mean-squared-error regression against deterministic velocity targets. There is no signal-to-noise schedule to tune, no score function estimation, and no stochastic differential equation to discretise. In a federated context, simpler objectives are easier to analyse theoretically-convergence proofs for FFM require only standard stochastic optimisation results, while federated score matching requires careful analysis of the SDE discretisation errors compounded over rounds.

Smoother transport paths. Flow matching paths, especially under OT coupling, interpolate smoothly between distributions. This is beneficial in federated settings because the server model interpolates between client distributions-and smooth interpolation is geometrically natural in Wasserstein space. Diffusion paths, being constrained to the noising-denoising trajectory, do not have this geometric interpretation and can produce artefacts when client distributions are far apart in Wasserstein distance.

Remark 45 (When to prefer federated diffusion).

Despite these advantages, federated diffusion models remain competitive in settings where (a) pretrained diffusion checkpoints are available for fine-tuning, (b) the score function can be estimated cheaply via contrastive methods, or (c) the application requires text-to-image generation with CFG, which is better developed in the diffusion literature. Flow matching excels in pure distribution-matching tasks, unconditional generation, and settings where sampling speed is a hard constraint.

GenEPS: Generative Superensemble with Unconditional Diffusion Prior

The connection between federated learning and numerical weather prediction (NWP) is deeper than a mere analogy. Modern ensemble prediction systems (EPS) aggregate forecasts from multiple NWP models-each run with a different initial condition perturbation-to produce a probabilistic forecast. The spread of the ensemble encodes forecast uncertainty. GenEPS (Generative Ensemble Prediction System) reimagines this framework by replacing hand-crafted ensemble perturbations with unconditional diffusion priors trained in a federated manner across meteorological agencies.

System architecture. GenEPS operates as follows:

  1. Each participating meteorological agency k (e.g., ECMWF, NCEP, MetOffice, CMA) trains a local unconditional diffusion model Dk on its own reanalysis dataset ๐’Ÿk, capturing the climatological distribution of atmospheric states.

  2. Federated aggregation produces a global prior model Dglobal=FedAvg(D1,โ€ฆ,DK) that combines the meteorological knowledge of all participating agencies without sharing raw reanalysis data.

  3. At forecast time, Dglobal is used as the prior distribution for a conditional score-based inference: given observations ๐ฒ (radiosonde measurements, satellite radiances, surface station data), the posterior atmospheric state is p(๐ฑ|๐ฒ)โˆp(๐ฒ|๐ฑ)โ‹…pDglobal(๐ฑ), sampled via diffusion posterior sampling (DPS) or guidance.

  4. Multiple independent samples from p(๐ฑ|๐ฒ) constitute the generative ensemble, whose spread provides a calibrated uncertainty estimate of the atmospheric state.

Connection to Chapter 36 (Weather Generative Models). GenEPS provides a direct technical bridge to the weather chapter of this book. The diffusion priors trained in GenEPS are precisely the score-based generative models for atmospheric states developed in Chapter 36, but trained federally across agencies rather than centralised. The federated training protocol addresses the primary obstacle to global NWP collaboration: meteorological agencies operate under national sovereignty constraints that prevent sharing of raw reanalysis data, yet the quality of weather forecasts improves monotonically with the diversity and volume of training data. GenEPS resolves this tension by federating the training while keeping data local.

Example 12 (GenEPS for tropical cyclone prediction).

A tropical cyclone track forecast requires integration of satellite imagery (available globally), ocean temperature data (partly proprietary), and high-altitude radiosonde data (collected nationally). In the GenEPS framework:

  • The satellite operator (e.g., EUMETSAT) trains a local diffusion prior on satellite-derived atmospheric states;

  • National agencies contribute diffusion priors from their respective radiosonde networks;

  • The federated prior Dglobal captures the joint distribution across all data sources;

  • Posterior sampling conditions on real-time observations to produce a 100-member ensemble of 5-day track forecasts.

Because raw observations never leave their source institution, the system is deployable across geopolitical boundaries that would otherwise prevent data sharing.

Hybrid Systems: Combining NWP and Federated Diffusion

A recurring theme in operational meteorology is the superiority of hybrid forecasting systems over pure data-driven or pure physics-based approaches. The dominant paradigm in 2024 combines physics-based NWP (which is interpretable, conserves physical quantities, and handles edge cases reliably) with data-driven corrections (which can capture statistical biases that physics-based models systematically miss).

Federated diffusion models are uniquely suited to the data-driven correction role in hybrid NWP systems:

  • NWP residual correction. Let ๐ฑ^NWP denote the deterministic NWP forecast. The residual ๐ซ=๐ฑobsโˆ’๐ฑ^NWP has a complex, non-Gaussian distribution that depends on geographic location, season, and atmospheric regime. A federated diffusion model trained on residuals across multiple agencies produces a probabilistic correction that is far more accurate than deterministic post-processing.

  • Physically-constrained generation. The reverse diffusion process can be guided by physical constraints (conservation of mass, energy, and momentum) via projected Langevin sampling-adding a projection step after each denoising step to enforce physical laws. This ensures that federated generative corrections do not violate atmospheric physics.

  • Uncertainty quantification. The spread of the diffusion ensemble provides a calibrated uncertainty estimate that is consistent with the CRPS (continuous ranked probability score) minimisation objective used to evaluate operational EPS.

The connection to Chapter 36 (Weather Generative Models) is direct: the techniques for score-based atmospheric modelling developed there apply directly in the federated setting, with the federated training protocol replacing centralised training while preserving the same generative inference procedures.

Personalized Federated Diffusion with Privacy Guarantees

One-shot FL and flow matching address the global generative model quality. But many federated applications require personalisation: a model that captures the idiosyncrasies of each client's local distribution, not just the global average. Personalized federated diffusion (PFD) achieves this by decomposing the generative model into a shared global backbone and client-specific adaptation layers.

Architecture. PFD parameterises the noise prediction network as ฯตฮธ(๐ฑt,t)=fฮธglobal(๐ฑt,t)+ฮฑkโ‹…gฯ•k(๐ฑt,t), where ฮธglobal are the globally shared parameters trained via federated averaging, ฯ•k are client-specific adapter parameters (e.g., LoRA matrices or lightweight residual blocks), and ฮฑk>0 is a personalisation strength hyperparameter.

Privacy mechanism. Global parameters ฮธglobal are trained under (ฯตg,ฮดg)-DP via DP-FedAvg (gradient clipping + Gaussian noise). Client-specific adapters ฯ•k are trained locally and never transmitted-they are truly private, with no privacy budget expenditure. The personalisation step therefore adds no privacy cost beyond the global training budget.

Privacyโ€“personalisation trade-off. Let โ„’k(ฮธ,ฯ•k) denote the local diffusion loss for client k. The total PFD objective is minฮธglobal,{ฯ•k}โกโˆ‘k=1Kwk[โ„’k(ฮธglobal,ฯ•k)+ฮปโ€–ฯ•kโ€–F2]s.t.ฮธglobalโˆˆฮ˜ฯตg,ฮดg, where ฮ˜ฯตg,ฮดg is the set of models achievable under the specified global DP budget, and ฮป is a regularisation parameter controlling adapter complexity. Larger ฮป favours the global model (better privacy, less personalisation); smaller ฮป allows more expressive local adaptation.

Exercises

Exercise 55.

(One-Shot FL communication bound). Consider a federated system with K=50 clients, each holding n=10,000 images. A standard FedAvg protocol with T=100 rounds transmits full model gradients of dimension d=108 per round per client.

  1. Compute the total uplink communication cost in bits, assuming 32-bit floats.

  2. A one-shot FL system transmits a Gaussian mixture model with M=64 components in โ„512 per client. Compute the total uplink cost and the compression ratio relative to (a).

  3. Argue that the one-shot system can achieve (ฯต,ฮด)-DP with ฯต=1.0, ฮด=10โˆ’5 by appropriate Gaussian noise addition to the GMM parameters. What noise standard deviation ฯƒ is required?

Exercise 56.

(FFM-LOT convergence). Let p0=๐’ฉ(0,Id) and p1 be a Gaussian mixture p1=12๐’ฉ(ฮผ1,ฮฃ)+12๐’ฉ(ฮผ2,ฮฃ) with โ€–ฮผ1โˆ’ฮผ2โ€–=ฮ”.

  1. Compute the expected squared displacement ๐”ผ[โ€–๐ฑ1โˆ’๐ฑ0โ€–2] under the independent coupling.

  2. Compute the same quantity under the OT coupling ฯ€โ‹†. For what value of ฮ” is the OT advantage largest?

  3. Simulate the FFM-LOT and standard FFM training procedures for d=2, ฮ”โˆˆ{1,2,4,8}, and plot the NFE versus FID curves for 4, 8, 16, and 32 function evaluations.

Exercise 57.

(Personalised federated diffusion). Suppose 20 clients each hold images from a different fine-grained category (e.g., 20 species of birds), with 500 images per client. The global distribution is roughly uniform over species.

  1. Train a standard FedAvg diffusion model and a PFD model with LoRA adapters of rank rโˆˆ{4,8,16,32}. Report per-client FID scores.

  2. At what adapter rank does PFD achieve comparable per-client FID to a fully local model trained on only 500 images?

  3. Suppose each client's adapter ฯ•k is also protected by local DP with budget (ฯตk,ฮดk). How does the noise required for local adapter DP interact with the performance at each adapter rank?

Federated Generative AI Governance and Ethics

The preceding sections have developed the technical machinery of federated generative AI with precision: objectives, convergence guarantees, privacy analyses, and architectural innovations. This final section steps back from the machinery to ask the questions that will ultimately determine whether federated generative AI is deployed beneficially: Who owns the outputs? Who bears responsibility for harms? How can oversight be maintained without centralisation? And what happens when federated systems operate across national borders with incompatible legal frameworks?

These are not soft questions relegated to philosophy departments. They are engineering constraints. A federated system that violates GDPR may be shut down regardless of its technical quality. A generative model that amplifies biases across clients may cause systematic discrimination at scale. A deepfake generated by a federated system that operates across jurisdictions may be simultaneously legal and illegal depending on which court examines the case. Governance is not an afterthought to federated generative AI; it is part of the system specification.

Insight.

Federated learning democratises AI-but democracy requires governance. The same structural property that makes FL attractive (distributing computation and data across many participants) makes it difficult to enforce quality control, audit for bias, or attribute responsibility. Every advance in federated capability must be matched by a corresponding advance in federated accountability.

Regulatory Landscape: GDPR, CCPA, and the EU AI Act

Federated generative AI operates at the intersection of three major regulatory frameworks, each of which imposes distinct constraints on system design, data handling, and deployment.

GDPR Article 17: The Right to Erasure. GDPR Article 17 (โ€œthe right to be forgottenโ€) grants EU data subjects the right to have their personal data erased upon request. In centralised AI systems, erasure is implemented by removing the individual's records from the training dataset and retraining or fine-tuning the model. In federated generative AI, erasure presents a fundamentally different challenge: if a data subject's records were used to train a local model, and that local model's parameters influenced the global generative model via federated aggregation, then the global model encodes information about the data subject-but there is no mechanism to excise that information without full retraining.

Machine unlearning for federated generative models is an active research problem. Proposed approaches include:

  • Federated SISA (Sharded, Isolated, Sliced, and Aggregated) training: partition each client's dataset into shards such that removing one shard requires retraining only a fraction of the model;

  • Influence function approximation: estimate the effect of removing a data point on model parameters using second-order Taylor expansion, then apply a parameter correction without full retraining;

  • Differential privacy as approximate unlearning: argue that under (ฯต,ฮด)-DP, the model's parameters are already approximately independent of any individual's data, so formal unlearning is not required beyond a specified privacy budget.

None of these approaches fully satisfies the GDPR Article 17 requirement as currently interpreted by EU data protection authorities. This remains a legal and technical open problem.

CCPA: Consumer Data Rights. The California Consumer Privacy Act (CCPA) grants California residents the right to know what personal information is collected, the right to delete it, and the right to opt out of its sale. For federated generative AI, the โ€œsaleโ€ of model outputs (synthetic data derived from federated training) raises novel questions: does sharing a synthetic dataset derived from user data constitute a sale of personal information, even if the synthetic data contains no direct identifiers? The CCPA's definition of โ€œpersonal informationโ€ includes any data that โ€œcould reasonably be linkedโ€ to an individual, and there is evidence that synthetic data generated without formal privacy guarantees can be re-linked to its source individuals at significant rates. The CCPA therefore effectively mandates differential privacy or equivalent formal guarantees for commercially deployed federated generative systems in California.

EU AI Act. The EU AI Act (2024) classifies AI systems by risk tier and imposes conformity obligations accordingly. Federated generative models potentially fall into multiple risk categories:

  • High risk (Article 6): if used in healthcare diagnosis, employment decisions, or critical infrastructure-typical federated generative use cases;

  • General purpose AI models (GPAI) (Articles 51โ€“55): large generative models with broad applicability must publish technical documentation, comply with copyright law, and publish summaries of training data;

  • Unacceptable risk (Article 5): real-time biometric identification from synthetic data derived from federated learning may trigger the prohibition on certain types of biometric surveillance.

The EU AI Act's conformity obligations are designed for centralised systems where a single legal entity can be identified as the provider. Federated systems distribute responsibility across clients and servers, making conformity assessment structurally more complex.

When a federated generative model produces synthetic data, a cascade of legal questions arises that existing intellectual property frameworks are ill-equipped to answer.

Who owns federated synthetic outputs? Consider a federated system where 100 hospitals jointly train a generative model and the server generates 100,000 synthetic patient records for sharing with pharmaceutical researchers. Who owns these records?

  • The server operator, who ran the generation process;

  • The participating hospitals, whose data implicitly shaped the generative model;

  • The patients, whose records were in the training data;

  • No one, if synthetic data without human authorship lacks copyright protection under existing law.

In the United States, the Copyright Office has held that AI-generated works without human creative input are not copyrightable. Synthetic records generated by a federated diffusion model likely fall into this category, creating a situation where the outputs are in the public domain regardless of the investment required to produce them. This has implications for commercialisation: a pharmaceutical company cannot protect its investment in federated synthetic data generation through copyright, necessitating alternative legal mechanisms such as trade secret protection or contractual restrictions.

Privacy status of synthetic data. The legal question of whether synthetic data constitutes โ€œpersonal dataโ€ under GDPR depends on whether it is truly anonymous. Recital 26 of GDPR holds that anonymised data falls outside the regulation's scope, but empirical research has demonstrated that synthetic data generated without formal DP guarantees can be re-identified at non-negligible rates using membership inference attacks. From a regulatory standpoint, synthetic data generated by a federated model without formal privacy guarantees should be treated as pseudonymous rather than anonymous-and therefore remains subject to GDPR.

Caution.

A federated model trained across jurisdictions may simultaneously comply with and violate different privacy laws. A synthetic dataset that satisfies CCPA's standard of de-identification may fail GDPR's anonymisation standard because the EU and US apply different criteria for determining when data is โ€œreasonably linkableโ€ to an individual. Organisations deploying cross-border federated generative systems must perform jurisdiction-specific legal analysis for each output use case.

Fairness in Federated Generation: Bias Amplification

Standard machine learning fairness concerns-demographic parity, equalised odds, individual fairness-are complicated in federated settings by heterogeneity: different clients may have systematically different demographic compositions, different labelling practices, and different historical biases. Federated aggregation can amplify these local biases rather than averaging them out.

Definition 48 (Federated Fairness).

Let G be a global federated generative model, A a sensitive attribute (e.g., race, sex, age), and f:๐’ณโ†’๐’ด a downstream classifier trained on synthetic data from G. Define the federated demographic parity gap as ฮ”DP(G,f,A)=maxa,aโ€ฒโˆˆ๐’œโก|Prโก[f(๐ฑ)=1|A(๐ฑ)=a]โˆ’Prโก[f(๐ฑ)=1|A(๐ฑ)=aโ€ฒ]|, where ๐ฑโˆผG. The global model G achieves (K,ฮฑ)-federated fairness if ฮ”DP(G,f,A)โ‰ค1Kโˆ‘k=1Kฮ”DP(Gk,fk,A)+ฮฑ, for all downstream classifiers f, where Gk is the local generative model trained on client k alone, fk is the corresponding local classifier, and ฮฑโ‰ฅ0 is an amplification tolerance parameter. The model fails (K,ฮฑ)-federated fairness when the global model introduces bias amplification exceeding ฮฑ relative to the local baselines.

Sources of bias amplification. Federated generative models amplify bias through three distinct mechanisms:

  1. Weighted aggregation bias. FedAvg weights client contributions by dataset size |๐’Ÿk|. Larger clients (which may be wealthier institutions with more historically biased data collection practices) exert disproportionate influence on the global model.

  2. Mode collapse under heterogeneity. When client distributions are very different, federated GAN training may collapse to generating samples from the dominant client distribution, effectively erasing minority groups represented only in small clients.

  3. Differential privacy noise disproportionality. Adding DP noise of fixed magnitude affects rare sub-populations more than majority groups, because the signal-to-noise ratio for minority groups is lower. A federated model trained with DP may achieve strong aggregate FID while failing catastrophically to model under-represented groups.

Mitigation strategies. Several technical interventions can reduce bias amplification:

  • Fair federated aggregation: replace FedAvg with a minimax aggregation scheme that minimises the worst-case client loss rather than the average;

  • Fairness-regularised generative training: add a fairness penalty to the generative loss that penalises demographic parity gaps in downstream tasks;

  • Oversampling of minority clients: increase the communication round participation probability for underrepresented clients, compensating for dataset size imbalance.

Auditing Federated Generative Models

Auditing a centralised AI model is already technically challenging. Auditing a federated generative model-without centralised access to training data, without the ability to retrain the model with controlled perturbations, and without knowledge of individual client contributions-is substantially harder.

What auditing means in a federated context. An audit of a generative model answers questions of the form: does the model generate discriminatory outputs? Does it memorise training data? Does it reproduce copyrighted material? Each of these questions requires access to the model's internal representations and, ideally, to samples of the training data-neither of which is directly available in a federated system.

Black-box auditing via query protocols. The most immediately deployable approach is query-based auditing: the auditor is given API access to the global generative model G (i.e., the ability to sample from G and to evaluate the model's probability assignments) but has no access to training data or intermediate computations. The auditor then:

  1. Samples a large synthetic dataset ๐’Ÿ^โˆผG;

  2. Applies standard bias metrics to ๐’Ÿ^ to measure demographic parity, representation balance, and output diversity;

  3. Applies membership inference attacks to test whether G memorises specific training records;

  4. Applies copyright detection pipelines to check for verbatim reproduction of text or near-duplicate reproduction of images.

This approach is limited because a model can pass all black-box tests while still exhibiting biases that are not detectable without knowledge of the training data composition.

Federated auditing protocols. A more principled approach distributes the auditing process itself federally:

  • An auditing party ๐’œ is introduced as a trusted-but-curious third party that can query clients without accessing their raw data;

  • Each client k runs a local auditing procedure on ๐’Ÿk (e.g., a local membership inference attack) and reports a summary statistic sk (e.g., a p-value or AUC score) to ๐’œ under DP;

  • ๐’œ aggregates {sk} using a secure aggregation protocol and reports a global audit verdict without learning any individual client's result.

This approach enables privacy-preserving auditing at the cost of reduced statistical power: the aggregate summary statistics may not be sufficient to detect subtle biases that are visible only at the individual client level.

Model Cards for Federated Generative Models

Model cards, introduced by Mitchell et al. (2019), are structured documentation artifacts that accompany machine learning models and disclose their intended use cases, performance characteristics, and limitations. For federated generative models, the standard model card framework requires significant extension to capture the distributed nature of training and the heterogeneity of participating clients.

Federated model card components. A federated generative model card should include:

  1. Federation topology: the number of clients K, the aggregation protocol (FedAvg, SecAgg, etc.), the number of communication rounds, and the participation rate per round;

  2. Client data characterisation: aggregate statistics of client dataset sizes, geographic distribution, and demographic composition-disclosed at the level of precision permitted by client privacy requirements;

  3. Privacy budget: the global (ฯต,ฮด)-DP guarantee achieved by the training procedure, the per-client noise mechanism, and the privacy accounting method (Rรฉnyi DP, GDP, etc.);

  4. Per-client fairness metrics: a breakdown of generation quality and fairness metrics by client subgroup, at whatever granularity is disclosed by the auditing protocol;

  5. Environmental disclosure: the total compute hours consumed across all clients, the estimated carbon footprint, and whether renewable energy sources were used;

  6. Intended deployment context: downstream tasks for which the model has been validated, jurisdictions in which its outputs are legally permissible, and limitations of synthetic data use.

The challenge of model card completion in federated settings is that clients may be unwilling or unable to provide the information needed to fill each section. Federated model cards should therefore distinguish between verified disclosures (confirmed by the server or an auditing party) and self-reported disclosures (provided by clients without independent verification).

Environmental Cost of Federated Training

The environmental cost of AI training has attracted significant scrutiny, with estimates placing the carbon footprint of training a single large language model at hundreds of tonnes of CO2 equivalent. Federated training introduces a distinctive energy consumption profile that differs from centralised training in both magnitude and distribution.

Energy components of federated training. The total energy consumed by a federated generative training run decomposes as Etotal=Ecompute+Ecomm+Eserver, where:

  • Ecompute=โˆ‘k=1KTโ‹…ฯ„kโ‹…Pk is the total compute energy across K clients, T rounds, local training time ฯ„k, and device power draw Pk;

  • Ecomm=โˆ‘k=1KTโ‹…bk/rkโ‹…Pkcomm is the communication energy, where bk is the per-round communication budget and rk is the transmission rate;

  • Eserver is the server compute energy for model aggregation and sampling.

Distributed vs. centralised comparison. In principle, federated training could be more energy-efficient than centralised training if client devices are more energy-efficient than data centre GPUs. In practice, this benefit is often reversed because: (a) T rounds of communication multiply the compute cost; (b) client devices typically have lower compute throughput per watt than modern accelerators; and (c) communication energy in mobile networks can dominate the total budget.

One-shot FL and flow matching directly address the energy cost problem. One-shot FL eliminates the T multiplier in the communication energy term. Flow matching reduces the per-sample generation cost by 10ร—โ€“100ร— relative to diffusion, reducing both Eserver and the effective energy cost of downstream synthetic data users.

Remark 46 (Carbon intensity heterogeneity).

The carbon intensity of electricity varies by a factor of 50ร— across geographic locations-from near-zero for clients powered by hydroelectric or nuclear energy to 800+ gCO2e/kWh for coal-dependent grids. A federated system that aggregates clients from different energy grids should weight contributions not just by dataset size or model quality, but also by carbon intensity, potentially scheduling training to coincide with periods of low-carbon energy availability at each client site.

TikZ: Federated Governance Framework

Governance framework for federated generative AI. Regulatory requirements (GDPR, EU AI Act, CCPA) drive the selection of technical mechanisms (differential privacy, secure aggregation, machine unlearning, fairness constraints). An audit layer-combining black-box sampling, federated privacy audits, and bias measurement-verifies compliance before deployment. Continuous post-deployment monitoring feeds back into regulatory updates, closing the governance loop.

The Dual-Use Problem: Federated Deepfakes

The most acute governance challenge for federated generative AI is the dual-use problem: the same technical capabilities that enable legitimate applications-privacy-preserving medical image synthesis, federated satellite data augmentation, cross-hospital rare disease modelling-also enable harmful applications at scale. Federated deepfake generation is the canonical example.

Why federation amplifies the deepfake threat. Centralised deepfake generation is already a serious concern, with detection arms races between generators and discriminators ongoing since 2018. Federation significantly worsens the threat landscape for three reasons:

  1. Distributed training evades detection. Centralised training of a large generative model requires significant compute infrastructure that can be identified and monitored. Federated training across hundreds of edge devices is indistinguishable from legitimate federated learning, making detection and interdiction extremely difficult.

  2. No single point of attribution. Law enforcement actions against centralised deepfake operations can target the server operator. In a federated system, the server may be a coordinator with no access to the harmful content, while the clients are anonymous participants. Attribution is computationally hard when clients use privacy-preserving aggregation protocols.

  3. Personalisation enables targeted attacks. Personalized federated generation (Section Personalized Federated Diffusion with Privacy Guarantees) allows fine-grained targeting: a federated deepfake system could produce personalised synthetic content targeting specific individuals by training client adapters on small amounts of target imagery, without needing centralised coordination.

Technical countermeasures. The cryptographic and watermarking communities have proposed several countermeasures that can be deployed in federated generative systems:

  • Federated watermarking: embed invisible watermarks in all outputs of a federated generative model by training the generator to produce a covert signal detectable by a shared detection key. The watermark key is distributed to all clients via secure key agreement, and detection requires access to the key-providing attribution even without access to the training infrastructure;

  • Provenance attestation: use trusted execution environments (TEEs) at each client to generate cryptographic attestations that training was conducted according to an approved protocol. Aggregation is refused for clients that cannot provide valid attestations;

  • Content provenance standards: adopt the C2PA (Coalition for Content Provenance and Authenticity) standard for attaching cryptographic provenance metadata to generated content, enabling downstream systems to verify the origin of synthetic media.

None of these countermeasures is foolproof. Watermarks can be removed by adversarial post-processing; TEEs can be compromised; provenance metadata can be stripped. The dual-use problem admits no purely technical solution and requires a combination of technical, legal, and social countermeasures.

International Collaboration: Cross-Border FL for Global Challenges

Despite the dual-use risks and regulatory complexity, cross-border federated learning represents one of the most promising frameworks for addressing global challenges that require data from multiple jurisdictions.

Climate science. Climate modelling requires integration of atmospheric, oceanic, and cryospheric data collected by national agencies under national sovereignty. Federated generative models trained across agencies from the EU, US, China, India, and the roughly 195 signatories to the Paris Agreement could produce substantially better probabilistic climate projections than models trained on any single nation's data. The GenEPS system (Section GenEPS: Generative Superensemble with Unconditional Diffusion Prior) is a prototype of this vision.

Pandemic preparedness. The COVID-19 pandemic illustrated the catastrophic cost of data fragmentation in global health emergencies. Federated generative models for pathogen sequence synthesis, clinical outcome modelling, and vaccine efficacy prediction could be trained across health agencies from multiple countries without sharing individual patient records. The WHO's Health Data Collaborative has identified federated learning as a priority architecture for pandemic preparedness data sharing.

Scientific collaboration. Large-scale physics experiments (CERN, LIGO, the Square Kilometre Array) already generate data at volumes that require distributed processing. Federated generative models trained on scientific data from multiple institutions could produce synthetic datasets that enable computationally intensive analyses to be performed on distributed infrastructure, reducing the centralisation bottleneck in scientific computing.

Governance frameworks for cross-border FL. Realising these applications requires governance frameworks that operate above the national level:

  • International data spaces: treaty-level agreements establishing shared technical standards and legal frameworks for cross-border data access (the EU Data Spaces framework is an early example);

  • Mutual recognition of privacy certifications: bilateral or multilateral agreements recognising each other's DP standards as equivalent (analogous to the EU-US Data Privacy Framework);

  • Federated audit authorities: international bodies authorised to conduct privacy and fairness audits of cross-border federated systems, with access to summary statistics from all participating jurisdictions;

  • Benefit-sharing mechanisms: protocols ensuring that the scientific and economic benefits of federated models are distributed equitably across participating nations, preventing wealthy nations from extracting value from data collected in lower-income settings.

Caution.

A federated model trained across jurisdictions may simultaneously comply with and violate different laws. The EU's General Data Protection Regulation and China's Personal Information Protection Law (PIPL) impose conflicting requirements on data localisation and cross-border data transfers. A federated system that satisfies GDPR's requirements for international data transfers may violate PIPL's requirement that personal data be processed within China, and vice versa. Cross-border federated generative AI is a legal minefield that requires jurisdiction-specific legal counsel at every stage of system design and deployment.

Insight.

Federated learning democratises AI-but democracy requires governance. The distributed nature of federated learning eliminates single points of control, but also eliminates single points of accountability. Effective governance of federated generative AI requires technical mechanisms that embed accountability directly into the system architecture-watermarking, cryptographic attestation, privacy-preserving auditing-rather than relying on post-hoc regulatory enforcement against a centralised actor. The goal is a federated system that is accountable by construction, not merely compliant in expectation.

Exercises

Exercise 58.

(Machine unlearning for federated diffusion). A federated diffusion model was trained using FedAvg over T=100 rounds with K=50 hospital clients. A patient at hospital k=3 requests erasure of their records under GDPR Article 17.

  1. Describe the influence function approach to approximate unlearning for this setting. What information must hospital 3 retain to compute the influence of the patient's records on the global model parameters?

  2. Under (ฯต,ฮด)-DP with ฯต=1.0 and ฮด=10โˆ’5, argue that the model's parameters are already approximately unlearned with respect to any single record. What is the maximum membership inference advantage an adversary can achieve?

  3. Propose a federated SISA training protocol for this setting that reduces the retraining cost of erasure to at most 10% of the original training cost. What are the trade-offs in model quality?

Exercise 59.

(Federated fairness audit). A federated generative model is trained on demographic data from 20 clients representing 20 countries. The global model is used to generate synthetic population data for downstream insurance pricing models.

  1. Define a federated demographic parity gap for this setting, using Definition Definition 48. Specify what sensitive attribute A and downstream classifier f you would use.

  2. Propose a privacy-preserving audit protocol in which each client reports a local fairness statistic to a central auditor under (ฯตk,ฮดk)-DP. What aggregate statistic does the auditor compute?

  3. Empirically: generate a synthetic federated dataset where three clients have systematically biased representations of a minority group. Train a federated generative model and measure ฮ”DP for the global model. Does ฮ”DP exceed the average local bias? Under what conditions does bias amplification occur?

Exercise 60.

(Federated watermarking). Design a federated watermarking scheme for a flow matching generative model trained across K=100 clients.

  1. Specify the watermark embedding procedure: how is the watermark signal incorporated into the flow matching training objective? Write the modified training loss explicitly.

  2. Specify the detection procedure: given a query sample ๐ฑ, how does a detector with access to the watermark key ๐ฐ determine whether ๐ฑ was generated by the federated model? What is the false positive rate and detection power as a function of watermark strength ฮป?

  3. Analyse robustness: consider an adversary who applies Gaussian noise ๐’ฉ(0,ฯƒ2I) to watermarked outputs. For what value of ฯƒ does the watermark become undetectable? How does this compare to the distortion imposed on image quality (as measured by PSNR)?

Open Problems and Future Directions

Federated generative modelling stands at a crossroads. The past five years have demonstrated that it is possible to train powerful generative models-GANs, VAEs, diffusion models, and large language models-without ever centralising sensitive data. Yet the gap between proof-of-concept research and robust, production-grade systems remains enormous. This section catalogues the most pressing open problems that must be solved before federated generative AI becomes a mature engineering discipline, rather than an aspirational research direction.

We organise the problems roughly in order of theoretical depth, from those that are primarily engineering challenges to those that require fundamentally new mathematical frameworks. For each problem we describe the state of the art, articulate precisely what is unknown, and sketch what a solution might look like. We close the section with a bold conjecture about the long-term trajectory of the field, and a vision of how federated learning, generative modelling, and foundation models are converging toward a single unified paradigm.

Insight.

The open problems listed here are not independent. Progress on any one of them-privacy, scale, communication, or verification-tends to unlock progress on the others. The field is poised for a period of rapid, mutually reinforcing advances.

Open Problem 1: Scaling Federated Diffusion to Billion-Parameter Models

Denoising diffusion probabilistic models trained on centralised datasets have scaled remarkably: models with one to twelve billion parameters now generate photorealistic images, coherent videos, and fluent text with state-of-the-art fidelity. The federated analogue, however, remains stuck at orders of magnitude smaller. The largest federated diffusion experiments reported in the literature involve models in the hundreds-of-millions-of-parameters regime, trained on tens to hundreds of clients. Bridging this gap to billion-parameter models trained across thousands or millions of clients is a fundamental open problem.

Problem 1 (Federated Billion-Parameter Diffusion).

Let G๐œฝ be a denoising diffusion model with |๐œฝ|โ‰ฅ109 parameters. Design a federated training protocol for Kโ‰ฅ104 clients such that:

  1. The communication cost per round is O(r) where rโ‰ช|๐œฝ| (i.e., no client transmits the full gradient);

  2. The model converges to a stationary point of the expected ELBO within T rounds, where T is polynomial in 1/ฮต for target accuracy ฮต;

  3. The total computation per client per round is bounded by the compute budget of a commodity GPU.

Is there a training algorithm that achieves all three properties simultaneously under heterogeneous data distributions?

The core tension is between model capacity and communication efficiency. Gradient compression methods such as top-k sparsification and low-rank approximation can reduce the transmitted payload by factors of 100 to 1000, but introduce compression error that accumulates across rounds. For large models, this error can overwhelm the learning signal. Federated parameter-efficient fine-tuning (FedPEFT) approaches such as FedLoRA transmit only a small number of adapter parameters, but they presuppose a strong pre-trained initialisation that may itself be proprietary or unavailable in certain domains.

Definition 49 (Communication-Efficient Federated Diffusion).

A federated diffusion protocol is (ฮด,B)-communication efficient if, for any target accuracy ฮด>0, the total number of bits transmitted per client across all training rounds is at most B(ฮด)=O(poly(1/ฮด)โ‹…dฮฑ) for some constant ฮฑ<1, where d=|๐œฝ| is the model dimension.

A plausible path forward combines three ideas: (a) pre-training a strong backbone on publicly available data centrally, followed by federated fine-tuning of only the adapter parameters; (b) using structured communication compression-such as Kronecker-factored gradient approximations-that exploit the tensor structure of diffusion U-Nets; and (c) asynchronous federated protocols that allow slow clients with large local compute to contribute full gradient information over multiple rounds without stalling fast clients.

Remark 47.

The distinction between federated pre-training and federated fine-tuning is not merely semantic. Pre-training requires communicating gradient information about the full model from scratch, while fine-tuning can exploit a fixed public initialisation. Most current federated diffusion work is really federated fine-tuning in disguise. True federated pre-training of billion-parameter diffusion models remains entirely open.

Scaling laws for centralised diffusion models suggest that model performance improves predictably with model size, data volume, and compute. No analogous scaling laws exist for federated diffusion models. Establishing such laws-relating client count, data heterogeneity, communication budget, and model quality-would be a major theoretical contribution.

Open Problem 2: Provably Private Federated Generation Beyond Differential Privacy

Differential privacy is the gold standard for privacy in machine learning, and for good reason: it provides a mathematically rigorous, worst-case guarantee about the information that an adversary can extract about any individual training example. Yet differential privacy has important limitations in the context of federated generative models. The (ฮต,ฮด) accounting framework becomes difficult to interpret when applied to a generative model that produces synthetic data; the privacy guarantee applies to the model parameters, not directly to the synthetic outputs. Moreover, the noise required to achieve strong differential privacy guarantees often degrades sample quality to the point of practical uselessness, particularly for high-dimensional generation tasks such as image synthesis.

Problem 2 (Privacy Frameworks for Synthetic Data Generation).

Let โ„ณ:๐’ŸKโ†’๐’ข be a federated training algorithm that maps K client datasets to a generative model Gโˆˆ๐’ข. Construct a privacy notion ฮ  such that:

  1. ฮ  implies a meaningful bound on what any computationally bounded adversary can infer about any individual training record ๐’™โˆˆโ‹ƒkDk from arbitrarily many synthetic samples ๐’™~โˆผG;

  2. ฮ  is compositional: if โ„ณ is ฮ -private and G is used to train a downstream model f, then f inherits a quantifiable privacy guarantee;

  3. ฮ  is strictly weaker than (ฮต,ฮด)-DP for practically useful values of ฮต and ฮด, enabling higher-quality generation.

Does such a notion ฮ  exist, and if so, under what computational assumptions?

Several alternative privacy frameworks have been proposed, each with partial success. Pufferfish privacy generalises differential privacy by specifying which pairs of secrets should be indistinguishable, allowing domain-specific privacy definitions that may be weaker on non-sensitive attributes. Information-theoretic privacy bounds the mutual information between the model and individual records, but tends to produce bounds that are vacuous for high-capacity models. Attribute inference protection focuses on preventing the reconstruction of specific sensitive attributes rather than individual records, which may be sufficient for many applications.

Definition 50 (Synthetic Data Privacy).

Let D be a training dataset and GD a generative model trained on D. For a target distribution Q over records and an adversary ๐’œ with auxiliary information ๐šŠ๐šž๐šก, the synthetic data privacy risk is ฮ (GD,D,๐’œ,๐šŠ๐šž๐šก)=defsup๐’™โˆˆDโก|Prโก[๐’œ(GD,๐šŠ๐šž๐šก)=๐’™]โˆ’Prโก[๐’œ(GDโˆ–{๐’™},๐šŠ๐šž๐šก)=๐’™]|. A federated generative protocol is ฯ€-synthetic-private if ฮ (GD,D,๐’œ,๐šŠ๐šž๐šก)โ‰คฯ€ for all polynomial-time adversaries ๐’œ and all auxiliary information sets ๐šŠ๐šž๐šก.

A promising direction is to combine differential privacy with semantic privacy guarantees. Rather than protecting individual records at the bit level, one could aim to ensure that the synthetic data preserves population-level statistics while revealing nothing about individuals beyond what can be inferred from aggregate data. This connects federated generative modelling to the rich literature on statistical disclosure limitation, a field with decades of practical experience in releasing synthetic public-use microdata.

Open Problem 3: Federated Continual Generative Learning

Real-world federated systems are not static. Clients join and leave the federation over time, new data distributions emerge, and old data becomes stale or irrelevant. Centralised continual learning addresses the problem of learning new tasks without forgetting old ones, but the federated setting introduces unique challenges: clients arrive and depart asynchronously, each client may specialise in a narrow distribution, and the server has no persistent memory of past data.

Problem 3 (Federated Non-Stationary Generative Learning).

Consider a sequence of time steps t=1,2,โ€ฆ in which at each step: a new cohort of clients ๐’žt arrives, each holding data from a distribution pt(k); some fraction of previous clients depart; and the server must maintain a generative model Gt that adequately covers the union of all distributions seen so far, i.e., Gtโ‰ˆ1tโˆ‘s=1tpโ€พs where pโ€พs=1|๐’žs|โˆ‘kโˆˆ๐’žsps(k). Design a federated protocol that:

  1. Does not suffer catastrophic forgetting, i.e., the quality of Gt on data from round s<t does not degrade significantly as tโ†’โˆž;

  2. Does not store raw data from past rounds (privacy constraint);

  3. Handles new clients whose distributions are out-of-distribution relative to all previous clients.

The catastrophic forgetting problem is already severe in centralised continual learning; in the federated setting it is compounded by the fact that replaying past data is not possible without violating the privacy guarantees of clients who have departed. Generative replay, in which the current model generates synthetic examples of past tasks to interleave with new training, is a natural approach but creates a circular dependency: the quality of generative replay depends on the quality of the model, which is the very thing being trained.

Remark 48.

Federated continual generative learning is intimately connected to the federated unlearning problem (Open Problem 5). In a sense, continual learning asks how to remember what departed clients knew, while unlearning asks how to forget it. The two problems may require fundamentally different mechanisms, or they may admit a unified framework based on selective memory management.

Open Problem 4: Cross-Modal Federated Generation

Modern generative AI is increasingly multimodal. Large models such as GPT-4V, Gemini, and Stable Diffusion XL jointly model images and text, while audio-visual models extend this to speech and video. The federated analogue-training cross-modal generative models across clients whose data is inherently heterogeneous not only in distribution but in modality-is almost entirely unexplored.

Problem 4 (Heterogeneous-Modality Federated Generation).

Suppose client k holds data of modality mkโˆˆ{image,text,audio,video}, and different clients hold different modalities. That is, no single client holds paired cross-modal data. Design a federated protocol for training a cross-modal generative model G such that G can generate samples from any modality conditioned on inputs from any other modality, even though no client has ever seen paired examples.

This problem connects to the unsupervised cross-modal alignment literature, where shared latent spaces are learned from unpaired data. In the federated setting, even the unpaired data is distributed, and clients cannot share intermediate representations without risking privacy leakage through the shared latent space.

A potential approach is to learn modality-specific encoders locally on each client, then federate only the shared latent space parameters. Privacy analysis of this approach is non-trivial: the shared latent space is trained on gradients computed from private data, and the standard DP-SGD analysis applies to each modality separately, but the joint privacy guarantee for the cross-modal model requires careful composition.

Key Idea.

Cross-modal federated generation requires solving three nested problems simultaneously: (a) learning a shared representation across clients with different modalities; (b) aligning these representations without paired data; and (c) ensuring that the shared representation does not inadvertently encode private information from any individual client's dataset.

Open Problem 5: Federated Unlearning at Scale

The right to be forgotten, enshrined in regulations such as GDPR, has spawned a large literature on machine unlearning: the problem of removing the influence of specific training examples from a trained model without retraining from scratch. For federated generative models, unlearning is both more urgent and more difficult. It is more urgent because the distributed data includes sensitive personal information across many clients. It is more difficult because the server has no direct access to the data that must be unlearned.

Problem 5 (Scalable Federated Unlearning).

Let G๐œฝ be a federated generative model trained on datasets {Dk}k=1K across K clients. Suppose a set of clients ๐’ฐโŠ‚[K] submits unlearning requests, potentially at rate |๐’ฐ|=O(K) per day. Design an unlearning algorithm ๐š„๐š—๐š•๐šŽ๐šŠ๐š›๐š—(G๐œฝ,๐’ฐ) such that:

  1. Completeness: the unlearned model G~ is statistically indistinguishable from a model trained from scratch on {Dk:kโˆ‰๐’ฐ};

  2. Efficiency: the computational cost of unlearning is o(Ttrain) where Ttrain is the training cost;

  3. Verifiability: a third party can verify that unlearning has occurred without access to the original data.

Is it possible to satisfy all three simultaneously at scale?

The verifiability requirement is particularly challenging. Standard membership inference attacks can serve as a post-hoc check, but they are probabilistic and may fail to detect subtle residual memorisation. Cryptographic approaches, such as commitment schemes or zero-knowledge proofs of unlearning, offer stronger guarantees but are computationally expensive at the scale of large generative models.

A compounding difficulty is the generative nature of the model. For discriminative models, unlearning is well-defined as removing a data point's influence on the model's predictions. For generative models, unlearning means ensuring the model cannot generate samples that are close to the removed training examples in some semantic sense. This is a much richer and less well-defined criterion.

Open Problem 6: Verification of Federated Synthetic Data Quality Without Centralised Access

A federated generative model produces synthetic data that clients or third parties intend to use for downstream tasks: training classifiers, performing statistical analyses, or publishing public-use datasets. Before using synthetic data, one naturally wants to verify that it is of high quality-that it faithfully represents the underlying population distribution, does not introduce systematic biases, and does not memorise sensitive training examples.

The verification problem becomes subtle in the federated setting because there is no central repository of real data against which to compare the synthetic data.

Problem 6 (Decentralised Synthetic Data Validation).

Let G be a federated generative model, and let {D~k} denote synthetic datasets generated by G. Design a protocol that computes a fidelity score ๐™ต๐š’๐š(G,{Dk})โˆˆ[0,1] such that:

  1. The protocol does not require any client to share raw data with the server or other clients;

  2. The score is a faithful proxy for the standard centralised Frechet Inception Distance (FID) or similar metric;

  3. The protocol is robust to adversarial clients who may report fabricated quality estimates.

One approach is to compute local FID scores at each client using the client's own real data as the reference set, then aggregate these scores using a secure aggregation protocol. However, local FID scores are only meaningful if the client's local dataset is a representative sample from the population distribution, which is precisely the assumption that fails under severe data heterogeneity.

An alternative is to use trusted held-out data at the server-a small public validation set that does not belong to any client-as the reference for quality evaluation. This is pragmatic but introduces a dependency on the availability of representative public data, which may not exist in highly specialised domains such as medical imaging or financial transaction data.

Remark 49.

Synthetic data quality is not one-dimensional. A synthetic dataset may have high fidelity (synthetic samples look realistic) but low diversity (many modes of the real distribution are missing), or high coverage but poor statistical fidelity. A comprehensive federated quality verification framework should assess all three axes: fidelity, diversity, and downstream utility.

Open Problem 7: Federated Generative Models for Scientific Discovery

Some of the most impactful applications of generative AI lie in scientific domains where data is inherently federated: pharmaceutical companies each hold proprietary assay data, hospitals each hold patient outcome records, climate research institutes each maintain regional measurement databases. In each case, the data is sensitive, the distributions are heterogeneous, and the scientific value of a model trained on the union would be immense.

Problem 7 (Federated Molecular Generation).

Let {Dk}k=1K denote proprietary molecular datasets held by K pharmaceutical clients, where Dk contains molecules ๐’™(k)โˆˆ๐’ณmol with associated bioactivity labels y(k). Design a federated generative model G such that:

  1. G generates novel molecular structures with high predicted bioactivity across all K targets;

  2. The generated molecules do not appear verbatim in any Dk (privacy constraint);

  3. G can be conditioned on target-specific properties specified by individual clients without sharing the conditioning information with other clients.

Establish formal privacy guarantees and empirically validate the approach on molecular generation benchmarks.

Molecular generation is particularly challenging because the molecular space is discrete (graphs, SMILES strings) rather than continuous, which complicates the application of standard diffusion and VAE frameworks. Graph-based generative models such as GDSS and MolDiff handle molecular structure but have not been adapted to the federated setting. Energy-based models may offer an attractive alternative due to their modularity and composability, which may translate well to federated training.

For materials discovery, federated generation must produce crystal structures or amorphous materials with specified electronic, thermal, or mechanical properties. The evaluation of generated materials typically requires quantum-mechanical calculations (DFT or higher), which are orders of magnitude more expensive than standard image quality metrics. Incorporating such expensive evaluations into the federated training loop is itself an open problem.

Key Idea.

The scientific discovery use case is perhaps the most compelling justification for federated generative models. A federated model trained on the combined proprietary knowledge of ten pharmaceutical companies could accelerate drug discovery by years. The open problems are not primarily algorithmic but institutional: who governs the federation, how are intellectual property rights managed, and how are the benefits of the shared model distributed?

Open Problem 8: Real-Time Federated Generation for Edge Applications

Applications such as autonomous driving, augmented reality, and real-time video processing require generative models that run at inference time on edge devices with constrained compute, memory, and power budgets. The federated training of such models must not only produce models of high quality but models that are efficient enough to run on the very devices that trained them.

Problem 8 (Hardware-Aware Federated Generative Training).

Let H=(c,m,p) denote the hardware specification of a client device, where c is the compute capacity in FLOPS, m is the memory in bytes, and p is the power budget in Watts. Design a federated protocol that produces a generative model GH such that:

  1. GH can be evaluated at inference time on a device with specification H, i.e., the evaluation cost is within the budget (c,m,p);

  2. The training protocol itself runs on devices with specification H, i.e., the training cost per round does not exceed the budget;

  3. The quality of GH degrades gracefully as H becomes more constrained, rather than catastrophically.

Autonomous driving is a particularly compelling case study. Each vehicle generates a continuous stream of sensor data-LiDAR, camera, GPS, IMU-and uses generative models for sensor simulation, data augmentation, world modelling, and trajectory prediction. Federating these models across a fleet of vehicles has obvious privacy benefits (no raw sensor data leaves the vehicle) and obvious commercial value (the fleet collectively learns a better world model than any single vehicle could). Yet the requirements are extreme: inference must occur in milliseconds, the model must be robust to distribution shift (weather, geography, traffic patterns), and the federation must tolerate vehicles dropping in and out at arbitrary times.

Real-time augmented reality applications add the further constraint that the generative model must be personalised to the individual user-their appearance, environment, and preferences-using data that is highly sensitive and should never leave the device. Federated meta-learning offers a partial solution, but the communication overhead of meta-gradient aggregation is still too high for many edge deployments.

The Privacy-Utility-Communication Trilemma

Underlying all of the open problems above is a fundamental tension that we articulate here as a conjecture.

Conjecture 1 (The Federated Generative Trilemma).

For any federated generative training protocol โ„ณ and any target generative model class ๐’ข, there exist constants ฮฑ,ฮฒ,ฮณ>0 such that for all (ฮต,ฮด,B) with ฮต>0, ฮด>0, and B>0, if โ„ณ is:

  • (ฮต,ฮด)-differentially private,

  • within a factor ฮฑ of the utility of the optimal centralised model in ๐’ข,

  • using at most B bits of communication per round,

then the number of training rounds T required satisfies Tโ‰ฅฮฉ(ฮฒdฮต2B), where d=|๐œฝ| is the model dimension. Consequently, no protocol can simultaneously achieve strong privacy, near-optimal utility, and low communication overhead.

The Privacy-Utility-Communication Trilemma in federated generative learning. Each vertex represents one desideratum; the three pairwise edges represent known tradeoffs. The shaded inner region represents the practical operating region achievable by current algorithms. Conjecture Conjecture 1 asserts that the centre of the triangle-simultaneously achieving strong privacy, near-optimal utility, and low communication-is fundamentally unachievable by any protocol.

This conjecture is consistent with all known lower bounds for private distributed optimisation, and with the empirical observation that existing federated generative protocols trade off these three properties in predictable ways. However, a formal proof remains elusive, partly because the conjecture requires a unified measure of utility that applies across generative model classes (GANs, VAEs, diffusion models), which are evaluated by fundamentally different metrics.

A weaker version of the conjecture-that no single protocol is uniformly optimal on all three axes-can likely be proved using existing information-theoretic tools. The stronger version, which asserts that the tradeoffs are quantitatively large and unavoidable, would require new lower-bound techniques.

Research Challenge Boxes

We now present three structured research challenge boxes that synthesise multiple open problems and point toward concrete intermediate milestones.

[ enhanced, breakable, colback=exonavybg, colframe=exonavyfg, boxrule=1pt, arc=4pt, title= Research Challenge A: The Federated Diffusion Scaling Benchmark, coltitle=exonavyfg!20!white, fonttitle=, top=10pt, bottom=10pt, left=10pt, right=10pt, before skip=12pt, after skip=12pt ] Goal: Establish the first rigorous scaling benchmark for federated diffusion models, analogous to the scaling laws established for centralised language models.

Methodology:

  1. Train federated DDPM models with parameter counts ranging from 107 to 109, across Kโˆˆ{10,100,1000,10000} clients.

  2. Vary the data heterogeneity using a Dirichlet partition with ฮฑโˆˆ{0.01,0.1,1.0,โˆž}.

  3. Vary the communication budget Bโˆˆ{104,105,106,107} bits per round.

  4. Measure generation quality (FID), training efficiency (rounds to target FID), and communication cost (total bits transmitted).

Hypothesised scaling law: FID(N,K,ฮฑ,B)โ‰ˆc0โ‹…Nโˆ’aโ‹…Kโˆ’bโ‹…Bโˆ’cโ‹…f(ฮฑ) for constants c0,a,b,c>0 and a heterogeneity penalty function f(ฮฑ) satisfying f(โˆž)=1 and f(ฮฑ)โ†’โˆž as ฮฑโ†’0.

Expected deliverable: A benchmark suite, baseline implementations of FedAvg-DDPM, FedProx-DDPM, and FedLoRA-DDPM, and an empirical characterisation of the scaling law coefficients.

[ enhanced, breakable, colback=exogreenbg, colframe=exogreenfg, boxrule=1pt, arc=4pt, title= Research Challenge B: Private Federated Molecular Generation for Drug Discovery, coltitle=exogreenfg!20!white, fonttitle=, top=10pt, bottom=10pt, left=10pt, right=10pt, before skip=12pt, after skip=12pt ] Goal: Demonstrate that a federated molecular generative model trained with differential privacy can discover novel drug candidates that outperform models trained on individual client datasets.

Setup: Partition the ChEMBL database into K=20 federated clients, each simulating a pharmaceutical company with expertise in a different target class (kinases, GPCRs, ion channels, etc.). Train a federated graph diffusion model with (ฮต,10โˆ’5)-DP for ฮตโˆˆ{1,5,10,50}.

Evaluation metrics:

  • Validity: fraction of generated SMILES strings that correspond to valid molecules.

  • Uniqueness: fraction of valid generated molecules not in the training set.

  • Novelty: fraction of unique molecules not in any client's training set.

  • Bioactivity: predicted activity against held-out targets using a separately trained QSAR model.

  • Privacy: membership inference attack AUC against the final model.

Privacy-utility Pareto frontier: Map the tradeoff between ฮต and the bioactivity score. The scientific hypothesis is that the federated model achieves higher bioactivity for a given ฮต than any single-client model, because federation provides access to a more diverse chemical space.

[ enhanced, breakable, colback=exopurplebg, colframe=exopurplefg, boxrule=1pt, arc=4pt, title= Research Challenge C: Verifiable Federated Unlearning for Generative Models, coltitle=exopurplefg!20!white, fonttitle=, top=10pt, bottom=10pt, left=10pt, right=10pt, before skip=12pt, after skip=12pt ] Goal: Design and implement a cryptographically verifiable unlearning protocol for federated diffusion models that satisfies the trilemma requirements: completeness, efficiency, and verifiability.

Protocol sketch:

  1. During training, the server maintains a cryptographic commitment ๐™ฒ๐š˜๐š–(๐œฝt,D๐š๐š›๐šŠ๐š’๐š—) at each round t.

  2. Upon receiving an unlearning request from client k, the server computes the gradient of the training loss with respect to Dk using influence functions, and subtracts this influence from ๐œฝ.

  3. The server produces a zero-knowledge proof ฯ€ that the updated parameters ๐œฝ~ are consistent with having never trained on Dk.

  4. The proof ฯ€ is published so that any third party can verify the unlearning without accessing Dk.

Key challenge: Influence function computation for large diffusion models is currently O(|๐œฝ|2), which is infeasible. The research question is whether block-diagonal or low-rank approximations of the Hessian suffice for accurate influence estimation, and whether the resulting approximation errors invalidate the verifiability guarantee.

Evaluation: Test on CelebA-HQ (face generation) with unlearning requests targeting specific identities. Verify using membership inference attacks and identity recognition classifiers.

The Convergence Thesis: FL + Generative + Foundation Models

We close Section Open Problems and Future Directions with a forward-looking synthesis. The three threads of modern AI-federated learning, generative modelling, and foundation models-are not evolving in isolation. They are converging.

Federated learning provides a principled framework for training on distributed, privacy-sensitive data. Generative modelling provides the capacity to learn rich data distributions and to synthesise new examples, serving as both an end goal and a tool for data augmentation. Foundation models provide a powerful, transferable initialisation that dramatically reduces the data and compute requirements for fine-tuning on any specific task or domain.

Key Idea.

The next major paradigm in AI systems will be federated foundation generative models: pre-trained billion-parameter generative models that are continually updated via federated fine-tuning on private, distributed data from millions of edge devices, hospitals, vehicles, and scientific instruments. These models will be capable of generating high-quality synthetic data for any domain, conditioned on locally specified constraints, without ever exposing raw private data. Privacy will be guaranteed by construction via differential privacy and secure aggregation, not bolted on as an afterthought.

This convergence is already visible in early systems. Gboard uses federated learning to update language models on mobile devices. Apple's Neural Engine runs local diffusion models for image enhancement and on-device personalisation. Healthcare consortia use federated learning to train diagnostic models across hospital networks. The synthesis of all three paradigms-federated, generative, and foundation-is the natural next step.

The open problems articulated in this section are not obstacles that will prevent this convergence; they are the research agenda that will make it rigorous and safe. Solving them will require not only new algorithms and theoretical frameworks, but new infrastructure, institutional models, and governance mechanisms. The mathematics and the engineering are ready to begin. The open problems are hard, but they are not intractable.

Insight.

The history of deep learning suggests that the field often advances not by solving existing open problems but by reframing them. Backpropagation did not solve the credit assignment problem; it reframed it. Attention did not solve the long-range dependency problem; it reframed it. The solution to the federated generative trilemma may come from a reframing we cannot yet anticipate.

Comprehensive Exercises and Research Challenges

The following exercises and research challenges are designed to consolidate understanding of the material in this chapter and to push the reader toward independent contribution. The exercises range from mathematical derivations to software implementation, and the research challenges constitute genuine open-ended research projects suitable for a graduate seminar or research internship.

For the exercises, detailed solutions or solution sketches are available in the supplementary material. For the research challenges, there are no predetermined correct answers: the value lies in the process of formulating the problem precisely, implementing a prototype, and interpreting the results.

Exercises

Exercise 61 (FedAvg Derivation and Convergence Analysis).

(a) Starting from the global objective min๐œฝโกF(๐œฝ)=def1Kโˆ‘k=1KFk(๐œฝ),Fk(๐œฝ)=1|Dk|โˆ‘๐’™โˆˆDkโ„“(๐’™;๐œฝ), derive the FedAvg update rule. Show that when each client performs exactly one step of gradient descent with learning rate ฮท, FedAvg reduces to synchronised SGD.

(b) Assume Fk is L-smooth and ฮผ-strongly convex for all k, and that the gradient variance is bounded by ฯƒ2. Prove that after T rounds of FedAvg with ฯ„ local steps each, the expected gap satisfies ๐”ผ[F(๐œฝโ€พT)]โˆ’Fโˆ—โ‰ค(1โˆ’ฮผฮท2)T(F(๐œฝ0)โˆ’Fโˆ—)+2ฮทฯƒ2ฮผ+2ฮท2Lฯƒ2ฯ„2ฮผ, where ๐œฝโ€พT is the weighted average of client models at round T. Identify the dominant source of error when ฯ„>1.

(c) Suppose client k has local objective Fk(๐œฝ)=F(๐œฝ)+โŸจฮดk,๐œฝโŸฉ, where ฮดk is a client-specific bias term satisfying โˆ‘kฮดk=๐ŸŽ. Show that FedAvg converges to a biased solution, and compute the bias in terms of the ฮดk, ฮท, and ฯ„. This is the client drift phenomenon.

Exercise 62 (Non-IID Simulation: Synthetic Dirichlet Partitions).

Let ๐’ž={1,โ€ฆ,C} be a set of class labels, and let D be a dataset of N samples with class distribution (p1,โ€ฆ,pC) where pc=|Dc|/N.

(a) Describe the Dirichlet-ฮฑ partitioning scheme for allocating samples to K clients. Precisely, if ๐ชcโˆผDir(ฮฑโ‹…๐ŸK) for each class c, and the fraction of class-c samples allocated to client k is qc,k, write down the expected number of samples from class c at client k.

(b) Define the effective heterogeneity of a partition as the average KL divergence between client distributions and the global distribution: H(ฮฑ,K)=def1Kโˆ‘k=1KKL(pk(ฮฑ)โ€–p), where pk(ฮฑ) is the class distribution of client k under the Dirichlet-ฮฑ partition. Compute limฮฑโ†’โˆžโกH(ฮฑ,K) and limฮฑโ†’0โกH(ฮฑ,K).

(c) Implement the Dirichlet partition in Python/NumPy for CIFAR-10 with K=10 clients and ฮฑโˆˆ{0.01,0.1,1.0}. Visualise the resulting class distributions as a stacked bar chart. Report the effective heterogeneity H(ฮฑ,10) for each ฮฑ.

Exercise 63 (FedGAN Mode Collapse Analysis).

(a) Consider a simple federated GAN with K=2 clients. Client 1 holds data from p1=๐’ฉ(ฮผ1,1) and client 2 holds data from p2=๐’ฉ(ฮผ2,1) with ฮผ1โ‰ ฮผ2. The global discriminator D๐“ is shared, but each client trains a local generator G๐œฝk. The generator update is ๐œฝkโ†๐œฝk+ฮทโˆ‡๐œฝk๐”ผ๐’›[logโกDฯ†(G๐œฝk(๐’›))]. Show that if the discriminator perfectly distinguishes ๐’ฉ(ฮผ1,1) from ๐’ฉ(ฮผ2,1) using the midpoint threshold (ฮผ1+ฮผ2)/2, then both generators converge to the same mode, either ฮผ1 or ฮผ2, regardless of their initialisation.

(b) Propose a modification to the FedGAN objective that encourages diversity between local generators. Specifically, add a repulsion term โ„’div(๐œฝ1,๐œฝ2)=โˆ’ฮป๐”ผ๐’›1,๐’›2[d(G๐œฝ1(๐’›1),G๐œฝ2(๐’›2))] for some distance function d. Analyse whether this term prevents mode collapse in the two-client Gaussian example.

(c) Design an experiment to measure mode collapse in a FedGAN trained on MNIST with K=5 clients, each holding only two digit classes. Use the number of distinct modes in the generated distribution (estimated by a pre-trained classifier) as your metric.

Exercise 64 (DP-SGD Noise Calibration for Target ฮต).

(a) Recall that DP-SGD with clipping norm C, noise multiplier ฯƒ, sampling rate q=B/N, and T training steps satisfies (ฮต,ฮด)-differential privacy where ฮต is computed via the moments accountant or Renyi DP composition. Using the Gaussian mechanism with (ฮต,ฮด)-DP and ฮด=10โˆ’5, express the required ฯƒ as a function of ฮต, T, and q. For what value of ฯƒ is ฮต=1 achieved?

(b) Consider a federated diffusion model with N=50000 training samples, batch size B=256, and T=1000 training steps. Compute the noise multiplier ฯƒ needed to achieve ฮตโˆˆ{0.5,1,2,5,10} with ฮด=10โˆ’5. Plot the FID score of a DP-trained DDPM on CIFAR-10 as a function of ฮต, using the noise values you computed.

(c) The signal-to-noise ratio at step t is SNR(t)=โ€–โˆ‡๐œฝโ„’t(๐œฝ)โ€–ฯƒC/B, where โ„’t is the diffusion loss at noise level t. For which diffusion timesteps tโˆˆ{1,โ€ฆ,T} is the DP noise most damaging? Propose an adaptive noise schedule that allocates more noise to timesteps where the gradient signal is inherently noisy.

Exercise 65 (VAE ELBO Derivation in the Federated Setting).

(a) For a VAE with encoder q๐“(๐’›|๐’™) and decoder p๐œฝ(๐’™|๐’›), derive the evidence lower bound (ELBO): โ„’ELBO(๐œฝ,๐“;๐’™)=๐”ผq๐“(๐’›|๐’™)[logโกp๐œฝ(๐’™|๐’›)]โˆ’KL(q๐“(๐’›|๐’™)โ€–p(๐’›)). Starting from logโกp๐œฝ(๐’™)โ‰ฅโ„’ELBO, show each algebraic step clearly.

(b) In the federated VAE, client k maximises a local ELBO using its own data, and the global model is obtained by averaging client parameters. Formally, define the federated ELBO as โ„’Fed(๐œฝ,๐“)=1Kโˆ‘k=1K1|Dk|โˆ‘๐’™โˆˆDkโ„’ELBO(๐œฝ,๐“;๐’™). Show that โ„’Fed is a lower bound on the log-likelihood of the aggregate mixture distribution pmix(๐’™)=1Kโˆ‘k1|Dk|โˆ‘๐’™โˆˆDkp๐œฝ(๐’™). What additional assumption is needed?

(c) Suppose encoder parameters ๐“ are kept locally at each client (personalised), while decoder parameters ๐œฝ are shared globally. Derive the update equations for both ๐“k and ๐œฝ under this split federated VAE framework. Discuss when this personalised approach is preferable to a fully shared federated VAE.

Exercise 66 (Gradient Inversion Attack Implementation).

(a) The DLG (Deep Leakage from Gradients) attack reconstructs a private input ๐’™โˆ— from an observed gradient โˆ‡๐œฝโ„“(๐’™โˆ—,๐œฝ) by solving ๐’™^=argโ€‰min๐’™โ€ฒโกโ€–โˆ‡๐œฝโ„“(๐’™โ€ฒ,๐œฝ)โˆ’โˆ‡๐œฝโ„“(๐’™โˆ—,๐œฝ)โ€–2. Explain why this attack is feasible for small models and batch size 1 but becomes intractable for large models or large batches.

(b) The R-GAP (Recursive Gradient Attack on Privacy) attack improves upon DLG by exploiting the ReLU activation structure to analytically recover the pre-activation values at each layer. For a two-layer fully connected network with ReLU activations: f(๐’™)=W2ฯƒ(W1๐’™+b1)+b2, show that the gradient with respect to W1 is โˆ‡W1โ„“=(ฮด1โŠ™ฯƒโ€ฒ(W1๐’™+b1))๐’™โŠค, where ฮด1=W2โŠคฮด2 and ฮด2=โˆ‡fโ„“. Explain how the ReLU structure ฯƒโ€ฒ(z)=๐Ÿ[z>0] can be used to recover ๐’™ from โˆ‡W1โ„“ when ฮด1 is known.

(c) Implement the DLG attack in PyTorch on MNIST. Train a small CNN, extract the gradient of a single training image, and run the DLG optimisation for 300 iterations. Report the PSNR and SSIM of the reconstructed image. Then add gradient noise with standard deviation ฯƒโˆˆ{0.0,0.01,0.1} and repeat. At what noise level does the attack fail (PSNR below 20 dB)?

Exercise 67 (LoRA Rank Selection and Communication Cost).

(a) In LoRA, a weight matrix Wโˆˆโ„mร—n is decomposed as W=W0+AB where Aโˆˆโ„mร—r and Bโˆˆโ„rร—n. The communication cost per round (transmitting A and B) is r(m+n) parameters. For a transformer with L attention layers, each with query, key, and value matrices of dimension dmodelร—dheadโ‹…h (where h is the number of heads), compute the total communication cost as a function of r, L, dmodel, and h.

(b) The approximation error of LoRA with rank r relative to full fine-tuning is bounded by the sum of the discarded singular values of the optimal weight perturbation ฮ”Wโˆ—: โ€–Wโˆ—โˆ’W0โˆ’ArBrโ€–Fโ‰คโˆ‘i=r+1minโก(m,n)ฯƒi(ฮ”Wโˆ—)2, where ฯƒi denotes the i-th singular value. Under what distributional assumptions on ฮ”Wโˆ— does rank-r LoRA achieve near-zero approximation error?

(c) For a GPT-2 medium model (345M parameters) fine-tuned on a medical text generation task, conduct an ablation study with rโˆˆ{1,2,4,8,16,32}. Plot perplexity on a held-out medical text corpus versus communication cost in megabytes. Identify the rank that achieves within 5% of the full fine-tuning perplexity at minimum communication cost.

Exercise 68 (FedDDPM Synthetic Auxiliary Data Quality).

(a) The FedDDPM protocol trains a shared diffusion model to generate synthetic auxiliary data D~โˆผG๐œฝ. Clients then use D~ to augment local training. Define three metrics for evaluating D~:

  1. Fidelity: FID(D~,Dref) where Dref is a held-out centralised reference set.

  2. Diversity: the number of modes with probability greater than 1/(2C) in a pre-trained classifier's softmax distribution over D~.

  3. Downstream utility: the test accuracy of a classifier trained on DkโˆชD~ evaluated on Dref.

Derive a theoretical relationship between fidelity and downstream utility under the assumption that Dref and Dk are drawn from the same distribution.

(b) In a federated setting with K=10 clients and Dirichlet-0.1 partition on CIFAR-10, train a FedDDPM for 200 rounds. Generate |D~|=50000 synthetic images. For each client k, measure the downstream utility (accuracy on the full CIFAR-10 test set) of a ResNet-18 trained on DkโˆชD~ versus Dk alone. Report the average improvement and the variance across clients.

(c) Prove or disprove the following claim: if the FedDDPM model achieves FID โ‰คฮท on Dref, then the downstream classifier trained on DkโˆชD~ achieves accuracy within O(ฮท) of the accuracy of a classifier trained on DkโˆชDref. What additional assumptions are required?

Exercise 69 (Discrete Diffusion Masking Schedule Design).

In masked discrete diffusion (MDLM/MDDM), tokens are masked at rate ฮฒ(t) and the model learns to unmask them. The forward process is: q(๐’™t|๐’™0)i={๐’™0,iwithย probabilityย eโˆ’โˆซ0tฮฒ(s)ds[๐™ผ๐™ฐ๐š‚๐™บ]otherwise

(a) Derive the reverse process q(๐’™0|๐’™t) under this forward process. Show that it factorises over positions and depends only on ฮฒ(t) and ๐’™0.

(b) The training objective for the federated discrete diffusion model is โ„’k(๐œฝ)=๐”ผ๐’™0โˆผDk๐”ผtโˆผ๐’ฐ[0,1]๐”ผ๐’™tโˆผq(โ‹…|๐’™0)[โˆ’logโกp๐œฝ(๐’™0|๐’™t)]. Show that the global federated objective 1Kโˆ‘kโ„’k is a valid ELBO for the mixture distribution pmix(๐’™0)=1Kโˆ‘kpk(๐’™0) where pk is the distribution of Dk.

(c) Compare two masking schedules: (i) linear ฮฒ(t)=t and (ii) cosine ฮฒ(t)=1โˆ’cosโก(ฯ€t/2). Which schedule concentrates the unmasking difficulty in earlier or later timesteps? In the federated setting where different clients have different token frequencies, which schedule is more robust to heterogeneous data distributions? Justify with an information-theoretic argument.

Exercise 70 (PRISM Lottery Ticket Probability Analysis).

The PRISM protocol assigns each parameter ฮธj a retention probability pjโˆˆ[0,1] computed from the magnitude of the gradient signal across clients. Specifically, after aggregation: pj=ฯƒ(|gโ€พj|โˆ’ฯ„ฮฝ), where gโ€พj=1Kโˆ‘kgj,k is the averaged gradient, ฯ„ is a threshold, ฮฝ is a temperature, and ฯƒ is the sigmoid function.

(a) Show that in the IID setting (gj,k=gj+ฮพj,k where ฮพj,kโˆผiid๐’ฉ(0,ฯƒg2)), the averaged gradient satisfies gโ€พjโˆผ๐’ฉ(gj,ฯƒg2/K). What is the expected retention probability ๐”ผ[pj] as a function of gj, ฯ„, ฮฝ, and K?

(b) Define the effective compression ratio of PRISM as ฯ=1โˆ’1dโˆ‘j๐”ผ[pj], where d is the number of parameters. Under a prior gjโˆผ๐’ฉ(0,ฯƒw2) on parameter importances, derive ฯ as a function of ฯ„, ฮฝ, ฯƒw, and K.

(c) In the non-IID setting, different clients have different gradient magnitudes for the same parameter. Show that the PRISM retention probability pj overestimates the true importance of parameters that are important for high-weight clients but irrelevant for low-weight clients. Propose a correction that weights client contributions by local dataset size.

Exercise 71 (Federated Unlearning Verification Protocol).

(a) A membership inference attack (MIA) evaluates whether a given sample ๐’™ was in the training set by querying the model. For a generative model G๐œฝ, define a score-based MIA: ๐™ผ๐™ธ๐™ฐ(๐’™,G๐œฝ)={memberifย logโกp๐œฝ(๐’™)โ‰ฅฮณnon-memberotherwise where ฮณ is a threshold. Explain why a high MIA AUC score on a held-out test set indicates memorisation.

(b) After running a federated unlearning algorithm on client k's data Dk, design a verification protocol using MIA:

  1. Partition Dk into Dkunlearn (to be forgotten) and Dkretain (legitimate to remember).

  2. Compute the MIA AUC for Dkunlearn before and after unlearning.

  3. Compute the MIA AUC for Dkretain before and after unlearning.

A successful unlearning is one where the MIA AUC for Dkunlearn drops to approximately 0.5 (random chance) while the AUC for Dkretain remains above a threshold ฮณretain.

(c) Implement this verification protocol for a FedVAE trained on MNIST. Simulate the unlearning of client k's data by fine-tuning the decoder only on the remaining clients' data. Report the MIA AUC before and after unlearning, and the test ELBO on retained versus unlearned samples. Does simple fine-tuning constitute effective unlearning by your metric?

Exercise 72 (Communication Cost Comparison Across Federated Methods).

Consider a federated training scenario with K=100 clients, T=1000 communication rounds, and a model with d=108 parameters. Assume each parameter is represented in 32-bit floating point (4 bytes).

(a) Compute the total communication cost in gigabytes for:

  1. FedAvg (full gradient upload and download each round)

  2. Top-k sparsification with k/d=0.01 (1% of parameters per round)

  3. FedLoRA with rank r=32 applied to all linear layers of a transformer with L=12 layers, dmodel=768, and 4 matrices per layer

  4. FedDiff (transmitting only noise prediction network gradients, assumed to have d/10 parameters)

(b) For each method, compute the communication-utility tradeoff: the ratio of test FID improvement (over the baseline without communication) to total communication cost. Assume:

  • FedAvg achieves FID improvement ฮ”FedAvg=50 FID points.

  • Top-k achieves 0.85ฮ”FedAvg.

  • FedLoRA achieves 0.90ฮ”FedAvg.

  • FedDiff achieves 0.95ฮ”FedAvg.

Which method has the best communication-utility tradeoff?

(c) Prove that under a communication budget of B total bits and a gradient variance bound ฯƒ2, the optimal allocation of bits across T rounds is B/T bits per round, and that concentrating all communication in a single round achieves strictly worse convergence.

Research Challenges

The following five research challenges require original implementation, experimental design, and scientific writing. Each challenge is suitable as a course project or research internship deliverable.

Challenge 1 (Build a Minimal FedGAN for MNIST).

Objective: Implement a complete FedGAN system from scratch and systematically investigate the effect of data heterogeneity on mode coverage.

Architecture:

  • Generator: 4-layer MLP with 100โ†’256โ†’512โ†’784 units, ReLU activations, sigmoid output.

  • Discriminator: 4-layer MLP with 784โ†’512โ†’256โ†’1 units, LeakyReLU activations.

  • Shared discriminator, federated via FedAvg.

  • Local generators per client, aggregated via FedAvg.

Experimental design:

  1. Partition MNIST into Kโˆˆ{2,5,10} clients using Dirichlet-ฮฑ with ฮฑโˆˆ{0.01,0.5,โˆž}.

  2. Train for 100 communication rounds with 5 local GAN steps per round.

  3. Measure: FID (using a pre-trained MNIST classifier as the inception model), number of modes covered (digits generated with probability >5%), and training stability (loss variance).

  4. Compare: FedAvg-GAN versus local-only GAN versus centralised GAN.

Deliverable: A 4-page report with figures showing generated samples at rounds {10,25,50,100}, a table of FID and mode coverage, and a discussion of the mode collapse behaviour observed under highly non-IID conditions.

Challenge 2 (Design a Privacy Attack on a Federated VAE).

Objective: Design and implement a gradient inversion attack targeting a federated VAE, and evaluate the effectiveness of gradient noise as a defence.

Setup:

  1. Train a small VAE (encoder: 2-layer CNN; decoder: 2-layer transposed CNN; latent dimension z=32) on CelebA-64 using FedAvg with K=5 clients.

  2. After training, simulate an honest-but-curious server that observes the gradient updates from one client per round.

  3. Implement three attack strategies: enumerate

  4. Direct reconstruction: minimise the gradient mismatch โ€–โˆ‡๐œฝโ„’(๐’™^)โˆ’โˆ‡๐œฝโ„’(๐’™โˆ—)โ€–2 over the input space.

  5. Latent-space attack: reconstruct the posterior mean ฮผ๐“(๐’™โˆ—) from the encoder gradient, then decode to image space.

  6. GAN-prior attack: use a pre-trained GAN to project the reconstruction into a realistic image manifold. enumerate

Defence evaluation: For each attack, measure reconstruction quality (PSNR, SSIM, face recognition accuracy) under:

  • No defence (baseline).

  • Gradient clipping (clip norm Cโˆˆ{1,10,100}).

  • Gaussian noise (ฯƒโˆˆ{0.01,0.1,1.0}).

  • Gradient compression (top-1% sparsification).

Deliverable: Reconstruction examples for each attackโ€“defence pair, a quantitative table of PSNR vs. model utility (ELBO), and a recommendation for the minimum noise level that renders all three attacks ineffective while preserving ELBO within 10% of the no-noise baseline.

Challenge 3 (Implement FedDDPM with Synthetic Data Augmentation).

Objective: Implement FedDDPM and demonstrate that synthetic data generated by the federated diffusion model improves downstream classification accuracy on clients with limited local data.

Implementation:

  1. Train a DDPM with a small U-Net backbone (โ‰ˆ5ร—106 parameters) using FedAvg on CIFAR-10 partitioned across K=10 clients with Dirichlet-0.1.

  2. After 200 rounds, generate D~ of size 50000 images using the aggregated diffusion model.

  3. For each client k, train a ResNet-18 classifier on Dk alone and on DkโˆชD~k where D~kโŠ‚D~ is filtered to match the class distribution of Dk.

  4. Compare test accuracy (on the full CIFAR-10 test set) for all three conditions.

Ablation studies:

  • Effect of |D~k|โˆˆ{1000,5000,10000,50000}.

  • Effect of filtering strategy: (a) random sampling from D~; (b) class-balanced sampling; (c) distribution matching using maximum mean discrepancy.

  • Effect of diffusion model quality: FID at rounds {50,100,150,200}.

Deliverable: FID curve over training rounds, accuracy improvement table, generated image grid at each training checkpoint, and an analysis of which clients benefit most from synthetic augmentation and why.

Challenge 4 (Create a FedLoRA Training Pipeline).

Objective: Build a complete FedLoRA training pipeline for adapting a pre-trained language model to domain-specific text generation tasks, and characterise the rank-accuracy-communication tradeoff.

Setup:

  1. Use GPT-2 (small, 117M parameters) as the base model.

  2. Simulate K=10 federated clients, each holding text from a different domain: medical, legal, financial, scientific, news, fiction, code, social media, dialogue, and poetry. Use domain-specific subsets of The Pile or Common Crawl.

  3. Apply LoRA to the query and value projection matrices in all 12 attention layers with ranks rโˆˆ{1,2,4,8,16}.

  4. Train for 100 federated rounds with 5 local gradient steps per round.

Evaluation:

  • Perplexity: on held-out test sets for each domain.

  • Communication cost: total megabytes transmitted per client.

  • Personalisation: optionally, allow each client to fine-tune the shared LoRA adapter for 10 additional local steps and report perplexity improvement.

  • Catastrophic forgetting: after federated training, fine-tune the global model on the medical domain for 50 local steps and measure perplexity on the other 9 domains.

Deliverable: Perplexity vs. communication cost Pareto plot, rank ablation table, sample generated texts from each domain, and a discussion of whether the federated model outperforms individually trained domain-specific models at the same communication budget.

Challenge 5 (Propose a Federated Generative Model for Climate Data).

Objective: Design (and, where feasible, prototype) a federated generative model for climate data synthesis, motivated by the challenge that national meteorological agencies cannot share raw station data across borders due to data sovereignty restrictions.

Problem statement: Each of K=20 simulated meteorological agencies holds time-series data: temperature, precipitation, wind speed, and humidity at Nk weather stations for a period of 30 years. The agencies wish to train a joint generative model that can simulate realistic global weather patterns and generate synthetic station data for use in climate impact studies.

Design requirements:

  1. Architecture: Propose a generative model architecture suited to multivariate spatio-temporal time series. Candidates include: federated score-based diffusion over graphs, federated normalising flows with temporal conditioning, or federated transformers with spatial attention.

  2. Privacy model: Define what โ€œprivacyโ€ means in this context. Should the model prevent reconstruction of individual station records, or should it prevent inference about the statistical climate signature of a particular country or region?

  3. Utility metrics: Define at least three domain-specific metrics for evaluating synthetic climate data quality, e.g., spatial autocorrelation preservation, precipitation frequency distribution, and extreme event (heat wave, drought) frequency.

  4. Communication protocol: Design a communication protocol that accounts for the heterogeneous bandwidth and latency of meteorological agencies in different countries.

  5. Validation: Propose a validation methodology that does not require centralising any real data.

Prototype: Using the ERA5 reanalysis dataset (publicly available), simulate the federated scenario by partitioning ERA5 data by geographic region across 20 simulated agencies. Train a federated score diffusion model on daily temperature fields. Report the continuous ranked probability score (CRPS) of the synthetic climate data relative to held-out ERA5 data.

Deliverable: A 6-page technical report covering the proposed architecture and privacy model, a quantitative evaluation table, a discussion of the practical barriers to deploying such a system in practice (institutional, regulatory, and technical), and a prototype implementation with generated climate data visualisations.

Chapter Summary

This chapter has provided a comprehensive tour of federated generative modelling: the mathematical foundations, the principal algorithms, the privacy and communication tradeoffs, and the open frontiers. We close with two summary boxes that crystallise the chapter's most important insights.

Key Idea.

Three principles underpin all federated generative modelling systems:

1. Data gravity: raw data has a gravitational pull-it stays close to its source. The federated framework accepts this constraint rather than fighting it, treating data locality as a first-class design requirement rather than a limitation to be overcome.

2. The trilemma is real but not fatal: no protocol simultaneously achieves perfect privacy, optimal utility, and minimal communication. Practitioners must understand this tradeoff and make conscious, domain-specific choices about which dimension to prioritise. The choice is never purely technical; it reflects institutional values and regulatory requirements.

3. The generative model is the protocol: in federated generative learning, the model itself serves as a communication medium. By generating synthetic data that can be shared freely, the generative model resolves the privacy-utility tension in a way that discriminative models cannot. This is the deepest reason why generative models are especially valuable in federated settings.

Insight.

The convergence of federated learning, generative modelling, and foundation models is not merely a technical trend-it is a response to a deep social reality. The world's most valuable data is distributed, sensitive, and irreplaceable: medical records, financial transactions, personal communications, scientific measurements. This data cannot and should not be centralised. Yet the patterns in this data, if unlocked, could dramatically accelerate scientific discovery, improve healthcare, and expand access to AI-powered tools.

Federated generative models are the mechanism by which these patterns can be learned and shared without compromising the privacy of individuals or the sovereignty of institutions. The mathematics developed in this chapter-differential privacy, secure aggregation, gradient compression, ELBO decomposition, diffusion score matching-is the formal language in which this mechanism is expressed.

The open problems of Section Open Problems and Future Directions are not obstacles; they are invitations. They mark the boundary between what is known and what remains to be discovered. Solving them is the research agenda of the coming decade.