S14 Machine learning · Practice
Problem set 11: designing learning systems
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
0 solved
0 in a row
0 of 15 kinds solid
Check
Scores are N(0, 1) for good units and N(2.5, 1) for faulty ones, and 0.01 of units are faulty. A false alarm costs 5 and a missed fault 200.
(a)
What score threshold minimizes the expected cost?
(b)
What fraction of faulty units does it miss?
(c)
What fraction of good units does it flag?
Check
A detector's recall is about 0.8. It must be measured with a standard error of 1 percentage points, and positives make up 0.05 of the data.
(a)
How many positive examples does the test set need?
(b)
How many examples must be labeled in all?
Check
A learning curve fits test error as 0.03 + 20/N, with N training examples.
(a)
How many examples reach a test error of 0.08?
(b)
How many more is that than for an error 0.01 higher?
Check
A weight expected to be about 1 in size is estimated from data with Σx² = 10 and noise variance 0.5.
(a)
What ridge λ minimizes the mean squared error?
(b)
What mean squared error does it achieve?
Check
A one-weight Bayesian model (prior precision 0.1, noise precision 4) must predict at x = 5 with a predictive standard deviation of 0.8.
(a)
How large must Σx² be?
Check
A grid of 20 hyperparameter settings is searched by 5-fold cross-validation, then the best is refitted on all the data. One fit on all the data takes 40 minutes, and fits scale with training size.
(a)
How many fits does it run?
(b)
How long does it take?
Check
A network with 64 inputs, two hidden layers of equal width H and 2 outputs (with biases) must have about 1000000 parameters.
(a)
What width H gives exactly that many?
Check
A training run has a budget of 1 × 10²³ operations, and follows the rule of thumb of about 20 training tokens per parameter.
(a)
How many billion parameters should the model have?
(b)
On how many billion tokens of data?
Check
A quadratic training problem's Hessian eigenvalues run from 0.01 to 10; the error must shrink by a factor of 1 × 10⁻⁶.
(a)
How many steps does gradient descent at its best fixed rate need?
(b)
And with optimally tuned momentum?
Check
Trees in a forest have pairwise error correlation 0.1. Each tree takes 15 ms to evaluate.
(a)
How many trees bring the forest's variance within 0.05 of its floor?
(b)
How long does a prediction then take on one core?
Write units the way you normally would: 1.5 ms, 1500 µs and 0.0015 s are the same answer.
Check
A Gaussian process's squared-exponential kernel must keep function values 0.5 apart correlated by at least 0.5.
(a)
What is the smallest length scale that does?
Check
A monitor flags any sample more than 4 standard deviations from a Gaussian model's mean, at 10 samples a second.
(a)
What fraction of normal samples does it flag?
(b)
How many false alarms does it raise per day (a number of alarms)?
Check
A recurrent model must keep at least 0.01 of a gradient signal across 200 steps.
(a)
What per-step gain does that require?
(b)
What forget-gate bias would hold an LSTM cell at that gain?
Check
A model with 32 layers of width 4096 and 32 GB of weights serves batches of 4 on a 141 GB device with a 16-bit key–value cache.
(a)
What is the longest context that fits?
Check
A Monte Carlo estimate of a quantity with standard deviation 1 must reach a standard error of 0.01, using a Markov chain whose successive samples are correlated by 0.9.
(a)
How many independent samples would that take?
(b)
How many chain samples does it take?
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in S14