Overview
As Deep Neural Networks (DNNs) grow in complexity, training them requires massive computational power, often spread across a heterogeneous mix of hardware (e.g., several GPUs and a CPU). The "device placement problem" asks a critical question: Which specific operation (like a matrix multiplication or a convolution) should run on which device?
If you place everything on one GPU, you waste the power of the others. If you split them poorly, the time spent moving data between devices (communication overhead) outweighs the gains of parallel processing. Previous state-of-the-art solutions used "vanilla" reinforcement learning (Policy Gradients), which are notoriously inefficient—one famous implementation required 27 hours of training across 160 workers just to find a good placement.
Spotlight is a reinforcement learning (RL) framework that automatically decides how to distribute neural network operations across a mix of CPUs and GPUs to minimize training time. By modeling device placement as a multi-stage Markov Decision Process (MDP) and using Proximal Policy Optimization (PPO), it achieves a 40% reduction in training time compared to previous RL methods while requiring significantly fewer computational resources to find the optimal strategy.
Methods and Architecture
Spotlight introduces several major innovations to tackle the inefficiencies of prior approaches:
1. Multi-stage MDP Modeling
The authors treat device placement as a sequence of decisions. For a network with $N$ operations, the agent makes $N$ choices. At each stage, it looks at where previous operations were placed and decides the best home for the next one. This allows the authors to use the mathematical machinery of Markov Decision Processes (MDP).
2. Proximal Policy Optimization (PPO)
Instead of standard policy gradients—which can take "steps" that are too large, leading to unstable performance—Spotlight uses PPO. This method optimizes a "surrogate" objective that penalizes the agent for changing its strategy too drastically in one go, ensuring stable and monotonic improvement.
3. Sequence-to-Sequence Architecture
The "agent" is a sequence-to-sequence Recurrent Neural Network (RNN) with an attention mechanism. It "reads" the list of operations and "writes" out the recommended device assignments. To handle the sheer number of operations in modern networks (often thousands), they use Co-location grouping. They group operations that share a prefix (like conv1/biases/add) into "super operations," reducing the number of decisions the RNN has to make from nearly 1,000 down to roughly 86.
Key Insights and Results
The authors evaluated Spotlight on three distinct benchmarks on the Google Cloud Platform (using Intel Broadwell CPUs and multiple NVIDIA Tesla K80 GPUs): CIFAR-10 (CNN), RNNLM (a 4-layer LSTM), and NMT (an 8-layer sequence-to-sequence network).
Faster, More Efficient Training
For the CIFAR-10 benchmark, the training time using Spotlight's placement was 60.9% of the time required by the previous best RL method (GRL). Furthermore, Spotlight found these superior placements in just 9 hours using only 5 worker machines. For context, the previous state-of-the-art required significantly more time and a cluster of 160 workers.
Stability over Speed
Unlike previous RL methods that suffered from "oscillations" (where the strategy would suddenly get much worse before getting better), Spotlight’s learning curve is monotonic—it gets steadily and reliably better. It consistently beat standard human-designed heuristics like "Single GPU" or "Metis" (a traditional graph-partitioning tool).
The "Partial Connectivity" Trick
One of the most interesting findings was that Spotlight discovered a non-obvious placement strategy for CNNs. It learned that because certain layers in a CNN are only "partially connected," it could split those layers across two GPUs without incurring heavy communication costs. This balanced the computational load perfectly—a "trick" that human experts might easily overlook.
Limitations and Future Work
While Spotlight represents a significant leap forward, it has a few limitations:
- Static vs. Dynamic: Spotlight finds a "static" placement before training begins. It does not account for dynamic changes in system load or network traffic that might occur during a long training run.
- Grouping Dependency: The effectiveness of the tool relies heavily on the "co-location grouping" heuristic. If the operations aren't named consistently or grouped logically, the RNN might struggle with the complexity of the graph.
- Hyperparameter Tuning: The algorithm introduces a hyperparameter ($\beta$) to control the "closeness" of policy updates. While the authors suggest a range of 1 to 10, finding the sweet spot for a brand-new architecture might still require some trial and error.
Summary updated