# Artificial neural network

*14 January 2011*.

**Artificial Neural Networks** (ANNs for short) are a connectionist processing model inspired by the architecture of real brains. Artificial neural networks are composed of simple nodes called artificial neurons or Processing Elements (PEs). They can be implemented via hardware (i.e., electronic devices) or software (i.e., computer simulations).

In neural nets, the network behavior is stored in the connections between neurons in values called *weights*, which represent the strength of each link, equivalent to many components of its biological counterpart.

## Contents |

## [edit] Network Components

There are three things to define when creating a neural network:

- Network architecture: How many neurons the network has, and which neurons are connected to which.
- Activation function: How a neuron's output depends on its inputs.
- Learning rule: How the strength of the connections between neurons changes over time.

## [edit] An Illustration: The McCulloch-Pitts Neuron

The McCulloch-Pitts neuron precedes modern Neural Nets. It demonstrates that sentential logic can be implemented with a very simple network architecture and activation function, but, because it does not define an activation function, requires hand-tuned weights. It is included here as an illustration.

### [edit] M-P Architecture

The basic McCulloch-Pitts network has two input neurons *x*_{1} and *x*_{2} which fire either 1 or 0 along with a bias neuron *x*_{b} that always fires 1. These input neurons have weighted directed connections to a single output neuron *y*. For example, the connection from input neuron *x*_{1} to the output neuron *y* has weight , and there is no connection at all from output neuron *y* to *x*_{1} (or any of the input neurons). The net input *n**e**t* to output neuron *y* is the weighted sum of its inputs:

Because the bias neuron always fires 1:

### [edit] M-P Activation Function

The activation function of the M-P neuron is the step function of its net input:

### [edit] Illustrations

To demonstrate how fiddling with the network weights allows us to change the logical function implemented by the network, we next select specific weights and see how the network behavior changes.

#### [edit] Illustration 1: Implementing AND

We will select a set of weights to define a network whose output fires 1 if both inputs are firing 1, and where the output fires 0 otherwise. Let , , and .

Consider first the case where both inputs are 1. Then we have:

So by definition of our activation function, we have *f*(*n**e**t*) = 1.

Consider next the case where only one input is 1. Then we have:

And by definition of our activation function, we have *f*(*n**e**t*) = 0. Finally, consider the case where neither input is 1:

And by definition of our activation function, we have *f*(*n**e**t*) = 0. So this network fires 1 if and only if both input neurons are firing 1.

#### [edit] Illustration 2: Implementing OR

We will select a set of weights to define a network whose output fires 1 if either or both inputs are firing 1, and where the output fires 0 otherwise. Let , , and .

Consider first the case where both inputs are 1. Then we have:

So by definition of our activation function, we have *f*(*n**e**t*) = 1.

Consider next the case where only one input is 1. Then we have:

And by definition of our activation function, we have *f*(*n**e**t*) = 1. Finally, consider the case where neither input is 1:

And by definition of our activation function, we have *f*(*n**e**t*) = 0. So this network fires 1 if either or both of its neurons are firing 1.

Some content on this page may previously have appeared on Citizendium. |