A Discrete-event-based Simulator for Distributed Deep Learning

Xiaoyan Liu, Zhiwei Xu, Yana Qin, Jie Tian

TL;DR

This paper introduces sim4DistrDL, a novel discrete-event simulator designed to bridge the gap between network simulation and deep learning. It allows researchers to effectively simulate and analyze distributed deep learning applications in realistic network environments, addressing a critical need for better tools in this rapidly evolving field.

What Problem Does This Paper Address?

The increasing deployment of deep neural networks (DNNs) in distributed environments, especially at the edge, presents significant challenges. Optimizing the numerous parameters of network devices and DNN models for these distributed setups is complex. While simulations are crucial for evaluating scalability and configuration effects, existing tools like NS-3 and MATLAB fall short. NS-3, a robust network simulator, lacks built-in support for deep learning computations, making it difficult to integrate libraries like PyTorch or TensorFlow. MATLAB, while capable of some simulations, doesn't systematically support discrete-event simulation, hindering accurate modeling of distributed learning dynamics. This leaves a void for a simulator that can seamlessly combine network behavior with deep learning processes.

Methods

The core innovation is sim4DistrDL, a discrete-event simulator built upon the NS-3 framework. It achieves its functionality by integrating two key modules:

  • Network Simulation Module: This module leverages NS-3's discrete-event simulation capabilities. It includes components for network device modeling, data transmission, protocol stacks (TCP/IP), and importantly, a data caching component. The paper specifically highlights the implementation of an LRU (Least Recently Used) caching strategy, which is crucial for managing training data at the edge.
  • Deep Learning Module: This module provides the deep learning functionality. Instead of relying on heavy external frameworks, it incorporates a lightweight deep learning library (OpenNN) that supports various DNN models like MLPs and CNNs. This module is designed to be cross-compiled with the network simulation module, enabling seamless interaction.

The integration is achieved by exposing network simulation module utilities to the deep learning module and encapsulating deep learning processes as applications within the network simulation environment.

Datasets

The paper mentions the use of:

  • A textual dataset for training the MLP model.
  • An image dataset for training the AlexNet model.

The paper does not introduce any new benchmarks or datasets.

Key Insights and Ideas

  • Bridging the Simulation Divide: The most significant insight is the successful integration of a deep learning module within a discrete-event network simulator. This overcomes the limitations of existing tools that are either strong in networking or deep learning but not both.
  • Importance of Caching: The paper emphasizes the role of in-network caching (specifically LRU) in distributed deep learning. Efficiently caching training data at edge nodes is presented as a critical factor for performance.
  • Lightweight Deep Learning Integration: By using a self-contained deep learning library (OpenNN) rather than heavy external frameworks, sim4DistrDL avoids the resource overhead and integration complexities often associated with such frameworks in simulation environments.
  • Generic Applicability: The simulator is designed to be generic, allowing for the simulation of various DNN models and distributed learning scenarios, making it a versatile tool for researchers.

Key Results

The paper demonstrates the effectiveness of sim4DistrDL through application cases involving the training of an MLP and an AlexNet (CNN) model.

  • Successful Training Simulation: The results show that sim4DistrDL can accurately simulate the distributed training process, as evidenced by the decreasing loss values over epochs for both MLP and AlexNet models (shown in Figures 4 and 5).
  • Convergence: Both models demonstrated convergence, with varying latencies, indicating the simulator's ability to capture performance characteristics.
  • Validation of Framework: The authors conclude that their framework is generic and can be used to identify various training processes of DNN models, validating its utility.

Limitations and Future Work

  • Limited Deep Learning Library: While OpenNN is used, it's noted that it includes "some popular DNN models." The paper explicitly states a future plan to "include more support to types of neural network models," suggesting the current library might not cover all advanced architectures.
  • Specific Caching Strategy: The paper focuses on LRU caching as an example. While effective, other caching strategies might be relevant for different scenarios and could be explored in the future.
  • Future Work: The authors plan to include more support for various neural network models. They also aim to provide a prerequisite for the configuration of distributed intelligent applications, suggesting further development towards more user-friendly application deployment within the simulator.

Summary updated

Abstract

New intelligence applications are driving increasing interest in deploying deep neural networks (DNN) in a distributed way. To set up distributed deep learning involves alterations of a great number of the parameter configurations of network/edge devices and DNN models, which are crucial to achieve best performances. Simulations measure scalability of intelligence applications in the early stage, as well as to determine the effects of different configurations, thus highly desired. However, work on simulating the distributed intelligence environment is still in its infancy. The existing simulation frameworks, such as NS-3, etc., cannot extended in a straightforward way to support simulations of distributed learning. In this paper, we propose a novel discrete event simulator, sim4DistrDL, which includes a deep learning module and a network simulation module to facilitate simulation of DNN-based distributed applications. Specifically, we give the design and implementation of the proposed learning simulator and present an illustrative use case.
BibTeX
@inproceedings{liu2022discrete,
  author = {Xiaoyan Liu and Zhiwei Xu and Yana Qin and Jie Tian},
  title = {{A Discrete-event-based Simulator for Distributed Deep Learning}},
  booktitle = {2022},
  year = {2022},
  doi = {10.1109/iscc55528.2022.9912919},
}
Figure