Deep Learning

Artificial neurons, layers, and activation functions: how a neural network "thinks"

February 10, 2025 13 min read Lorenzo Mascia

When people talk about neural networks, they often describe them as mysterious or opaque, as if something almost magical were happening inside. In reality, a neural network is built from very simple components. What makes it powerful is not the complexity of each part, but how many simple parts interact and how they are organized. To understand how a neural network "thinks," you have to start from its smallest unit: the artificial neuron.

The Artificial Neuron

An artificial neuron is a mathematical abstraction inspired by biology, but it is far simpler than a real neuron. It receives inputs, assigns a weight to each one, adds them together, and then applies a transformation. That's it. There is no memory, no reasoning, no awareness. The neuron is simply computing a weighted sum and passing it through a function. On its own, this is not impressive. But this operation is the foundation of everything neural networks do.

The weights play a crucial role. They represent how important each input is for the neuron's output. During training, the network adjusts these weights so that useful inputs are emphasized and irrelevant ones are downplayed. Learning, in a neural network, is nothing more than the systematic adjustment of millions of these weights to reduce error. There is no symbolic understanding, only numerical tuning guided by feedback.

Activation Functions

After combining inputs and weights, the neuron applies an activation function. This step is essential. Without it, a neural network would collapse into a simple linear model, no matter how many neurons or layers it had. The activation function introduces non-linearity, allowing the network to represent complex relationships. In intuitive terms, it decides whether the neuron "fires" and how strongly.

Different activation functions shape learning in different ways. Some allow gradual responses, others enforce sharp thresholds. Some help gradients flow smoothly during training, others risk saturating and slowing learning down. Choosing an activation function is not a cosmetic detail; it affects how information moves through the network and how easily the model can be trained.

The Power of Layers

A single neuron, even with a non-linear activation, has very limited expressive power. The real strength of neural networks comes from layers. Neurons are arranged in layers, where each layer takes the output of the previous one as input. This creates a pipeline of transformations, each layer building on the representation learned by the previous layer.

The first layer typically interacts directly with raw input data. It does not understand meaning; it only responds to patterns in numbers. In an image, this might correspond to simple contrasts or edges. In tabular data, it might capture basic combinations of features. As data flows deeper into the network, layers begin to represent more abstract concepts. These abstractions are not explicitly programmed. They emerge as a consequence of optimization.

Hierarchical Representations

This layered structure is what gives deep learning its name and its power. Each layer learns to re-express the data in a way that makes the task easier for the next layer. Instead of solving the problem all at once, the network decomposes it into many small steps. This mirrors how complex reasoning often works in practice: not as a single leap, but as a sequence of refinements.

It is important to understand that a neural network does not "think" in the human sense. There is no internal narrative, no explicit logic, no awareness of concepts. What exists is a flow of numbers through a structured system, shaped by training data and loss functions. The apparent intelligence emerges from the alignment between this numerical process and the structure of the problem.

The Critical Role of Non-linearity

Activation functions deserve special attention because they define the character of this flow. They control how sensitive neurons are to input changes, how gradients propagate backward during training, and how expressive each layer can be. In a very real sense, activation functions determine how easily a network can learn and what kinds of patterns it can represent. Without them, depth would be meaningless.

Understanding neurons, layers, and activation functions demystifies neural networks. You begin to see them not as black boxes, but as systems of transformations stacked together with purpose. Each neuron contributes a tiny piece. Each layer reshapes information slightly. Together, they form a model capable of learning representations that would be extremely difficult to design by hand.

From Awe to Understanding

This perspective is empowering. It replaces awe with understanding and fear with control. Neural networks are not thinking entities; they are structured learning machines. Once you grasp how their basic components work together, you stop asking what magic they contain and start asking better questions: how deep should the network be, how expressive should each layer be, and how can the flow of information be shaped to match the problem at hand.