NIN is a network that stacks mlpconv layers and ends with global average pooling. In the figure at the top of the article, the left shows the overall flow, and the right shows the inside of an mlpconv layer and global average pooling.
The mlpconv layer
An ordinary convolutional layer (with ReLU as the activation function) computes the output of channel k from the input region xi,j centered at position (i,j) as follows.
fi,j,k=max(wk⊤xi,j, 0)
An mlpconv layer passes the same region xi,j through an n-layer MLP (Eq. (2) of the paper).
fi,j,k11=max(wk11⊤xi,j+bk1, 0)
fi,j,knn=max(wknn⊤fi,jn−1+bkn, 0)
The MLP's weights are shared across all positions; that is, the same MLP is slid over the input. This is the same computation as the following steps.
- Apply an ordinary k×k convolution and ReLU (the first MLP layer).
- Apply a 1×1 convolution and ReLU (the second MLP layer).
- Apply another 1×1 convolution and ReLU (the third MLP layer).
A 1×1 convolution computes a weighted sum of the channels at the same position. The paper calls this "cross-channel parametric pooling" and explains that stacking it lets the network learn complex relationships between channels. In the paper's experiments, the MLP in each mlpconv layer has 3 layers.
Global average pooling
The last mlpconv layer outputs as many feature maps as there are classes to classify. Averaging each feature map over all positions gives a vector whose length is the number of classes. This vector goes straight into the softmax function, without any fully connected layer, to produce class probabilities.
If feature map c has size H×W, the score of class c is given by the following equation.
sc=HW1i=1∑Hj=1∑Wfi,j,c
Because each feature map corresponds to one class, the final feature maps can be read as "maps of how much each location looks like that class."
Overall flow
The networks in the paper's experiments have the following form for every dataset.
- mlpconv layer → max pooling (halving height and width) → dropout
- mlpconv layer → max pooling → dropout
- mlpconv layer (outputs one feature map per class) → max pooling
- Global average pooling → softmax function
Dropout is applied to the outputs of all mlpconv layers except the last. The number of channels and receptive field size of each layer are given in the paper's supplementary material, not in the main text. In the CIFAR-10 experiments, the channel counts match the corresponding layers of the maxout network, and the receptive field sizes were chosen on validation data.