Artificial Intelligence Neural Networks 2 — Questions and Answers
Question 1: What distinguishes a convolutional neural network (CNN) from a standard feedforward network?
- CNNs use recurrent connections
- CNNs apply learnable filters that share weights spatially (Correct answer)
- CNNs have no hidden layers
- CNNs use unsupervised learning only
Correct answer: CNNs apply learnable filters that share weights spatially
CNNs use convolutional filters with shared weights to detect local patterns efficiently, especially in image data.
Question 2: What is the purpose of a pooling layer in a CNN?
- Add non-linearity
- Reduce spatial dimensions and provide translational invariance (Correct answer)
- Increase the number of feature maps
- Connect all neurons to the output
Correct answer: Reduce spatial dimensions and provide translational invariance
Pooling (e.g., max pooling) downsamples feature maps, reducing computation and making features more invariant to small shifts.
Question 3: What is batch normalization designed to do?
- Increase the batch size during training
- Normalize layer inputs to speed up and stabilize training (Correct answer)
- Apply dropout to each batch
- Convert labels into one-hot encodings
Correct answer: Normalize layer inputs to speed up and stabilize training
Batch normalization normalizes activations within a mini-batch, reducing internal covariate shift and allowing higher learning rates.
Question 4: In a recurrent neural network (RNN), what makes it suitable for sequential data?
- It uses convolutional filters
- It maintains a hidden state that captures information from previous time steps (Correct answer)
- It processes all inputs in parallel
- It uses attention mechanisms exclusively
Correct answer: It maintains a hidden state that captures information from previous time steps
RNNs pass a hidden state from one time step to the next, allowing the network to remember previous inputs.
Question 5: What problem do LSTMs (Long Short-Term Memory networks) solve compared to standard RNNs?
- Slow inference speed
- Vanishing gradients over long sequences (Correct answer)
- Lack of non-linear activations
- High memory usage per parameter
Correct answer: Vanishing gradients over long sequences
LSTMs use gating mechanisms (forget, input, output gates) to maintain gradients over long sequences, addressing the vanishing gradient problem.
Question 6: What is the softmax function used for in the output layer of a multi-class classifier?
- Introduce sparsity in the weights
- Convert raw scores (logits) into a probability distribution over classes (Correct answer)
- Normalize input features
- Apply dropout to logits
Correct answer: Convert raw scores (logits) into a probability distribution over classes
Softmax exponentiates and normalizes logits so they sum to 1, providing class probabilities for multi-class classification.
What distinguishes a convolutional neural network (CNN) from a standard feedforward network?