A neural network is a machine-learning approach built from connected computational nodes. It transforms incoming values by applying weights, combining the results, and passing them through an activation function. Machine learning sits within artificial intelligence, while neural networks are one specific machine-learning approach. section 4.1 section 14.1.1
The basic mechanism is small enough to calculate by hand:
- Feed values into the network, such as A and B set to -1 for off or 1 for on. section 4.1.3
- Multiply each input by its corresponding weight, then combine the weighted values. section 4.1.3 section 14.1.1
- Apply an activation function; the simple example returns zero for a negative result and otherwise returns the sum. section 4.1.3
- Pass outputs into further nodes in larger networks, where many interconnected weights perform the useful work. section 14.1.1
A tiny AND detector
Give A and B weights of 0.5. When both inputs are on, the weighted sum is 1, so the activation returns 1. If either input is off, the sum is 0 or negative, so the network returns 0. This simple behavior illustrates the larger pattern: weights and activation functions convert inputs into an output. section 4.1.3
Large neural networks are often called deep learning systems. Their human-neuron inspiration is an architectural analogy, not a claim that they reproduce human brains. In Stable Diffusion, a large neural network called a U-NET uses learned parameters, also called weights, to help denoise a random image until it matches a prompt. section 4.1.3 section 5.0
Figure 4.1 Visualizing the hierarchy of AI related terms

Use the hierarchy diagram to distinguish artificial intelligence, machine learning, and neural networks. section 4.1










