Aggregate programming is a field-based coordination paradigm with over a decade of exploration and successful applications across domains including sensor networks, robotics, and IoT, with implementations in various programming languages, such as Protelis, ScaFi (Scala), and FCPP (C++). A recent research direction integrates machine learning with aggregate computing, aiming to support large-scale distributed learning and provide new abstractions for implementing learning algorithms. However, existing implementations do not target data science practitioners, who predominantly work in Python--the de facto language for data science and machine learning, with a rich and mature ecosystem. Python also offers advantages for other use cases, such as education and robotics (e.g., via ROS). To address this gap, we present Phyelds, a Python library for aggregate programming. Phyelds offers a fully featured yet lightweight implementation of the field calculus model of computation, featuring a Pythonic API and an architecture designed for seamless integration with Python's machine learning ecosystem. We describe the design and implementation of Phyelds and illustrate its versatility across domains, from well-known aggregate computing patterns to federated learning coordination and integration with a widely used multi-agent reinforcement learning simulator.
翻译:聚合编程是一种基于域的协调范式,历经十余年的探索并在传感器网络、机器人技术和物联网等众多领域成功应用,已出现以Protelis、ScaFi(Scala)和FCPP(C++)等不同编程语言实现的方案。近期研究方向将机器学习与聚合计算相结合,旨在支持大规模分布式学习,并为学习算法的实现提供新的抽象机制。然而,现有实现并未针对数据科学从业者——他们主要使用Python(数据科学与机器学习领域事实上的标准语言,拥有丰富成熟的生态系统)。Python在教育和机器人技术(例如通过ROS)等其他应用场景中也具备优势。为弥补这一缺口,我们提出了Phyelds,一个用于聚合编程的Python库。Phyelds提供了字段演算计算模型的完整且轻量级实现,其特点在于采用Python化的API和专为与Python机器学习生态系统无缝集成而设计的架构。本文描述了Phyelds的设计与实现,并展示了其跨领域的多用途性,应用范围涵盖从经典聚合编程模式到联邦学习协调以及与广泛使用的多智能体强化学习模拟器的集成。