# Neural network

> A neural network is a computing model made of layers of connected units that each apply simple maths to their inputs, and which learns by adjusting the strength of those connections from examples until it produces useful outputs.

Also called: artificial neural network, ANN, neural net. Category: Models and training. Source: https://aibuildindex.com/glossary/neural-network

## In the index

- Deep learning: median $3,000, middle half $400 to $9,900, 1,501 priced briefs (https://aibuildindex.com/skills/deep-learning)
- PyTorch: median $3,200, middle half $560 to $12,450, 262 priced briefs (https://aibuildindex.com/skills/pytorch)

A neural network is the basic structure inside most modern AI models. It is loosely inspired by the brain, but in practice it is a large set of numbers arranged in layers that turn an input, such as an image or a sentence, into an output, such as a label or the next word. For a business buyer the detail matters less than the consequences: neural networks are powerful with images, audio and language, need plenty of data to train, and can be hard to explain.

## How it works

Each unit, often called a neuron, takes several numbers in, multiplies each by a weight, adds them up and passes the result through a simple function. Units are stacked in layers: an input layer, one or more hidden layers, and an output layer. When a network has many hidden layers, the approach is called [deep learning](https://aibuildindex.com/glossary/deep-learning).

Training works by comparison. The network makes a prediction on an example, the error against the correct answer is measured, and a method called backpropagation adjusts every weight slightly to reduce that error. Repeated over many examples, the weights settle into values that capture useful patterns. Once trained, using the network to produce answers is called [inference](https://aibuildindex.com/glossary/inference), and it is far cheaper than training.

Different arrangements suit different data. Convolutional networks handle images well; recurrent networks were long used for sequences; the [transformer](https://aibuildindex.com/glossary/transformer), which lets every part of an input look at every other part, now underpins language models.

## What it means for cost

Buyers rarely pay for a neural network directly; they pay for the work around it:

- **Pre-trained or custom.** Using an existing network through an API avoids training costs. Training or fine-tuning one needs data, GPU time and evaluation.
- **Size.** Larger networks are usually more capable but slower and more expensive to run, which matters for real-time use.
- **Explainability.** In regulated decisions such as lending, a neural network's reasoning is hard to justify, and a simpler model may be required or preferred.

Ask a builder why a neural network is needed for the problem, and whether a simpler model was tried first.

## Common questions

### Do neural networks think like a brain?

No. The name comes from a loose analogy with biological neurons, but a neural network is a mathematical function tuned on data. It does not understand in the human sense, which is one reason it can fail in surprising ways on inputs unlike its training data.

### Why are neural networks called black boxes?

Their knowledge is spread across millions of weights rather than stored as readable rules, so it is hard to say exactly why a given output was produced. Tools exist to highlight which inputs mattered most, but they give partial explanations rather than full reasons.

## Related terms

- [Deep learning](https://aibuildindex.com/glossary/deep-learning): Deep learning is a type of machine learning that uses neural networks with many layers to learn directly from raw data such as text, images and audio, and it underpins modern language, vision and speech models.
- [Machine learning](https://aibuildindex.com/glossary/machine-learning): Machine learning is a branch of AI in which software learns patterns from examples rather than following hand-written rules, then uses those patterns to make predictions or decisions about new data.
- [Transformer](https://aibuildindex.com/glossary/transformer): A transformer is the neural network design behind nearly all modern language models, which processes a sequence of tokens by letting each one weigh its relationship to every other through a mechanism called attention.
- [Training data](https://aibuildindex.com/glossary/training-data): Training data is the set of examples a machine learning model learns from, such as labelled images, past transactions or question-and-answer pairs, and its quality, coverage and rights largely decide how well the finished model performs.
- [Inference](https://aibuildindex.com/glossary/inference): Inference is the stage where a trained AI model is used to produce outputs, such as answers, classifications or images, from new inputs, as opposed to training, where the model learns from data.
