Shared AI lesson · Objects as numbers
Explain: Feature responses
Why did that happen?
The starting weights were written by a person. They were not learned from pictures. A high response tells us that some pixels matched this rule. It does not tell us that the computer understands the whole shape.
Explain it in your own words · optional
Compare your prediction and explanation with the observed numbers.
Try a different case · guided practice
A selected pixel is dark (0). Its weight is 0.7, predicted probability is 0.9 and target is 0. What happens to this weight in the displayed learning step?
Need a hint?
For the optional learning check, a dark pixel has value zero. Multiplying by zero makes this pixel’s weight change zero too.
How this helps your classifier project
A good report includes a counterexample, not just a flattering picture. Save what the classifier gets wrong and explain the limits of your interpretation.
Understand what changed.
A shorter explanation, with the original worked examples available below. Both explain the same experiment and its limits.
The idea in everyday terms
An image can be represented by a grid of brightness numbers. Multiply each brightness by its weight, add the results and a bias, then pass the total through a function called sigmoid. Sigmoid puts the output between zero and one. The weight pattern determines which bright pixels raise or lower the score.
What to watch in the experiment
Change the image and inspect the contribution of individual pixels. A detector that responds to a horizontal stroke can also respond to a plus sign containing that stroke. To learn the distinction, the task and training examples must distinguish those cases.
What this does not establish
An activation is evidence about this calculation, not proof that a neuron understands an object. An output between zero and one is not automatically a well-calibrated probability.
Open the full worked examples, calculations and limitations
This is the same reference used in Technical mode. Expand it whenever you need the exact numbers, assumptions or further explanation.
Multiply, add, and interpret carefully
A 5 × 5 image becomes 25 brightness inputs. The neuron multiplies each by a weight, adds the products and a bias, then applies a sigmoid. A sigmoid maps a score to a number between 0 and 1. We interpret that number as a predicted probability of the selected positive class, although it has not been calibrated on independent data.
The initial vertical template uses +1 in the center column, −0.25 elsewhere, and bias −2. A vertical line contributes 5, giving score 3 and sigmoid output about 0.953. A cross also contains the vertical stroke. Its four extra bright pixels subtract 1, leaving score 2 and output about 0.881. “Contains a vertical line” and “is exclusively a vertical line” are different tasks.
The starting weights are a hand-written teaching template. The editor lets you inspect that mechanism directly. Changing a weight by hand is not learning; the learning-step button in the lab performs an actual gradient update for the current labeled image.
How a feature can be learned
For a binary classifier, cross-entropy penalizes assigning little probability to the correct class. If the target is 1, a probability near zero is costly. If the target is 0, a probability near one is costly. With a sigmoid output and this loss, the weight gradient has a simple form:
A dark pixel has input zero, so its weight gradient is zero for this example. A bright pixel contributes the prediction error. The optimizer subtracts learning rate times each gradient, using the same old parameter values. The lab’s rate is 0.1; both weights and bias update together.
Repeated training on varied labeled examples can strengthen useful patterns. Training on just the displayed image can overfit it and alter the response to other images. Try labeling a cross as negative, taking one step, and returning to the vertical line. Lower loss on one example is not proof that the detector has learned the intended task.
Features are not always individual neurons
Hidden features emerge because they help the final objective; programmers need not name each intermediate feature. In a larger network, one feature may be spread across many dimensions, and one neuron may contribute to several features. A strong activation is evidence of a response, not a complete explanation of a concept.
Interpretability researchers measure activations and intervene on parts of the computation to test hypotheses about their roles. Methods such as sparse autoencoders try to separate mixed activations into a larger set of sparsely used features. Their outputs are useful hypotheses, not guaranteed unique dictionaries of the model’s concepts.
Transfer the source exercise to a 3 × 3 image
Give the three middle-row pixels weight +1 and the other six weight −0.25. With bias −1, a horizontal line has score 2. A plus sign adds two negatively weighted pixels, giving score 1.5. Both still activate the sigmoid strongly. To distinguish “has a horizontal stroke” from “is only a horizontal stroke,” you need a task definition and examples that separate them.
Notes, help and related ideas
My notes and reflection
What will you take away?
Keep a private reminder for yourself.
Loading your journal…
Add a short reflection
Prerequisites and related ideas
Key terms: Activation Feature Sigmoid Cross-entropy