联合学习_联合学习为什么以及如何开始

联合学习

A general audience introduction to the federated learning technique and its goals, with a brief review of existing platforms and Digital Catapult’s own demonstration example.

向大众介绍联邦学习技术及其目标,并简要回顾现有平台和Digital Catapult自己的演示示例。

什么是联合学习? (What is federated learning?)

A topic of growing interest, federated learning can be associated with data privacy, distributed systems and machine learning, but what is it?

联合学习是一个越来越受关注的话题,它可以与数据隐私,分布式系统和机器学习相关联,但这是什么?

Federated learning (FL) is a particular approach for training machine learning (ML) algorithms in a way that means data stays private. Specifically, federated learning techniques aim to train machine learning algorithms across multiple, distributed devices or servers, each holding their own local and private data.

联合学习(FL)是一种用于训练机器学习(ML)算法的特殊方法,它意味着数据保持私密性。 具体来说,联合学习技术旨在跨多个分布式设备或服务器训练机器学习算法,每个设备或服务器都拥有自己的本地和私有数据。

This collaborative approach contrasts with traditional machine learning techniques, which are centralised in nature and rely on all data samples to be gathered in one unique dataset before being used. It also differs from techniques based on parallel computation, which are devised to optimise computation for ML over multiple processors, using a centralised dataset that is split into identically distributed subsets for computation.

这种协作方法与传统的机器学习技术形成了鲜明的对比,传统的机器学习技术本质上是集中的,并且依赖于所有数据样本在使用之前被收集到一个唯一的数据集中。 它也不同于基于并行计算的技术,该技术被设计为使用集中化的数据集将多个处理器上的ML优化计算,该数据集被分为相同分布的子集进行计算。

Federated learning hence offers a broader paradigm for implementing ML solutions, essentially providing more flexibility on how the data can be managed. FL is not restricted to specific ML algorithms and it can be used in a variety of contexts. It is primarily adapting how the training procedures for those algorithms are implemented, and it can be considered for both offline or online learning (for example, training on a static dataset at once, or continuously training on new coming data). It follows that FL is not one unique method, and according to the ML technique employed, the type of data and the operational context, a different strategy will be preferable.

因此,联合学习为实施ML解决方案提供了更广泛的范例,从本质上为如何管理数据提供了更大的灵活性。 FL不限于特定的ML算法,它可以在多种情况下使用。 它主要是针对这些算法的训练程序的实现方式进行调整,并且可以考虑将其用于离线或在线学习(例如,一次对静态数据集进行训练,或对新数据进行连续训练)。 因此,FL不是一种独特的方法,根据所采用的ML技术,数据类型和操作环境,最好使用其他策略。

Some simple and intuitive FL methods have proven to be surprisingly efficient solutions for practical application, one such example being the federated averaging algorithm. It consists in averaging at regular intervals the weights of the Neural Networks trained by different FL participants, called workers, on their local data subsets to update a global model. In turn, the local neural networks are then updated with this new global model for further training. The learnings obtained from each local dataset are progressively shared across all the workers as the global model is updated. This is the method we applied to an image classification use-case in an agricultural application presented more in detail below.

事实证明,一些简单而直观的FL方法是实际应用中令人惊讶的高效解决方案,其中一个示例就是联合平均算法。 它包括定期对由不同FL参与者(称为工作者)训练的神经网络的权重进行平均,以权衡其本地数据子集以更新全局模型。 反过来,然后使用此新的全局模型更新局部神经网络以进行进一步的训练。 随着全局模型的更新,从每个本地数据集获得的学习信息将逐步在所有工作人员之间共享。 这是我们在农业应用中应用于图像分类用例的方法,下面将详细介绍。

See Figure 1 below a for an illustration of the federated learning principles in this case.

有关这种情况下的联合学习原理的说明,请参见下面的图1。

是什么使联合学习如此吸引人? (What makes federated learning such an appealing technique?)

Machine learning applications require vast amounts of data. Acquiring sufficient quantities of data to solve a specific problem with ML can be challenging, time-consuming and costly. In practical cases, the data generated is often not centralised, but dispersed instead, and needs to be gathered first from many sources for being used. In addition, the data acquired by an organisation can have a specific distribution that may not support the development of models that can generalise well. For example, hospitals in different regions or countries may have different distributions of patients profiles and pathologies, and would benefit from collaborating to develop ML applications that serve equally all their patients. While those challenges could be theoretically addressed through the collaborations of organisations sharing a common problem and interest, such a collaboration is in practice a very hard problem to solve in any context, when it comes to exchanging data and information.

机器学习应用程序需要大量数据。 获取足够数量的数据来解决ML的特定问题可能是具有挑战性,耗时且昂贵的。 在实际情况下,生成的数据通常不是集中的,而是分散的,需要首先从许多来源收集以便使用。 此外,组织获取的数据可能具有特定的分布,可能无法支持可以很好地推广的模型的开发。 例如,不同地区或国家/地区的医院可能具有不同的患者资料和病理分布,并且将受益于合作开发可同时为所有患者提供服务的ML应用程序。 尽管理论上可以通过拥有共同问题和共同利益的组织的协作来解决这些挑战,但在交换数据和信息时,在任何情况下,这样的协作实际上都是一个很难解决的问题。

The federated learning approach enables the collaborative development of more robust and performant machine learning models, while addressing critical issues such as data transfer, privacy, and security for each individual participant.

联合学习方法可以协作开发更强大和性能更好的机器学习模型,同时为每个参与者解决诸如数据传输,隐私和安全性等关键问题。

Because in a FL system the data of each participant is not transferred and remains under the participant’s control, it provides a solution to the problem of privacy preservation when considering working in collaboration. This privacy-by-design characteristic is one of the main advantages of FL. Data privacy matters whether different organisations consider collaborating on solving a common set of problems, or when protecting sensitive and personal data is crucial but using this data would also be beneficial, such as in the case of health data. With FL, the security and access to the data can be managed locally, under the participant’s security and privacy requirements. The potential is huge, as privacy and ownership concerns are one of the main barriers to data sharing.

因为在FL系统中,每个参与者的数据都不会传输,而是保持在参与者的控制之下,所以当考虑进行协作时,它为隐私保护问题提供了解决方案。 这种按设计保密的特性是FL的主要优势之一。 数据隐私很重要,无论是不同组织考虑在解决一组常见问题上进行协作,还是在保护敏感和个人数据至关重要时,但使用此数据也将是有益的,例如在健康数据方面。 使用FL,可以根据参与者的安全性和隐私要求在本地管理数据的安全性和访问权限。 潜力巨大,因为隐私和所有权问题是数据共享的主要障碍之一。

In a FL system, there is no assumption regarding the distribution of the data within each participant’s dataset, nor assumptions regarding the size of each of the distributed datasets. This flexibility is another key advantage of the technique. It allows different participants, with different volumes or distribution of data and varying capabilities, to collaborate on the training of ML models. Having heterogeneous datasets potentially helps building models that can generalise better. Each participant can then benefit from models trained on a richer and broader range of data with no additional cost for acquiring this data.

在FL系统中,没有关于每个参与者的数据集中的数据分布的假设,也没有关于每个分布式数据集的大小的假设。 这种灵活性是该技术的另一个关键优势。 它允许具有不同数据量或数据分布和不同功能的不同参与者在ML模型的训练上进行协作。 具有异构数据集可能有助于构建可以更好地概括的模型。 然后,每个参与者都可以受益于在更丰富和更广泛的数据范围上训练的模型,而无需花费额外的成本来获取此数据。

联合学习应用 (Federated learning applications)

Federated learning, with its many advantages, has applications in many industries:

联合学习具有许多优点,已在许多行业中得到应用:

A canonical example is Google’s Gboard, where federated learning has been used to train the predictive keyboard algorithm directly on millions of user’s smartphones, without needing to upload any of the user’s interactions or private text messages in the cloud. Instead, neural network models were sent to the user’s devices, trained locally on data stored in the devices, and sent back with additional privacy preserving methods to be averaged with thousands of other devices’ updates. Despite the stringent technical constraints of having to train models directly on devices without affecting the user experience, the obligation to preserve users’ privacy provided a compelling use case for FL. For the user, the improved and personalised experience using the keyboard provides an incentive for accepting to participate in the model training.

一个典型的例子是Google的Gboard ,其中联邦学习已被用于直接在数百万用户的智能手机上训练预测键盘算法,而无需在云中上传用户的任何交互或私人短信。 取而代之的是,将神经网络模型发送到用户的设备,对设备中存储的数据进行本地培训,然后使用其他隐私保护方法发送回去,以与数千个其他设备的更新进行平均。 尽管必须在不影响用户体验的情况下直接在设备上直接训练模型的严格技术限制,但保护用户隐私的义务还是FL的引人注目的用例。 对于用户而言,使用键盘的改进的个性化体验为接受参加模型训练提供了动力。

Some data can be even more sensitive than mobile keyboard interactions. Personal healthcare data must be managed with the highest consideration for privacy and security. However, this data is also invaluable to develop new useful AI applications, and FL offers a technical solution to that challenge: Hospitals can now collaborate with their data, such as medical imaging for automated cancer diagnostic systems, so researchers can use more significant databases capturing the largest spectrum of cases and pathological patterns. In the UK, NVIDIA is partnering with King’s College London and Owkin to create a federated learning platform for the National Health Service, that enables algorithms to travel from one hospital to another, training on local datasets.

某些数据甚至比移动键盘交互更为敏感。 个人医疗数据必须在高度重视隐私和安全性的前提下进行管理。 但是,这些数据对于开发新的有用的AI应用程序也是无价的,FL提供了应对这一挑战的技术解决方案:医院现在可以与其数据进行协作,例如用于自动癌症诊断系统的医学成像,因此研究人员可以使用更重要的数据库来捕获最大范围的病例和病理模式。 在英国,NVIDIA与伦敦国王学院和Owkin合作,为National Health Service创建了联邦学习平台 ,该平台使算法能够从一所医院转移到另一所医院,并接受本地数据集的培训。

Data intensive applications are another promising domain of application for federated learning: self-driving cars onboard many ML technologies to operate that rely on a lot of sensing data, such as computer vision with cameras or Lidar technologies. Federated learning can provide a solution to limit the volume of data transfer needed while allowing for real-time, continuous improvement for these applications, compared to classic centralised cloud approaches. This is an example of distributed edge computing application.

数据密集型应用是联邦学习的另一个有前途的应用领域:许多ML技术的自动驾驶汽车依靠大量的传感数据进行操作,例如带摄像头的计算机视觉或激光雷达技术。 与传统的集中式云方法相比,联合学习可以提供一种解决方案,以限制所需的数据传输量,同时允许这些应用程序进行实时,持续的改进。 这是分布式边缘计算应用程序的示例。

More generally, since FL enables collaboration without actually requiring the transfer of data, it opens opportunities for cooperation between organisations. Problems shared across an industry are good candidates for utilising FL to support the development of more robust and effective machine learning solutions. Sectors likely to gain from such collaborations include supply chain, manufacturing, energy distribution, transport. The data collection burden can be spread between the participating organisations while they collectively benefit from improved solutions. This opens the opportunity for new business models for exploiting and managing access to data.

更一般而言,由于FL使协作成为可能,而实际上并不需要进行数据传输,因此为组织之间的合作提供了机会。 跨行业存在的问题是利用FL支持更健壮和有效的机器学习解决方案开发的良好候选者。 此类合作中可能受益的行业包括供应链,制造,能源分配,运输。 数据收集负担可以分散在参与组织之间,而它们可以共同受益于改进的解决方案。 这为开发和管理对数据的访问的新业务模型提供了机会。

挑战性 (Challenges)

The federated learning setting provides solutions to some practical machine learning problems as well as new opportunities for ML applications; it is important to mention the set of potential challenges that a FL framework presents.

联合学习设置为一些实际的机器学习问题提供解决方案,并为机器学习应用提供了新的机会。 重要的是要提到FL框架提出的一系列潜在挑战。

As they are based on a distributed network, FL applications have to address risks of potential attacks or failures of numerous workers. Attacks on a federated learning setting could take different forms. An attack could originate from a participant by altering the data used to train the ML model, or altering the model itself, with the potential to compromise the global model. It can also be an attempt by a participant or the server to infer data from other workers through the model updates it receives. Failures are, in contrast, of non-malicious nature but can also adversely affect the performance of the FL process. Network unreliability, the limited availability, unresponsiveness or drop-out of the workers are more prevalent problems in a distributed setting, and FL implementations should be designed to be robust to these threats.

由于它们基于分布式网络,因此FL应用程序必须解决潜在的攻击风险或众多工作人员的失败。 对联合学习环境的攻击可能采取不同的形式。 通过更改用于训练ML模型的数据或更改模型本身,攻击者可能发起攻击,有可能危害全局模型。 参与者或服务器也可以尝试通过接收到的模型更新来推断其他工作者的数据。 相反,故障是非恶意的,但也会对FL过程的执行产生不利影响。 在分布式环境中,网络不可靠,工作人员有限的可用性,React迟钝或辍学是更为普遍的问题,因此FL设计应设计为对这些威胁具有鲁棒性。

From an ethical point of view, concepts such as bias and fairness, while not specific to FL and relevant to most ML applications, can potentially be more challenging topics to address due to the private nature of the distributed datasets and require specific attention. However, as noted before, this challenge comes with the potential benefit to leverage Federated Learning to increase the data diversity.

从伦理的角度来看,诸如偏见和公平之类的概念虽然并非特定于FL而是与大多数ML应用相关,但由于分布式数据集的私有性质,因此有可能成为更具挑战性的主题,需要特别注意。 但是,如前所述,此挑战具有利用联合学习增加数据多样性的潜在好处。

Solutions to these challenges exist and are topics of active research. Although they are out of the scope of this article, it is worth mentioning differential privacy and homomorphic encryption as examples of privacy preserving techniques suitable for FL applications. AI Ethics is a topic central to Digital Catapult’s objective of accelerating the ethical and responsible adoption of AI, and we are keen to support innovation and experimentation to address those challenges, and to explore applications on FL, which we started with a demonstrator project.

这些挑战的解决方案已经存在,并且是积极研究的主题。 尽管它们不在本文讨论范围之内,但值得一提的是,差分隐私和同态加密是适用于FL应用程序的隐私保护技术的示例。 AI伦理学是Digital Catapult加速以道德和负责任的方式采用AI的目标的核心主题,我们热衷于支持创新和试验以应对这些挑战,并探索FL上的应用程序,我们从一个演示项目开始。

示威者 (Demonstrator)

As a demonstrator for federated learning applications, Digital Catapult has chosen to ground or work on a use case stemming from our observations in prior works with the agricultural sector. Crop scouting and diseases outbreak detection is an area where data could be leveraged to generate actionable insights for growers to improve productivity, reduce costs and enable more environmentally friendly treatment methods. In practice, gathering consistent data in quantity is costly and impractical for growers, because of the manual work involved, the lack of adequate tools and the expertise required. The diversity and range of crops and diseases observable is also limited for any grower. This operational data is also viewed as sensitive and sharing it represents a competitive risk, so attempts to bring consortium of growers to gather their private data has proven to be difficult. This represents a perfect use-case for federated learning.

作为联邦学习应用程序的演示者,Digital Catapult已选择根据我们在农业领域的先前工作中的观察得出的用例进行研究或开展工作。 作物侦查和疾病暴发检测是一个领域,可以利用数据为种植者提供可行的见解,以提高生产力,降低成本并采用更环保的治疗方法。 在实践中,由于涉及手工操作,缺乏足够的工具和所需的专业知识,因此收集一致的数据对于种植者而言既昂贵又不切实际。 可观察到的农作物和病害的多样性和范围也对任何种植者都是有限的。 该操作数据也被视为敏感数据,并且共享它代表着竞争风险,因此,试图让种植者财团来收集其私人数据非常困难。 这代表了联合学习的理想用例。

Using an open-source images dataset named PlantVillage, we have simulated a collaborative ensemble of growers, shown in Figure 1, contributing to the development of a global model with their own private datasets of crops leaves presenting symptoms of various diseases. Using our own platform independent implementation of FL and the Federated Average algorithm, we demonstrated the potential for FL to achieve state of the art performance on this computer vision task. Each growers would consequently benefit from an increased performance and better generalisation power of the ML model, with a solution running on small and inexpensive edge computing devices, Jetson Nano. We dive into the technical details of this FL library in an upcoming blog post.

使用名为PlantVillage的开源图像数据集,我们模拟了种植者的协作集合,如图1所示,这有助于建立具有自己的农作物叶片私人数据集的全球模型,该数据集呈现各种疾病的症状。 使用我们自己的平台独立实现的FL和联合平均算法,我们展示了FL在此计算机视觉任务上实现最新性能的潜力。 因此,通过在小型且便宜的边缘计算设备Jetson Nano上运行的解决方案,每个种植者都将受益于ML模型的更高性能和更强的泛化能力。 我们将在即将发布的博客文章中深入探讨该FL库的技术细节。

结论 (Conclusion)

Federated learning has received increasing attention in recent years, and for good reasons: a flexible paradigm for implementing machine learning in a distributed and privacy preserving way, FL has the potential to address some of the current limitations of applied artificial intelligence by facilitating the collaboration around data across an industry.

近年来,联合学习受到越来越多的关注,并且有充分的理由:基于以分布式和隐私保护方式实施机器学习的灵活范例,FL可以通过促进围绕以下方面的协作来解决应用人工智能的当前局限性整个行业的数据。

The growth of the internet of things provides another game changing application to FL, and technologies like blockchain can support the development of new business models to incentivise participants in a FL environment with new business models.

物联网的发展为FL提供了另一种改变游戏规则的应用程序,而区块链等技术可以支持新业务模型的开发,从而通过新业务模型激励FL环境中的参与者。

What use cases for federated learning can you can think of? We’d love to hear about those in the comments!

您能想到哪些联合学习用例? 我们希望知道评论中的内容!

翻译自: https://medium.com/digital-catapult/federated-learning-why-and-how-to-get-started-811d7bdb468f

联合学习

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值