S14 · Problem set 10
Problem set 10: problems that combine priors and regression, classifiers and their evaluation, network sizes, gradients and training, kernels, Gaussian processes, mixtures, components, sampling, ensembles and hardware
These problems draw on the whole course, and most chain several ideas: a classifier's posterior turned into a decision and a precision, a network's size turned into a memory budget and a token rate, a covariance turned into components and a compression ratio. Work them as a review before the final.
Check
A defect rate has a beta(1, 1) prior and 6 defects are seen in 20 units; a false alarm costs 1 and a missed defect 50.
(a)
Posterior probability that the next unit is defective?
(b)
Probability above which a unit should be flagged?
(c)
Expected cost of flagging the next unit?
Check
Bayesian regression of one weight: α = 0.5, β = 4, Σx² = 20, Σxt = 18.
(a)
Posterior mean weight?
(b)
Predicted value at x = 2?
(c)
Its predictive standard deviation?
Check
Gaussian classes (means 2 and 0, variance 1.5²) with class 1's prior 0.3; a point at 1.
(a)
Posterior of class 1?
(b)
Decision boundary?
Check
A detector with sensitivity 0.8 and specificity 0.9 screens 10000 units with fault rate 0.05.
(a)
Expected true positives?
(b)
Expected false positives?
(c)
Precision?
(d)
F1?
Check
A network of 48 identical blocks, each two dense layers 512 → 2048 → 512 (no biases), stored at 16 bits and run at batch 1 on 200 GB/s.
(a)
Parameters?
(b)
Weight memory in GB?
(c)
Upper bound on forward passes per second?
Check
with = 0.4, = −1.5, input 2, target 1; one gradient step with rate 0.05.
(a)
?
(b)
after the step?
(c)
after the step?
Check
A training problem with Hessian eigenvalues from 0.2 to 50; a stride-1, padded 5 × 5 convolution from 16 to 32 channels on a 224 × 224 map.
(a)
Best learning rate?
(b)
Per-step factor with tuned momentum?
(c)
Convolution multiply-accumulates (same-size output)?
Check
Two inputs 0.5 apart under a squared-exponential kernel with = 1 and ℓ = 1; a Gaussian process with noise variance 0.25 observes 3 at one of them.
(a)
Kernel value?
(b)
Posterior mean at the other input?
(c)
Posterior variance there?
Check
A linear SVM with w = (3, 4); (2, 1) is a support vector labeled 1; the soft-margin constant is C = 1 and the total slack is 0.6.
(a)
Margin?
(b)
Bias?
(c)
Objective?
Check
A mixture of unit-variance components at 0 and 3 with weights 0.6 and 1 − 0.6; a 3-component full-covariance mixture in 4 dimensions.
(a)
Responsibility of the first component at 2?
(b)
Parameters of the 4-dimensional mixture?
Check
Two-dimensional data with variances 3 and 1 and covariance 1.5; separately, 10000 samples of dimension 64 compressed to 8 components.
(a)
Fraction of variance in the first component?
(b)
One-component reconstruction error?
(c)
Compression factor?
Check
A Monte Carlo average of a quantity with standard deviation 0.5, drawn from a Markov chain with neighbor correlation 0.9; separately, an ensemble of 20 models with error correlation 0.3.
(a)
Independent samples needed for standard error 0.005?
(b)
Chain steps needed?
(c)
Ensemble variance as a fraction of one model's?
Check
A quantity x has prior N(0, 1²) and is measured as y = 1.5 with noise variance 0.5. Acting when x > 0 gains 3; acting when x ≤ 0 costs 2.
(a)
What is the posterior mean of x?
(b)
What is P(x > 0 | y)?
(c)
Above what posterior probability is acting worthwhile?
Check
A transformer with width 2048 and 24 layers (ignore its embedding) stores 16-bit weights and serves batch 16 from 2 TB/s of memory bandwidth, memory-bound.
(a)
How much do its weights take?
(b)
How many tokens per second does it generate in all?
Check
A classifier makes no errors on 500 independent test examples.
(a)
What error rate does that bound with confidence 0.95?
(b)
What bound holds if the classifier was the best of 1000 candidates checked on the same examples?
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.