Deep Learning with Apache SystemML

Niketan Pansare, Michael Dusenberry, Nakul Jindal, Matthias Boehm, Berthold Reinwald, Prithviraj SenarXiv 2018 · OpenReview

TL;DR

This paper introduces Apache SystemML's approach to integrating deep learning (DL) into existing big data ecosystems like Spark. It addresses the challenge of deploying DL models in shared enterprise environments by providing a unified framework that automatically optimizes execution plans for both single-node and distributed settings, leveraging existing big data infrastructure.

What Problem Does This Paper Address?

The paper tackles a significant disconnect between the deep learning community and the big data community. Traditional deep learning frameworks often rely on custom communication libraries (like MPI or Gloo) that don't integrate well with enterprise-grade big data platforms like Hadoop and Spark. This leads to inefficient resource utilization, requiring separate infrastructures for data processing and DL model training. Furthermore, the differing workload characteristics (e.g., memory-bound ML vs. compute-bound DL) create challenges when data pipelines need to seamlessly transition between ML and DL stages. Apache SystemML aims to bridge this gap by offering a unified framework that integrates DL seamlessly with big data frameworks.

Methods

SystemML's core innovation lies in its declarative, R-like language called DML (Declarative Machine Learning). This language allows data scientists to express ML and DL algorithms with precise semantics, abstracting away underlying data representations and cluster characteristics. SystemML's cost-based compiler then automatically generates hybrid runtime execution plans. These plans can be composed of single-node and distributed operations, dynamically adapting to data size, sparsity, cluster size, and memory configurations. This approach allows for algorithm reusability across different data-parallel frameworks (like Spark) and simplifies deployment across various runtime environments, from low-latency scoring to large-scale training.

For deep learning specifically, SystemML offers:

  • NN Library: A library of over 20 pre-implemented DL layers and 6 optimizers, all written in DML. This allows users to build custom layers and modify existing ones.
  • Keras2DML/Caffe2DML APIs: Python APIs that translate Keras or Caffe DL models into SystemML's DML scripts. These APIs also provide a scikit-learn-like interface for Python programmers and integrate with Spark's MLPipeline API.
  • Compiler Optimizations: SystemML leverages optimizations for tensor representation (linearizing multi-dimensional tensors), built-in functions for common operations, native BLAS exploitation for CPU-intensive tasks, and a GPU backend that compiles GPU low-level operators when data fits in GPU memory. It also handles sparse operations efficiently and generates distributed data-parallel plans for large-scale operations.

Datasets

Not discussed in the paper.

Key Insights and Ideas

  • Unified Framework for DL and Big Data: The most significant insight is the creation of a single framework that can handle both traditional ML and cutting-edge DL, running on existing big data infrastructure. This breaks down silos and improves resource utilization in enterprise settings.
  • Compiler-Driven Optimization: SystemML's compiler is the "secret sauce." By analyzing data and cluster characteristics, it automatically generates optimized execution plans, abstracting away the complexity of distributed systems for the end-user.
  • Bridging the Gap for DL Experts: The Keras2DML and Caffe2DML APIs are crucial for adoption. They allow DL practitioners familiar with popular frameworks to leverage SystemML's distributed capabilities without learning a new language from scratch.
  • Flexibility in Execution: The ability to seamlessly switch between single-node and distributed execution, and to exploit multi-core, multi-GPU, and cluster parallelism, makes SystemML highly adaptable to different deployment scenarios.

Key Results

The paper doesn't present specific quantitative results in terms of accuracy or speedup benchmarks. Instead, it focuses on the architectural and methodological contributions of SystemML for deep learning. The key "results" are the capabilities it enables:

  • Seamless integration of DL models into big data pipelines.
  • Automatic generation of optimized execution plans for various cluster configurations.
  • Support for popular DL frameworks (Keras, Caffe) through Python APIs.
  • Efficient handling of large datasets and complex DL operations on distributed systems.

Limitations and Future Work

Limitations:

  • No Automatic Differentiation: The current SystemML NN library requires users to manually write the DML code for partial derivatives (backward pass) of each layer.
  • Tensor Representation Simplification: Representing multi-dimensional tensors by linearizing all but the first dimension might introduce complexities or inefficiencies in certain scenarios, though the paper highlights optimizations to mitigate this.

Future Work:

  • Extending Code Generation: Further enhancements to the code generation framework for DL operations, including vertical and horizontal fusion of layers, and code generation for heterogeneous hardware (GPUs).
  • Asynchronous Algorithms: Support for asynchronous algorithms like HogWild! and Stale-Synchronous SGD to improve scalability and efficiency.
  • Parameter Server Abstractions: Integrating parameter server abstractions to support data-parallel, task-parallel, and parameter-server-based execution strategies within a single framework.
  • Optimization Tradeoffs: Investigating the automatic exploitation of optimization tradeoffs between hardware efficiency and statistical efficiency.

Summary updated

Abstract

Enterprises operate large data lakes using Hadoop and Spark frameworks that (1) run a plethora of tools to automate powerful data preparation/transformation pipelines, (2) run on shared, large clusters to (3) perform many different analytics tasks ranging from model preparation, building, evaluation, and tuning for both machine learning and deep learning. Developing machine/deep learning models on data in such shared environments is challenging. Apache SystemML provides a unified framework for implementing machine learning and deep learning algorithms in a variety of shared deployment scenarios. SystemML's novel compilation approach automatically generates runtime execution plans for machine/deep learning algorithms that are composed of single-node and distributed runtime operations depending on data and cluster characteristics such as data size, data sparsity, cluster size, and memory configurations, while still exploiting the capabilities of the underlying big data frameworks.
BibTeX
@misc{pansare2018deep,
  author = {Niketan Pansare and Michael Dusenberry and Nakul Jindal and Matthias Boehm and Berthold Reinwald and Prithviraj Sen},
  title = {{Deep Learning with Apache SystemML}},
  year = {2018},
  eprint = {1802.04647},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1802.04647},
}

Loading related content...

Figure