Neural network (source code)

= Neural network
{wiki=Artificial_neural_network}

= Artificial neural network
{synonym}

An artificial neural network is a parameterized system of interconnected computational units whose outputs depend on weighted inputs. A <feedforward neural network> commonly composes layers
$$
h_0=x,\qquad h_{\ell+1}=g_\ell(W_\ell h_\ell+b_\ell),
$$
where $W_\ell$ are weight matrices, $b_\ell$ are biases and $g_\ell$ are <activation functions>. <Recurrent neural networks> instead reuse a state through time; <weight sharing> also imposes structure in a <convolutional neural network>.

A <loss function> measures how well outputs serve the task. <Backpropagation> applies the <chain rule> to compute parameter <gradients>, which an optimization algorithm can use for learning. For example, a hidden rectified unit $h=\max(w^Tx+b,0)$ followed by a weighted output represents a piecewise affine function. With identity activations in every hidden layer, successive affine maps collapse to one affine map, so depth alone adds no nonlinear expressiveness.

The useful representation depends on architecture, data and training. Fitting many parameters does not establish <generalization>; <regularization>, independent evaluation and the target data distribution remain relevant.