Each neuron controls how strongly one part of the network influences the other. Weights determine the strength of the connections between neurons: the degree to which one neuron’s output affects the next neuron’s input.
During training, the network receives inputs. To continue the example of home prices, this might be square footage, year of construction, neighborhood demographic data, and dozens of other inputs.
These input features are passed into the first layer of neurons. Each input is multiplied by a weight, the network’s best guess about how important that neuron is, and a bias is added to improve flexibility, giving neurons some independence from the influence of the weighted sum of the inputs from neurons in the previous layer. An activation function decides how strongly that neuron “fires” and passes information to the next layer as input to the activation functions of each individual neuron in the next layer. Each of these neuron-to-neuron connections have their own weight.
The weights form a matrix, biases form a vector and the layer computes linear combinations of inputs + bias, then passes the result through an activation function, such as a sigmoid, tanh, ReLU or softmax function. The job of this function is to introduce nonlinearity, which allows the network to learn and model complex patterns instead of just linear relationships.
The data moves through the subsequent “hidden” layers. The first hidden layer might combine the home’s square footage and its number of bedrooms to arrive at “overall living space.” Another layer might combine the home’s geographical location + the rating of its school district to determine the “desirability of the neighborhood.” The model doesn’t have a human’s understanding of what “neighborhood desirability” is, it merely recognizes patterns in the numbers of its training data and makes correlations.
From layer to layer, the network begins to “understand” which patterns are most relevant. These stacked layers turn simple operations into a powerful network capable of learning complex, hierarchical patterns.