Fully-Connected NN

  • A general function approximator

  • Problems:

    1. Storage
    2. Running time
    3. Hard to train
    4. Prior knowledge is ignored
    5. Overfitting

LeNet

  • Architectures: 2 convolution layers + 2 pooling layers + 2 fully-connected layers = (6+2) different layers

  • Translation invariance and Locality: It ables to capture the patch information and the local regions information and do the aggregation later

  • Further Improvement: We can improve the model by making it deeper (more convolution layers, channels, modules)

AlexNet

  • An advanced version of LeNet, a groundbreaking CNN model for image classification (had high performance in ILSVRC)

  • Further Improvement: Add more layers

blocks-VGG

  • Modulization: using VGG Block which is easier to make the model deeper and maintain (only fine-tune a block)
    It consists of multiple (3x3 + pad 1) convolutional layers, which would not change the dimension of inputs, and a final MaxPool layer, which changes the dimension to aggregate the information

  • Dimension: all convolutional layers do not change the dimension of the inputs

  • Visual Geometry Group (VGG)
    It consists of serval modules (VGG blocks)

  • Further Improvement: Add more filters (increase the channel and kernel)

GoogLeNet

  • Modulization:

  • Dimension: all convolution operations do not change the dimension of the inputs

  • Concatenation: concatenate along the channel dimension (feature dimension)

Performance Degradation

The problem of adding more layers further

  • Notice: No matter the training or testing errors, the 56-layer model, with more parameters and model complexity, is higher than that of the 20-layer model. It implies that there exists some optimization problem other than the generalization problem.

  • If the problem is overfitting, the training error of the 56-layer model should be lower than that of the 20-layer model (pink line), and the testing error of the 56-layer model should be higher than that of the 20-layer model (just like shown). Therefore, the problem is not just overfitting.

Gradient Vanishing / Explosion

Notice that

When the model consists of many layers, value of $y$ will vanish or explode

However, the value of $y$ affects the derviative of $w_{ij}$ in back-propagation

  • Solution 1: Make the optimization step be more stable

    1. Use ReLU activation function
    2. Weight initialization: such that the weights are not far away from 1

    3. Gradient clipping: limiting the gradient

  • Solution 2: Increase the performance of models

    1. Shortcut Connection
    2. Batch Normalization

Residual Networks

  • Function view:
    Instead of learning the function directly, we want to learn the function residual. i.e., We want a deep learning model to fit the $f(x)$ in previous networks, We want the deep learning model to fit the $f(x) - x$ in residual networks.

  • Neural Network view:
    In the residual networks, there exists a shortcut from the input directly to the layer that contacts the residual network block. The dimension of inputs would not change within the residual network block for the pointwise operations.

  • With residual network block, the network can be very deep

  • Evaluation:
    The performance of Residual Networks is improved

Batch Normalization

The reason for performing normalization is the units for the features are different, and the attributes (features) are not on a similar level of measurement (e.g. the unit of height is m, but the unit of weight is kg). If we don’t perform normalization, the (evaluate) distance is dominated by the weight. It is important to normalize (mean of 0, variance of 1) the data for the inputs of every layer, which also prevents the gradient vanishing/explosion problems that may affect the distribution.
Besides, the data should be stored in the GPU, but due to the limitation of GPU memory, the model can only normalize the inputs for each batch.

  • $\gamma$: Scale parameter
  • $\beta$: Shift parameter
  • $\hat{\mu}_B$: Batch mean (only based on the training data, test data is not included)
  • $\hat{\sigma}_B$: Batch variance (only based on the training data, test data is not included)

  • Direction

    1. For fully-connected layers, it calculates the batch mean and variance for each node
    2. For convolutional layers, it calculates the batch mean and variance for each channel

Inception-ResNet

DenseNet

Densely Neural Networks connect different layers by concatenation, not summation. The network consists of many shortcuts which are implemented as the outputs of the layer will concatenate with the outputs of other layers along the channel dimensions. Therefore, the outputs of the last layer have a large number of channels (Small image size but a large number of channels).