What is federated learning?

Answer

Federated learning trains ML models across decentralized devices (e.g., mobile phones) without sharing raw data. Each device trains locally on its data and sends only model updates (gradients) to a central server, which aggregates them (typically via FedAvg — federated averaging of weights). This preserves privacy since raw data never leaves the device. Challenges: non-IID data (each device has different data distributions), communication efficiency (compressing gradient updates), and security against adversarial clients. Used by Google for keyboard prediction (Gboard) and healthcare (training on hospital data without sharing patient records).