S1453 of 55
0 XP
  1. Hook
  2. Problems

S14 · Problem set 11

Problem set 11: design problems for thresholds from costs, test and label budgets, regularization and data for a target uncertainty, network sizes for a parameter budget, compute-optimal training, optimizers, ensembles, kernels, detectors, recurrent memory, context lengths and Monte Carlo budgets

Each problem here starts from a requirement and asks for the design that meets it: a threshold that minimizes expected cost, a test set that can certify a recall, a network that fits a parameter budget, a training run that fits a compute budget, a context that fits in memory. Most draw on two or three parts of the course at once.

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)?

Have paper and a calculator ready. Work each problem out by hand, then enter the answer. Your first try on each one counts toward your score.

Practice

Keep practicing

15 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.