SplitBrain: Hybrid Data and Model Parallel Deep Learning

Farley Lai, Asim Kadav, Erik KruusarXiv 2021

Training state-of-the-art deep learning models has become a high-stakes game of balancing memory and compute. As models like VGG and its successors grow deeper, they often hit a "memory wall" where a single machine simply cannot hold all the parameters. While Data Parallelism (DP)—replicating the model across many workers—is the industry standard, it is incredibly memory-inefficient for massive models. On the other hand, Model Parallelism (MP)—sharding the model across workers—saves memory but often collapses under the weight of communication overhead.

In their paper, researchers from NEC Labs present SplitBrain, a framework that seeks the "Goldilocks zone" by intelligently hybridizing these two approaches.

TL;DR

SplitBrain is a distributed deep learning framework that automatically partitions CNNs, applying data parallelism to compute-heavy layers and model parallelism to memory-heavy ones. By introducing a novel "Group Model Parallelism" extension, it achieves nearly linear scaling and up to 67% memory savings on VGG-class models.

What Problem Does This Paper Address?

The core challenge is the fundamental difference between layer types in Convolutional Neural Networks (CNNs).

  1. Convolutional Layers are compute-intensive but have relatively few parameters. They are perfect for DP because the communication cost to sync their small parameter sets is low compared to the work they do.
  2. Fully-Connected (FC) Layers are the opposite: they are compute-light but parameter-heavy. In a VGG variant, FC layers can account for over 75% of the total memory usage. Replicating these across every worker (as in pure DP) is a massive waste of RAM.

Previous attempts at hybrid parallelism often struggled with complexity or poor scaling. If you shard a model across 32 machines, the communication required for every single training sample becomes a bottleneck that destroys throughput.

Methods

SplitBrain automates the transformation of a standard CNN into a hybrid parallel version. It uses a layer-specific partitioning strategy:

  • Automatic Transformation: The framework analyzes the network and inserts two specialized layers: the Modulo Layer ($L_M$) and the Shard Layer ($L_S$).
  • The Modulo Layer schedules how mini-batches are broadcast and gathered across workers.
  • The Shard Layer manages the communication of partitioned outputs during forward passes and gradients during backpropagation.
Figure 3: Automatic CNN transformation with layer partitioning. LFC, LConv, LM and LS stand for FC, convolutional, modulo and shard layers.
  • Group Model Parallelism (GMP): This is SplitBrain's "secret sauce" for scaling. Instead of sharding the model across all available machines, it organizes workers into small groups. Within a group, workers perform MP (sharing the memory load). Across different groups, the system performs DP (replicating the sharded groups). This localizes the high-frequency communication required for MP to a small subset of nodes, preventing network congestion.
Figure 6: A CNN with GMP enabled, showing workers partitioned into MP groups.

Datasets

The authors evaluated SplitBrain using the CIFAR-10 dataset, a standard benchmark for image classification consisting of 60,000 32x32 color images. They used a VGG variant with 11 layers and 7.5 million parameters to demonstrate the framework's efficiency.

Key Insights and Ideas

  • The "Compute-to-Communication" Ratio (CCR): SplitBrain doesn't just shard everything. It uses the CCR to decide if a layer is worth partitioning. If the communication overhead of sharding a layer outweighs the time saved in computation, it stays replicated.
  • Localizing MP Overhead: By using GMP, SplitBrain acknowledges that all-to-all communication is a scaling killer. Keeping MP communication "intra-group" allows the system to benefit from memory savings without sacrificing the linear speedup provided by DP.
  • Asynchronous Approximation: The framework supports an asynchronous approximate computation model, which helps hide the latency of model parallelism from the developer.

Key Results

  • Memory Efficiency: SplitBrain achieved up to 67% memory savings for the VGG model compared to standard data parallelism.
  • Linear Scaling: When using an MP group size of 2, the framework demonstrated nearly linear throughput scaling up to 32 machines.
  • Throughput: In a 32-machine cluster, SplitBrain reached a throughput of nearly 3,900 images/sec for pure DP, while maintaining high performance even as model sharding was increased.
  • Configurability: The results showed a clear, tunable trade-off: larger MP groups save more memory but introduce more communication overhead, allowing engineers to optimize based on their specific hardware constraints.

Limitations and Future Work

While powerful, SplitBrain currently focuses on CNNs with sequential containers. The authors note that more complex, arbitrarily connected architectures (like those with dense skip connections) might require more sophisticated partitioning logic.

Looking ahead, the team plans to investigate fine-grained partitioning under strict resource budgets and adaptive migration, where the system could dynamically move model shards between machines to balance workloads in real-time.

Summary updated

BibTeX
@misc{lai2021splitbrain,
  author = {Farley Lai and Asim Kadav and Erik Kruus},
  title = {{SplitBrain: Hybrid Data and Model Parallel Deep Learning}},
  year = {2021},
  eprint = {2112.15317},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.15317},
}
Figure