Перейти к содержимому

Week 09 – Part 2 | Federated SMS Spam Detection with Clipping and Noise

Faranak Solat

0:00 / 0:00

Week 09 – Part 2 | Federated SMS Spam Detection with Clipping and Noise

20 просмотров · 7 дн. назад
Faranak Solat
24 подписчика
20 просмотров · 7 дн. назад
Theory and Applications of Federated Learning Week 09 – Part 2: Federated SMS Spam Detection with Clipping and Noise In this practical session, we use Google Colab to build a simple federated learning model for SMS spam detection. We explain the main code blocks and results without writing the code line by line. The full notebook is available for students to review and run after class. Using the public UCI SMS Spam Collection, we divide training messages among twenty simulated clients. Each client has a different number of messages and a different share of spam. We compare three methods: • FedAvg • FedAvg with client-update clipping • FedAvg with clipping and Gaussian noise The example uses logistic regression and runs on a CPU. We show how clients train locally, how the server combines their updates, and how clipping and noise affect the results. Topics covered: • Preparing training, validation, and test sets • Creating clients with different data distributions • Local training and global model updates • Limiting update size with clipping • Adding Gaussian noise to the average update • Comparing spam F1, precision, and recall • Checking update sizes before and after clipping • Testing different noise levels • Repeating experiments with different random seeds • Understanding the limits of the results This notebook demonstrates clipping and noise mechanisms. It does not calculate an epsilon privacy budget or provide a complete differential privacy guarantee. Secure aggregation is not implemented. Course Materials / GitHub: https://github.com/faranaksadatsolat/ Course: Theory and Applications of Federated Learning Level: Graduate Language: English Instructor: Faranak Solat Department of AI & Data Science, Sejong University Dataset: T. Almeida and J. Hidalgo, SMS Spam Collection, UCI Machine Learning Repository, 2011. https://doi.org/10.24432/C5CC84 This session is intended for educational purposes as part of a graduate-level course on federated learning. #FederatedLearning #FedAvg #DifferentialPrivacy #SpamDetection #GoogleColab #MachineLearning #DataPrivacy #NonIID #Python #GraduateCourse