1. Home
  2. Explore
  3. Computer Science
  4. Synthetic Gradients in Neural Networks

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Synthetic Gradients in Neural Networks

  • 72Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Backpropagation Basics
A standard training iteration using backpropagation has a forward phase followed by a
phase.

72 questions

  1. 1
    A standard training iteration using backpropagation has a forward phase followed by a
    _____
    phase.
    Hint

    This phase sends gradients from the loss back through the network.

    Answer

    Backward

    Explanation

    Backpropagation first runs a forward phase to compute outputs and loss, then a backward phase to propagate gradients.

  2. 2
    During the forward phase, each layer uses its parameters to compute its
    _____
    from its inputs.
    Hint

    These are the values passed on to the next layer.

    Answer

    outputs

    Explanation

    The forward phase sends inputs through the layers, each of which computes outputs using its parameters.

  3. 3
    The network's loss is computed by comparing its outputs with the
    _____
    .
    Hint

    These are the target values supplied with the training examples.

    Answer

    labels

    Explanation

    The loss measures the difference between the network's outputs and the labels.

  4. 4
    Backpropagation first computes the gradients of the loss with respect to the outputs of the
    _____
    layer.
    Hint

    This is the final layer whose predictions are compared with the labels.

    Answer

    output

    Explanation

    The backward phase begins by computing gradients of the loss with respect to the output layer's activations.

  5. 5
    The final parameter adjustment in backpropagation uses computed gradients to reduce the loss; this is the
    _____
    step.
    Hint

    It updates parameters in the direction indicated by the gradients.

    Answer

    gradient descent

    Explanation

    Gradient descent uses the computed gradients to tweak parameters in a direction that reduces the loss.

  6. 6
    In backpropagation, gradients are propagated backward through the network until they reach the
    _____
    hidden layer.
    Hint

    This is the hidden layer closest to the input.

    Answer

    first

    Explanation

    The backward pass propagates gradients through the network all the way to the first hidden layer.

  7. 7
    Splitting a neural network into parts that run on different GPUs is called
    _____
    parallelism.
    Hint

    The network's model is divided across devices.

    Answer

    model

    Explanation

    Model parallelism assigns different parts of a neural network to different GPU cards.

  8. 8
    In ordinary model parallelism, later GPUs must wait for earlier GPUs to finish the batch's forward computation because of the
    _____
    lock.
    Hint

    This lock blocks progress while activations move through the network.

    Answer

    Forward

    Explanation

    The Forward Lock occurs because a later part of the model cannot begin its forward computation until the previous part has finished.

  9. 9
    Because parameters cannot be updated until the loss is computed, ordinary backpropagation has an
    _____
    lock.
    Hint

    It refers to the timing of parameter changes.

    Answer

    Update

    Explanation

    The Update Lock describes the requirement to wait for the loss computation before updating model parameters.

  10. 10
    A layer's parameters cannot be updated until the backward pass has reached that layer, creating the
    _____
    lock.
    Hint

    This lock is caused by waiting for gradients to propagate through the network.

    Answer

    Backward

    Explanation

    The Backward Lock means a layer must wait for the backward pass to reach it before its parameters can be updated.

  11. 11
    The Forward, Update, and Backward locks cause GPUs in model parallelism to spend much of their time
    _____
    for other GPUs.
    Hint

    Their work is stalled while other devices complete tasks.

    Answer

    waiting

    Explanation

    The locks leave GPUs idle while they wait for other GPUs, reducing the efficiency of model parallelism.

  12. 12
    With three GPUs, ordinary model parallelism can be slower than a single GPU because the devices spend too much time
    _____
    .
    Hint

    The locks prevent the GPUs from staying busy.

    Answer

    waiting

    Explanation

    Despite using multiple GPUs, ordinary model parallelism can run more slowly because its devices are blocked by sequential dependencies.

  13. 13
    The central purpose of Synthetic Gradients is to break training
    _____
    so model parallelism can work more effectively.
    Hint

    These include the forward, update, and backward constraints.

    Answer

    locks

    Explanation

    Synthetic Gradients aim to break the locks that make ordinary model parallelism inefficient.

  14. 14
    In a network split across GPUs, the CPU can load training examples and place them into a training
    _____
    .
    Hint

    Batches wait here until a layer can process them.

    Answer

    queue

    Explanation

    The CPU loads training instances and pushes them into a training queue for the GPU pipeline.

  15. 15
    A Synthetic Gradient model predicts an approximation of the gradients for its associated
    _____
    .
    Hint

    It is attached to a particular part of the network.

    Answer

    layer

    Explanation

    A Synthetic Gradient model estimates the gradients that will be needed for its associated layer.

  16. 16
    A Synthetic Gradient model produces estimated gradients called
    _____
    gradients.
    Hint

    The term distinguishes these estimates from gradients computed directly from the loss.

    Answer

    synthetic

    Explanation

    The model's predicted gradients are called synthetic gradients because they approximate the true gradients.

  17. 17
    A layer can use predicted gradients to update its parameters without waiting for the
    _____
    gradients.
    Hint

    These are the gradients that would ordinarily arrive through backpropagation.

    Answer

    true

    Explanation

    Synthetic gradients allow a layer to perform a gradient descent update before the true gradients have been computed.

  18. 18
    A layer equipped with its own Synthetic Gradient model is decoupled from the
    _____
    of the network.
    Hint

    The layer no longer needs to wait for all other parts to complete their computation.

    Answer

    rest

    Explanation

    The Synthetic Gradient model lets a layer update independently of the rest of the network; this arrangement is a Decoupled Neural Interface.

  19. 19
    The abbreviation DNI stands for
    _____
    .
    Hint

    It names a layer made independent using a Synthetic Gradient model.

    Answer

    Decoupled Neural Interface

    Explanation

    DNI is short for Decoupled Neural Interface, a layer equipped with a Synthetic Gradient model.

  20. 20
    In a network with multiple hidden layers, each layer can use a separate Synthetic Gradient model to predict its own
    _____
    .
    Hint

    These predictions enable the layers to update independently.

    Answer

    gradients

    Explanation

    Separate Synthetic Gradient models can estimate the gradients for their corresponding hidden layers.

  21. 21
    At the output layer, one can use the
    _____
    gradients directly instead of a Synthetic Gradient model.
    Hint

    They are computed from the loss at the network's output.

    Answer

    true

    Explanation

    The output layer can compute and use true gradients directly, since the loss is available there.

  22. 22
    Training with Synthetic Gradients can potentially avoid a full
    _____
    pass for each parameter update.
    Hint

    This is the phase in which true gradients normally propagate through the network.

    Answer

    backward

    Explanation

    Synthetic gradients allow layers to update using estimated gradients, so a complete backward pass may not be needed for each update.

  23. 23
    Synthetic Gradient models are used during training, while inference uses the network's trained
    _____
    .
    Hint

    These are the values learned by the network and used to make predictions.

    Answer

    parameters

    Explanation

    After training, the neural network can be used as usual with its trained parameters; Synthetic Gradient models are only used during training.

  24. 24
    For a deep network split across GPUs, layers can process different training
    _____
    at the same time.
    Hint

    One layer may handle an earlier group of examples while another handles a later group.

    Answer

    batches

    Explanation

    Synthetic Gradients make it possible for successive layers to work in parallel on different training batches.

  25. 25
    While one GPU processes the first batch, the CPU can load another batch and place it in the training
    _____
    .
    Hint

    It holds incoming batches for later processing.

    Answer

    queue

    Explanation

    The CPU can prepare and queue a new training batch while the GPU is still processing a previous one.

  26. 26
    Overlapping different batches across layers keeps GPUs more
    _____
    than when every layer must wait for the previous one.
    Hint

    This describes devices that are busy doing computation rather than idle.

    Answer

    active

    Explanation

    Processing different batches in parallel reduces GPU waiting and keeps the devices more active.

  27. 27
    Moving data between GPU cards can take enough time to outweigh the benefits of model
    _____
    .
    Hint

    It is the approach that divides a model across devices.

    Answer

    parallelism

    Explanation

    Communication overhead between GPUs can be so large that it cancels out the speed benefits of model parallelism.

  28. 28
    When a deep network has many layers, the time spent copying data can be small relative to the total
    _____
    time.
    Hint

    This is the time spent performing the network's calculations.

    Answer

    computation

    Explanation

    With many layers, computation time can dominate the time required to copy data between GPUs.

  29. 29
    For a network with many layers, Synthetic Gradient models can be placed at every hidden layer, every few layers, or at GPU
    _____
    .
    Hint

    These are the boundaries between the parts assigned to different cards.

    Answer

    interfaces

    Explanation

    Synthetic Gradient models may be inserted at various points, including the interfaces between GPU cards.

  30. 30
    A Synthetic Gradient model can be a small neural network, such as a single linear layer with no
    _____
    function.
    Hint

    This type of function is commonly applied after a neural layer.

    Answer

    activation

    Explanation

    One possible Synthetic Gradient model is a single linear layer without an activation function.

  31. 31
    Synthetic Gradient models can also contain one or two
    _____
    layers.
    Hint

    These layers lie between a model's input and output.

    Answer

    hidden

    Explanation

    A Synthetic Gradient model may be more complex than a single linear layer and include one or two hidden layers.

  32. 32
    A Synthetic Gradient model is trained to predict the
    _____
    gradients for its layer.
    Hint

    These are the gradients it aims to approximate.

    Answer

    true

    Explanation

    The model gradually learns to predict the true gradients for the layer it serves.

  33. 33
    The Synthetic Gradient model can be trained by minimizing a
    _____
    function.
    Hint

    This quantity measures how far its predictions are from the target gradients.

    Answer

    loss

    Explanation

    Training the Synthetic Gradient model normally involves minimizing a loss function that measures prediction error.

  34. 34
    One training objective for a Synthetic Gradient model is the L2 norm of the difference between synthetic and
    _____
    gradients.
    Hint

    These are the target values the model is trying to approximate.

    Answer

    true

    Explanation

    The L2 norm of the difference between synthetic and true gradients can serve as a loss for training the Synthetic Gradient model.

  35. 35
    Instead of minimizing the L2 distance itself, one can minimize the
    _____
    of that distance.
    Hint

    This alternative objective applies a common operation to the distance.

    Answer

    square

    Explanation

    The squared distance between synthetic and true gradients is another possible training objective.

  36. 36
    To obtain a training target without waiting for the loss and full backward pass, one can backpropagate the next layer's
    _____
    gradients through that layer.
    Hint

    These are the next layer's predicted rather than directly computed gradients.

    Answer

    synthetic

    Explanation

    Backpropagating the next layer's synthetic gradients through the current layer gives an estimate of the current layer's gradients.

  37. 37
    Backpropagating the next layer's synthetic gradients gives an estimate that may be close to, but is not necessarily, the
    _____
    gradients.
    Hint

    These are the exact gradients the approximation is intended to resemble.

    Answer

    true

    Explanation

    This method avoids waiting for true gradients, but the resulting values are only an approximation.

  38. 38
    If the next layer is the output layer, the model can compute the
    _____
    gradients and backpropagate them.
    Hint

    They can be obtained directly from the loss.

    Answer

    true

    Explanation

    At the output layer, the true gradients can be calculated from the loss and propagated backward.

  39. 39
    For a convolutional layer with five feature maps of size 400 by 200, the attached Synthetic Gradient model must output an array of shape
    _____
    .
    Hint

    The output must preserve the number and spatial dimensions of the feature maps.

    Answer

    5x400x200

    Explanation

    A Synthetic Gradient model's output shape must match the attached layer's outputs, giving a 5x400x200 array in this example.

  40. 40
    A Synthetic Gradient model's output must have the same
    _____
    as the output of its attached layer.
    Hint

    It refers to the dimensions and arrangement of the values.

    Answer

    shape

    Explanation

    The predicted gradients must match the shape of the attached layer's outputs.

  41. 41
    A shallow convolutional model can preserve input shape using zero padding and a
    _____
    of 1.
    Hint

    This setting controls how far the convolution moves each step.

    Answer

    stride

    Explanation

    A couple of convolutional layers with zero padding and stride 1 can preserve the shape of their inputs.

  42. 42
    Giving a Synthetic Gradient model the labels of the current batch provides it with
    _____
    information.
    Hint

    The labels are extra inputs beyond the corresponding layer's output.

    Answer

    additional

    Explanation

    Synthetic Gradient models may receive information beyond their associated layer's output, such as the current batch's labels.

  43. 43
    A Decoupled Neural Interface whose Synthetic Gradient model receives extra information such as labels is called a
    _____
    .
    Hint

    Its name indicates that the interface is conditioned on additional inputs.

    Answer

    conditional Decoupled Neural Interface

    Explanation

    A conditional Decoupled Neural Interface, or cDNI, supplies additional information to the Synthetic Gradient model.

  44. 44
    In the reported MNIST experiments, the fully connected network had three to six hidden layers with
    _____
    neurons each.
    Hint

    Each hidden layer used the same number of units.

    Answer

    256

    Explanation

    The experiment used a fully connected network with three to six hidden layers, each containing 256 neurons.

  45. 45
    The MNIST network used
    _____
    normalization and the ReLU activation function at each hidden layer.
    Hint

    This normalization method is named for the examples processed together.

    Answer

    Batch

    Explanation

    Batch normalization and ReLU were used at each hidden layer in the described network.

  46. 46
    In the reported experiment, adding more layers improved the final performance of a network trained with regular
    _____
    .
    Hint

    This is the conventional method of computing gradients through the network.

    Answer

    Backpropagation

    Explanation

    The network trained with regular Backpropagation performed better as more layers were added.

  47. 47
    With Synthetic Gradient models at every hidden layer, adding more layers in the reported experiment made performance worse and increased training
    _____
    .
    Hint

    This is the duration required to complete learning.

    Answer

    time

    Explanation

    For the tested DNI setup, deeper networks had lower performance and took longer to train.

  48. 48
    In the reported cDNI experiments, adding more layers improved the network, and the six-layer network achieved the best overall
    _____
    .
    Hint

    This refers to how well the model did on the task.

    Answer

    performance

    Explanation

    The cDNI network improved with depth, and the six-layer version achieved the best overall performance in the comparison.

  49. 49
    The reported cDNI network reached less than 2% error in just a few thousand
    _____
    .
    Hint

    These are repeated training updates or steps.

    Answer

    iterations

    Explanation

    The cDNI learning curve reached below 2% error after only a few thousand iterations.

  50. 50
    At each time step, an RNN layer uses the current input and its output from the previous time step to produce the current
    _____
    .
    Hint

    It is the layer's value at the current point in the sequence.

    Answer

    output

    Explanation

    A recurrent layer combines the current input with its previous output to produce its current output.

  51. 51
    Unrolling an RNN through time represents the same recurrent layer at different points in
    _____
    .
    Hint

    The sequence dimension is laid out horizontally in the representation.

    Answer

    time

    Explanation

    The unrolled diagram shows repeated time-step instances of the same recurrent layer.

  52. 52
    At the first time step of an unrolled RNN, there are no
    _____
    outputs from an earlier time step.
    Hint

    These are recurrent activations that would normally be carried forward.

    Answer

    previous

    Explanation

    The first unrolled time step has no earlier recurrent outputs to use.

  53. 53
    Stopping an RNN's unrolling after a limited number of time steps and then applying backpropagation is called Truncated Backpropagation through
    _____
    .
    Hint

    The method limits how far gradients are propagated along the sequence.

    Answer

    time

    Explanation

    Truncated Backpropagation through time stops the unrolled sequence after a limited number of steps, computes a loss, and updates the recurrent layer.

  54. 54
    Truncated Backpropagation through time can make it difficult for an RNN to learn
    _____
    patterns.
    Hint

    These patterns depend on information far back in a sequence.

    Answer

    long-term

    Explanation

    When training uses loss from only a few outputs, the network has little information about future losses and may fail to learn long-term patterns.

  55. 55
    To estimate gradients for future time steps, an RNN can run one additional step and send its output to a
    _____
    Gradient model.
    Hint

    The model predicts gradients without waiting for future loss computation.

    Answer

    Synthetic

    Explanation

    The extra time-step output can be used by a Synthetic Gradient model to estimate gradients for that step.

  56. 56
    The estimated future gradients can be backpropagated through the recurrent layer to estimate gradients for an
    _____
    time step.
    Hint

    These gradients are for a point in the sequence before the step that produced the estimate.

    Answer

    earlier

    Explanation

    Backpropagating the estimated future gradients through the layer provides an estimate of gradients for the preceding time step.

  57. 57
    When training an RNN with synthetic future gradients, the update can combine true gradients with
    _____
    gradients.
    Hint

    These come from the Synthetic Gradient model rather than direct loss calculation.

    Answer

    estimated

    Explanation

    The procedure mixes true gradients from observed losses with estimated gradients representing future effects.

  58. 58
    The last unrolled recurrent cell should not be updated while its output is still needed to train the Synthetic Gradient
    _____
    .
    Hint

    This component learns to predict gradients.

    Answer

    model

    Explanation

    Updating the last unrolled cell would change its output, which is needed to train the Synthetic Gradient model.

  59. 59
    Using Synthetic Gradients allows an RNN to capture long-term patterns even when it is unrolled through only a few
    _____
    .
    Hint

    These are the sequence positions included in the truncated computation.

    Answer

    time steps

    Explanation

    Estimated future gradients can convey information beyond the few explicitly unrolled time steps.

  60. 60
    The Synthetic Gradient model for an RNN can be trained by moving forward through additional time steps, computing the loss, and using estimated gradients to obtain an approximation of the true gradients at the target
    _____
    .
    Hint

    The resulting gradients become training targets for the model.

    Answer

    time step

    Explanation

    Running the RNN further and combining losses with estimated gradients provides gradients that are close to the true gradients for training the Synthetic Gradient model.

  61. 61
    In the Penn Treebank language-modeling comparison, RNN error was measured in bits per character, abbreviated
    _____
    .
    Hint

    The abbreviation names the reported error unit.

    Answer

    BPC

    Explanation

    The graph measured model error in bits per character, or BPC.

  62. 62
    For a regular RNN trained with Backpropagation through time, unrolling through more steps generally takes longer and requires more data, but can lead to better eventual
    _____
    .
    Hint

    This describes the quality the model ultimately achieves.

    Answer

    performance

    Explanation

    The comparison showed that greater unrolling increased training time and data needs but could improve eventual performance.

  63. 63
    In the reported comparison, an RNN unrolled for eight time steps with Synthetic Gradients reached lower error than the regular RNN unrolled for
    _____
    time steps.
    Hint

    This was the longest of the three regular-RNN unroll lengths shown.

    Answer

    40

    Explanation

    The eight-step RNN using Synthetic Gradients reached lower error than the regular RNN unrolled through 40 steps.

  64. 64
    The eight-step RNN using Synthetic Gradients took roughly
    _____
    as much time and data to train as the longer-unrolled comparison.
    Hint

    It used about one of two equal portions.

    Answer

    half

    Explanation

    The reported Synthetic Gradient approach achieved its result with roughly half as much training time and data.

  65. 65
    A Synthetic Input model can break the
    _____
    lock by approximating the inputs to a layer before the preceding layers finish.
    Hint

    This lock ordinarily forces later layers to wait for earlier layers.

    Answer

    Forward

    Explanation

    Synthetic Input models estimate a layer's inputs, allowing its computation to begin before the true inputs arrive and thereby breaking the Forward Lock.

  66. 66
    A Synthetic Input model for a layer estimates the
    _____
    that the layer would ordinarily receive from the previous layer.
    Hint

    They are the values fed into the layer's computation.

    Answer

    inputs

    Explanation

    A Synthetic Input model produces an approximation of a layer's inputs, allowing the layer to proceed earlier.

  67. 67
    For an output layer, a Synthetic Input model can approximate the hidden activations from the preceding layer, denoted in the explanation as
    _____
    .
    Hint

    These are the inputs that would normally come from hidden layer 2.

    Answer

    h2

    Explanation

    The Synthetic Input model for layer 3 estimates h2 so the output layer can begin before the preceding hidden layers finish.

  68. 68
    Once the true output from the previous layer becomes available, it can be used to train the Synthetic Input
    _____
    .
    Hint

    This component learned to predict the layer's inputs.

    Answer

    model

    Explanation

    The true previous-layer output provides a target for training the Synthetic Input model.

  69. 69
    A Synthetic Input model can itself use the previous layer's synthetic input to produce an approximation for the next layer, extending the approach in the
    _____
    direction.
    Hint

    This is the direction in which activations travel through a network.

    Answer

    forward

    Explanation

    Using synthetic inputs successively across layers applies the same approximation idea in the forward direction.

  70. 70
    In a fully decoupled interface, the Synthetic Input model first approximates a layer's inputs, while the layer sends its outputs to the next layer and to its Synthetic
    _____
    model.
    Hint

    This model predicts gradients for the layer.

    Answer

    Gradient

    Explanation

    The layer's outputs are used both for forward propagation and by its own Synthetic Gradient model.

  71. 71
    In the fully decoupled data flow, gradients backpropagated through a layer provide an approximation of the true gradients for the
    _____
    layer.
    Hint

    This is the layer immediately before the current one.

    Answer

    previous

    Explanation

    Backpropagating the synthetic gradients through the current layer gives an approximation of the gradients needed by the previous layer.

  72. 72
    In a fully decoupled interface, a layer can update its parameters using its own
    _____
    gradients before receiving all other signals.
    Hint

    These predicted gradients enable an early local update.

    Answer

    Synthetic

    Explanation

    The layer can immediately update its parameters using its Synthetic Gradients; later, incoming gradients and outputs train the synthetic models.

1 of 72
Question 1 of 72

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent