Part 2: How does an artificial neural network operate?

Many generative AI models use deep learning techniques such as artificial neural networks.  But what are these?

TL:DR Artificial neural networks emulate connected neurons in a network, using numeric inputs rather than electrochemical signals to ‘learn’ the best path through the network by repeatedly passing inputs and adjusting weights and biases on those inputs until the best output results are achieved.

Part one of this article examined a neural network.  Neurons connected to other neurons in a network and firing an output when a strong enough input is detected.  The more frequent the connection activation, the greater the strength of learning.

A diagram of an artificial neuron
An artificial neuron

An artificial neural network takes numerical inputs (rather than electrochemical signals) and calculates the sum of those inputs along with weights and biases (adjustments from previous runs to try to improve the output) which are used to strengthen or weaken the effect of each of the inputs.  This is known as a recurrent neural network.

If the sum (typically between 0 and 1) exceeds a threshold, the artificial neuron will fire and generate an output.

An artificial neuron showing an input layer where data points enter and an activation function to determine if the input exceeds our threshold.

Because the neuron is connected to many other neurons on the chain, this network starts to ‘learn’ the best path to traverse through for different inputs.  The network might have anywhere from a few layers to several hundred layers between the inputs and the outputs, with every neuron in adjacent layers connected to each other.

A diagram of a small artificial neural network
A small artificial neural network with four inputs and three outputs

In the next part of this article, I’ll examine two examples of using artificial neural networks in classification problems.

Credit to the Missouri University of Science and Technology for the images on this page.