S14 Machine learning · Practice
Problem set 12: learning systems in hardware and signals
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.
Check
A keyword spotter's main layer is a 3 × 3 convolution from 32 to 64 channels with a 16 × 16 output. Each multiply-add costs 2 pJ, and the device runs 1 inferences a second from a 3 V battery of 200 mAh.
(a)
How many million multiply-adds does the layer take?
(b)
How much energy does one inference of it take?
Write units the way you normally would: 1.5 µJ, 1500 nJ and 0.0015 mJ are the same answer.
(c)
How long would the battery last if this layer were the only load?
Check
A sound classifier computes spectra at 16000 samples a second with 10 Hz resolution, hopping by 1/4 of a frame.
(a)
How long is each frame?
(b)
At about 5N log₂ N operations per FFT, how many million operations a second do the spectra take?
Check
A sensor's noise is 0.5 mV RMS over a 2 V input range, and the ADC's quantization noise should be 4 times smaller.
(a)
How large can the quantization step be?
Write units the way you normally would: 1.5 mV, 1500 µV and 0.0015 V are the same answer.
(b)
How many bits does the ADC need?
Check
An int8 dense layer maps 1024 inputs to 1024 outputs at batch 256, on a chip with 400 TFLOP/s and 1 TB/s.
(a)
How long does its arithmetic take?
Write units the way you normally would: 1.5 µs, 1500 ns and 0.0015 ms are the same answer.
(b)
How long does the layer take, reading its weights once?
Check
A slowly drifting quantity changes by a random walk with variance 0.01 per step and is measured each step with noise variance 0.5.
(a)
What steady-state posterior variance does a Kalman filter reach?
(b)
What gain does it apply to each measurement?
Check
A two-feature Gaussian model of normal operation flags samples whose squared Mahalanobis distance exceeds a threshold, at 1 samples a second, raising an alarm after 3 flags in a row.
(a)
What threshold flags a fraction 0.01 of normal samples?
(b)
About how many false alarms per day result, with independent samples (a number of alarms)?
Check
A microcontroller runs fixed-point logistic regression on 16 features, at 1 cycles per multiply-add plus 200 cycles for the sigmoid, clocked at 80 MHz and drawing 3 mW.
(a)
How long does an inference take?
Write units the way you normally would: 1.5 µs, 1500 ns and 0.0015 ms are the same answer.
(b)
How much energy does it use?
Check
A server gives each of 64 users 20 tokens a second, drawing 10000 W.
(a)
What is its total throughput?
(b)
How much energy does each token take?
Write units the way you normally would: 1.5 J, 1500 mJ and 0.0015 kJ are the same answer.
Check
A logger records 8 channels at 100 samples a second, 24 bits each, onto a 512 GB card.
(a)
How much data does it collect per day?
(b)
How many days fill the card?
Check
Each device in a federated system uploads a model update of 10 million parameters at 8 bits each over a 2 Mb/s uplink.
(a)
How long does one upload take?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
Check
A binary detector's two classes produce antipodal features in Gaussian noise at an energy-to-noise ratio of 7 dB per decision.
(a)
What is its error rate?
(b)
And when it combines two independent observations of each decision coherently?
Check
A sensor array's 64 channels have covariance eigenvalues proportional to (k = 1, 2, …) with r = 0.5, and PCA keeps 16 components.
(a)
By what factor does it compress each sample?
(b)
What signal-to-reconstruction-error ratio does it achieve (treating the spectrum as infinitely long)?
Check
A learned power-management policy acts 100 times a second and should look about 1 s ahead.
(a)
What discount factor gives that horizon?
(b)
How many value-iteration sweeps shrink an error by a factor of 0.01?
Check
A microcontroller has 256 KB of RAM, 40 KB of which hold activations and buffers; the rest holds 4-bit weights.
(a)
How many parameters fit?
(b)
How wide a 64-input hidden layer, followed by a 10-output layer, fits (with biases)?
Check
An analog in-memory multiplier computes a dot product of 256 terms, each a weight of size 0.5 times a unit input; each weight's conductance varies randomly by a fraction 0.01.
(a)
What is the standard deviation of the result's error?
(b)
What signal-to-noise ratio does a full-scale result (all terms adding) have?
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