Blog

# Artificial Neural Networks: What they are and how they’re trained - Part I In our earlier blog post about Machine Learning, we touched upon neural networks. In this post, we will explain what a neural network is and how it works.

Artificial neural networks are based on how networks of biological neurons work. The neurons that we all have in our brains are made up of dendrites, the soma and the axon. The job of the dendrites is to capture the nerve impulses emitted by other neurons. These impulses are processed in the soma and transmitted through the axon, which emits a nerve impulse to the adjacent neurons. ## What is a neural network in Artificial Intelligence?

The following diagram represents an artificial neuron: In the case of artificial neurons, the sum of the inputs multiplied by their associated weights determines the “nerve impulse” that the neuron receives. This value is processed inside the cell by means of an activation function that returns a value that is sent as an output from the neuron.

Just as our brain is made up of interconnected neurons, an artificial neural network is made up of artificial neurons connected to each other and grouped into different levels that we call layers:

A layer is a set of neurons whose inputs come from an earlier layer (or input data in the case of the first layer) and whose outputs are the inputs for a later layer.

The following diagram shows a network with four layers: The neurons in the first layer receive as input the real data that feeds the neural network. For this reason, the first layer is known as the input layer. The output of the last layer is the visible result of the network, so the last layer is known as the output layer. The layers between the input layer and output layer are known as hidden layers because neither the input values nor output values are known to us.

Therefore, a neural network is always made up of an input layer, an output layer (if there is only one layer in the neural network, that layer is both the input layer and the output layer) and may contain zero or more hidden layers. The concept of Deep Learning was born out of the use of a large number of hidden layers in neural networks.

## How do you train a neural network?

Training a neural network consists of adjusting each of the input weights of all the neurons that are part of the neural network, so that the responses of the output layer match as closely as possible the data we know.

In the following animation, we can see a very simplified example of the neural network training process for, in this case, detecting a cat in an image. The thickness of each arrow represents the weight of that input in the neural network. As we can see, as the weights are adjusted, the error decreases. If we want the neural network to be able to generalise and identify cats in any image, it is important to use a large number of images during training – both images that are cats (labelled as 1) and images that are not cats (labelled as 0) – and to include as much variability as possible. In this way, the neural network will be able to adjust its parameters to correctly process as many images as possible, and it will therefore be able to extract accurately the characteristics that identify the presence of a cat in an image.

Now that we know what a neural network is and how they work, in our next blog post we’ll talk about the reasons why their use has become so widespread in recent years. Subscribe now and stay up to date with our latest posts on Artificial Intelligence.

is a Data Scientist and R&D Engineer at Xeridia
{"ft_lang_label":"__label__en","ft_lang_prob":0.94785017,"math_prob":0.8889574,"size":3536,"snap":"2020-45-2020-50","text_gpt3_token_len":717,"char_repetition_ratio":0.18346547,"word_repetition_ratio":0.01577287,"special_character_ratio":0.19937783,"punctuation_ratio":0.0713246,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9779304,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12],"im_url_duplicate_count":[null,3,null,2,null,3,null,3,null,3,null,3,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-11-25T22:30:26Z\",\"WARC-Record-ID\":\"<urn:uuid:954544fe-15f9-4057-aef5-02d7aa29285b>\",\"Content-Length\":\"56138\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:83235653-b80f-4129-9685-bc61e446503d>\",\"WARC-Concurrent-To\":\"<urn:uuid:00441e89-01bc-47ff-9d86-cc1355d643fb>\",\"WARC-IP-Address\":\"81.169.152.65\",\"WARC-Target-URI\":\"https://www.xeridia.co.uk/blog/artificial-neural-networks-what-they-are-and-how-theyre-trained-part-i\",\"WARC-Payload-Digest\":\"sha1:YB2NY4LXZH2OOVBDYEDYQL3HV2XRBDBK\",\"WARC-Block-Digest\":\"sha1:5A256X3NOGWJKVSQFB724UJNGQYXPUTJ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141184870.26_warc_CC-MAIN-20201125213038-20201126003038-00443.warc.gz\"}"}