How Neural Networks Learn
- 98Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
How does the tuned Plinko board illustrate what a trained neural network does?
98 questions
- 1
How does the tuned Plinko board illustrate what a trained neural network does?
Model answer
A trained neural network takes an input and produces an intended output, like a Plinko board tuned to send each shape to its correct bin.
Explanation
The Plinko machine illustrates how a system can be adjusted to map inputs to desired outputs.
- 2
What repeated process does the Plinko analogy use to represent learning?
Model answer
Try an input, check its result against the goal, and adjust the settings when the result is wrong; repeat this process across inputs.
Explanation
The board is tuned through repeated attempts rather than by changing itself automatically.
- 3
What replaces pegs and bouncing shapes in a real neural network?
Model answer
A neural network processes numerical inputs through connected calculations to produce outputs.
Explanation
Real networks use numbers and connected calculations in place of pegs and bouncing objects.
- 4
What does a neuron's weight do in the sound-activated light example?
Model answer
The neuron multiplies the input by its weight; the weight controls the input’s influence on the score.
Explanation
In the sound-light example, the neuron's weight determines how strongly sound affects its score.
- 5
How is sound level represented in the light-switch example?
Model answer
The sound level is represented by a number from zero to one, with zero meaning silence and one meaning very loud.
Explanation
The example represents sound level on a scale from silence to very loud.
- 6
How does the example turn a neuron's score into an on-or-off light output?
Model answer
Scores below 0.5 round to zero, turning the light off; scores of 0.5 or more round to one, turning it on.
Explanation
The example converts the neuron's score into a binary light state using a threshold.
- 7
Is rounding the output score a required step in every neural network? Explain.
Model answer
No. The final step depends on the task, and different networks can use different output transformations.
Explanation
Rounding is specific to this example; other tasks can use different output transformations.
- 8
What input-output rule is the light neuron intended to learn?
Model answer
The light should be on at sound levels of 0.3 or higher and off below 0.3.
Explanation
The desired output changes at a sound level of 0.3.
- 9
With weight one, what happens for a sound level of 0.4, and why is the result wrong?
Model answer
The neuron outputs off, even though the target is on, because the score of 0.4 rounds down.
Explanation
With weight one, an input of 0.4 produces a score of 0.4, which is below the light's 0.5 output threshold.
- 10
How should the weight be adjusted after an incorrect low score or an incorrect high score?
Model answer
Increase the weight when the score is too low for the desired output; decrease it when the neuron is too sensitive. Correct outputs need no adjustment.
Explanation
A score that is too low calls for increasing the weight; a score that is too high calls for decreasing it.
- 11
How is the light neuron trained using practice sounds?
Model answer
Use practice sound levels with known correct outputs, start from a weight, and repeatedly check outputs and nudge the weight after errors.
Explanation
Training uses random practice inputs with known target outputs, adjusting the weight after mistakes.
- 12
What weight did the example training settle on, and how did the neuron perform on fresh test sounds?
Model answer
The weight settled at about 1.67, and the tested fresh inputs—0.15, 0.3, 0.29, and 0.8—were classified correctly.
Explanation
The example's weight settled near 1.67, then worked on fresh inputs including the boundary case 0.3.
- 13
Why demonstrate trial-and-adjust learning on a problem that could be solved with a simple formula?
Model answer
A formula could solve the one-weight example directly, but real networks may have millions or billions of weights, so repeated adjustment is useful at scale.
Explanation
A simple one-weight problem can be solved directly, but the example demonstrates an approach that also works when there are many parameters.
- 14
What are the components of the simplest neural-network example, and why is it significant?
Model answer
It has one input, one weight, and one answer; this small computation is the basic building block of larger networks.
Explanation
The example begins with one input, one weight, and one output, the basic computational unit from which larger networks are built.
- 15
How does a neuron combine multiple inputs, and what is its output called?
Model answer
A neuron multiplies each input by its own weight and adds the weighted values to form a score; its response is called its activation.
Explanation
For several inputs, each input has its own weight, and their weighted contributions are combined into one score.
- 16
Why can a neuron need a bias when all its inputs are zero?
Model answer
Without a bias, zero inputs always produce a zero score. A bias lets a neuron have a nonzero activation even when all inputs are zero.
Explanation
With all inputs at zero, weighted inputs alone sum to zero; a bias allows the neuron to have a nonzero starting activation.
- 17
What does a neuron's bias do, and is it adjusted during training?
Model answer
A bias sets the neuron's starting activation, including when inputs are zero; training adjusts biases as well as weights.
Explanation
The bias is the neuron's own starting number and is adjusted during training alongside weights.
- 18
How can a bias shift the light neuron's decision point without scaling the input?
Model answer
A bias of −0.3 with weight one makes the score the sound level minus 0.3; turning on at scores of zero or more gives the same threshold as the example goal.
Explanation
Using weight one and bias negative 0.3 makes the score the sound level minus 0.3, so the zero-score boundary matches the desired decision point.
- 19
What defines a layer of neurons?
Model answer
A layer is a group of neurons that process the same inputs side by side, each with its own weights and output.
Explanation
A layer consists of companion neurons that read the same inputs but have separate weights and produce separate responses.
- 20
How does adding a second layer change what that layer processes?
Model answer
A later layer reads the preceding layer's outputs, so successive layers build decisions on earlier decisions.
Explanation
In a multilayer network, later layers use earlier layers' outputs rather than directly using only the original inputs.
- 21
Why can't stacking linear layers by itself let a network represent complex patterns?
Model answer
No. Stacking linear equations still produces a linear mapping, so the network can only represent line-like relationships regardless of how many such layers it has.
Explanation
Multiplying by weights and adding biases are linear operations, and composing linear operations still yields a linear mapping.
- 22
What does the ReLU activation rule do?
Model answer
ReLU sets a total of zero or less to zero and leaves a positive total unchanged: the activation is \max(0,\text{total}).
Explanation
ReLU maps nonpositive totals to zero and passes positive totals through unchanged.
- 23
How do nonlinear activations expand the kinds of patterns a network can represent?
Model answer
Nonlinear activations let networks form patterns that lines cannot represent; combining and stacking them can build shapes such as peaks, waves, and complex outlines.
Explanation
Nonlinear activations bend the relationships a network can represent; combining and stacking these bends can form increasingly varied patterns.
- 24
How can a deep network build a complex recognition from simpler features?
Model answer
Different inputs can activate different neuron combinations; successive layers can reuse features, such as combining pixels into edges, edges into circles, and circles into eyes or faces.
Explanation
Different inputs can activate different combinations of neurons, while later layers build on earlier patterns.
- 25
Why can feature reuse make a deep network more practical than one very wide layer?
Model answer
A deep network can learn features once and reuse them in different combinations; a single layer might need a separate rule for every variation of a whole object or face.
Explanation
A single layer might need a separate rule for every possible whole pattern, while deep layers can reuse learned components.
- 26
What is ReLU, and what basic computation remains at the heart of a neuron?
Model answer
ReLU is a common activation that keeps positive values and zeros out the rest. The basic recipe remains weigh, add, bias, and apply a nonlinear activation.
Explanation
Most neurons use a nonlinear rule such as ReLU, while the core computation remains weighting, adding, applying bias, and bending.
- 27
What are hidden layers, and what choices can a designer make about them?
Model answer
Hidden layers lie between the inputs and outputs; designers choose their number of neurons and how many layers to use.
Explanation
The input and output sizes can be fixed while the number and arrangement of hidden neurons are chosen as design decisions.
- 28
Compare a wider network with a deeper network.
Model answer
A wider network has more neurons in a layer; a deeper network has more layers, each processing the preceding layer's results.
Explanation
A wider layer has more neurons processing the same inputs; a deeper network has more successive processing stages.
- 29
What does deep learning refer to, and does choosing a wider or deeper network guarantee better results?
Model answer
Deep learning uses networks with several processing layers. Greater width or depth does not guarantee better answers; performance must be measured.
Explanation
Deep learning refers to networks with several processing layers, and the best arrangement must be measured on the task.
- 30
How is a handwritten digit image represented as input to the network?
Model answer
A 28×28 image contains 784 pixels, each represented by a brightness value from zero to one, so the network receives 784 numbers.
Explanation
Each pixel contributes one brightness value between zero and one, giving 28×28=784 input values.
- 31
Which parts of the digit network's layer sizes are fixed by the image, and which are design choices?
Model answer
The input layer has 784 values because the image has 784 pixels; the example's hidden layer has 32 neurons, a design choice rather than a magic number.
Explanation
The image determines the input size, while the chosen middle layer contains thirty-two neurons.
- 32
How does each hidden neuron process the image's pixel values?
Model answer
Each hidden neuron has 784 weights, one for each pixel, and applies the weigh-add-bias-activation computation.
Explanation
Each of the thirty-two hidden neurons reads every pixel using its own set of weights and applies the neuron's computation.
- 33
What does each hidden neuron output in the digit-recognition network?
Model answer
Each neuron outputs a number indicating how strongly it responded, so the layer produces thirty-two numerical responses.
Explanation
These hidden neurons produce graded responses, not binary light-switch outputs.
- 34
Why does the digit network have ten output neurons, and what does each one read?
Model answer
The network has ten output neurons, one for each digit, and each reads all thirty-two hidden-layer responses using its own weights.
Explanation
There are ten possible digit labels, and each output neuron reads the thirty-two hidden responses.
- 35
What does softmax do in the digit classifier, and how is the predicted digit selected?
Model answer
Softmax converts the ten scores into probabilities that sum to one, and the digit with the highest probability is the prediction.
Explanation
Softmax transforms the ten output scores into probabilities that sum to one; the largest probability determines the predicted digit.
- 36
What is the objective of training the digit classifier?
Model answer
Training aims to move the correct digit's probability toward one and the other digits' probabilities toward zero by adjusting weights and biases.
Explanation
Training adjusts weights and biases to raise the correct digit's probability and lower the others.
- 37
What training run and probability result are reported for the example handwritten seven?
Model answer
The network trained on 60,000 images for five passes; afterward, the shown seven received a probability of about 98.6%.
Explanation
The described run used sixty thousand images over five passes; the probability for the shown seven rose to about 98.6%.
- 38
How did the architecture of the second digit-recognition network differ from the first?
Model answer
The second network used two hidden layers, with 64 neurons followed by 32, rather than the first network's single 32-neuron hidden layer.
Explanation
The comparison used one hidden layer with thirty-two neurons versus two layers with sixty-four and thirty-two neurons.
- 39
How did the two digit networks compare on the ten thousand images neither had seen during training?
Model answer
The one-hidden-layer network achieved 95.58% accuracy; the two-hidden-layer network achieved 96.35%, or seventy-seven more correct classifications out of ten thousand.
Explanation
On ten thousand unseen images, the two-layer model scored 96.35% and the one-layer model scored 95.58%, a difference of seventy-seven correct images.
- 40
What are network parameters, and what limits the conclusions from the reported architecture comparison?
Model answer
A parameter is an adjustable weight or bias. The larger network had about twice as many parameters, but because it became both wider and deeper, the comparison cannot isolate the effect of depth.
Explanation
Parameters include all weights and each neuron's bias; the larger network had about twice as many, and width and depth both changed.
- 41
How is the small training demonstration simplified relative to the full digit network?
Model answer
It uses three input numbers, two neurons, and ten output probabilities so that its calculations can be examined directly.
Explanation
The small demonstration reduces the input to three numbers but retains two hidden neurons and ten output probabilities, making its internal values inspectable.
- 42
Why can an untrained network initially predict the wrong digit?
Model answer
Weights and biases begin as starting values, commonly chosen at random, so the initial probabilities and prediction may be arbitrary.
Explanation
Before training, weights and biases are starting values, often random; their initial values can yield an arbitrary prediction.
- 43
What did the untrained small network predict, and what probability did it give the correct digit?
Model answer
It assigned seven about 9% probability and predicted three; this indicates that its output was far from the desired answer.
Explanation
The example network assigned the correct digit seven only about nine percent probability, motivating a measure of error.
- 44
What behavior should a loss measure have for correct and increasingly incorrect predictions?
Model answer
Loss is a number measuring error: it should be zero when the correct digit has probability one and the others zero, and should grow as the correct digit's probability decreases.
Explanation
Loss summarizes how wrong the network is on an example; it should be zero for a fully correct probability assignment and increase as the correct class probability falls.
- 45
What cross-entropy loss is used in the demonstration, and why does its shape suit the task?
Model answer
Cross-entropy here is the negative logarithm of the correct answer's probability, so it grows steeply as that probability approaches zero.
Explanation
For this example, cross-entropy is the negative logarithm of the probability assigned to the correct answer; it rises sharply as that probability approaches zero.
- 46
What loss corresponds to the example's nine-percent probability for seven, and how should it be interpreted?
Model answer
The loss is about 2.37. A smaller cross-entropy loss means the network's outputs are closer to the expected answer.
Explanation
The nine-percent correct-class probability corresponds to a cross-entropy loss of about 2.37; lower loss means outputs closer to the target.
- 47
What did the small weight-nudge experiment reveal about the direction and strength of that weight's effect on loss?
Model answer
Increasing the weight by 0.05 reduced the loss by 0.0065, indicating that raising it helps; the size of the response indicates the strength of the effect.
Explanation
Changing one weight by 0.05 changed a neuron by 0.04, the seven's score by 0.016, and reduced loss by 0.0065.
- 48
What information does a weight's slope provide?
Model answer
A slope describes which direction to change a parameter to help and how much the loss responds to that change.
Explanation
A slope gives the direction of change that helps and how strongly the loss responds to that parameter.
- 49
What question does a derivative answer?
Model answer
A derivative measures how much one quantity changes when another quantity changes; it is the slope of the first quantity with respect to the second.
Explanation
A derivative measures how much one quantity changes for a unit change in another, holding the relationship specified by the function.
- 50
For a neuron with output y=wx+b, what are the output's derivatives with respect to the weight, bias, and input?
Model answer
For y=wx+b, the output's derivative with respect to the weight is the input, with respect to the bias is one, and with respect to the input is the weight.
Explanation
For output y=wx+b, the local derivatives are ∂w∂y=x, ∂b∂y=1, and ∂x∂y=w.
- 51
For input five, how does raising the weight from two to three affect the output, and what does this demonstrate?
Model answer
The output changes by five, equal to the input, so the derivative with respect to the weight is five in this example.
Explanation
With input five and bias one, raising the weight from two to three changes the output from eleven to sixteen, a change of five—the input value.
- 52
What do the bias and input changes in the neuron example demonstrate about their derivatives?
Model answer
Increasing the bias from one to two raises the output from eleven to twelve. Increasing the input from five to six raises it from eleven to thirteen, equal to the weight two.
Explanation
Raising the bias by one raises the output by one; raising the input by one changes the output by the weight.
- 53
Describe the calculations in the two-neuron chain used to explain backpropagation.
Model answer
The first neuron produces x2=w1x1+b1; the second produces x3=w2x2+b2, which is then evaluated by a loss function.
Explanation
The two-neuron chain computes x2=w1x1+b1, then x3=w2x2+b2, and scores the final answer with a loss.
- 54
What loss and parameter slopes are used in the two-neuron backpropagation example?
Model answer
Its loss is half the squared difference between expected and actual output; the goal is to find the loss slope for w1, b1, w2, and b2.
Explanation
The demonstration uses half the squared difference between expected and actual output, then seeks the loss derivative for every weight and bias.
- 55
What slopes does the two-neuron example calculate for the output and its parameters?
Model answer
The loss slope with respect to x3 is +2; the resulting parameter slopes are 14 for w2, 4 for b2, and 8 for w1.
Explanation
Starting at the output, the example obtains a loss derivative of plus two with respect to x3, then applies chain-rule products to obtain slopes for downstream and earlier parameters.
- 56
How does the chain rule help calculate the loss slope for a parameter earlier in a network?
Model answer
Multiply the loss slope with respect to an intermediate output by that output's local derivative with respect to the parameter; this carries the effect backward through the chain.
Explanation
The chain rule splits a downstream effect into the slope arriving at an intermediate value and the local derivative from that value to a parameter.
- 57
Why is changing and testing each parameter individually impractical for a real network?
Model answer
The digit network had 25,450 parameters and used 2,345 updates; checking each parameter separately would require nearly sixty million reruns, making one-at-a-time nudging impractical.
Explanation
Changing parameters one by one would require millions of full network reruns for the stated digit network and training updates.
- 58
What problem does backpropagation solve, and how does it do so?
Model answer
Backpropagation finds the slopes for all weights and biases in a single backward pass, instead of rerunning the network once per parameter.
Explanation
Backpropagation calculates all parameter slopes in one pass by starting at the loss and moving backward through the network.
- 59
What repeated operations does backpropagation perform as it moves through a network?
Model answer
At each layer, multiply the incoming slope by local derivatives; retain slopes for that layer's weights and biases, then pass the input slopes to the preceding layer.
Explanation
At each equation, backpropagation multiplies an arriving downstream slope by a simple local derivative, keeps parameter slopes, and passes input slopes backward.
- 60
How does backpropagation handle a neuron whose output feeds many neurons in the next layer?
Model answer
It adds the slope contributions arriving from all the neurons it feeds, then passes the combined slope farther backward.
Explanation
A neuron feeding several later neurons receives contributions from each of them, which must be added to form its backward slope.
- 61
What is the gradient, and what does each of its entries measure?
Model answer
The gradient is the list of loss slopes for all weights and biases; each slope measures sensitivity to one parameter with the others held fixed.
Explanation
The gradient is the collection of parameter slopes, each describing loss sensitivity to one weight or bias while other parameters stay fixed.
- 62
What does backpropagation do not do?
Model answer
Backpropagation calculates sensitivities only: it changes no parameters and does not tell individual neurons what their outputs should be.
Explanation
Backpropagation measures how loss responds to parameter changes but neither modifies parameters nor assigns target outputs to neurons.
- 63
How does gradient descent use the gradient after backpropagation has calculated it?
Model answer
Gradient descent updates all weights and biases together in directions that reduce loss; the size of each move depends on its slope and the learning rate.
Explanation
Gradient descent uses the gradient to update all parameters together in directions that reduce loss, with larger slopes producing larger changes before learning-rate scaling.
- 64
Why should gradient-descent parameter updates generally not be too large?
Model answer
The slope is measured with other parameters fixed, so it is trustworthy for small moves; large changes elsewhere can make it inaccurate.
Explanation
If other parameters change only slightly, the measured sensitivity remains useful; large simultaneous changes can make the old slope unreliable.
- 65
What problems can arise when gradient-descent steps are too small?
Model answer
Tiny steps make learning slow and may prevent the network from crossing a bump to reach a better solution.
Explanation
Very small updates make learning slow and can leave the network in a shallow dip before it crosses a bump toward a better solution.
- 66
What is the learning rate, and how does it affect a parameter update?
Model answer
The learning rate is a shared scale for update size: each move is proportional to its slope, in the direction that helps reduce loss.
Explanation
The learning rate scales the slope to determine the size of each parameter move; the direction is chosen to reduce loss.
- 67
What happens after one update with learning rate 0.2 in the example?
Model answer
With learning rate 0.2, the loss falls from 2.37 to 2.08, though the network still predicts three.
Explanation
The example uses learning rate 0.2, reducing loss from 2.37 to 2.08 in one update without yet changing the predicted digit from three.
- 68
How is a suitable learning rate selected?
Model answer
The learning rate is found by trying values, checking their effects, and adjusting; no formula in the example determines the best one.
Explanation
There is no formula supplied for the best learning rate; it is chosen empirically by trying settings and checking outcomes.
- 69
How does training handle examples that recommend opposite changes to a weight?
Model answer
Calculate each example's gradient, average the suggested changes, and apply one shared update so the examples jointly guide the parameters.
Explanation
Different training examples can prefer opposing changes, so their gradients are averaged to make a shared update.
- 70
Define a batch and an epoch.
Model answer
A batch is a group of examples whose gradients are combined for an update. An epoch is one complete pass through the training data.
Explanation
A batch is a group of examples processed together for one shared update; an epoch is a complete pass through the training set.
- 71
What happened to the loss over successive passes in the digit experiment?
Model answer
One pass through the digit training data involved hundreds of updates; loss continued to decrease from pass to pass.
Explanation
A digit-training pass consists of hundreds of updates, and successive passes in the described experiment reduced loss.
- 72
How did three learning rates affect loss in the same two-example update experiment?
Model answer
Rate 0.05 barely reduced loss from 2.00 to 1.97; rate two reduced it to 0.92; rate twenty caused it to explode to 8.99.
Explanation
The example's one-update losses were 2.00 initially, 1.97 at learning rate 0.05, 0.92 at rate two, and 8.99 at rate twenty.
- 73
What does the learning-rate comparison show about choosing update sizes?
Model answer
An overly small rate makes little progress, while an overly large rate can overshoot and increase loss; a useful rate balances progress with reliable updates.
Explanation
The largest rate overshot what the measured slopes could reliably guide, while the smallest barely changed the loss.
- 74
What is overfitting, and how does it differ from learning a general pattern?
Model answer
Overfitting occurs when a network continues improving on training examples but becomes worse on unseen examples, effectively memorizing its training data.
Explanation
A network can improve on training images while worsening on unseen images because it memorizes rather than generalizes.
- 75
How do training, validation, and test data differ in their uses?
Model answer
Training data is used for learning, validation data is held out to monitor performance during training, and test data is reserved for evaluation at the end.
Explanation
Training data updates the model, validation data checks it during training without training on it, and test data is reserved for a final evaluation.
- 76
What evidence of overfitting appeared in the experiment with about one thousand training images?
Model answer
The wide network's training loss kept falling, but its validation loss turned upward, indicating that it was memorizing rather than continuing to generalize.
Explanation
With about one thousand training images, the wide network's training loss fell while its validation loss eventually rose, showing memorization.
- 77
How was the best checkpoint selected in the small-data experiment, and how did it perform on the test set?
Model answer
The validation set selected epoch ten as the best checkpoint, which scored 88.83% on the test set used once at the end.
Explanation
Validation performance identified epoch ten as the best checkpoint; that model achieved 88.83% on the untouched test set.
- 78
What is early stopping, and how does it use validation data?
Model answer
Keep checkpoints during training, then use the one with the best validation performance; this practice is called early stopping.
Explanation
Early stopping restores the checkpoint that performed best on validation data rather than using a later, overfit version.
- 79
Why is more training data a strong way to reduce overfitting, according to the examples?
Model answer
More varied examples give the network more practice with the underlying pattern and less room to memorize; the network trained on sixty thousand images reached 95.58% accuracy.
Explanation
More training examples provide more variety and reduce opportunities to memorize; the full sixty-thousand-image run reached 95.58%.
- 80
Name several methods besides adding data that can help reduce memorization.
Model answer
Methods include choosing a suitable network size, penalizing extreme weights, randomly silencing neurons during training, and stretching, shifting, or tilting training images.
Explanation
Other strategies include choosing a suitable network size, penalizing extreme weights, randomly silencing neurons, and transforming images to add variety.
- 81
What trade-off did the narrow network illustrate, and what does it imply about network size?
Model answer
A narrow network may memorize less but can also learn less; network size should be selected based on measured performance, not assumed benefit.
Explanation
The narrow network memorized less but also learned less, illustrating that a larger network is not automatically better.
- 82
Why must a network be evaluated using data it has never seen?
Model answer
Evaluate the network on data it has never seen; held-out data reveals whether it learned patterns that generalize beyond its training examples.
Explanation
Generalization must be judged on examples the network did not train on, which is why data is held back.
- 83
How is a layer's weight matrix arranged, and how does a column produce a neuron's weighted sum?
Model answer
Put one input in each matrix row and one neuron in each column; multiplying the inputs by the weights in a column and summing gives that neuron's weighted sum.
Explanation
Weights can be arranged with one input per row and one neuron per column; a neuron's weighted sum is computed down its column.
- 84
Which parts of a neuron's calculation does matrix multiplication perform, and what follows it?
Model answer
A matrix multiplication computes the weighted sums for all neurons; each neuron's bias and nonlinear activation are applied afterward.
Explanation
Matrix multiplication performs the weigh-and-add for a whole layer; the bias and activation are applied afterward to each neuron.
- 85
How does representing a batch as a matrix allow many examples to be processed together?
Model answer
Stack examples as rows in a batch matrix; a single matrix multiplication then computes every neuron's weighted sum for every example in the batch.
Explanation
A batch can be represented with one example per row, allowing one multiplication to compute all neurons' weighted sums for every example.
- 86
Which neural-network calculations can run in parallel, and why must layers still be processed in sequence?
Model answer
Cells within a matrix calculation can be computed in parallel because each is an independent multiply-and-add; successive layers must still wait for earlier outputs.
Explanation
Each output cell is an independent multiply-and-add, allowing parallel computation within a layer, though layers depend on preceding layers.
- 87
Why are GPUs often useful for neural-network calculations compared with CPUs?
Model answer
A CPU is designed for general-purpose work; a GPU is designed for many similar calculations at once, making it well suited to large neural-network matrix operations.
Explanation
CPUs are general-purpose processors, while GPUs are built to perform many similar calculations concurrently, suiting large matrix operations.
- 88
How does the scale of modern language-model training explain the need for specialized hardware?
Model answer
Large language models can have billions of weights and use repeated gradient-descent training at scale, often running for days or weeks on thousands of processors.
Explanation
Modern language models may have billions of weights and use the same training loop at much greater scale, requiring many processors over days or weeks.
- 89
What is tokenization, and what kinds of units can tokens represent?
Model answer
A tokenizer splits text into tokens, which can be whole words, word pieces, or punctuation, so the network can process numerical representations of text.
Explanation
Networks for text need numerical representations, so tokenization first divides text into small units.
- 90
What determines the way text is split, and what numerical representation does each token receive?
Model answer
The tokenizer determines the text's token divisions, and each token is assigned its own learned list of numbers.
Explanation
The tokenizer determines how text is split; each resulting token has a learned numerical representation.
- 91
How are token representations learned in a language model?
Model answer
The token number lists are learned parameters: training adjusts them alongside the network's weights and biases.
Explanation
Token representations are tuned during training alongside weights and biases.
- 92
What prediction problem does a language model solve using context?
Model answer
Given the preceding text as context, the model scores possible next tokens and predicts what should come next.
Explanation
The model uses preceding words as context to estimate a probability distribution over possible next tokens.
- 93
How does a language model generate text one token at a time?
Model answer
Softmax turns token scores into probabilities. The model chooses the most probable token or samples one, adds it to the text, and predicts again.
Explanation
Softmax converts token scores into probabilities; generation can select the highest-probability token or sample another, then repeat with the expanded context.
- 94
How is a language model trained to predict the next token?
Model answer
The model is shown preceding text and asked to predict the next token; the actual next token is the target, and loss measures the probability assigned to it.
Explanation
During next-token training, the model predicts a hidden next word, and the real word supplies the target used to calculate loss.
- 95
How do backpropagation and optimization contribute to training a language model?
Model answer
The loss is backpropagated to calculate slopes, then the optimizer adjusts weights, biases, and token representations to improve predictions.
Explanation
Backpropagation and an optimizer update the model's parameters, including token representations, using the prediction loss.
- 96
What are some language-model tasks beyond next-token prediction, and what role does attention play?
Model answer
Networks can also be trained to translate, summarize, or answer questions. Attention helps a language model determine which earlier words matter most.
Explanation
Translation, summarization, and answering are additional tasks; attention helps decide which earlier words are most relevant.
- 97
What common idea links neural networks for vision, language, and speech?
Model answer
These systems share the neural-network backbone and the training loop: make a prediction, check it against the desired result, and adjust parameters to improve.
Explanation
Across vision, language, and speech systems, the shared pattern is to predict, check the error, and adjust parameters.
- 98
In the Plinko analogy, what do the pegs and their adjustments represent?
Model answer
The pegs correspond to weights, and changing them corresponds to adjusting parameters after checking the result against the goal; the board does not tune itself.
Explanation
In the Plinko analogy, peg settings correspond to weights and adjustments respond to errors; the board itself does not adjust its pegs.

Ask anything
We've read this whole study set, so questions about it get the best answers.