


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















●● What is the difference between backpropagation and optimisation? Answer: Backpropagation calculates the gradients of the cost with respect to every parameter. The optimiser uses those gradients to update the parameters. ●● What is the standard gradient-descent update rule? Answer: w ← w - η ∂J/∂w, where w is a parameter, J is the cost and η is the learning rate. ●● Why is the gradient subtracted in gradient descent? Answer: The gradient points in the direction of the steepest increase in cost. Subtracting it moves the parameters towards decreasing cost. ●● What does the magnitude of a gradient indicate? Answer: It indicates how sensitive the cost is to a change in that parameter. A large magnitude suggests a small parameter change may strongly affect the cost.
●● What does the sign of a gradient indicate? Answer: It determines the direction in which the parameter should move to reduce the cost. ●● What is a parameter? Give examples. Answer: A parameter is learned directly during training. Examples include weights and biases. ●● What is a hyperparameter? Give examples. Answer: A hyperparameter is chosen before or around training rather than learned through backpropagation. Examples include learning rate, batch size, optimiser, momentum coefficient and network depth. ●● What is an epoch? Answer: One complete pass through the entire training dataset. ●● What is an iteration? Answer: One parameter update. An epoch may contain multiple iterations when mini-batches or individual examples are used. ●● How many updates occur per epoch if a dataset contains 1, examples and the batch size is 100? Answer: 10 iterations or parameter updates occur per epoch.
●● What are the disadvantages of SGD? Answer: Its gradient estimates are noisy, its cost curve fluctuates and it may bounce around a minimum instead of settling precisely. ●● What is Mini-batch Gradient Descent? Answer: Mini-batch GD divides the training data into small groups and performs one parameter update after each group. ●● Why is mini-batch GD commonly used? Answer: It balances the stability of Batch GD with the speed and frequent updates of SGD, while also using GPU hardware efficiently. ●● What happens when the mini-batch size becomes 1? Answer: Mini-batch GD becomes equivalent to strict SGD. ●● What happens when the mini-batch contains the entire dataset? Answer: Mini-batch GD becomes Batch GD. ●● Compare the noise levels of the three methods. Answer: SGD is normally the noisiest, mini-batch GD has moderate noise, and Batch GD is the smoothest. ●● Compare the update frequency of the three methods.
Answer: SGD updates after every example, mini-batch GD updates after every batch, and Batch GD updates after the entire dataset. ●● Why can the noise in SGD be useful? Answer: Random fluctuations can shake the optimiser out of flat regions, saddle points or shallow local minima. ●● Why might SGD struggle near a minimum? Answer: Its noisy updates may repeatedly move the parameters around the minimum rather than allowing precise convergence. ●● True or false: Batch GD is always faster than SGD because it uses a more accurate gradient. Answer: False. Its gradient is more stable, but calculating it using the whole dataset can make each update considerably slower. ●● True or false: The cost must decrease after every individual SGD update. Answer: False. Individual updates are noisy. The overall trend should decrease, but particular updates may increase the cost. ●● How many updates occur in five epochs if a dataset contains 2, examples and uses batches of 200? Answer: 60 updates occur.
Answer: Smaller updates help the optimiser approach a minimum more precisely and reduce oscillation around it. ●● Why should the learning rate not necessarily be reduced too early? Answer: The optimiser may begin making tiny steps before reaching a good region, causing slow training or trapping it in a poor solution. ●● What is the basic principle behind learning-rate scheduling? Answer: Use larger steps for rapid early progress and smaller steps for precise later refinement. ●● True or false: The gradient and learning rate perform the same role. Answer: False. The gradient determines the direction and relative sensitivity, while the learning rate controls the overall step size. ●● Does reducing the learning rate directly prevent an exploding gradient? Answer: No. It reduces the size of the resulting parameter update, but the gradient itself may still be enormous. ●● What is the vanishing-gradient problem? Answer: Gradients become extremely small as they propagate backwards through a deep network, causing earlier layers to learn very slowly or stop learning.
●● Why can gradients vanish during backpropagation? Answer: Backpropagation multiplies many derivatives together; if these derivatives generally have magnitudes below 1, the product becomes progressively smaller. ●● Why is the problem worse in deep networks? Answer: Deeper networks require the gradient to pass through more derivatives, creating more opportunities for repeated shrinkage. ●● Why is sigmoid associated with vanishing gradients? Answer: Its derivative has a maximum value of only 0.25, which can shrink the gradient rapidly when multiplied repeatedly. ●● What happens when a sigmoid unit is saturated? Answer: Its output is close to 0 or 1, making its derivative close to zero, resulting in almost no gradient passing backwards. ●● Calculate the result of multiplying four derivatives of 0.25. Answer: 0.25^4 = 0.00390625. ●● How do vanishing gradients affect early layers? Answer: Early layers receive the smallest gradients, so their weights barely change and they may fail to learn useful low-level features.
Answer: False. They mean the derivatives used to update earlier parameters are extremely small, even though the model's cost may remain high. ●● True or false: Increasing the learning rate always fixes vanishing gradients. Answer: False. If the gradient is effectively zero, a larger learning rate may still produce a negligible update. ●● What is the exploding-gradient problem? Answer: Gradients become extremely large during backpropagation, producing unstable parameter updates and possible failure to converge. ●● Why can gradients explode? Answer: Backpropagation multiplies many terms; if their magnitudes are repeatedly greater than 1, the product can grow exponentially. ●● Calculate the result of multiplying ten gradient factors of 2. Answer: 2^10 = 1024. ●● What practical symptoms suggest exploding gradients? Answer: Large fluctuations in cost, rapidly increasing cost, extremely large parameter values, numerical overflow, NaN values, failure to converge.
●● What is gradient clipping? Answer: Gradient clipping caps or rescales gradients when their magnitude exceeds a chosen threshold. ●● If a scalar gradient is 12 and the clipping range is [-5,5], what gradient is used? Answer: The gradient is clipped to 5. ●● Give methods for mitigating exploding gradients. Answer: Gradient clipping, careful weight initialization, batch normalization, simpler architecture, and a smaller learning rate. ●● What is the difference between clipping and reducing the learning rate? Answer: Clipping modifies the gradient magnitude itself; reducing the learning rate reduces how strongly it changes the parameter. ●● True or false: Replacing sigmoid with ReLU is the main direct solution to exploding gradients. Answer: False. Exploding gradients are treated using clipping, careful initialization, normalization, and controlled update sizes. ●● True or false: Exploding gradients can cause NaN values.
●● What can happen if initial weights are too small? Answer: Signals and gradients may progressively shrink, contributing to vanishing gradients and slow learning. ●● What can happen if initial weights are too large? Answer: Activations and gradients may become excessively large, causing saturation and very small derivatives. ●● What is Xavier or Glorot initialization commonly associated with? Answer: Sigmoid and tanh networks; it attempts to maintain a reasonable variance of signals between layers. ●● What is He initialization commonly associated with? Answer: ReLU and related activation functions. ●● True or false: Weight initialization only affects the first forward pass. Answer: False. It influences gradient flow, convergence speed, stability, and the solution reached during training. ●● True or false: Initialising every hidden weight to the same nonzero number solves the zero-initialisation problem. Answer: False. Equal weights still preserve symmetry between neurons.
●● What is a loss or cost landscape? Answer: It is a conceptual surface showing how the cost changes across different possible parameter values. ●● Why are deep-network loss landscapes difficult to optimise? Answer: They are high-dimensional and non-convex, containing flat regions, saddle points and multiple minima. ●● What is a local minimum? Answer: A point with lower cost than surrounding nearby points, but not necessarily the lowest cost across the entire landscape. ●● What is a global minimum? Answer: A parameter configuration with the lowest possible cost across the complete landscape. ●● What is a saddle point? Answer: A stationary or nearly flat point that is not a true minimum, curving upwards in some directions and downwards in others. ●● Why can gradient descent slow down near a saddle point? Answer: The gradient may be close to zero, producing extremely small parameter updates even though a lower-cost direction still exists.
Answer: It controls how much previous history is retained, with a larger (\beta) producing stronger smoothing and longer memory. ●● What is the approximate effective averaging window? Answer: (\frac{1}{1-\beta}) time steps. ●● What is the approximate averaging window when (\beta=0.9)? Answer: Approximately 10 time steps. ●● What is the approximate averaging window when (\beta=0.99)? Answer: Approximately 100 time steps. ●● Which responds faster to new information: (\beta=0.5) or (\beta=0.99)? Answer: (\beta=0.5), because it gives greater weight to the newest observation and retains less historical information. ●● Why are these averages called exponentially weighted? Answer: The contribution of older observations decreases geometrically through repeated multiplication by (\beta). ●● What is momentum in gradient-based optimisation?
Answer: Momentum uses a moving average of past gradients to create a velocity that smooths and accelerates parameter updates. ●● Write Kate's momentum velocity equation. Answer: (m_t=\beta_1m_{t-1}+(1-\beta_1)g_t) where (g_t) is the current gradient. ●● How is the velocity used to update a parameter? Answer: Under the convention used here: (w_t=w_{t-1}-\eta v_t) where some sources absorb (\eta) or omit (1-\beta). ●● How does momentum reduce zigzagging? Answer: Gradients that alternate direction tend to cancel in the moving average, while gradients that consistently point in one direction accumulate. ●● How does momentum accelerate learning? Answer: Repeated gradients in a consistent direction build velocity, producing stronger movement along that direction. ●● How can momentum help in flat regions? Answer: Stored velocity can continue moving the parameters even when the current gradient becomes temporarily small.
●● Why can random search outperform grid search for the same budget? Answer: It explores more distinct values of important hyperparameters instead of repeatedly testing combinations that differ mainly in unimportant dimensions. ●● Which dataset should be used to compare grid-search configurations? Answer: The validation set, not the test set. ●● What does convergence mean? Answer: Training has reached a point where further updates produce little meaningful reduction in cost. ●● Give a simple convergence criterion. Answer: ΔJ < threshold, for example, ΔJ < 10^{-3}. ●● Why must a convergence threshold be chosen carefully? Answer: A threshold that is too large may stop training prematurely, while one that is too small may waste computation chasing insignificant improvements. ●● What cost-curve behaviour is expected from Batch GD? Answer: The cost should generally decrease relatively smoothly.
●● What cost-curve behaviour is expected from SGD or small mini- batches? Answer: The curve may fluctuate, but its overall trend should decrease. ●● The training cost rapidly increases and becomes NaN. What are likely explanations? Answer: The learning rate may be too high, gradients may be exploding, initial weights may be poorly scaled or there may be an implementation error. ●● The training cost decreases extremely slowly. What are possible explanations? Answer: The learning rate may be too small, gradients may be vanishing, the optimiser may be in a flat region, or the input features may be poorly scaled. ●● Training cost decreases, but validation cost begins increasing. What does this suggest? Answer: Overfitting. The model continues improving on training data while its generalisation performance deteriorates. ●● What is early stopping? Answer: Stop training when validation performance stops improving, usually preserving the parameters from the best validation epoch.