Let be the input to output weight for datum , including for the bias. With identity output activation, . The chain rule givesThe are held fixed when differentiating an output-layer weight; they may be hidden-layer activations rather than raw descriptors. Hidden-weight derivatives require backpropagation through the preceding layers.
The printed PDF has a plus sign before the second logarithm. Differentiating that expression literally, with and , givesFor example, at it is , so minimizing this printed objective pushes the predicted probability of class one upwards rather than downwards; the objective is unbounded below as . It is therefore not the usual binary cross-entropy.
If the second sign was intended to be negative, the standard negative log-likelihood is and the derivative simplifies instead to . Stating both cases preserves the actual question's algebra while identifying the apparent sign error. The logarithms here are natural; another base multiplies the gradients by its constant conversion factor.
For mutually exclusive classes, the output layer should provide nonnegative probabilities summing to one, with labels aligned consistently to output coordinates. A softmax activation on logits providesSubtracting from all logits before exponentiation preserves these probabilities and prevents numerical overflow. Categorical cross-entropy is appropriate for one-hot or probabilistic class targets. Independent sigmoid outputs fit a different setting in which multiple labels can be present simultaneously and their probabilities need not sum to one.
Compose affine maps with nonlinear hidden activation functions, for example . Several hidden units can respond to different linear combinations of input features; later units combine their responses to represent curved or piecewise-linear decision boundaries and interactions. A product interaction can be understood from : units approximating nonlinear functions of and can represent effects that no single additive linear fit captures.
Nonlinearity in hidden layers is essential: with only identity activations, repeated affine maps collapse to one affine map regardless of depth. Width and depth determine available representations; regularization, validation and suitable optimization are needed to learn useful rather than overfitted interactions. A nonlinear output activation alone applied to one linear score does not give an unrestricted model of feature interactions.
A multilayer perceptron usually connects every input unit of a layer to every output unit. For inputs and outputs its dense affine layer has parameters, including biases. A convolutional layer instead applies small local filters with weight sharing across positions. A two-dimensional filter of size , with input channels and output channels, has parameters. The count does not increase with spatial height and width, although the activation storage and arithmetic do.
Local receptive fields and repeated layers capture increasingly extended patterns. translation equivariance follows from shared filters under compatible boundary conventions; pooling or global aggregation can help build invariance but a convolution alone is not generally translation-invariant. Flattening a large convolutional output into a dense head can reintroduce many parameters. For an unordered descriptor vector, a convolutional locality assumption must be justified rather than imposed merely because convolutional layers have fewer weights.
Articles by others on the same topic
There are currently no matching articles.