Distributed Neural Network Training with Gradient Clipping

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current neural network training methods face challenges in efficiently performing distributed training due to the need for extensive communication between processors for gradient exchange, which increases training time and can lead to unstable gradient updates.

Innovation Solution

The proposed solution involves a distributed training apparatus and method where each processor performs forward and backward operations, determines local gradients, and applies gradient clipping based on thresholds, allowing for simultaneous gradient determination and transmission, thereby reducing communication overhead and stabilizing updates through parallel processing using GPUs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If processors perform distributed training with extensive gradient exchange, then training accuracy can be maintained, but training time increases and communication overhead increases

Engineering Contradiction:
Improvetraining accuracyVSAvoidtraining time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs gradient clipping as a preliminary action before gradient exchange between processors. Each processor clips its local gradients to satisfy the Lipschitz condition before transmitting them to other processors, preventing the need for extensive communication rounds and reducing overall training time while maintaining convergence accuracy.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The gradient computation and clipping process is segmented and distributed across multiple processors. Each processor independently computes and clips its local gradients, then exchanges only the clipped gradients with other processors. This segmentation reduces communication overhead while maintaining the reliability of distributed training.

Inventive Principle:
Principle #1Segmentation

2Stability of the object's composition

If processors exchange gradients frequently for stable updates, then parameter update stability improves, but communication overhead increases

Engineering Contradiction:
Improveparameter update stabilityVSAvoidcommunication overhead
Core Design Contradiction:
Stability of the object's compositionVSDevice complexity

Solution Approach 1:

Gradient clipping is applied as a preliminary action locally at each processor before gradient exchange. By ensuring gradients satisfy the Lipschitz condition beforehand, the system achieves stable parameter updates without requiring frequent communication rounds, thus reducing communication overhead while maintaining update stability.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Each processor independently performs gradient clipping on its own local gradients before exchange. This self-service approach ensures that each processor contributes stable, clipped gradients to the distributed training process without requiring complex coordination or validation from other processors, reducing communication overhead.

Inventive Principle:
Principle #25Self-service

3Stability of the object's composition

If gradient clipping is performed for all layers, then gradient stability improves, but computational overhead increases

Engineering Contradiction:
Improvegradient stabilityVSAvoidcomputational overhead
Core Design Contradiction:
Stability of the object's compositionVSUse of energy by moving object

Solution Approach 1:

The system applies gradient clipping selectively based on local conditions at each processor and layer. Gradient clipping is performed on local gradients that exceed the Lipschitz bound, rather than uniformly applying it to all layers. This localized approach maintains gradient stability where needed while reducing unnecessary computational overhead in layers that already satisfy the Lipschitz condition.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS20230169333A1Method and apparatus with distributed training of neural network
Publication Date: 2023.06.01 SAMSUNG ELECTRONICS CO LTD
  • US20230169333A1 patent drawing
  • US20230169333A1 patent drawing
  • US20230169333A1 patent drawing

AI summary

Disclosed are a training method and apparatus for distributed training of a neural network, the training apparatus including processors configured to perform distributed training, wherein each of the processors is further configured to perform a forward direction operation for layers of the neural network, determine a loss of the neural network based on the forward direction operation, determine a local gradient for each layer of the neural network by performing a backward direction operation for the layers of the neural network based on the loss, determine whether to perform gradient clipping for a local gradient determined for a previous layer, in response to determining a local gradient for a current layer through the backward direction operation, determine an aggregated gradient based on the backward direction operation and the gradient clipping performed by each of the processors, and update parameters of the neural network based on the aggregated gradient.