1. Home
  2. Explore
  3. Computer Science
  4. Neural Network Training

Study methods

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

Neural Network Training

  • 90Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Neural Network Training
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What is a computational graph?

Tap to flipClick to flipspace

A representation of a function as a sequence of interconnected computational operations.

Or swipe the card

90 cards

  1. What is a computational graph?

    A representation of a function as a sequence of interconnected computational operations.

  2. What distinguishes a neural network computational graph?

    It stacks linear layers with nonlinear activation functions between them.

  3. How does a convolutional layer preserve spatial structure?

    It applies filters across spatial locations rather than fully mixing all spatial positions.

  4. What determines the depth of a convolutional layer's output?

    The number of filters in the layer.

  5. What is the basic goal of optimizing neural-network parameters?

    To reach a region of the loss landscape with low loss.

  6. What direction does gradient descent use to update parameters?

    The direction of the negative gradient.

  7. What are the steps of mini-batch stochastic gradient descent?

    Sample a mini-batch, forward-propagate it, compute the loss, backpropagate to obtain gradients, and update the parameters.

  8. What is the role of backpropagation in neural-network training?

    It computes parameter gradients by propagating derivatives backward through the computational graph.

  9. What is the sigmoid activation function?

    The elementwise function σ(x)=11+e−x\sigma(x)=\frac{1}{1+e^{-x}}σ(x)=1+e−x1​, which maps inputs to the range (0,1)(0,1)(0,1).

  10. Why was the sigmoid historically considered biologically interpretable?

    Its output between 000 and 111 can be interpreted as a saturating neuronal firing rate.

  11. Why do saturated sigmoid neurons cause vanishing gradients?

    The sigmoid is nearly flat for very large positive or negative inputs, so its local derivative is near zero.

  12. What happens to the sigmoid gradient near x=0x=0x=0?

    It is relatively strong because the sigmoid is in its approximately linear region.

  13. Why are sigmoid outputs problematic because they are not zero-centered?

    If inputs to a layer are positive, weight gradients tend to have the same sign, restricting updates to inefficient directions.

  14. How does zero-mean input improve optimization with sigmoid-like activations?

    It provides both positive and negative input values, allowing weight gradients to point in varied directions.

  15. What is a second computational disadvantage of the sigmoid?

    It requires evaluating an exponential function, making it more computationally expensive than simple piecewise functions such as ReLU.

  16. What is the hyperbolic tangent activation function?

    An activation function that squashes inputs to the range (−1,1)(-1,1)(−1,1) and is zero-centered.

  17. What major problem does tanh still share with sigmoid?

    It saturates at large positive or negative inputs, causing its gradient to approach zero.

  18. What is the ReLU activation function?

    The elementwise function f(x)=max⁡(0,x)f(x)=\max(0,x)f(x)=max(0,x).

  19. What is the gradient of ReLU for a negative input?

    Zero.

  20. What is the gradient of ReLU for a positive input?

    One.

  21. How is the ReLU derivative treated at x=0x=0x=0 in practice?

    It is conventionally treated as zero.

  22. What is a major advantage of ReLU over sigmoid and tanh?

    ReLU does not saturate in the positive region, allowing gradients to pass through there.

  23. Why is ReLU computationally efficient?

    It only requires a maximum operation rather than an exponential or other complex nonlinear calculation.

  24. How does ReLU typically compare with sigmoid and tanh in convergence speed?

    In practice, ReLU was described as converging about six times faster.

  25. What is a dead ReLU?

    A ReLU that receives only negative inputs, always outputs zero, and receives no gradient-based updates.

  26. What can cause dead ReLUs at initialization?

    An unlucky weight initialization that places the ReLU's active region away from the training-data cloud.

  27. How can an excessively high learning rate create dead ReLUs?

    Large updates can move an initially active ReLU off the data manifold, after which it no longer activates.

  28. Why might slightly positive ReLU biases be used at initialization?

    They increase the likelihood that ReLUs are active initially and receive updates.

  29. What is a leaky ReLU?

    A ReLU variant with a small negative slope instead of a flat zero output for negative inputs.

  30. How does leaky ReLU address the dying-ReLU problem?

    It provides a nonzero gradient in the negative region, so units can continue to update.

  31. What is a parametric ReLU, or PReLU?

    A leaky-ReLU-like function whose negative-region slope α\alphaα is learned through backpropagation.

  32. What is an exponential linear unit, or ELU?

    A ReLU variant that retains ReLU-like positive behavior but uses a negative saturating region, producing outputs closer to zero mean.

  33. What is a Maxout neuron?

    A unit that computes the maximum of multiple affine functions, such as max⁡(W1x+b1,W2x+b2)\max(W_1x+b_1, W_2x+b_2)max(W1​x+b1​,W2​x+b2​).

  34. What is the main disadvantage of a two-piece Maxout neuron?

    It doubles the number of parameters per neuron because it uses two sets of weights and biases.

  35. What is the general recommended default activation function?

    ReLU.

  36. What are the two common basic steps in data preprocessing?

    Subtract the mean to zero-center the data, then divide by the standard deviation to normalize its scale.

  37. Why should input data be zero-centered?

    To avoid biased gradients and inefficient updates caused by inputs that are predominantly positive or negative.

  38. Why is feature normalization useful?

    It places features in comparable ranges so that they contribute more equally during optimization.

  39. What preprocessing is typically used for image data in this context?

    Usually zero-centering, but not necessarily division by the standard deviation.

  40. Why are PCA and whitening not typically used for these images?

    They can project pixels into new feature spaces and disrupt the original spatial structure that convolutional networks exploit.

  41. Which data should be used to estimate preprocessing statistics?

    The training data.

  42. What is a mean image?

    An array with the same dimensions as an image, obtained by averaging the training images elementwise.

  43. What is per-channel mean subtraction for RGB images?

    Subtracting one scalar mean for each channel: one for red, one for green, and one for blue.

  44. How often should the training mean generally be computed?

    Once before training, rather than separately for every mini-batch.

  45. What is the problem with initializing every network weight to zero?

    It preserves symmetry: neurons produce identical outputs, receive identical gradients, and continue learning the same features.

  46. Why are small random weights preferable to identical weights?

    They break symmetry so neurons can produce different outputs and receive different updates.

  47. What happens when weights are initialized too small in a deep network?

    Activations and gradients can shrink toward zero as they pass through successive layers.

  48. Why do small weights produce small weight gradients in deep networks?

    The gradient with respect to a layer's weights includes the layer input, and those inputs have already collapsed toward zero.

  49. What happens when weights are initialized too large with tanh activations?

    The pre-activations become very positive or negative, saturating tanh and causing gradients to approach zero.

  50. What is the central initialization trade-off in deep networks?

    Weights that are too small cause vanishing activations and gradients, while weights that are too large cause saturation and vanishing gradients.

  51. What is Xavier initialization designed to achieve?

    It attempts to preserve approximately the same variance between layer inputs and outputs.

  52. How does Xavier initialization scale weights when a layer has many inputs?

    It uses smaller weights because many inputs contribute to the output variance.

  53. How does Xavier initialization scale weights when a layer has few inputs?

    It uses relatively larger weights to compensate for fewer contributing inputs.

  54. What assumption underlying the basic Xavier derivation can fail for ReLU?

    The derivation assumes approximately linear activations, whereas ReLU sets roughly half of its inputs to zero.

  55. How can initialization be adjusted for ReLU networks?

    Account for the approximately halved variance caused by ReLU, commonly by including an additional factor related to division by 222 in the scaling.

  56. Why is proper weight initialization especially important in deep networks?

    Poor initialization can prevent the network from training at all by causing activation collapse or saturation.

  57. What is the purpose of batch normalization?

    To normalize layer activations using the mean and variance of the current mini-batch, improving their scale and gradient flow.

  58. How are activations normalized in batch normalization?

    For each feature, subtract the mini-batch mean and divide by the mini-batch standard deviation.

  59. Why can batch normalization be differentiated through?

    Mean, variance, subtraction, division, scaling, and shifting are differentiable computational operations.

  60. Where is batch normalization commonly inserted?

    After fully connected or convolutional layers.

  61. How is batch normalization applied to a fully connected layer?

    Each feature or neuron dimension is normalized independently across the examples in the mini-batch.

  62. How does batch normalization differ for convolutional layers?

    Each activation map uses one mean and one variance computed jointly across the batch and all spatial locations.

  63. Why does batch normalization use shared statistics across an activation map?

    To normalize spatial locations consistently while preserving the spatial structure of convolutional representations.

  64. What are the learned parameters added after batch normalization?

    A scale parameter γ\gammaγ and a shift parameter β\betaβ.

  65. Why are γ\gammaγ and β\betaβ important in batch normalization?

    They give the network flexibility to scale and shift normalized activations and control the amount of saturation in later nonlinearities.

  66. Can batch normalization represent the identity mapping?

    Yes. Suitable values of γ\gammaγ and β\betaβ can undo the normalization and recover the identity mapping.

  67. How can batch normalization act as regularization?

    An example's normalized representation depends partly on the other examples in its mini-batch, introducing small stochastic variations.

  68. What training benefits are associated with batch normalization?

    Improved gradient flow, greater robustness to learning-rate and initialization choices, and easier training.

  69. How is batch normalization handled at test time?

    Use mean and variance estimated from the training process, often through running averages, rather than recomputing them from the test batch.

  70. What is the first sanity check after initializing a network?

    Run a forward pass and verify that the initial loss has the expected value.

  71. Why should regularization initially be disabled during sanity checks?

    It isolates the data loss and makes it easier to verify that the model and loss implementation behave correctly.

  72. What should happen when regularization is increased?

    The total loss should increase because an additional regularization term has been added.

  73. Why should training first be tested on a very small dataset?

    A sufficiently flexible network should overfit the small dataset, driving training loss near zero and accuracy near 111.

  74. What does a nearly unchanged loss with a very small learning rate indicate?

    The learning rate is probably too small to produce meaningful parameter updates.

  75. Why can accuracy improve sharply while softmax loss changes little?

    Accuracy depends only on which class has the maximum probability, whereas loss also reflects the full probability distribution.

  76. What does a NaN loss usually indicate during training?

    The loss or parameter values have exploded, commonly because the learning rate is too high.

  77. What rough learning-rate range was suggested for cross-validation?

    Approximately 10−310^{-3}10−3 to 10−510^{-5}10−5.

  78. What is cross-validation for hyperparameter selection?

    Training models on the training set and comparing their performance on a separate validation set.

  79. What is a practical two-stage strategy for hyperparameter search?

    First test widely spaced values for a few epochs, then perform a finer and longer search around promising values.

  80. How should learning rates generally be sampled?

    In logarithmic or log space rather than uniformly in ordinary numerical space.

  81. What does it mean if the best hyperparameter value lies at the edge of the search range?

    The search range may be too narrow and should be extended in that direction.

  82. Why can random hyperparameter search outperform grid search?

    Random search tests more distinct values of important hyperparameters, especially when performance depends more strongly on some dimensions than others.

  83. What can be monitored to detect an exploding hyperparameter trial early?

    The loss at each iteration or epoch; stop if it becomes much larger than the original loss, such as roughly three times larger.

  84. What loss-curve pattern suggests that the learning rate is too high?

    An exploding loss or a steep initial decrease followed by a plateau caused by overly large steps.

  85. What loss-curve pattern suggests that the learning rate is too low?

    A very flat or slowly changing loss curve.

  86. What can a flat loss curve followed by sudden learning suggest?

    Bad initialization may have initially blocked gradient flow before the parameters moved into a trainable region.

  87. What does a large gap between training and validation accuracy usually indicate?

    Overfitting.

  88. What does little or no gap between training and validation accuracy suggest?

    The model may not have enough capacity and could potentially benefit from a larger or more expressive architecture.

  89. What ratio of update magnitude to parameter magnitude is a useful rough target?

    Approximately 0.0010.0010.001, though substantial variation is acceptable.

  90. Which hyperparameters can be optimized during neural-network development?

    Learning rate, decay schedule, update rule, regularization, network depth, number of hidden units, and other architectural choices.

Card 1 of 90
Card 1 of 90

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent