Skip to main content
QUICK REVIEW

[论文解读] Walle: An End-to-End, General-Purpose, and Large-Scale Production System for Device-Cloud Collaborative Machine Learning

Chengfei Lv, Chaoyue Niu|arXiv (Cornell University)|May 30, 2022
IoT and Edge/Fog Computing被引用 10
一句话总结

Walle 是一个端到端、通用、大规模的生产级系统,用于设备-云协同机器学习,可在数十亿台设备上高效、安全且低延迟地执行各类机器学习任务。它集成了基于 MNN 的跨平台计算容器(支持算子分解与半自动搜索)、流式数据处理管道以及可扩展的部署平台,在大规模真实电商业务中实现了高性能与低开销。

ABSTRACT

To break the bottlenecks of mainstream cloud-based machine learning (ML) paradigm, we adopt device-cloud collaborative ML and build the first end-to-end and general-purpose system, called Walle, as the foundation. Walle consists of a deployment platform, distributing ML tasks to billion-scale devices in time; a data pipeline, efficiently preparing task input; and a compute container, providing a cross-platform and high-performance execution environment, while facilitating daily task iteration. Specifically, the compute container is based on Mobile Neural Network (MNN), a tensor compute engine along with the data processing and model execution libraries, which are exposed through a refined Python thread-level virtual machine (VM) to support diverse ML tasks and concurrent task execution. The core of MNN is the novel mechanisms of operator decomposition and semi-auto search, sharply reducing the workload in manually optimizing hundreds of operators for tens of hardware backends and further quickly identifying the best backend with runtime optimization for a computation graph. The data pipeline introduces an on-device stream processing framework to enable processing user behavior data at source. The deployment platform releases ML tasks with an efficient push-then-pull method and supports multi-granularity deployment policies. We evaluate Walle in practical e-commerce application scenarios to demonstrate its effectiveness, efficiency, and scalability. Extensive micro-benchmarks also highlight the superior performance of MNN and the Python thread-level VM. Walle has been in large-scale production use in Alibaba, while MNN has been open source with a broad impact in the community.

研究动机与目标

  • 通过在大规模设备-云协同机器学习场景下突破以云为中心的机器学习瓶颈,包括高延迟、通信开销和隐私风险。
  • 设计一个通用、端到端的系统,支持在移动和云平台之间跨多种机器学习工作负载(计算机视觉、自然语言处理和推荐系统)的运行。
  • 将机器学习任务的迭代与移动应用发布周期解耦,实现在无需应用更新的情况下快速实验和部署。
  • 提供高性能、跨平台的执行环境,支持异构设备上的并发任务执行和高效模型推理。
  • 通过自动化机制大幅减少在数百种硬件后端上手动优化机器学习算子的工作量。

提出的方法

  • 计算容器基于 MNN 构建,MNN 是一种经过优化的 Python 线程级虚拟机的张量计算引擎,支持跨平台执行和并发任务处理。
  • 采用算子分解与半自动搜索技术,自动优化不同硬件后端上的算子,最大限度减少手动调优。
  • 数据管道采用设备端流式处理框架,原地处理用户行为数据,减少数据传输与延迟。
  • 部署平台采用推送-拉取机制,并结合多粒度策略,实现实时向数十亿台设备高效发布机器学习任务。
  • 系统支持端到端的机器学习生命周期管理——包括预处理、训练、推理和后处理——覆盖设备与云环境。
  • MNN 的运行时优化可动态为给定计算图选择最优后端,从而提升性能与适应性。

实验结果

研究问题

  • RQ1如何设计一个通用、大规模的系统,以支持在多样化应用场景中实现端到端的设备-云协同机器学习?
  • RQ2哪些机制能够实现在数十亿台移动设备上高效、低延迟且安全地执行机器学习任务,同时最小化通信与计算开销?
  • RQ3系统如何实现机器学习任务迭代与移动应用发布周期的解耦,以支持快速实验与生产迭代?
  • RQ4哪些技术能够实现对数百种硬件后端上机器学习算子的自动化优化,而无需人工调优?
  • RQ5该系统在真实世界、生产级别的电商业务工作负载中如何保持高性能与可扩展性?

主要发现

  • Walle 已在阿里巴巴大规模落地,每日服务数十亿用户,覆盖多样化电商业务场景,充分验证了其在真实生产环境中的可行性。
  • 基于 MNN 的计算容器在微基准测试中表现出卓越性能,得益于自动化算子优化与后端选择,显著提升了运行速度。
  • 设备端流式处理管道通过在数据源本地处理用户行为数据,有效减少了数据传输与延迟,提升了整体效率。
  • 推送-拉取部署机制支持对海量设备集群的及时、可扩展的任务发布,并具备多粒度控制能力。
  • 半自动搜索与算子分解机制大幅减少了在异构硬件上优化机器学习算子所需的手动工作量。
  • Walle 通过将敏感数据保留在设备端,同时将计算卸载至移动设备,实现了低延迟、隐私保护的推理。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。