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

Study methods

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

Interpreting Neural Networks

  • 78Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Interpretation Goals
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

Why is interpreting neural networks important beyond trial-and-error improvement?

Tap to flipClick to flipspace

Interpretation and visualization provide theoretical insight into how networks make decisions and may support more systematic improvements than hyperparameter experimentation alone.

Or swipe the card

78 cards

  1. Why is interpreting neural networks important beyond trial-and-error improvement?

    Interpretation and visualization provide theoretical insight into how networks make decisions and may support more systematic improvements than hyperparameter experimentation alone.

  2. What are the three methods used to map a network's output decision back to the input?

    Saliency maps, occlusion sensitivity, and class activation maps.

  3. What methods can be used to investigate intermediate layers and activations?

    Gradient ascent class model visualization, dataset search, and deconvolution.

  4. What is the purpose of interpreting a neural network trained for an animal classifier?

    To show that the model is focusing on the relevant animal rather than relying on an unrelated part of the image.

  5. What question does an input-visualization method answer?

    Which parts of the input were discriminative for a particular output or class score?

  6. What is the difference between explaining an output and explaining an intermediate activation?

    Output explanations identify input regions responsible for a prediction, whereas activation explanations investigate what a neuron or feature map responds to in general.

  7. What is a saliency map?

    A map of the derivatives of a chosen class score with respect to the input pixels.

  8. How is a saliency map computed for the class 'dog'?

    Take the derivative of the pre-softmax dog score with respect to the input and backpropagate it all the way to the pixels.

  9. What does a large absolute value in a saliency map indicate?

    The corresponding pixel had a strong impact on the selected class score.

  10. Why should saliency maps use a pre-softmax score instead of a post-softmax probability?

    A post-softmax probability can change because the scores of other classes decrease, even when the selected class score does not change.

  11. What is the relationship between the saliency-map gradient and the input?

    The gradient has the same shape and size as the input, forming a matrix of pixel-level influence values.

  12. How can a saliency map potentially be used for segmentation?

    Threshold the pixel-score map to identify regions with strong influence on the class score.

  13. What is occlusion sensitivity?

    A method that systematically covers parts of an input and measures how the selected class confidence changes.

  14. What are the basic steps of occlusion sensitivity?

    Place an occluding patch at a location, forward-propagate the modified image, record the class score, shift the patch, and repeat.

  15. What does a decrease in the dog score when a region is occluded indicate?

    The covered region contained information important for recognizing the dog.

  16. Can occluding a region ever increase the probability of a class?

    Yes. Removing distracting or competing information can make the network more confident in the selected class.

  17. How does occlusion-patch size affect the resulting confidence map?

    A smaller patch produces a more spatially precise map.

  18. What can occlusion sensitivity reveal about competing visual evidence?

    It can show that covering evidence for another class increases the selected class score, or that covering the target object decreases it.

  19. What did the occlusion example involving a Pomeranian and a tennis ball demonstrate?

    Covering the tennis ball reduced the network's confidence that the image contained a Pomeranian because the ball was associated with that class.

  20. What did the example involving a dog and a human face demonstrate?

    Covering the human face increased confidence in the dog class, while covering the dog could make the human class more likely.

  21. What is the central idea of a class activation map?

    It uses the final convolutional feature maps and class-specific weights to localize evidence for a particular class.

  22. Why can flattening and fully connected layers make localization difficult?

    Flattening discards the explicit spatial arrangement of the convolutional feature maps.

  23. What architecture is used to preserve spatial information for class activation maps?

    The final convolutional output is followed by global average pooling and a fully connected softmax classifier.

  24. What does global average pooling do to a feature map?

    It averages all spatial values in each feature map into one scalar.

  25. If the final convolutional volume has six feature maps, what is the output of global average pooling?

    A vector containing six scalar activations.

  26. How is a class activation map constructed?

    Compute a weighted sum of the final convolutional feature maps using the weights connecting each feature map to the selected class, then upsample the result to input size.

  27. Why is a class activation map class-specific?

    The weights used to combine the feature maps differ for each output class.

  28. Why does global average pooling not completely destroy spatial information in class activation maps?

    The original spatial feature maps are still known, so the class-specific weighted sum can be evaluated at each spatial location before upsampling.

  29. How do class activation maps differ from saliency maps?

    Saliency maps use gradients backpropagated to input pixels, whereas class activation maps use class-specific weights and last-layer feature maps followed by upsampling.

  30. What is gradient-ascent class model visualization?

    An iterative method that updates an input image to maximize a chosen class score, usually while applying regularization.

  31. What objective is optimized in gradient-ascent class visualization?

    A class score minus a regularization term that encourages the optimized image to look natural.

  32. What are the iterative steps in gradient-ascent visualization?

    Forward-propagate the current image, compute the objective, backpropagate its gradient, update the pixels, and repeat.

  33. What does L2L_2L2​ regularization contribute to class model visualization?

    It discourages extreme pixel values and encourages pixel values to remain relatively similar.

  34. Why might pixel values need to be clipped during gradient-ascent visualization?

    Gradient ascent can produce values outside the valid image range, even though image pixels are typically represented between 000 and 255255255.

  35. What is Gaussian blurring used for in class model visualization?

    It suppresses high-frequency pixel variations and encourages smoother images.

  36. Can gradient ascent visualize an intermediate activation rather than a final class?

    Yes. The objective can be set to a chosen intermediate activation, and the input that maximizes it can be found.

  37. Does a more realistic class model visualization necessarily prove that a model is more accurate?

    No. It is useful for checking whether the network focuses on sensible evidence, but it does not directly measure model accuracy.

  38. What is dataset search for neural-network interpretation?

    A method that finds the dataset examples producing the highest activation for a selected neuron or feature map.

  39. How is dataset search performed for a feature map?

    Forward-propagate many data points, measure their activation for the selected feature map, and rank the examples by activation.

  40. What can top-activating images reveal about early feature maps?

    They may reveal simple patterns such as edges, diagonals, or basic textures.

  41. What can top-activating images reveal about deeper feature maps?

    They may reveal increasingly complex patterns such as faces, clothing, text, or other object parts.

  42. Why are top-activating images sometimes shown as crops rather than full images?

    A neuron often sees only its receptive field, a subregion of the original input.

  43. How does receptive-field size change with network depth?

    It generally becomes larger in deeper layers because successive convolutions allow activations to depend on more of the original image.

  44. What types of concepts can networks learn without being directly labeled for them?

    Intermediate neurons may learn to detect faces, wrinkles, text, edges, or other useful visual patterns.

  45. What is the main function of deconvolution in a neural network?

    It increases the spatial dimensions of a representation, reversing the downsampling direction of convolutional encoding.

  46. Why are deconvolution networks useful for image segmentation?

    They can upsample a compact encoded representation into a segmentation mask with the same spatial size as the input image.

  47. How is deconvolution used to visualize an activation?

    Keep a selected activation, set other activations to zero, and reconstruct backward through unpooling, a ReLU reconstruction step, and deconvolution.

  48. Why are nonselected activations set to zero during deconvolutional visualization?

    To isolate the input evidence associated with the selected activation and reduce noise from other activations.

  49. How can a one-dimensional convolution be represented mathematically?

    As a matrix-vector product y=Wxy = Wxy=Wx, where the matrix contains shifted versions of the filter weights.

  50. In the one-dimensional example, what is the output size for input size 121212, filter size 444, stride 222, and padding 222?

    The output size is 555.

  51. What assumption allows a convolution matrix to be inverted for reconstruction?

    The matrix must be invertible; a stronger simplifying assumption is that it is orthogonal.

  52. Why is deconvolutional reconstruction generally only approximate?

    The convolution matrix is not always orthogonal or invertible, and pooling and nonlinearities also discard information.

  53. How can transposed convolution be implemented using an ordinary convolution pattern?

    Insert zeros between elements of the input, use flipped filter weights, and reduce the stride accordingly.

  54. What happens to the stride in the one-dimensional transposed-convolution example?

    A forward stride of 222 becomes a stride of 111 after inserting zeros between input elements.

  55. What happens to the filter weights in the transposed-convolution formulation?

    The filter weights are reversed, such as changing [w1,w2,w3,w4][w_1,w_2,w_3,w_4][w1​,w2​,w3​,w4​] to [w4,w3,w2,w1][w_4,w_3,w_2,w_1][w4​,w3​,w2​,w1​] in one dimension.

  56. How does two-dimensional deconvolution differ from the one-dimensional case?

    The same principle is applied with a two-dimensional filter: each activation scales the filter, and the shifted filters overlap to produce an upsampled output.

  57. When must deconvolution weights be learned rather than reused from the encoder?

    In applications such as segmentation, the deconvolutional network can have its own trainable weights and does not require the encoder's filters to be orthogonal.

  58. Why is max pooling not mathematically invertible?

    It retains only the maximum value in each pooling region and discards the other values.

  59. What are pooling switches?

    Stored indicators showing the location of the maximum value within each pooling region.

  60. How does unpooling use switches?

    It places each pooled value at the recorded maximum location and fills the other positions with zeros.

  61. How does ReLU behave during ordinary backpropagation?

    Gradients are set to zero for inputs that were negative and pass through unchanged for positive inputs.

  62. Why does ReLU reconstruction use stored activation information?

    The reconstruction needs to identify which forward activations were positive and therefore contributed to later computations.

  63. What is the purpose of the ReLU deconvolution step in visualization?

    To retain positive evidence that supports the selected activation while reducing influence from unrelated forward activations.

  64. How do learned features typically change from early to deep layers?

    They progress from edges and simple patterns to more complex structures such as faces, objects, text, or object parts.

  65. Why can an intermediate feature detector for text emerge in an image classifier?

    Text may provide useful evidence for recognizing a labeled object, such as identifying a book or bookcase.

  66. What does a feature map that responds to many differently shaped circles suggest?

    The feature is relatively invariant to changes in the size or precise appearance of the circles.

  67. What does it suggest if a feature map is always dark for every input?

    The corresponding neuron or feature may be dead and may not be detecting any useful pattern.

  68. What is Deep Dream's basic procedure?

    Forward-propagate an image, choose a layer, set the gradient there to the layer's activation, backpropagate to the input, update the pixels, and repeat.

  69. How does Deep Dream differ from ordinary gradient-ascent class visualization?

    Deep Dream directly sets gradients at a selected layer to the layer's activations, amplifying whatever patterns are already present rather than optimizing only one explicitly chosen class score.

  70. What happens when Deep Dream is applied to lower network layers?

    It tends to amplify simple edges and textures.

  71. What happens when Deep Dream is applied to deeper layers?

    It tends to amplify complex objects or object parts that the network associates with the image.

  72. Why might gradient ascent visualize a dumbbell together with a human hand?

    The network may have learned that dumbbells usually appear with human hands or arms in its training data.

  73. Which methods are useful for determining what part of an input caused an output?

    Occlusion sensitivity, saliency maps, and class activation maps.

  74. Which methods help determine the role of an intermediate neuron or feature layer?

    Deconvolution and dataset search, along with gradient-ascent visualization.

  75. Which method can provide a quick but relatively imprecise object segmentation?

    A saliency map followed by thresholding.

  76. What are important practical uses of deconvolution?

    Visualization, image reconstruction, segmentation, and some image-generation systems such as generative adversarial networks.

  77. How can visualization reveal a problem with a neural network's internal features?

    If some feature maps remain inactive for all tested inputs, visualization can reveal that their neurons are dead or ineffective.

  78. How can attention methods help interpret non-image data?

    They identify which parts of a sequence, such as words in a sentence, were important for producing an output.

Card 1 of 78
Card 1 of 78

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent