
A neural network is actually very simple:
A Neuron:
The activation function:
But this neuron is not a biological neuron—it is merely inspired by the brain. A neuron receives multiple inputs (X) and finally outputs a weighted sum.
W is like the axon of a biological neuron, computing over all the input neurons one by one.
Turing: Can Machines Think?
The human brain is made up of tens of billions of neurons, connected to each other through synapses, transmitting information via electrical and chemical signals. When a neuron receives stimulation from other neurons, a change in potential builds up inside the cell; when this change reaches a certain threshold, the neuron is activated and passes the signal on to the next neuron.
Why does material neural activity give rise to thought, feeling, and self-awareness?
Why can a system made of matter turn around and come to know the world—even to know itself?
From microscopic neural activity to macroscopic thought and consciousness, there seems to span a gap that has yet to be fully explained.
In 1950, the British mathematician Alan Turing published his famous paper, Computing Machinery and Intelligence.
At the beginning of this paper, he posed a question that would later become extremely famous:
Turing did not try to directly define “thinking” or “intelligence.” These concepts are too abstract and too easily mired in philosophical debate.
Instead, he took a more practical approach: if a machine behaves indistinguishably from a human in conversation, can we then consider it to possess some kind of intelligence?
This idea later became known as the Turing Test.
Turing’s truly important contribution to artificial intelligence is not that he gave a final definition of intelligence, but that he turned “whether machines can think” into a question that can be discussed, tested, and engineered.
The MP Neuron Model
Can complex intelligence emerge from the collective behavior of simple computational units?
In 1943, Warren McCulloch and Walter Pitts proposed an early mathematical model of an artificial neuron, later commonly known as the MP neuron model.
The model is very simple: it receives multiple inputs, sums them up, and then decides whether to output 1 through a simple threshold check.
It receives multiple inputs:
In the simplest MP neuron, each input usually has only two states:
The neuron sums all its inputs and compares the result against a threshold.
If the sum reaches the threshold, it outputs 1; otherwise, it outputs 0.
If the total stimulation exceeds the threshold, the neuron is activated; if it does not exceed the threshold, the neuron is not activated.
The MP neuron can represent certain logical operations, such as AND, OR, and NOT.
But the MP neuron has no learning ability.
The Perceptron
In 1958, Frank Rosenblatt proposed the Perceptron.
The perceptron can be seen as an upgraded MP neuron. It still receives multiple inputs, but each input now has a weight associated with it.
The inputs of the perceptron can be written as:
The weights can be written as:
The perceptron first computes the weighted sum of its inputs:
It can also be written in vector form:
where:
The bias b can be understood as a parameter that adjusts how easily the neuron is activated. If the bias is large, the neuron is easier to activate; if the bias is small, the neuron is harder to activate.
The output of the perceptron can be written as:
[COMMON] A step function is used here, which can also be written as:
where:
The Geometric Meaning of the Perceptron
Essentially, the perceptron is looking for a classification boundary.
For two-dimensional input:
The perceptron’s decision condition is:
which fits a straight line.
More generally, in high-dimensional space:
represents a hyperplane.

The problems a perceptron can solve are essentially classification problems that can be separated by a line, a plane, or a high-dimensional hyperplane.
The Limitations of the Perceptron
A single-layer perceptron can only solve linearly separable problems.
But many real-world problems are not linearly separable. The simplest classic example, XOR, is not linearly separable.

The inputs and outputs of XOR are:
Although a single-layer perceptron can learn some simple classification boundaries, it cannot express more complex nonlinear relationships.
In 1969, Marvin Minsky and Seymour Papert systematically analyzed the limits of the perceptron in their book, Perceptrons.
But the story did not really end there. If a single-layer perceptron cannot solve nonlinear problems, a natural idea arises: why not stack multiple neurons into a multilayer network?
Multilayer Perceptron (MLP)
| From Linear to Nonlinear
The key to breaking through is not abandoning neurons, but connecting them into a multilayer structure. The first layer of neurons extracts intermediate features, and the later neurons make decisions based on those features. In this way, the network can no longer only draw a straight line, but can compose more complex decision boundaries.
But without an activation function, each layer is just a linear transformation:
Substituting the first layer into the second gives:
Expanding:
which is equivalent to:
After stacking, multiple linear transformations are still essentially just one linear transformation.
Nonlinear activation functions break this limitation. They allow the network to express curved, piecewise, and complex functional relationships, rather than only drawing a line, a plane, or a hyperplane.
Activation Functions
Step Function
In early perceptrons, neurons used the step function:
where:

The step function is intuitive: if the input signal is strong enough, the neuron outputs 1; if it is not strong enough, the neuron outputs 0—making a binary decision.
Sigmoid
The Sigmoid function can be written as:
[COMMON] It compresses any real number to between 0 and 1:

[INFERRED] This makes it well-suited for representing a “sense of probability” or “degree of activation.” [COMMON] But when the input is very large or very small, Sigmoid’s gradient becomes very small. [INFERRED] This slows down training in deep networks—the so-called vanishing gradient problem.
Tanh
The Tanh function can be written as:
[COMMON] It compresses the input to between -1 and 1:

[INFERRED] Compared to Sigmoid, Tanh’s output is centered at 0, making it easier to optimize in some scenarios. [COMMON] But it can also suffer from diminishing gradients when the absolute value of the input is large.
ReLU
The ReLU function can be written as:
that is:
[INFERRED] ReLU’s idea is very simple: if the input is positive, keep it; if it is negative, turn it into 0. [COMMON] ReLU is computationally simple, with stable gradients in the positive region. [KNOWN] In modern deep neural networks, ReLU and its variants are widely used. [INFERRED] Its importance lies not only in its “simple functional form,” but in that it makes deep networks easier to train.
Forward Propagation
| Forward Propagation: How Information Flows Layer by Layer
[COMMON] With weights, biases, and activation functions, a neuron is no longer just a simple switch, but a unit capable of continuous computation.
[COMMON] For the -th layer, forward propagation can be written as:
[COMMON] Here, is the previous layer’s output, is the current layer’s weight matrix, is the current layer’s bias, is the activation function, and is the current layer’s output.
[INFERRED] That is, each layer first performs a linear transformation on the information from the previous layer, then adds nonlinearity through the activation function, and finally passes the result on to the next layer.
[INFERRED] This process can be understood as: the previous layer passes information to the next layer, which first combines the information via weighted sums, and then decides through the activation function which information should continue to be passed on.
[COMMON] If the network has multiple layers, this process repeats:
[INFERRED] This is what is called forward propagation. It is like an information flow from input to output: data enters at the input layer, is continuously transformed through the hidden layers, and finally produces a prediction at the output layer.
Loss Functions
[COMMON] Forward propagation only tells us the model’s prediction, not how good that prediction is.
[COMMON] To measure the gap between the predicted value and the true value, we need a loss function.
[COMMON] Suppose the model’s predicted value is:
and the true label is:
[COMMON] For regression problems, a common loss function is the Mean Squared Error (MSE):
[INFERRED] The larger the loss, the worse the model’s prediction; the smaller the loss, the closer the model’s prediction is to the true answer.
Gradient Descent

The gradient of the loss function with respect to all parameters can be written as a vector:
Each entry in this vector is the partial derivative of the loss function with respect to one parameter.
The parameter update rule for gradient descent is:
where: denotes the model parameters, denotes the loss function, and denotes the learning rate.
The gradient tells us: when a parameter changes slightly, in which direction the loss function changes, and how quickly.
If the gradient is positive, moving the parameter in the increasing direction makes the loss larger.
If the gradient is negative, moving the parameter in the increasing direction makes the loss smaller.