Skip to main content

Neural Network

Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/neural-network

In short

A neural network is a machine learning model made of layers of connected artificial neurons that learn patterns from data by adjusting numeric weights.

What is a neural network?

A neural network is a type of machine learning model loosely inspired by the brain. It is built from many simple units called neurons, arranged in layers: an input layer that receives data, one or more hidden layers in the middle, and an output layer that produces the result. Each connection between neurons has a number called a weight that controls how strongly one neuron influences the next.

Each neuron multiplies its inputs by their weights, adds them up together with a bias value, and passes the total through an activation function, which decides how strongly the neuron fires. During training, the network compares its output with the correct answer, measures the error with a loss function, and uses an algorithm called backpropagation to nudge every weight in the direction that reduces the error. After many rounds over the training data, the weights encode the patterns the network has learned.

A useful analogy is a large team passing notes forward: each person looks at what they receive, trusts some inputs more than others, and passes a summary to the next row, until the last row makes the final call. Neural networks power image recognition, speech recognition, translation, recommendation systems, and large language models.

Despite the name, artificial neural networks are not simulations of the brain; they are mathematical functions built mostly from multiplications and additions. A neural network is also not the same thing as deep learning. Deep learning refers specifically to neural networks with many hidden layers, while a small network with a single hidden layer is still a neural network.

At a glance

A small neural network: three input neurons take the pixels of an image, four hidden neurons combine them, and two output neurons score cat and dog. Every connection has a weight, drawn thicker when it is stronger, and training adjusts them all.training adjusts every weightweight 0.8pixelpixelpixelcat · 0.92dog · 0.08inputhiddenoutput
Learning means changing the weights: each training step compares the output with the right answer and nudges every weight to shrink the error (backpropagation).

Key takeaways

  • A neural network is made of layers of connected neurons: input, hidden, and output.
  • Each connection has a weight, and learning means adjusting those weights.
  • Training uses a loss function and backpropagation to reduce prediction errors.
  • Neural networks with many hidden layers are called deep learning models.

Example

A single artificial neuron in Pythonpython
import math

def neuron(inputs, weights, bias):
    # Weighted sum of the inputs plus a bias
    total = sum(x * w for x, w in zip(inputs, weights)) + bias
    # Sigmoid activation squashes the result into the range 0 to 1
    return 1 / (1 + math.exp(-total))

# Two inputs, e.g. hours studied and hours slept
inputs = [5.0, 7.0]
weights = [0.6, 0.3]  # learned during training
bias = -4.0

print(neuron(inputs, weights, bias))  # about 0.75

Readers ask

What is the difference between a neural network and machine learning?

Machine learning is the broad field of models that learn from data, and a neural network is one kind of machine learning model. Other machine learning models, such as decision trees and linear regression, don't use neurons or layers at all.

What is backpropagation?

Backpropagation is the algorithm used to train neural networks. It calculates how much each weight contributed to the error in the output, working backward from the last layer to the first, so every weight can be adjusted slightly to reduce the error.

What is a hidden layer?

A hidden layer is any layer of neurons between the input and the output. Hidden layers transform the data step by step into more useful internal representations, and adding more of them makes the network deeper.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings