Neural networks basics (concept)

Computer Science · AI/ML fundamentals

Question 1 of 10

0

    A learning rate of 0 means that:

    Stuck? Read the explanation

    Unlocks at a streak of 5 correct answers in a row.

    Print a free worksheet (PDF)

    Embed this practice on your site or class page

    Paste this HTML into your page. Students practise right there; it is free and needs no account.

    Neural networks basics (concept) explained

    A neural network is a model made of layers of simple units, called neurons, each of which combines its inputs with weights and passes the result through an activation function. Training adjusts the weights so that the network's outputs match the desired outputs.

    An artificial neuron takes inputs xix_i, multiplies each by a weight wiw_i and adds a bias bb. This gives the weighted sum z=∑iwixi+bz = \sum_i w_i x_i + b. The neuron then applies an activation function ff and outputs f(z)f(z). Without a non-linear activation, a stack of layers would collapse into a single linear function, so the activation is essential.

    Common activation functions include the sigmoid, which squashes any value into the range 0 to 1, and ReLU, which outputs max⁡(0,z)\max(0, z).

    Neurons are arranged in layers: an input layer, one or more hidden layers and an output layer. In a fully connected layer, every neuron connects to every neuron in the next layer.

    Training starts with random weights. The network makes predictions, a loss function measures how wrong they are, and backpropagation with gradient descent adjusts the weights to reduce the loss. Repeating this over many examples gradually improves the model.

    Worked example

    A single neuron has inputs x1=0.5x_1 = 0.5 and x2=−1.0x_2 = -1.0, weights w1=0.8w_1 = 0.8 and w2=0.2w_2 = 0.2, and bias b=0.1b = 0.1. It uses ReLU.

    1. Weighted sum: z=0.8×0.5+0.2×(−1.0)+0.1=0.4−0.2+0.1=0.3z = 0.8 \times 0.5 + 0.2 \times (-1.0) + 0.1 = 0.4 - 0.2 + 0.1 = 0.3.
    2. ReLU output: max⁡(0,0.3)=0.3\max(0, 0.3) = 0.3.

    With a sigmoid instead, the output is 11+e−0.3≈0.574\frac{1}{1 + e^{-0.3}} \approx 0.574.

    What you will practise

    105 multiple-choice questions (Easy, Medium, Hard). Each answer is followed by an explanation.

    Example questions

    • A neural network is inspired by:
    • Neurons are connected by:
    • A hidden layer:
    • Activation functions introduce:
    • Backpropagation:
    • A weight in a neural network is:
    • The process of computing outputs from inputs through the layers is called the:
    • The bias term in a neuron:

    …and 97 more.