1. Home
  2. Explore
  3. Computer Science
  4. Visualizing Convolutional Networks

Study methods

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

Visualizing Convolutional Networks

  • 103Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Vision Tasks
  • spaceFlip card
  • KI knew it
  • DI didn't know it
  • ←Previous card
  • →Next card

What does semantic segmentation predict for an input image, and what does it not distinguish?

Tap to flipClick to flipspace

It assigns a category label to every pixel, but does not distinguish individual instances of the same object category.

Or swipe the card

103 cards

  1. What does semantic segmentation predict for an input image, and what does it not distinguish?

    It assigns a category label to every pixel, but does not distinguish individual instances of the same object category.

  2. What is classification plus localization?

    Predicting a class label and the location of one or a fixed number of objects, often using bounding boxes.

  3. How can classification plus localization be used for pose recognition?

    The model can regress the locations of body joints.

  4. How does object detection differ from classification plus localization?

    Object detection finds and localizes every instance of selected categories without knowing in advance how many instances are present.

  5. What is instance segmentation?

    Detecting each object instance and labeling the pixels belonging to each individual instance.

  6. What is the key idea behind R-CNN-family and single-shot methods?

    They are different families of methods for solving object detection.

  7. In AlexNet, what are the shape and number of filters in the first convolutional layer?

    There are 64 filters, each with shape 3×11×113 \times 11 \times 113×11×11.

  8. How does a convolutional filter produce an activation from an image region?

    It computes an inner product between its weights and a corresponding image patch.

  9. Why can first-layer convolutional weights be visualized as images to understand the filters?

    An inner product is maximized when the input matches the filter weights, so the weights show the pattern that most strongly activates the filter.

  10. What patterns commonly appear in the first convolutional filters of image networks?

    Oriented edges and bars of light and dark, along with opposing color patterns.

  11. How do early convolutional filters relate to early processing in the human visual system?

    Both commonly respond to features such as oriented edges.

  12. How consistent are first-layer filter patterns across architectures and training sets?

    They commonly look similar, with oriented edges and opposing colors, across many image-network architectures and training sets.

  13. Why are intermediate-layer filter weights harder to interpret as images than first-layer weights?

    Intermediate filters operate on earlier feature maps rather than directly on RGB pixels; their multidimensional weights describe patterns of activations, not straightforward image templates.

  14. What does an intermediate-layer filter visualization represent?

    It shows a pattern in the previous layer’s activations that can strongly activate the filter, rather than a directly interpretable image pattern.

  15. What caveats apply when viewing filter weights as images?

    Weights may be rescaled for display, and such visualizations may omit biases, so they should not be interpreted too literally.

  16. What representation can be extracted from AlexNet’s last hidden layer for image comparison?

    A 4096-dimensional feature vector for each image.

  17. How does feature-space nearest-neighbor retrieval differ from pixel-space retrieval?

    Pixel-space neighbors tend to look similar in raw appearance; feature-space neighbors can have different pixels but similar semantic content.

  18. What does an elephant image finding a nearby feature-space neighbor with the elephant on the opposite side illustrate?

    A learned feature representation can place semantically similar images close together despite large pixel-level differences.

  19. Does ordinary supervised classification explicitly train the last-layer features to be close for semantically similar images?

    No. Such similarity can emerge even though the standard classification loss does not explicitly require it.

  20. What do contrastive loss and triplet loss encourage in learned representations?

    They impose constraints that give the learned features a metric-space interpretation, shaping which examples should be close or far apart.

  21. What is PCA used for when visualizing high-dimensional network features?

    It reduces a high-dimensional representation to a lower-dimensional one, such as two dimensions, for visualization.

  22. What is t-SNE, and why is it used to visualize learned features?

    t-SNE is a nonlinear dimensionality-reduction method used to map high-dimensional features into a space that can be visualized, often in two dimensions.

  23. What structure can t-SNE reveal when applied to raw handwritten-digit images?

    It can reveal clusters corresponding to different digit categories.

  24. How can a two-dimensional t-SNE layout of image features be visualized with the original images?

    Map each image’s feature vector to a two-dimensional coordinate, then display the original image near that coordinate.

  25. What should be kept in mind when interpreting a grid of images placed at t-SNE coordinates?

    A grid sample does not necessarily show the density of the feature space; images can overlap or be selected merely because they are near grid points.

  26. What is an activation volume in a convolutional network?

    The full three-dimensional collection of numbers output by a layer, typically organized as channels by height by width.

  27. What is an activation map?

    A two-dimensional slice of an activation volume corresponding to one channel.

  28. Why can intermediate activation maps be more interpretable than intermediate filter weights?

    They show where a feature responds for a particular input, which can reveal the image regions associated with that feature.

  29. What might an activation map that responds over a person’s face suggest?

    That the corresponding feature may respond to faces, even if face recognition is not an explicit output category.

  30. Does a black or inactive activation for one image necessarily mean a ReLU is dead?

    No. A dead ReLU is inactive across the entire training data set; an activation can simply be inactive for the particular image being viewed.

  31. Do activation maps always have the same spatial dimensions as the input image?

    No. Convolutional strides and pooling can subsample them, though their size generally scales with the input image size.

  32. How are maximally activating patches found for a convolutional feature?

    Run many images through the network, find locations with the highest activation for the selected feature, and extract the corresponding input patches.

  33. Why does a neuron in a convolutional layer correspond to only a patch of the input image?

    Its receptive field covers only a subset of the image, not the entire image.

  34. What can maximally activating input patches reveal about a feature?

    Recurring patterns among the patches suggest what visual structures or textures activate that feature.

  35. Why can maximally activating patches from higher layers show larger image structures?

    Higher-layer neurons have larger receptive fields and can respond to more complex, larger-scale patterns.

  36. How does an occlusion experiment test which image regions affect a classification?

    Replace a patch with the dataset mean pixel value, run the occluded image through the network, and repeat as the patch moves across the image.

  37. How is an occlusion sensitivity map interpreted?

    A large drop in the class probability when a region is occluded suggests that region was important to the classification.

  38. What is a limitation of interpreting occlusion experiments?

    Occluding background regions can also change the score, and it may be difficult to determine why a particular region matters.

  39. What does a saliency map measure?

    The gradient of a class score with respect to the input pixels, indicating how sensitive the score is to small pixel changes.

  40. How does a saliency-map gradient estimate pixel importance?

    It gives a first-order estimate of how much the class score would change if a pixel were changed slightly.

  41. What can the outline of an object in a saliency map suggest?

    That pixels around the object influence the network’s classification for that image.

  42. Can saliency maps be combined with segmentation methods to isolate objects?

    Yes. For example, saliency can be combined with an interactive method such as GrabCut to produce object segments, though this approach is brittle and generally weaker than supervised segmentation.

  43. What does guided backpropagation seek to visualize?

    Which input pixels influence a selected intermediate neuron’s value for a particular image.

  44. How does guided backpropagation differ from ordinary backpropagation through ReLUs?

    It allows only positive gradients to pass backward through ReLUs and blocks negative gradients, so it is not the true gradient.

  45. Why is guided backpropagation used for visualization?

    Empirically, it often produces cleaner visualizations of the input regions influencing a neuron than ordinary backpropagation.

  46. What is the difference between saliency-style analysis and gradient-ascent image synthesis?

    Saliency-style analysis examines pixel influence for a fixed image; gradient-ascent synthesis changes the image to find inputs that maximize a chosen neuron or class score.

  47. In gradient-ascent visualization, which quantities are optimized and which remain fixed?

    The image pixels are optimized while the trained network weights remain fixed.

  48. What are the basic steps for synthesizing an image that activates a neuron?

    Initialize an image, forward-propagate it, compute the score’s gradient with respect to the pixels, update the pixels by gradient ascent, and repeat.

  49. Why add regularization when synthesizing images by gradient ascent?

    Without it, the pixels can exploit quirks of the network and produce unnatural patterns rather than interpretable images.

  50. What does an L2L_2L2​ image regularizer do in early gradient-ascent visualizations?

    It penalizes the generated image’s L2L_2L2​ norm, providing a simple regularization term that can constrain the optimization.

  51. What can happen when class-visualization optimization uses only a simple regularizer?

    The result may contain multiple superimposed patterns or unclear shapes, reflecting ambiguity in the inputs that activate the class.

  52. How can image priors such as blurring and pixel clipping improve gradient-ascent visualizations?

    Periodic Gaussian blurring encourages spatial smoothness, while clipping small or low-gradient pixel values can make the generated image cleaner.

  53. What is projected gradient ascent in image synthesis?

    An optimization approach that periodically projects the generated image onto a set of images with desired properties, such as smoothness or valid pixel ranges.

  54. Why might gradient-ascent visualizations show unusual colors?

    The optimization may be unconstrained even though valid image pixels have bounded ranges; pixel constraints or rescaling may be needed, so displayed colors can be misleading.

  55. What tends to happen when image synthesis maximizes a class score without an image regularizer?

    It can produce noise-like images that receive a high class score but do not look like natural examples of the class.

  56. What is multimodality in the context of class-visualization images?

    A class can correspond to several visually different kinds of images, so there may be multiple distinct modes that activate the same class.

  57. How can clustering help with multimodal class visualizations?

    Clustering class examples into different modes and initializing near a chosen mode can produce visualizations that better represent that mode.

  58. How can a stronger natural-image prior improve synthesized class images?

    It can encourage outputs to look more realistic while still maximizing the desired class score.

  59. What is feature inversion?

    Reconstructing an image by synthesizing a new image whose network representation matches the features recorded from an original image.

  60. What objective is minimized in feature inversion?

    The distance between the original image’s recorded feature vector and the features computed from the generated image.

  61. What does a total-variation regularizer encourage in a generated image?

    Spatial smoothness by penalizing differences between neighboring pixels horizontally and vertically.

  62. What does successful reconstruction from an early network layer suggest?

    That the layer retains much of the original image’s low-level pixel information.

  63. What information tends to be lost when reconstructing from deeper network layers?

    Exact low-level details such as precise colors and textures, while broader spatial structure and semantic content may remain.

  64. What is a fooling image in the demonstrated gradient-ascent procedure?

    An image modified to make a classifier predict a chosen class, even though the result can look nearly unchanged or semantically unrelated to a person.

  65. Why are fooling images surprising?

    Tiny, often noise-like pixel changes can cause a network to assign a different class even when people still perceive the original image.

  66. What is DeepDream designed to do?

    Amplify features that a network already detects in an input image, producing visually striking patterns.

  67. How is DeepDream’s feature-amplification update performed?

    Run the image to a chosen layer, set the gradient there to the layer’s activations, backpropagate to the image, update the image, and repeat.

  68. What optimization interpretation is associated with setting DeepDream’s gradient to the activations?

    It corresponds to increasing the squared norm of the selected layer’s features.

  69. Why jitter an image during DeepDream optimization?

    Small shifts, often with wrapped pixels, act as a regularizer that encourages additional spatial smoothness.

  70. What other practical steps can be used during DeepDream image updates?

    Normalize gradients, clip pixel values to valid image ranges, and repeat the feature-amplification updates.

  71. Why can dog-like patterns appear frequently in DeepDream images from an ImageNet classifier?

    Many ImageNet categories are dog breeds, so the network has learned many dog-related features that can be amplified.

  72. How can the chosen network layer affect DeepDream results?

    Lower layers tend to amplify simpler patterns such as edges and swirls, while higher layers can produce more complex objects or structures.

  73. How does multiscale DeepDream produce more elaborate images?

    Apply DeepDream at a small scale, enlarge the image, continue optimizing, and repeat at progressively larger scales.

  74. How can the training data influence DeepDream patterns?

    The network tends to amplify features associated with its training data; scene-trained networks, for example, can produce scene-like structures.

  75. What is classical texture synthesis trying to generate?

    A larger image that resembles the texture of a given example patch.

  76. How does a nearest-neighbor texture-synthesis method generate pixels?

    It scans the output, finds an input patch matching the already-generated neighborhood, and copies a pixel from that patch.

  77. Why can classical patch-copying methods work poorly on complex textures?

    Directly copying local pixels may not capture the more complex structure and statistics of the texture.

  78. What is the role of a Gram matrix in neural texture synthesis?

    It summarizes co-occurrence statistics among convolutional features and serves as a descriptor of texture.

  79. How is a Gram matrix formed from convolutional feature activations?

    Take outer products of feature vectors at spatial locations and average them over the locations to obtain a channel-by-channel matrix.

  80. What does a large entry in a feature Gram matrix indicate?

    That the corresponding feature channels tend to have strong activations together in the feature representation.

  81. What information does a Gram-matrix texture descriptor discard?

    It discards the specific spatial arrangement of features while retaining their co-occurrence statistics.

  82. Why is the Gram matrix useful for describing texture?

    Texture depends strongly on which visual features co-occur, while their exact locations may matter less.

  83. How can a Gram matrix be computed efficiently from a feature volume?

    Reshape the feature volume into a matrix of channels by spatial positions, then multiply that matrix by its transpose.

  84. Why might practitioners use a Gram matrix instead of a covariance matrix for texture synthesis?

    Covariance-based descriptors can also work, but Gram matrices are less expensive to compute in practice.

  85. How is a neural texture-synthesis loss constructed?

    Compare the Gram matrices of the generated image and the input texture, often at several network layers, and minimize their difference.

  86. What role does a pretrained convolutional network play in neural texture synthesis?

    It extracts feature activations from which Gram-matrix texture descriptors are computed.

  87. How does the selected network layer affect synthesized texture?

    Lower-layer Gram matrices tend to reproduce local colors and splotches; higher-layer Gram matrices can reproduce larger structures.

  88. How can Gram-matrix synthesis be applied to an artwork?

    Treat the artwork as the input texture and synthesize a new image that matches its feature co-occurrence statistics.

  89. What are the two inputs to neural style transfer, and what does each control?

    A content image controls the broad image content, while a style image controls the desired texture or artistic appearance.

  90. What losses are combined in neural style transfer?

    A content feature-reconstruction loss and a style Gram-matrix loss.

  91. How is a style-transfer image commonly optimized?

    Initialize an output image, compute its content and style losses, backpropagate their gradients to its pixels, update the pixels, and repeat.

  92. How can the balance between content and style be adjusted?

    Change the relative weights of the content-reconstruction and style Gram-matrix losses.

  93. How can resizing the style image affect style transfer?

    It changes the scale of the style features represented by its Gram matrices, providing control over the scale of the transferred texture.

  94. How can style transfer combine multiple styles?

    Match Gram-matrix descriptors for multiple style images in the same optimization.

  95. Why is multiscale processing useful in style transfer?

    It allows stylization at progressively larger resolutions, including high-resolution outputs.

  96. What is the main practical limitation of optimization-based style transfer?

    It requires many forward and backward passes for each image, making high-resolution results slow and computationally demanding.

  97. How does a feed-forward style-transfer network speed up stylization?

    It learns to map a content image directly to a stylized image, so inference requires only one forward pass instead of iterative optimization.

  98. How is a feed-forward style-transfer network trained?

    Train its weights using content and style losses, with gradients computed through the losses to update the network.

  99. What is the trade-off of a feed-forward network trained for one fixed style?

    It can produce results quickly, but a separate network is needed for each style.

  100. How can one feed-forward network apply multiple styles?

    Provide the content image and a representation of the desired style to a network trained to handle multiple styles.

  101. How can a multi-style network blend styles at inference time?

    Specify a blend of trained styles as input so the network produces an image combining them.

  102. What is instance normalization’s role in the described feed-forward style-transfer architecture?

    Replacing batch normalization with instance normalization can improve style-transfer results.

  103. What broad categories of CNN interpretation methods were covered?

    Activation-based methods, such as nearest neighbors and occlusion, and gradient-based methods, such as saliency maps and image synthesis.

Card 1 of 103
Card 1 of 103

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent