Edge 269: A New Series About Federated Learning
Was this email forwarded to you? Sign up here. You can also give it as a gift. Edge 269: A New Series About Federated LearningIntro to federated learning, the original federated learning and the TensorFlow Federated framework.In this issue:
💡 ML Concept of the Day: A New Series About Federated LearningToday we are starting a new series about federated learning(FL), one of the most popular deep learning architectures used in distributed systems. Pioneered by Google in 2017, FL has become one of the fundamental techniques to train systems that operate in a decentralized manner. In that category, we can place applications running on mobile or internet of things(IOT) devices and the entire field of edge computing applications. But how does FL really works? In a setting in which an ML model is running in multiple silos. A centralized approach to ML training would require training to be collected in devices and send to the cloud. This imposes some privacy concerns but is also brutally hard to scale in architectures with millions of devices. . In a FL architecture, each host running the model will first download it and will improve it using local training data. After that, the FL method will push a small focused update to the cloud which is aggregated with the updates from millions of other hosts and distributed back to all of the m. Throughout this process, the training data remains locally in the host infrastructure and only the updates are distributed to cloud environments. The general principle of FL consists in training models on local, in-device data samples and exchanging parameters such as weights and biases between different devices at some frequency to generate a global model shared by all devices. FL is far from being a single architecture and has evolved into different variants such as: data-centric, model-centric, vertical, horizontal, federated transfer learning and many others. We will deep dive into all those areas in the next editions of this newsletter. 🔎 ML Research You Should Know About: The Original Federated Learning PaperCommunication-Efficient Learning of Deep Networks from Decentralized Data was published in by Google Research in 2017. The paper introduced the notion of federated learning that has become so popular in mobile machine learning architectures. The objective: The paper introduces a method to enable the training of mobile machine learning models while preserving privacy. Google terms this new method as federated learning. Why it is so important? Federated learning has become the most popular technique for highly scalable, private machine learning models. Most modern deep learning frameworks already include federated learning libraries. Diving Deeper: Most machine learning practitioners associate model training with access to the raw training data. Think about the scenario of a mobile app deployed across millions of devices. The traditional way to model training would be to collect data from all those users, aggregate it in a centralized server and train a new version of the model. By now you should be worrying about privacy in your mobile apps and you definitely should. However, federated learning offers a brilliant alternative to the traditional approach. In Communication-Efficient Learning of Deep Networks from Decentralized Data, Google researchers introduced the notion of federated learning as a method to decouple the training of machine learning models from the access to the raw training dataset. Essentially, federated learning leaves the training data distributed on the mobile devices, and learns a shared model by aggregating locally-computed updates. The concept of federated learning is not hard to comprehend but the devil is in the details. What are the exact updates published by the mobile devices? How are those updates aggregated to improve the training of the model? In a traditional machine learning scenario, the model will produce a set of parameters such as weights and biases which then will be processed by an optimization algorithm such as stochastic gradient descent(SGD). To adapt that model to a scenario with millions of parameter sets, federated learning introduces a new optimization algorithm known as FederatedAveraging which takes fewer iterations to produced an optimized model. The FederatedAveraging algorithm can be seen as a federated, high performance version of SGD that can receive parameter from millions of instances of the machine learning model and produced a new version of the model. Federated learning has discovered new frontiers and sparked a lot of innovation in the mobile machine learning space. Being familiar with this technique is essential when working in machine learning scenarios with internet of things(IOT) or mobile architectures. 🤖 ML Technology to Follow: TensorFlow Federated is an Open Source Framework for Federated LearningWhy Should I Know About This:. TensorFlow is the most popular deep learning framework in the market. TensorFlow Federated enables the implementation of federated learning models on top of TensorFlow. What is it: TensorFlow Federated(TFF) brings federated learning to TensorFlow models. The framework was built based on the experiences scaling federated learning architectures at Google. The idea behind TFF is to abstract a series of primitives that enable machine learning computations over decentralized data. Let’s imagine that we are building an image classification model in TensorFlow. That’s a relatively easy task as TensorFlow already includes many popular algorithms for image classification and there are plenty of high quality training datasets out there. The traditional way to do this in TensorFlow would be to build the initial model and train it across the entire dataset. However, what if we could partition the training across different nodes each one containing portions of the dataset. This could be the case in a mobile scenario in which part of the training data is hosted in the individual user’s devices. This is the type of scenario that TFF can enable. From the architecture standpoint, TFF is based on two fundamental components:
These two APIs are the core components needed to enable federated learning in a TensorFlow model. The FL API enables to create model architectures in which the training data is provided by different “writers” each one hosting a portion of the training dataset. The FC API provides a lower set of computations that can be distributed across all the different nodes in the architecture. For instance, imagine that we have a topology with many nodes, each reporting a numerical indicators(ex: the temperature in a given room). We would like to calculate the average of those computations without uploading the data to a centralized server. This is the type of federated computation that can be achieved with the TFF FC API. The computations enabled by the FC API can be seen as the equivalent of the FederatedAveraging function outlined in the original federated learning paper. TFF provides a very simple programming model that enables the creation of federated learning architectures in TensorFlow. The native integration with TensorFlow has made TFF one of the most popular federated learning frameworks in the deep learning community and one that we should expect to grow very fast in the next few years. How Can I Use it: TensorFlow Federated is part of the TensorFlow project and is available athttps://www.tensorflow.org/federated/. TheSequence is a summary of groundbreaking ML research papers, engaging explanations of ML concepts, and exploration of new ML frameworks and platforms. We keep you up-to-date with the main AI news, trends, and technology developments. This post is only for paying subscribers of TheSequence Edge. You can give it as a gift. |
Older messages
Meta and Amazon Generative AI Moves
Sunday, February 26, 2023
Sundays, The Sequence Scope brings a summary of the most important research papers, technology releases and VC funding deals in the artificial intelligence space.
📝 Guest Post: Harder than Expected: Why Large Enterprises Are Challenged by AI/ML*
Friday, February 24, 2023
Artificial Intelligence and Machine Learning (AI/ML) technologies are rapidly advancing, with new breakthroughs being made every day. Businesses in nearly every industry sector are rushing to take
Inside BLOOM: How Thousands of AI Researchers Created an Open Source ChatGPT Alternative
Thursday, February 23, 2023
An open-source LLM shows that tech incumbents are not the only companies able to create massive models.
💡TOMORROW: Chip Huyen & Kevin Stumpf on Making the Jump to Real-Time ML
Wednesday, February 22, 2023
Real-time ML is increasingly being adopted to power new applications across use cases in multiple industries. But for most companies, moving to real-time ML is a huge undertaking. It requires a shift
Who Has The Vision?
Sunday, February 12, 2023
On Sunday, The Sequence Scope brings a summary of the most important research papers, technology releases and VC funding deals in the artificial intelligence space
You Might Also Like
Corporate Casserole 🥘
Monday, November 25, 2024
How marketing and lobbying inspired Thanksgiving traditions. Here's a version for your browser. Hunting for the end of the long tail • November 24, 2024 Hey all, Ernie here with a classic
WP Weekly 221 - Bluesky - WP Assets on CDN, Limit Font Subsets, ACF Pro Now
Monday, November 25, 2024
Read on Website WP Weekly 221 / Bluesky Have you joined Bluesky, like many other WordPress users, a new place for an online social presence? Also in this issue: CrawlWP, Asset Management Framework,
🤳🏻 We Need More High-End Small Phones — Linux Terminal Setup Tips
Sunday, November 24, 2024
Also: Why I Switched From Google Maps to Apple Maps, and More! How-To Geek Logo November 24, 2024 Did You Know Medieval moats didn't just protect castles from invaders approaching over land, but
JSK Daily for Nov 24, 2024
Sunday, November 24, 2024
JSK Daily for Nov 24, 2024 View this email in your browser A community curated daily e-mail of JavaScript news JavaScript Certification Black Friday Offer – Up to 54% Off! Certificates.dev, the trusted
OpenAI's turbulent early years - Sync #494
Sunday, November 24, 2024
Plus: Anthropic and xAI raise billions of dollars; can a fluffy robot replace a living pet; Chinese reasoning model DeepSeek R1; robot-dog runs full marathon; a $12000 surgery to change eye colour ͏ ͏
Daily Coding Problem: Problem #1618 [Easy]
Sunday, November 24, 2024
Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Zillow. Let's define a "sevenish" number to be one which is either a power
PD#602 How Netflix Built Self-Healing System to Survive Concurrency Bug
Sunday, November 24, 2024
CPUs were dying, the bug was temporarily un-fixable, and they had no viable path forward
RD#602 What are React Portals?
Sunday, November 24, 2024
A powerful feature that allows rendering components outside their parent component's DOM hierarchy
C#533 What's new in C# 13
Sunday, November 24, 2024
Params collections support, a new Lock type and others
⚙️ Smaller but deeper: Writer’s secret weapon to better AI
Sunday, November 24, 2024
November 24, 2024 | Read Online Ian Krietzberg Good morning. I sat down recently with Waseem Alshikh, the co-founder and CTO of enterprise AI firm Writer. Writer recently made waves with the release of