3.1 & 3.2 Introduction to CNNs, Convolution, and Pooling Mechanisms
Convolutional Neural Networks (CNNs / ConvNets) are specialized deep learning architectures designed to process data with grid-like topology (such as 2D image matrices and 3D video tensors). Traditional fully connected MLPs fail on high-resolution images due to parameter explosion and loss of 2D spatial context.
Key Principles of Convolutional Layers:
- Local Receptive Fields: Neurons connect only to localized sub-regions of the input feature map rather than all input pixels.
- Shared Weights (Weight Sharing): The same filter kernel is convolved across the entire spatial domain, reducing parameter count and enforcing translation equivariance.
- Convolution Operation Formula: For input image $I$ and 2D kernel $K$ of size $k_h \times k_w$: $$S(i, j) = (I * K)(i, j) = \sum_{m} \sum_{n} I(i-m, j-n) K(m, n)$$
- Output Feature Map Spatial Dimension Formula: $$O = \left\lfloor \frac{W - K + 2P}{S} \right\rfloor + 1$$ where $W$ = input size, $K$ = kernel size, $P$ = padding (Zero Padding), and $S$ = stride.
Pooling Layers: Non-parametric downsampling operations that reduce spatial dimensions, providing computational efficiency and translation invariance. Common variants are Max Pooling (retains maximum value in window) and Average Pooling (computes window average).