Synthetic Gradients in Neural Networks
- 69Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What are the two phases of a standard backpropagation training iteration?
A forward pass computes layer outputs and the loss; a backward pass propagates gradients, followed by a gradient-descent update.
Or swipe the card
69 cards
What are the two phases of a standard backpropagation training iteration?
A forward pass computes layer outputs and the loss; a backward pass propagates gradients, followed by a gradient-descent update.
In the example network, what does the backward pass compute first?
It computes the loss gradients with respect to the output layer’s activations, denoted δ3 with respect to h3.
What is model parallelism?
Splitting a neural network into parts that run on different processing devices, such as separate GPUs.
What is the forward lock in model-parallel training?
A later GPU must wait for the preceding GPU to finish its part of the forward pass before it can process that batch.
What is the update lock?
Model parameters cannot be updated until the loss has been computed.
What is the backward lock?
A layer’s parameters cannot be updated until backpropagation has reached that layer.
Why can ordinary model parallelism be inefficient?
Forward, update, and backward locks leave GPUs waiting for other GPUs; with three GPUs, training can even be slower than on one GPU.
What is the central goal of synthetic gradients in model-parallel training?
To break the dependencies that cause the forward, update, and backward locks, allowing different parts of the network to work more independently.
How does the usual gradient-descent update use backpropagated gradients?
It adjusts parameters in a direction expected to reduce the loss.
What does a synthetic gradient model predict?
It predicts an approximation, δ^i, of the gradient δi that a hidden layer would receive through ordinary backpropagation.
What information does a basic synthetic gradient model receive?
The output activations hi of the layer it is attached to.
How does a layer use its synthetic gradients?
It uses the predicted gradients to update its parameters immediately, without waiting for gradients to propagate back through the rest of the network.
What is a Decoupled Neural Interface (DNI)?
A layer equipped with a synthetic gradient model so it can update its parameters independently of the rest of the network.
How can synthetic gradients allow multiple layers to train at the same time?
Each hidden layer can use its own synthetic gradient model to predict gradients and update its parameters without waiting for earlier layers’ backward computations.
Why might the output layer use true gradients rather than synthetic gradients?
Its true gradients can be computed directly from the loss, so a synthetic gradient model is not necessary there.
Does synthetic-gradient training require a backward pass for each immediate layer update?
No. Predicted gradients can be used for updates after the forward computation, without waiting for a full backward pass.
When are synthetic gradient models used?
During training. After training, the network can be used normally with its learned parameters.
What are examples of possible synthetic gradient model architectures?
A single linear layer with no activation, or a small neural network with one or more hidden layers.
How can a synthetic gradient model be trained?
By minimizing a loss between its predicted gradients and target gradients, such as the distance between them or the square of that distance, using ordinary backpropagation.
How can a lower layer get a training target for its synthetic gradient model without waiting for true gradients?
Use the next layer’s predicted gradients and backpropagate them through that next layer to obtain an approximation of the lower layer’s gradients.
How can the output layer provide gradient targets for the synthetic gradient model below it?
The output layer can compute true gradients from the loss and backpropagate them through its layer.
Why can synthetic gradient models become more useful over time?
As they learn to predict gradients more accurately, they can support better parameter updates and provide better training targets for synthetic gradient models in lower layers.
How can synthetic gradients support a pipeline across several GPUs?
While one GPU processes a batch at one layer, other GPUs can process different batches at other layers, reducing idle waiting.
What role can the CPU play in pipelined model-parallel training?
It can load training examples and place batches into a queue for the GPUs.
Why can different layers process different batches at the same time with synthetic gradients?
A layer can update using predicted gradients without waiting for the full forward and backward computation of its current batch.
What is a major practical cost of splitting a network across GPUs?
Moving activations and other data between GPU cards can take substantial time and may outweigh the benefits of parallel computation.
Why can dividing a deep network into larger groups of layers reduce the relative cost of GPU data transfers?
With many layers, the computation within each group can be large compared with the time needed to copy data between GPUs.
For a 30-layer network split across three GPUs, what division does the content give as an example?
Three groups of 10 layers each.
Where can synthetic gradient models be placed in a deep network split across GPUs?
At every hidden layer, every few hidden layers, or just at the interfaces between GPU groups.
What speedup does the content suggest may be possible for a sufficiently deep network split across three GPUs?
Training could approach three times the speed of regular backpropagation on a single GPU, if computation outweighs data-transfer costs.
Can synthetic gradients be used with convolutional neural networks?
Yes. Synthetic gradient models can be attached after selected hidden layers in convolutional networks.
What shape must a synthetic gradient model’s output have?
The same shape as its input, which is the shape of the activations produced by the layer it serves.
If a convolutional layer outputs five feature maps of size 400×200, what shape must its synthetic gradient model output?
A 5×400×200 array.
What is one suggested architecture for a synthetic gradient model attached to a convolutional layer?
A shallow convolutional network that preserves the input shape; for example, a couple of convolutional layers with zero padding and stride 1.
What additional information can be provided to a synthetic gradient model beyond the layer activations?
Other information that may improve its predictions, such as the labels for the current training batch.
What is a conditional Decoupled Neural Interface (cDNI)?
A DNI whose synthetic gradient model receives additional conditioning information, such as the current batch’s labels.
How did cDNI perform compared with regular DNI in the described experiments?
The reported experiments found that cDNI consistently performed better than regular DNI.
What hidden-layer architecture was used for the described fully connected MNIST networks?
Networks had three to six hidden layers with 256 neurons per layer, using batch normalization and ReLU activations in each hidden layer.
How did regular backpropagation perform on the described MNIST networks?
The networks reached below 2% test error, and adding more layers improved performance.
How did DNI at every hidden layer affect the three-layer MNIST network?
Its final performance was better than the regular-backpropagation result, but training took longer overall because the synthetic gradient models also had to be trained.
How did deeper MNIST networks using regular DNI perform in the reported experiments?
Adding layers reduced performance and increased training time.
What architecture was used for the synthetic gradient models in the described DNI experiment?
Each model had two hidden layers of 1,024 neurons and an output layer of 256 neurons, with batch normalization and ReLU in the hidden layers.
How did cDNI performance change as the MNIST network gained hidden layers?
Performance improved with added layers, and the six-layer network achieved the best reported performance.
How quickly did the six-layer cDNI network reach below 2% error in the described MNIST experiment?
In a few thousand iterations.
What was notable about the synthetic gradient models used in the described cDNI experiment?
They were simple models with no hidden layers.
What overall conclusion did the described MNIST results draw about cDNI?
On that task, cDNI performed better than regular backpropagation in both final accuracy and training speed.
What does a recurrent layer use to produce its output at time step t?
The current input Xt and its output from the previous time step, ht−1; it then produces ht.
What does it mean to unroll an RNN through time?
Representing repeated uses of the same recurrent layer at successive time steps as a sequence of linked computations.
Why is training an RNN by backpropagating through an unlimited number of time steps impractical?
The computation would eventually exceed available memory, so training must stop after a limited number of steps.
What is truncated backpropagation through time?
Training an RNN by unrolling it for a limited number of time steps, computing a loss on the outputs produced so far, backpropagating, and updating its parameters.
Why can truncated backpropagation through time make it difficult for an RNN to learn long-term patterns?
The loss is computed only on the outputs seen so far, so the network lacks information about losses that may occur further in the future.
How can a synthetic gradient extend the effective learning horizon of an RNN?
Unroll an extra step, use a synthetic gradient model to estimate gradients at that future step, and backpropagate the estimate to provide a gradient signal for earlier steps.
When using synthetic gradients with an RNN, how are true and estimated gradients combined?
They are mixed during backpropagation through time to compute the gradients used for the recurrent layer’s parameter update.
Why should the last unrolled RNN cell not be updated during the initial synthetic-gradient step?
Changing its parameters would change its output, which is needed later to train the synthetic gradient model.
How can the RNN’s future outputs provide training targets for its synthetic gradient model?
Run the RNN on subsequent time steps, compute losses, and use a synthetic gradient at an additional step; backpropagating it with true gradients gives an approximation of the gradients at the target step.
How are the RNN parameters updated after the synthetic-gradient training signal is obtained?
The computed gradients are used in a gradient-descent step to update the recurrent layer’s parameters.
What can repeated training with synthetic gradients improve in an RNN?
Both the recurrent network and its synthetic gradient model can improve over repeated training.
What task and error measure were used in the described RNN comparison?
The Penn Treebank language-modeling task, evaluated using bits per character (BPC).
How did ordinary RNN training change as the network was unrolled through more time steps?
Longer unrolls took more training time and data but eventually achieved better performance.
How did an RNN unrolled for eight steps with synthetic gradients compare with ordinary RNNs unrolled for up to 40 steps?
It reached lower error than the model unrolled for 40 steps, according to the described results.
What training-efficiency result was reported for the eight-step RNN using synthetic gradients?
It took roughly half as much time and data to train as the comparison described.
What is a synthetic input model used for?
It predicts an approximation of the inputs that a layer would receive, allowing that layer to begin computation before the preceding layers have produced their outputs.
How can a synthetic input model break the forward lock for an output layer?
It can predict an approximation of the output of the preceding hidden layer and feed that prediction directly to the output layer.
How can a synthetic input model be trained once the true input to its layer becomes available?
Use the actual output of the preceding layer as a target for training the synthetic input model.
How can synthetic input models be used recursively across multiple layers?
A layer’s synthetic input can be generated using a synthetic input model attached to the preceding layer, producing an approximation that can help train the next layer’s synthetic input model.
In a fully decoupled interface, what does a layer do with its synthetic input?
It computes its output using the approximate input h^i−1 supplied by its synthetic input model.
Where does a layer send its computed activations in a fully decoupled interface?
It sends them both to the next layer and to its own synthetic gradient model.
In a fully decoupled interface, how are gradients from a layer used by the preceding layer?
Gradients backpropagated through the layer provide an approximate gradient for the preceding layer, which can use it to train its own synthetic gradient model.
In a fully decoupled interface, when can a layer update its parameters?
It can update immediately using its predicted synthetic gradients, then use later-arriving true inputs and gradients to train its synthetic input and synthetic gradient models.

Ask anything
We've read this whole study set, so questions about it get the best answers.