1. Home
  2. Explore
  3. Computer Science
  4. Neural Networks Overview

Study methods

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

Neural Networks Overview

  • 31Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Backpropagation Concepts

Why is backpropagation computation linear in the depth of the network rather than exponential?

31 questions

  1. 1

    Why is backpropagation computation linear in the depth of the network rather than exponential?

    Model answer

    Computation is linear because partial derivatives computed at each layer are reused as common subexpressions when moving backward, so no exponential explosion.

    Explanation

    The chain rule expansion for each weight shares many subexpressions (e.g., the derivative of the output with respect to hidden unit activations). Once computed, these are reused for all weights feeding into that unit, making the total work proportional to the number of weights, not the number of paths.

  2. 2

    What does the slogan 'what's computed is computed and need not be recomputed' refer to in backpropagation?

    Model answer

    It refers to the reuse of already computed partial derivatives when calculating weight updates for earlier layers, avoiding redundant computation.

    Explanation

    As you move backward from outputs to inputs, the same intermediate derivatives appear in the chain rule expansions for multiple weights. Computing them once and reusing them keeps the algorithm efficient.

  3. 3

    How does the chain rule expand the partial derivative of performance with respect to a weight in a neural net?

    Model answer

    It expands into a sum over all paths from that weight to the output of the product of derivatives along each path: ∂P∂w=∑paths∂P∂y∂y∂net∂net∂w\frac{\partial P}{\partial w} = \sum_{\text{paths}} \frac{\partial P}{\partial y} \frac{\partial y}{\partial \text{net}} \frac{\partial \text{net}}{\partial w}∂w∂P​=∑paths​∂y∂P​∂net∂y​∂w∂net​.

    Explanation

    Each path corresponds to a sequence of neurons from the weight to the output. The chain rule multiplies the derivatives along the path, and the sum is over all paths. This expansion reveals many shared subexpressions.

  4. 4

    In the backpropagation example shown, why do the partial derivatives for w1w_1w1​ and w3w_3w3​ share common subexpressions?

    Model answer

    Both expansions involve the same term ∂P∂y1∂y1∂net1\frac{\partial P}{\partial y_1} \frac{\partial y_1}{\partial \text{net}_1}∂y1​∂P​∂net1​∂y1​​ because w1w_1w1​ and w3w_3w3​ both influence the output through the same hidden unit y1y_1y1​ (and y2y_2y2​).

    Explanation

    The derivative of performance with respect to the hidden unit's output appears in both calculations. This common subexpression is computed once and reused, illustrating the efficiency of backpropagation.

  5. 5

    What fundamental operation does a single neuron perform before applying its nonlinearity?

    Model answer

    It computes the dot product of its weight vector with the input vector: ∑iwixi\sum_i w_i x_i∑i​wi​xi​.

    Explanation

    The weighted sum of inputs is the dot product. This is why some researchers believe the dot product is a fundamental neural computation.

  6. 6

    What is convolution in a convolutional neural net, and how does it differ from the signal processing convolution?

    Model answer

    Convolution in CNNs involves sliding a kernel (set of weights) over an image to produce a feature map; it differs from signal processing convolution in that there is no memory or time reversal—it is essentially a sliding dot product.

    Explanation

    A neuron with fixed weights is applied to each local patch of the image, producing an output for each position. This operation is called convolution by analogy, but it lacks the memory and reversal of the traditional convolution integral.

  7. 7

    What is the typical input image size in the discussed deep net?

    Model answer

    Images are typically 256x256 pixels (compressed from larger sizes).

    Explanation

    Due to computational constraints, images are downsampled to 256x256 before being fed into the network.

  8. 8

    What does max pooling do in a convolutional net?

    Model answer

    It takes the maximum value in each local neighborhood of the feature map, producing a smaller, downsampled map.

    Explanation

    After convolution, max pooling selects the maximum activation in a small window (e.g., 2x2) and uses that as the output for that region, helping to achieve translational invariance and reduce dimensionality.

  9. 9

    How many kernels are typically used in the convolution stage of the discussed net?

    Model answer

    About 100 kernels are used.

    Explanation

    Each kernel produces a separate feature map, so the network learns 100 different features from the input image.

  10. 10

    After convolution and pooling, how are the resulting feature maps used for classification?

    Model answer

    They are flattened and fed into a fully connected neural network that ultimately outputs class probabilities.

    Explanation

    The fully connected layers combine local features to make a final classification decision.

  11. 11

    What is autocoding in the context of neural nets?

    Model answer

    Autocoding trains a neural net to reproduce its input at the output by forcing the data through a smaller hidden layer, learning a compressed representation.

    Explanation

    The desired output is set equal to the input. The network must learn to encode the input into a lower-dimensional representation and then decode it back, capturing the structure of the data.

  12. 12

    How is autocoding used for unsupervised pre-training in deep nets?

    Model answer

    Layers are trained one at a time as autoencoders: first the input to hidden layer, then that hidden layer to the next, and so on; only at the end is a classifier layer added and trained with labeled data.

    Explanation

    Each layer learns to reconstruct its input, building useful features layer by layer. The final labeled training adjusts the output layer.

  13. 13

    In the shadow height autocoding demonstration, what did the hidden layer neurons encode?

    Model answer

    They encoded a generalization of the input (shadow height), but the encoding was not directly interpretable as 'short', 'medium', or 'tall'.

    Explanation

    The hidden layer neurons developed receptive fields that responded to different shadow heights, but their activation patterns were not simple height detectors; the network learned a distributed representation.

  14. 14

    After pre-training an autoencoder, how is the output layer trained for classification?

    Model answer

    The pre-trained layers are frozen, and the output layer is trained using labeled data with a sigmoid or softmax output.

    Explanation

    The frozen layers already extract useful features; only the final layer is trained to map those features to class probabilities.

  15. 15

    What is the role of the hidden layer in autocoding?

    Model answer

    It acts as a bottleneck that forces the network to learn a compressed representation of the input data, capturing its essential structure.

    Explanation

    By reducing dimensionality, the hidden layer must find patterns that allow faithful reconstruction, effectively performing feature extraction.

  16. 16

    How is the output of a sigmoid neuron interpreted in the context of classification?

    Model answer

    It is interpreted as the probability that the input belongs to the positive class: P(y=1∣x)=11+e−(wx+T)P(y=1|x) = \frac{1}{1+e^{-(wx + T)}}P(y=1∣x)=1+e−(wx+T)1​.

    Explanation

    The sigmoid squashes the linear output to (0,1), which can be treated as a probability. The threshold TTT shifts the curve, and weight www controls steepness.

  17. 17

    How do we adjust the sigmoid parameters to maximize the probability of observing the training data?

    Model answer

    We use gradient ascent (or descent) to maximize the likelihood: adjust www and TTT to increase the product of probabilities for positive examples and 1−1 -1− probability for negative examples.

    Explanation

    The data likelihood is a function of the sigmoid parameters. Taking partial derivatives and updating parameters increases the likelihood of the observed class labels.

  18. 18

    What is softmax, and why is it used?

    Model answer

    Softmax converts a vector of class outputs into a probability distribution: P(class i)=ezi∑jezjP(\text{class } i) = \frac{e^{z_i}}{\sum_j e^{z_j}}P(class i)=∑j​ezj​ezi​​. It is used to get probabilities over multiple classes.

    Explanation

    Unlike a single sigmoid, softmax ensures the outputs sum to 1, giving a proper probability distribution. This allows ranking the most probable classes (e.g., top-5).

  19. 19

    What is the relationship between the sigmoid and softmax functions in multi-class classification?

    Model answer

    Sigmoid gives independent probabilities for each class (binary), while softmax gives a single distribution over all classes. For multiple classes, softmax is typically used at the final layer.

    Explanation

    In a network with many output neurons, using sigmoid on each would not enforce that the probabilities sum to 1. Softmax normalizes across classes.

  20. 20

    How does softmax enable the 'top-5' performance metric?

    Model answer

    Softmax provides a probability for each class, allowing the system to output the five most probable classes with their probabilities.

    Explanation

    The softmax outputs sum to 1, so you can sort by probability and pick the top 5. This is used in ImageNet evaluation.

  21. 21

    What is dropout and how does it help neural net training?

    Model answer

    Dropout randomly sets a fraction of neurons to zero (drops them) during each training iteration, which prevents overfitting and helps avoid local maxima.

    Explanation

    By removing neurons temporarily, the network becomes more robust and less reliant on specific neurons. It effectively trains an ensemble of sub-networks.

  22. 22

    Why do wide neural nets (many neurons per layer) help avoid local maxima?

    Model answer

    Wide nets turn local maxima into saddle points, allowing gradient-based optimization to escape and continue improving.

    Explanation

    With more parameters, the loss landscape is smoother; saddle points are more common than sharp local minima, and gradient descent can often find a downward direction.

  23. 23

    In the deep net demonstration, why did training with all neurons initially produce all-red output ('no' for all classes)?

    Model answer

    With no training, the network outputs were around 0.5 for each class; but after some iterations, the output turned red (negative) for all classes as a default safe prediction.

    Explanation

    Early in training, the network learns to predict 'no' for everything because it has no information; this is a local strategy before it discovers actual patterns.

  24. 24

    What happened when neurons were knocked out before any training?

    Model answer

    The network got stuck in a local maximum and could not learn well.

    Explanation

    Removing neurons initially limited the network's capacity, making it fall into a poor local optimum from which gradient descent could not escape.

  25. 25

    What happened when neurons were knocked out after training the full network?

    Model answer

    The network retrained quickly, finding a new solution with fewer neurons.

    Explanation

    The original training had found a good region of parameter space; removing neurons only slightly perturbed the solution, allowing fast convergence to a new optimum.

  26. 26

    How does plain backpropagation compare to more sophisticated methods like autocoding or Boltzmann machines?

    Model answer

    Plain backpropagation with a convolutional net performs about as well as those more complex methods.

    Explanation

    Despite the theoretical appeal of unsupervised pre-training, in practice, standard stochastic gradient descent on a well-designed convolutional net often achieves comparable accuracy.

  27. 27

    Can small pixel changes fool a deep neural net? Give an example from the lecture.

    Model answer

    Yes; a school bus image was changed by a few pixels imperceptible to humans, causing the net to lose confidence it was a school bus and instead classify it as something else.

    Explanation

    The altered pixels trick the net into focusing on local texture that matches other classes, even though the global appearance is unchanged.

  28. 28

    What does the school bus example reveal about how deep nets perceive images?

    Model answer

    It reveals that deep nets rely heavily on local texture and features rather than global shape or context.

    Explanation

    A small patch of 'bus-like' texture can override the overall shape, showing the net does not have a holistic understanding.

  29. 29

    How were the frequency band manipulation images created to test neural net robustness?

    Model answer

    An image was split into frequency bands, a rectangle was removed from one band, and the image was reassembled; the net still classified it correctly if the removed region was not critical.

    Explanation

    By knocking out information in specific frequency bands, researchers could see which parts of the image are most important for the net's decision.

  30. 30

    What did the frequency band manipulation experiments show about neural nets?

    Model answer

    They showed that nets can still classify even when large portions of an image are removed, often relying on remaining texture.

    Explanation

    For example, a railroad car image was still recognized even after removing a large rectangle, indicating the net uses local evidence rather than a global template.

  31. 31

    Why do researchers say deep neural nets do not 'see like we see'?

    Model answer

    Because they are easily fooled by small changes that humans would not notice, and they rely on local features rather than global understanding.

    Explanation

    Human vision integrates context and shape, while deep nets are more texture-based and can be misled by adversarial perturbations.

1 of 31
Question 1 of 31

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent