← Back to Contents

Chapter 01: Introduction to Federated Learning

Master the fundamentals of privacy-preserving collaborative machine learning

What is Federated Learning?

Federated Learning (FL) is a revolutionary machine learning paradigm that enables collaborative model training across multiple decentralized devices or servers holding local data samples, without exchanging their raw data. This approach addresses critical privacy concerns while still benefiting from the collective intelligence of distributed data sources.

The fundamental principle of federated learning is simple yet powerful: bring the code to the data, instead of bringing the data to the code. Rather than centralizing data in a single location for training, the training process is distributed to where the data lives, and only model updates are shared.

Key Insight

Federated learning enables organizations and individuals to collaboratively train machine learning models while keeping their data private, secure, and decentralized. This aligns with the philosophy of 弘益人間 (Hongik Ingan) - benefiting all humanity by advancing AI capabilities while respecting individual privacy.

The Motivation Behind Federated Learning

Privacy Concerns in Traditional ML

Traditional centralized machine learning requires collecting all training data in a single location. This approach raises significant privacy concerns:

The Data Silo Problem

In many domains, valuable data is fragmented across multiple entities that cannot or will not share their data:

Federated learning breaks down these silos without compromising data sovereignty, enabling collaborative learning while maintaining data ownership and control.

How Federated Learning Works

The Basic Workflow

A typical federated learning system operates through the following iterative process:

  1. Initialization: A central server initializes a global model
  2. Distribution: The model is sent to participating clients (devices or organizations)
  3. Local Training: Each client trains the model on its local data
  4. Update Computation: Clients compute model updates (gradients or weights)
  5. Secure Transmission: Updates are encrypted and sent to the server
  6. Aggregation: The server aggregates all updates into an improved global model
  7. Iteration: Steps 2-6 repeat until convergence

Privacy Guarantee

Throughout this entire process, raw data never leaves the client devices. Only model updates are shared, and these can be further protected through encryption and differential privacy techniques.

Federated Averaging Algorithm

The most common federated learning algorithm is Federated Averaging (FedAvg), proposed by McMahan et al. in 2017:

Algorithm: Federated Averaging (FedAvg)

Input:
  - K clients with local datasets D₁, D₂, ..., Dₖ
  - Learning rate η
  - Number of local epochs E
  - Batch size B
  - Number of rounds T

Initialize global model parameters w₀

for round t = 1 to T:
    Server:
        Sample subset Sₜ of K clients
        Send wₜ to all clients in Sₜ

    Each client k ∈ Sₜ in parallel:
        wₖᵗ⁺¹ ← ClientUpdate(k, wₜ)
        Send wₖᵗ⁺¹ to server

    Server:
        wₜ₊₁ ← Σ (nₖ/n) * wₖᵗ⁺¹
        # Weighted average by local dataset size

ClientUpdate(k, w):
    for epoch e = 1 to E:
        for batch b in Dₖ:
            w ← w - η∇ℓ(w; b)
    return w

This algorithm elegantly balances local computation with global coordination. Each client performs multiple epochs of local training before communicating, reducing the number of communication rounds required.

Federated Learning Architecture

System Components

A federated learning system consists of several key components:

Component Role Responsibilities
Central Server Orchestrator Model initialization, aggregation, client coordination
Client Devices Trainers Local data storage, model training, update computation
Communication Layer Transport Secure transmission of models and updates
Aggregation Module Combiner Merging client updates into global model
Privacy Module Protector Differential privacy, encryption, secure aggregation

Communication Patterns

Federated learning systems can employ different communication patterns:

Types of Federated Learning

Cross-Device Federated Learning

Involves millions or billions of devices (smartphones, IoT sensors) with small local datasets:

Cross-Silo Federated Learning

Involves multiple organizations or data silos with larger datasets:

Advantages of Federated Learning

Privacy Preservation

The most significant advantage is privacy protection. Raw data never leaves its source, reducing the risk of data breaches and unauthorized access. This enables compliance with strict data protection regulations like GDPR, HIPAA, and CCPA.

Data Sovereignty

Organizations and individuals maintain complete control over their data. They can participate in collaborative learning without surrendering data ownership or violating competitive boundaries.

Reduced Bandwidth Requirements

Only model updates (typically much smaller than raw data) are transmitted. For example, a model update might be 10MB while the training data could be terabytes.

Access to Diverse Data

Federated learning enables training on data that would otherwise be inaccessible due to privacy constraints. This leads to more robust and generalizable models trained on diverse, real-world data distributions.

Real-Time Personalization

Models can be personalized to local data while benefiting from global knowledge. Users get both privacy and personalized experiences.

Challenges in Federated Learning

Communication Efficiency

Communication can be a major bottleneck, especially for cross-device scenarios. Challenges include:

Design Consideration

Communication costs often dominate computation costs in federated learning. Algorithms must minimize the number of communication rounds and the size of transmitted updates.

Statistical Heterogeneity (Non-IID Data)

Unlike centralized learning with IID (Independent and Identically Distributed) data, federated learning must deal with:

System Heterogeneity

Clients vary dramatically in their capabilities:

Privacy Guarantees

While federated learning improves privacy, additional techniques are needed for strong guarantees:

Real-World Applications

Gboard (Google Keyboard)

Google's Gboard uses federated learning to improve next-word prediction and emoji suggestions. Millions of users train local models on their typing behavior, with updates aggregated to improve the global model without Google ever seeing what users type.

Healthcare Research

Hospitals collaborate to train diagnostic models on patient data without sharing sensitive medical records. For example, predicting patient deterioration or improving medical imaging analysis across institutions.

Financial Fraud Detection

Banks train fraud detection models collaboratively without revealing transaction details or customer information, benefiting from collective knowledge of fraud patterns across institutions.

Autonomous Vehicles

Vehicle fleets learn from diverse driving experiences while keeping route and location data private. Improvements to perception and planning systems are shared without compromising privacy.

Comparison with Traditional Machine Learning

Aspect Traditional ML Federated Learning
Data Location Centralized server Distributed across clients
Privacy Raw data exposed Raw data remains private
Communication One-time data upload Iterative model exchange
Data Distribution IID (typically) Non-IID (common)
Training Speed Fast (centralized GPU) Slower (distributed devices)
Scalability Limited by server capacity Scales with client population
Regulatory Compliance Complex (data movement) Easier (data stays local)

The Future of Federated Learning

Federated learning represents a paradigm shift in how we think about machine learning in an increasingly privacy-conscious world. As data privacy regulations tighten globally and users demand more control over their data, federated learning offers a path forward that balances innovation with individual rights.

The field is rapidly evolving with research on:

Chapter Summary

Review Questions

  1. Explain the fundamental principle behind federated learning. How does it differ from traditional centralized machine learning?
  2. Describe the seven steps of a typical federated learning workflow. Why is raw data never transmitted?
  3. What is the Federated Averaging (FedAvg) algorithm? How does it balance local computation with communication?
  4. Compare and contrast cross-device and cross-silo federated learning. Provide examples of each.
  5. What are the main advantages of federated learning for privacy preservation? Why is this important for regulatory compliance?
  6. Explain the challenge of statistical heterogeneity in federated learning. How does non-IID data affect model training?
  7. Why is communication efficiency a critical concern in federated learning, especially for cross-device scenarios?
  8. Describe three real-world applications of federated learning. How does each benefit from this approach?
  9. What are the key components of a federated learning system architecture?
  10. How does federated learning embody the philosophy of 弘益人間 (Hongik Ingan - Benefit All Humanity)?

Korea Standardization Infrastructure Mapping

Korea operates a comprehensive standards governance system through inter-ministerial cooperation. National Standards Council (under Prime Minister's Office, per Framework Act on National Standards Article 5) coordinates KATS (Korean Agency for Technology and Standards), MFDS (Ministry of Food and Drug Safety), MOTIE (Ministry of Trade, Industry and Energy), MSIT (Ministry of Science and ICT), MOIS (Ministry of the Interior and Safety), MOE (Ministry of Environment), MOHW (Ministry of Health and Welfare), MND (Ministry of National Defense), MCST (Ministry of Culture, Sports and Tourism), MOFA (Ministry of Foreign Affairs), MOJ (Ministry of Justice), and FSC (Financial Services Commission). Accreditation and Testing: KOLAS (Korea Laboratory Accreditation Scheme) accredits 800+ testing laboratories. KAS (Korea Accreditation System) accredits 50+ certification bodies. KTC (Korea Testing Certification), KTR (Korea Testing & Research Institute), KTL (Korea Testing Laboratory), and KCL (Korea Conformity Laboratories) provide conformance testing. Telecom and Cyber: KCC (Korea Communications Commission), KCA (Korea Communications Agency), TTA (Telecommunications Technology Association), IITP (Institute for Information & Communications Technology Planning & Evaluation), NIPA (National IT Industry Promotion Agency), KISA (Korea Internet & Security Agency), KCMVP (Korea Cryptographic Module Validation Program), NIS (National Intelligence Service), NSR (National Security Research Institute), and NCSC (National Cyber Security Center). National R&D Centers: KIST, ETRI, KAIST, Seoul National University, Yonsei University, Korea University, POSTECH, UNIST, GIST, DGIST, KISTI, KIER, KIMM, KRICT, KFRI, KRIBB. International Standards Cooperation: ISO TC/SC Korean secretariats, IEC TC/SC Korean secretariats, ITU-T Study Group Korean chairs, 3GPP RAN/SA Korean chairs, IEEE 802 Korean chairs, W3C Korea office, OASIS Korea office, IETF Korea cooperation, OECD CSTP, UN ESCAP, APEC SCSC Korean cooperation. Korean Industrial Standards (KS) Catalog: KS X (Information) 25,000+, KS A (Basic) 15,000+, KS B (Machinery) 25,000+, KS C (Electrical) 18,000+, KS D (Metallurgy) 12,000+, KS E (Mining) 5,000+, KS F (Construction) 18,000+, KS H (Food) 8,000+, KS I (Environment) 5,000+, KS J (Biology) 3,000+, KS K (Textile) 15,000+, KS L (Ceramics) 7,000+, KS M (Chemistry) 12,000+, KS P (Medical) 5,000+, KS Q (Quality Mgmt) 4,000+, KS R (Transport) 12,000+, KS S (Service) 3,000+, KS T (Packaging) 4,000+, KS V (Shipbuilding) 5,000+, KS W (Aerospace) 3,000+ — totaling 220,000+ Korean Industrial Standards. Key Acts: Personal Information Protection Act (Act 19234, effective Sept 15, 2024), Electronic Government Act, Electronic Signature Act, Act on Promotion of Information and Communications Network Utilization and Information Protection, Information and Communications Infrastructure Protection Act, Data Industry Act, Public Data Act, AI Framework Act (Act 20212, effective July 2026), Industrial Technology Innovation Promotion Act, Framework Act on Science and Technology — 70+ Korean standardization-related laws.