# Contrastive Hebbian learning

**Contrastive Hebbian learning** is an error-driven learning technique. It is a *supervised* learning technique, meaning that the desired outputs are known beforehand, and the task of the network is to learn to generate the desired outputs from the inputs.

As opposed to a feedforward network, a recurrent network is allowed to have connections from any neuron to any neuron in any direction. However, unlike Almeida-Pineda recurrent backpropagation, there is no backpropagation of errors; weights are updated purely via local information.

There are two phases to the model, a *positive* phase, also called the *Hebbian* or *learning* phase, and a *negative* phase, also called the *anti-Hebbian* or *unlearning* phase.

## Model

Given a set of k-dimensional inputs with values between 0 and 1 represented as a column vector:

and a nonlinear neuron with (initially random, uniformly distributed between -1 and 1) synaptic weights from the inputs:

then the output *y* of the neuron is defined as follows:

*n*is the net input of the neuron. During the positive phase, the net is written as

*N*neurons where some of the neurons are simple inputs to the network, some are outputs, with the weight of the connection from neuron

*i*to neuron

*j*being

*j*(where

*j*is neither an input neuron nor an output neuron) is computed using a discrete time approximation to the following equation, iteratively applied to all neurons until the nets settle to some equilibrium state. Initially set

where:

^{[1]}and the output neurons are not clamped:

where

^{[2]}If symmetry is not held, the network will often settle.

^{[3]}Of course, if

*i*is an input, then

Once the positive and negative nets of the neurons are determined, the weights are updated according to the following equation:

## Relation to cross-entropy

If, as discussed in the feedforward backpropagation derivation, the update to the weight is a gradient descent on the cross-entropy of the network, that is,This has the effect of "sculpting" the cross-entropy of the network so that it ends up lower where the output is closer to the target, and higher where the output is farther away from the target.^{[4]}

## Biological plausibility

Unlike in backpropagation modes such as feedforward backpropagation or Almeida-Pineda recurrent backpropagation, Contrastive Hebbian learning does not depend on the sending of error information backwards along connections. All the information needed to alter the weight is available locally. However, there are two phases to the model. There is some speculation that this has an analog in biological processing, where the negative phase comes first, followed by a positive phase some 300 milliseconds later.^{[5]}

Contrastive Hebbian learning requires that weights be symmetric. There is some evidence that there are symmetric connections between cortical areas in the brain.^{[6]} In addition, symmetric connectivity between individual neurons does not appear to be critical; as long as there is some bidirectional connectivity between some neurons, error signals can be obtained indirectly by the network.^{[3]}

## References

- ↑ Movellan, Javier R. (April 1991). "Contrastive Hebbian learning in the continuous Hopfield model". In
*Connectionist Models: Proceedings of the 1990 Summer School*. Morgan Kaufmann Publishers. ISBN 978-1558601567 - ↑ Hopfield, J. J. (May 1984). "Neurons with graded response have collective computational properties like those of two-state neurons".
*Proceedings of the National Academy of Sciences of the United States of America*.**81**: 3088-3092 - ↑
^{3.0}^{3.1}Galland, C. G.; Hinton, G. E. (April 1991). "Deterministic Boltzmann learning in networks with asymmetric connectivity" In*Connectionist Models: Proceedings of the 1990 Summer School*Morgan Kaufmann Publishers. pp. 39-9 ISBN 978-1558601567 - ↑ Seung, Sebastian. "Contrastive Hebbian learning". Retrieved Apr 15, 2012.
- ↑ O'Reilly, Randall C. (1996). "Biologically plausible error-driven learning using local activation differences: the general recirculation algorithm"
*Neural Computation***8**(5): 895-938 - ↑ Felleman, D. J.; Van Essen, D. C. (1991). Distributed hierarchical processing in the primate cerebral cortex
*Cerebral Cortex*(1): 1-47