Learning inside a single layer ADALINE

ADALINE (Adaptive Linear Neuron or later Adaptive Linear Element) is an early single-layer artificial neural network and the name of the physical device that implemented this network.[1][2][3][4][5] The network uses memistors. It was developed by Professor Bernard Widrow and his graduate student Ted Hoff at Stanford University in 1960. It is based on the McCulloch–Pitts neuron. It consists of a weight, a bias and a summation function.

The difference between Adaline and the standard (McCulloch–Pitts) perceptron is that in the learning phase, the weights are adjusted according to the weighted sum of the inputs (the net). In the standard perceptron, the net is passed to the activation (transfer) function and the function's output is used for adjusting the weights.

## Definition

Adaline is a single layer neural network with multiple nodes where each node accepts multiple inputs and generates one output. Given the following variables:as

• ${\displaystyle x}$  is the input vector
• ${\displaystyle w}$  is the weight vector
• ${\displaystyle n}$  is the number of inputs
• ${\displaystyle \theta }$  some constant
• ${\displaystyle y}$  is the output of the model

then we find that the output is ${\displaystyle y=\sum _{j=1}^{n}x_{j}w_{j}+\theta }$ . If we further assume that

• ${\displaystyle x_{0}=1}$
• ${\displaystyle w_{0}=\theta }$

then the output further reduces to: ${\displaystyle y=\sum _{j=0}^{n}x_{j}w_{j}}$

## Learning algorithm

Let us assume:

• ${\displaystyle \eta }$  is the learning rate (some positive constant)
• ${\displaystyle y}$  is the output of the model
• ${\displaystyle o}$  is the target (desired) output

then the weights are updated as follows ${\displaystyle w\leftarrow w+\eta (o-y)x}$ . The ADALINE converges to the least squares error which is ${\displaystyle E=(o-y)^{2}}$ .[6] This update rule is in fact the stochastic gradient descent update for linear regression.[7]

MADALINE (Many ADALINE[8]) is a three-layer (input, hidden, output), fully connected, feed-forward artificial neural network architecture for classification that uses ADALINE units in its hidden and output layers, i.e. its activation function is the sign function.[9] The three-layer network uses memistors. Three different training algorithms for MADALINE networks, which cannot be learned using backpropagation because the sign function is not differentiable, have been suggested, called Rule I, Rule II and Rule III. The first of these dates back to 1962 and cannot adapt the weights of the hidden-output connection.[10] The second training algorithm improved on Rule I and was described in 1988.[8] The third "Rule" applied to a modified network with sigmoid activations instead of signum; it was later found to be equivalent to backpropagation.[10]

The Rule II training algorithm is based on a principle called "minimal disturbance". It proceeds by looping over training examples, then for each example, it:

• finds the hidden layer unit (ADALINE classifier) with the lowest confidence in its prediction,
• tentatively flips the sign of the unit,
• accepts or rejects the change based on whether the network's error is reduced,
• stops when the error is zero.

Additionally, when flipping single units' signs does not drive the error to zero for a particular example, the training algorithm starts flipping pairs of units' signs, then triples of units, etc.[8]