Abstract: In response to growing concerns about user privacy, federated learning has emerged as a promising tool to train statistical models over networks of devices while keeping data localized. Federated learning methods run training tasks directly on user devices and do not share the raw user data with third parties. However, current methods still share model updates, which may contain private information (e.g., one's weight and height), during the training process. Existing efforts that aim to improve the privacy of federated learning make compromises in one or more of the following key areas: performance (particularly communication cost), accuracy, or privacy. To better optimize these trade-offs, we propose that sketching algorithms have a unique advantage in that they can provide both privacy and performance benefits while maintaining accuracy. We evaluate the feasibility of sketching-based federated learning with a prototype on three representative learning models. Our initial findings show that it is possible to provide strong privacy guarantees for federated learning without sacrificing performance or accuracy. Our work highlights that there exists a fundamental connection between privacy and communication in distributed settings, and suggests important open problems surrounding the theoretical understanding, methodology, and system design of practical, private federated learning.
The Privacy Challenge in Federated Learning
Federated Learning (FL) is frequently presented as a privacy-first paradigm because raw user data never leaves the local device. However, this privacy is often incomplete. During the training process, devices transmit model updates—such as gradients—to a central server for aggregation. Recent research has demonstrated that these updates can be "inverted" by malicious actors or curious servers to reconstruct sensitive training data.
As illustrated above, model updates can inadvertently act as proxies for sensitive features like age, gender, or health metrics. Existing countermeasures, such as Differential Privacy (DP) or Secure Multi-Party Computation (SMC), often introduce significant overhead. DP typically requires adding noise that degrades model accuracy, while SMC imposes heavy communication and computational burdens that are often prohibitive for resource-constrained mobile devices.
Methodology: Sketching for Privacy and Efficiency
To address these limitations, we propose the use of sketching algorithms—specifically Count-Min Sketch and Count Sketch—as a mechanism for both data compression and privacy preservation. Sketching involves using independent hash functions to map high-dimensional model updates into a much smaller matrix of counters.
This approach offers three primary advantages:
- Compression: By hashing updates, we can reduce the size of the transmitted data by orders of magnitude. This is particularly effective because model updates in FL are often sparse or skewed, meaning only a small subset of parameters changes significantly in any given round.
- Inherent Privacy: Sketching utilizes many-to-one hashing, which naturally obfuscates the identity of specific data points. Without knowledge of the secret hash seeds, a third party cannot easily map a counter back to its original model parameter. The probability of an attacker correctly guessing the original index is $1/n$, where $n$ is the model dimension.
- Linear Aggregation: Sketches are linear data structures. The central server can aggregate updates by simply summing the received sketches. The server then queries this aggregated sketch to update the global model, ensuring that individual updates are never viewed in isolation.
Experimental Evaluation
We evaluated our sketching prototype across three distinct tasks to test its robustness across different model architectures and data distributions:
- Synthetic Regression: A linear regression task using heterogeneous data to simulate non-identical distributions across devices.
- FEMNIST (Federated Extended MNIST): An image classification task involving handwritten characters distributed across 200 simulated devices, trained using a Multi-layer Perceptron (MLP).
- Shakespeare: A next-word prediction task based on The Complete Works of William Shakespeare, utilizing a Recurrent Neural Network (RNN) with LSTM layers.
Key Results and Discussion
Our findings indicate that sketching provides a powerful "win-win" for federated systems. We observed 10x to 25x compression of model updates while maintaining testing accuracy comparable to the standard FedAvg algorithm. Furthermore, when measuring accuracy against the total volume of data communicated, the sketching method converged significantly faster than vanilla FL.
However, we noted a slight accuracy degradation at the "tail" of training for non-linear models (FEMNIST and Shakespeare). As model updates become smaller during convergence, static sketches struggle to accurately recover these minute values. This suggests that "adaptive sketching"—where compression ratios or sketch types evolve during training—is a promising avenue for future research.
Conclusion
Sketching algorithms demonstrate that privacy and communication efficiency are not necessarily at odds; rather, they are two sides of the same coin. By reducing the fidelity of shared information, we can simultaneously protect user privacy and lower the barrier for distributed training on mobile hardware. Future work will focus on formalizing the differential privacy guarantees of these sketches and exploring hardware-level integrations to further harden the security of the federated pipeline.
Summary updated