[Paper Review] Walle: An End-to-End, General-Purpose, and Large-Scale Production System for Device-Cloud Collaborative Machine Learning
Walle is an end-to-end, general-purpose, large-scale production system for device-cloud collaborative machine learning, enabling efficient, secure, and low-latency execution of diverse ML tasks across billions of devices. It integrates a cross-platform compute container based on MNN with operator decomposition and semi-auto search, a stream-processing data pipeline, and a scalable deployment platform, achieving high performance and low overhead in real-world e-commerce workloads at scale.
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.
Motivation & Objective
- To overcome the bottlenecks of cloud-centric ML, including high latency, communication cost, and privacy risks, by enabling device-cloud collaborative ML at scale.
- To design a general-purpose, end-to-end system that supports diverse ML workloads—CV, NLP, and recommendation—across mobile and cloud platforms.
- To decouple ML task iteration from mobile app release cycles, enabling rapid experimentation and deployment without app updates.
- To provide a high-performance, cross-platform execution environment that supports concurrent task execution and efficient model inference on heterogeneous devices.
- To reduce the manual effort of optimizing ML operators across hundreds of hardware backends through automated mechanisms.
Proposed method
- The compute container is built on MNN, a tensor compute engine with a refined Python thread-level virtual machine, enabling cross-platform execution and concurrent task handling.
- Operator decomposition and semi-auto search are used to automatically optimize operators across diverse hardware backends, minimizing manual tuning.
- The data pipeline employs an on-device stream processing framework to process user behavior data at source, reducing data transfer and latency.
- The deployment platform uses a push-then-pull mechanism with multi-granularity policies to efficiently release ML tasks to billions of devices in real time.
- The system supports full ML lifecycle management—pre-processing, training, inference, and post-processing—across both device and cloud environments.
- MNN’s runtime optimization dynamically selects the best backend for a given computation graph, enhancing performance and adaptability.
Experimental results
Research questions
- RQ1How can a general-purpose, large-scale system be designed to support end-to-end device-cloud collaborative ML across diverse applications?
- RQ2What mechanisms enable efficient, low-latency, and secure execution of ML tasks on billions of mobile devices while minimizing communication and computational overhead?
- RQ3How can the system decouple ML task iteration from mobile app release cycles to support rapid experimentation and production iteration?
- RQ4What techniques can automate the optimization of ML operators across hundreds of hardware backends without manual tuning?
- RQ5How does the system maintain high performance and scalability in real-world, production-grade e-commerce workloads?
Key findings
- Walle has been deployed at scale in Alibaba, serving billions of users daily across diverse e-commerce applications, demonstrating real-world production viability.
- The MNN-based compute container achieves superior performance in micro-benchmarks, with significant speedups due to automated operator optimization and backend selection.
- The on-device stream processing pipeline reduces data transfer and latency by processing user behavior data at the source, improving efficiency.
- The push-then-pull deployment mechanism enables timely and scalable task release to massive device fleets with multi-granularity control.
- The semi-auto search and operator decomposition mechanisms drastically reduce the manual effort required to optimize ML operators across heterogeneous hardware.
- Walle enables low-latency, privacy-preserving inference by keeping sensitive data on-device while offloading computation to mobile devices.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.