CS 7643 QUIZ 1 ACTUAL TEST SCRIPT 2026
VERIFIED SOLUTIONS
◉ Equivariance. Answer: If the input changes, the output changes in
the same way if f(g(x) =g(f(x). If the beak of a bird in a picture moves
a bit, the output values will move in the same way
change to input causes equal change to output
◉ Invariance. Answer: If the input changes, the output stays the
same. That is f(g(x)) = f(x) E.g. rotating/scaling a number will still
result in that number being classified the same..
change to input does not affect output
Useful if we care more about if a feature is present than exactly
where it is
◉ saliency maps. Answer: Instead of using deconvnets, can, instead
of taking the error gradient wrt model parameters, take gradient of
class score we're trying to visualize wrt to the image itself (the input
of the network)
gets the degree to which a pixel contributed to that class score
, take absolute value of score because we care about degree, not
direction
helps us understand why model gives response they did
Another method to make saliency maps: guided backpropagation
algorithm (combination of deconvnet and gradient of class score wrt
input of network)
Sensitivity of loss to individual pixel changes , uses pre-softmax
scores (gradient, then absval, then sum across channels)
◉ CAM = Class Activation Mapping. Answer: use Global Average
Pooling layer as final layer to average the activations of each feature
map and run through softmax loss layer to highlight the important
regions of the image by projecting back the weights of the output on
the convolutional feature maps
◉ Grad-CAM. Answer: more versatile version of CAM that can
produce visual explanations for any arbitrary CNN, even if the
network contains a stack of fully connected layers too
let the gradients of any target concept score flow into the final
convolutional layer; then compute an importance score based on the
gradients and produce a coarse localization map highlighting the
important regions in the image for predicting that concept
What regions of image is model looking at to make prediction?
VERIFIED SOLUTIONS
◉ Equivariance. Answer: If the input changes, the output changes in
the same way if f(g(x) =g(f(x). If the beak of a bird in a picture moves
a bit, the output values will move in the same way
change to input causes equal change to output
◉ Invariance. Answer: If the input changes, the output stays the
same. That is f(g(x)) = f(x) E.g. rotating/scaling a number will still
result in that number being classified the same..
change to input does not affect output
Useful if we care more about if a feature is present than exactly
where it is
◉ saliency maps. Answer: Instead of using deconvnets, can, instead
of taking the error gradient wrt model parameters, take gradient of
class score we're trying to visualize wrt to the image itself (the input
of the network)
gets the degree to which a pixel contributed to that class score
, take absolute value of score because we care about degree, not
direction
helps us understand why model gives response they did
Another method to make saliency maps: guided backpropagation
algorithm (combination of deconvnet and gradient of class score wrt
input of network)
Sensitivity of loss to individual pixel changes , uses pre-softmax
scores (gradient, then absval, then sum across channels)
◉ CAM = Class Activation Mapping. Answer: use Global Average
Pooling layer as final layer to average the activations of each feature
map and run through softmax loss layer to highlight the important
regions of the image by projecting back the weights of the output on
the convolutional feature maps
◉ Grad-CAM. Answer: more versatile version of CAM that can
produce visual explanations for any arbitrary CNN, even if the
network contains a stack of fully connected layers too
let the gradients of any target concept score flow into the final
convolutional layer; then compute an importance score based on the
gradients and produce a coarse localization map highlighting the
important regions in the image for predicting that concept
What regions of image is model looking at to make prediction?