A neural network is a computing structure loosely inspired by how neurons in the brain connect to one another. It is made up of layers of small units called nodes, and each connection between nodes carries a numeric weight that determines how much influence one node has on the next.

From Input to Output

Data enters through an input layer, for example the pixel values of an image. It then passes through one or more hidden layers, where each node combines the values it receives, applies a mathematical function, and passes the result forward. Finally, an output layer produces the network's answer, such as a probability that the image contains a cat.

How the Network Learns

When the network is first created, its weights are essentially random, so its early guesses are poor. During training, the network compares its guess to the correct answer and calculates how wrong it was. It then works backward through the layers, slightly adjusting each weight in the direction that would have reduced the error, a process called backpropagation. Repeating this over millions of examples gradually tunes the weights until the network produces useful predictions.

This same basic mechanism, layers of weighted connections adjusted through repeated exposure to data, scales up to power everything from small image classifiers to the massive language models behind modern chatbots. The difference between a simple network and a large one is mostly a matter of scale: more layers, more nodes, and vastly more training data.