Leveraging Lagging Gradients in Distributed Neural Network Training

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In distributed synchronous training of deep neural networks, lagging gradients from slow worker machines are discarded, leading to wasted computing resources and inefficient training processes, as existing techniques do not leverage these gradients to improve model updates.

Innovation Solution

A method is introduced to detect and utilize lagging gradients by assigning weights to them during gradient aggregation, allowing the parameter server to incorporate information from previous iterations and improve the direction of parameter updates, thereby speeding up the training process and enhancing model performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If backup worker machines are added to avoid waiting for gradients from slow worker machines, then training speed is improved, but computing resources are wasted because lagging gradients are discarded

Engineering Contradiction:
Improvetraining speedVSAvoidcomputing resources
Core Design Contradiction:
SpeedVSLoss of energy

Solution Approach 1:

The patent changes the parameter of gradient utilization by introducing a mechanism to retain and reuse lagging gradients from previous iterations. Instead of discarding these gradients, the system incorporates them into the current iteration's gradient aggregation, effectively changing how gradient data is processed and utilized across time steps.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent applies preliminary action by preparing and storing gradient data from previous iterations before it is needed in the current iteration. The lagging gradients are retained in advance, allowing the system to utilize them when current iteration gradients are not yet available or to supplement them, thereby avoiding wasted computing resources.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If gradient aggregation waits for all worker machines to complete current iteration, then gradient accuracy is improved, but training time is increased due to synchronization bottleneck

Engineering Contradiction:
Improvegradient accuracyVSAvoidtraining time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent applies preliminary action by having worker machines prepare gradient computations in advance. By retaining lagging gradients from previous iterations, the system can perform gradient aggregation before all workers have completed their current iteration, thus reducing synchronization time while maintaining gradient accuracy through the inclusion of pre-computed gradient data.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent ensures continuity of useful action by maintaining gradient computation and aggregation processes continuously. Instead of waiting for all workers to complete, the system continuously aggregates gradients incorporating both current and previous iteration data, keeping the training process flowing without unnecessary idle time while preserving gradient accuracy.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS20210374544A1Leveraging lagging gradients in machine-learning model training
Publication Date: 2021.12.02 HUAWEI TECH CO LTD
  • US20210374544A1 patent drawing
  • US20210374544A1 patent drawing
  • US20210374544A1 patent drawing

AI summary

A computer-implemented method for distributed synchronous training of a neural network model includes detecting gradient sets from a plurality of worker machines, each worker machine generating a gradient set in a current iteration of a training data set, and each gradient set of the gradient sets comprising a plurality of gradients. A lagging gradient set from a lagging worker machine is detected. The lagging gradient set is generated by the lagging worker machine in a prior iteration of the training data set. Aggregated gradients are generated based on the gradient sets and the lagging gradient set. The neural network model is updated based on the aggregated gradients.