No history yet

Introduction to Neural Networks

What Are Neural Networks?

Artificial neural networks (ANNs) are computing systems inspired by the biological neural networks that constitute animal brains. They aren't exact replicas of the brain, but rather a simplified mathematical model designed to learn from data. Think of them as a way to recognize patterns, much like we do.

Lesson image

At its core, a neural network learns to perform tasks by considering examples, generally without being programmed with task-specific rules. For example, to teach a network to recognize cats, you would show it thousands of labeled pictures of cats. It would then learn the features of a cat on its own, rather than you telling it to look for whiskers, pointy ears, and fur.

The Basic Components

To understand how neural networks work, let's break one down into its fundamental parts. Every artificial neural network is made up of three key components: neurons, synapses, and layers.

neuron

noun

A node or computational unit in an artificial neural network that receives input, processes it, and generates an output.

An artificial neuron, or node, is the most basic unit. It receives one or more inputs, which are numbers. The neuron multiplies each input by a specific number called a weight. It then adds up all these weighted inputs and passes the sum through a special function called an activation function. The result of this function is the neuron's output, which it then passes on to other neurons.

The connections between neurons are called synapses. In an ANN, each synapse has an associated weight. This weight determines the strength and sign of the connection. A large positive weight means a strong, excitatory connection, while a large negative weight means a strong, inhibitory connection. The learning process of a neural network involves adjusting these weights to produce the desired outputs.

Think of a weight like a volume knob for a specific input. Turning it up makes the input's signal stronger; turning it down makes it weaker.

Neurons are organized into layers. Most networks have at least three:

  1. Input Layer: This is the first layer. It receives the initial data for the network. For example, if you're analyzing an image, the input layer might have one neuron for each pixel.
  2. Hidden Layers: These layers sit between the input and output layers. This is where most of the computation happens. A network can have zero or many hidden layers. The more hidden layers, the "deeper" the network.
  3. Output Layer: This is the final layer. It produces the network's result. If you're classifying images of cats and dogs, the output layer might have two neurons, one for 'cat' and one for 'dog'.

How Information Flows

The way data moves through the network defines its architecture. There are two main types of architectures based on information flow: feedforward and recurrent.

In a feedforward network, information moves in only one direction: forward. It goes from the input nodes, through the hidden layers (if any), and to the output nodes. There are no cycles or loops in the network. The output of one layer is the input to the next. This is the simplest and most common type of artificial neural network.

In a recurrent neural network (RNN), the connections between neurons can form a directed cycle. This creates a form of internal memory, allowing the network to process sequences of data. The output of a neuron can affect its own subsequent input. This makes RNNs particularly well-suited for tasks where context is important, like translating languages or predicting the next word in a sentence.

Now that you understand the basic building blocks, let's test your knowledge.

Quiz Questions 1/5

How do artificial neural networks primarily learn to perform tasks?

Quiz Questions 2/5

What is the key characteristic that distinguishes a Recurrent Neural Network (RNN) from a Feedforward network?

Understanding these core concepts—neurons, layers, and the direction of information flow—provides the foundation for exploring more complex and powerful neural network architectures.