ailearnist Loading…
AI Foundations Playgrounds · Intermediate

Neural Network Playground

Run forward passes and train a small network step by step — weights, activations and loss, visualised.

Live network diagram Step-by-step training See the maths

How to Use This Tool

1

Choose Input Data

Enter values or select from preset examples to feed into the network

2

Watch Forward Pass

See how data flows through layers, weights multiply inputs, and activation functions transform results

3

Observe Learning

Watch backpropagation adjust weights based on prediction errors to improve accuracy

4

Experiment with Settings

Adjust learning rate, activation functions, and network architecture to see how it affects training

Interactive Neural Network

Input Data

Quick Examples:

Network Settings

0.1
4
Current Loss
0.000
Prediction
0.000
Training Steps
0
Accuracy
0%
What is a Neural Network?

Inspired by the Brain

Neural networks are computing systems inspired by biological neural networks. Just like brain neurons connect and communicate, artificial neurons process and pass information through weighted connections.

Pattern Recognition

They excel at finding patterns in data by learning from examples. Each neuron receives inputs, applies weights, and produces outputs that help recognize complex patterns.

Learning Through Training

Networks improve their performance by adjusting connection weights based on training examples, gradually getting better at making accurate predictions.

Universal Problem Solvers

With enough neurons and training data, neural networks can solve diverse problems from image recognition to language translation and decision making.

How Neural Networks Work

1. Input Layer

Data enters the network through input neurons. Each input represents a feature or characteristic of the data (like pixel values in an image).

2. Weighted Connections

Each connection between neurons has a weight that determines how much influence one neuron has on another. These weights are the network's "memory."

3. Hidden Layers

Hidden neurons combine weighted inputs, add bias, and apply activation functions to transform data into increasingly complex representations.

4. Output Layer

Final neurons produce the network's prediction or decision, such as classifying an image or predicting a value.

5. Learning (Backpropagation)

When predictions are wrong, the network adjusts weights backwards through layers to reduce errors and improve future performance.

Key Components Explained

Neurons (Nodes)

Basic processing units that receive inputs, apply transformations, and produce outputs. Each neuron has an activation value representing its state.

output = activation(Σ(weight × input) + bias)

Weights

Numbers that determine the strength of connections between neurons. Positive weights excite, negative weights inhibit. Learning adjusts these values.

Range: -1.0 to +1.0

Bias

Additional parameter that shifts the activation function. Helps neurons activate even when inputs are zero, adding flexibility to learning.

Purpose: Threshold adjustment

Activation Functions

Mathematical functions that determine if and how strongly a neuron should activate based on its inputs. They introduce non-linearity.

Sigmoid: S-shaped curve (0-1)
ReLU: Linear for positive values
Tanh: S-shaped curve (-1 to 1)
The Learning Process

Forward Propagation

Data flows forward through the network:

  1. Input values enter the first layer
  2. Each neuron calculates: (input × weight) + bias
  3. Activation function transforms the result
  4. Output becomes input for the next layer
  5. Final layer produces the prediction

Error Calculation

The network measures how wrong its prediction was:

  • Compare prediction to actual answer
  • Calculate loss using a loss function
  • Larger errors mean more learning needed
Loss = (Prediction - Actual)²

Backpropagation

The network adjusts weights to reduce errors:

  1. Calculate how much each weight contributed to the error
  2. Adjust weights in proportion to their responsibility
  3. Work backwards from output to input layers
  4. Use gradient descent to find better weight values
Types of Neural Networks

Feedforward Networks

Simple networks where information flows in one direction. Great for basic classification and regression tasks like our playground example.

Use Cases: Image classification, price prediction, basic pattern recognition

Recurrent Networks (RNN)

Networks with memory that can process sequences by maintaining information from previous inputs. Ideal for time-series and text data.

Use Cases: Language translation, speech recognition, stock prediction

Convolutional Networks (CNN)

Specialized for processing grid-like data such as images. Use filters to detect features like edges, shapes, and patterns.

Use Cases: Image recognition, medical imaging, computer vision

Transformer Networks

Advanced architecture using attention mechanisms to process sequences in parallel. Powers modern language models like GPT and BERT.

Use Cases: ChatGPT, language translation, text generation, question answering
Real-World Applications

AI Assistants

ChatGPT, Claude, and other conversational AI systems use massive neural networks to understand and generate human-like responses.

Autonomous Vehicles

Self-driving cars use neural networks to process camera feeds, detect objects, and make driving decisions in real-time.

Medical Diagnosis

Neural networks analyze medical images, predict disease outcomes, and assist doctors in making more accurate diagnoses.

Content Creation

AI generates music, art, videos, and text by learning patterns from vast datasets of creative works.

Financial Trading

Trading algorithms use neural networks to analyze market patterns, predict price movements, and execute trades.

Search & Recommendations

Search engines and recommendation systems use neural networks to understand user intent and suggest relevant content.