BlazeFL让联邦学习仿真又快又可复现,同一配置下结果完全一致。
BlazeFL: Fast and Deterministic Federated Learning Simulation

- 用线程共享内存并行训练,避免通信开销
- 为每个客户端分配独立随机数流,确保结果可复现
- 在CIFAR-10上比基线快3.1倍,适合高效实验
联邦学习研究依赖单节点仿真,虚拟客户端达数百至数千,效率与可复现性至关重要。但并行训练常因共享随机状态和调度波动引入非确定性,迫使研究者在吞吐量与可复现性间权衡,或在复杂框架中添加定制控制逻辑。本文提出BlazeFL,一种轻量级单节点联邦学习仿真框架,通过无锁共享内存执行与确定性随机数管理,缓解这一矛盾。BlazeFL采用线程级并行,服务端与客户端通过内存直接交换参数,避免序列化和进程间通信开销。为实现确定性,为各客户端分配独立随机数生成器(RNG)流。在固定软硬件环境下,当随机算子使用BlazeFL管理的生成器时,高并发运行中线程与进程模式下结果比特级一致。在CIFAR-10图像分类实验中,相比广泛使用的开源基线,BlazeFL显著降低执行时间,通信密集型任务下最高提速3.1倍,同时保持轻量依赖。代码已开源:https://github.com/kitsuyaazuma/blazefl。
原文摘要 · Abstract (English)
Federated learning (FL) research increasingly relies on single-node simulations with hundreds or thousands of virtual clients, making both efficiency and reproducibility essential. Yet parallel client training often introduces nondeterminism through shared random state and scheduling variability, forcing researchers to trade throughput for reproducibility or to implement custom control logic within complex frameworks. We present BlazeFL, a lightweight framework for single-node FL simulation that alleviates this trade-off through free-threaded shared-memory execution and deterministic randomness management. BlazeFL uses thread-based parallelism with in-memory parameter exchange between the server and clients, avoiding serialization and inter-process communication overhead. To support deterministic execution, BlazeFL assigns isolated random number generator (RNG) streams to clients. Under a fixed software/hardware stack, and when stochastic operators consume BlazeFL-managed generators, this design yields bitwise-identical results across repeated high-concurrency runs in both thread-based and process-based modes. In CIFAR-10 image-classification experiments, BlazeFL substantially reduces execution time relative to a widely used open-source baseline, achieving up to 3.1$\times$ speedup on communication-dominated workloads while preserving a lightweight dependency footprint. Our open-source implementation is available at: https://github.com/kitsuyaazuma/blazefl.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。