What is the difference between unstructured magnitude pruning and structured pruning, and why does 80% unstructured sparsity often give little wall-clock speedup on standard GPUs?
ML systems and evaluation, Model compression
Level L2 Elementary. Length Short. Nature Th+Mat Both.
What's being asked
Whether you distinguish reducing the count of non-zero weights from actually shrinking the dense matrix dimensions that standard hardware executes.
Key idea
Unstructured pruning sets individual small weights anywhere in a matrix to zero without changing its shape, whereas structured pruning removes whole neurons, channels or attention heads so the remaining matrices are physically smaller. Standard GPUs (graphics processing units) are built to multiply regular dense blocks of numbers, so irregular zero entries still get processed or add lookup overhead unless specialised hardware support is used.
Steps
- Define unstructured magnitude pruning: set individual weights whose magnitude (for a chosen threshold ) to zero; the count of non-zero parameters drops, while the matrix shape stays unchanged.
- Define structured pruning: remove entire units such as neurons, convolutional filters or attention heads (for example, by total weight magnitude), shrinking a matrix into a genuinely smaller dense matrix ().
- Explain the GPU speedup gap: standard GPUs run fastest on regular, contiguous blocks of weights, so scattered zeros either stay in dense arrays and still get multiplied, or need extra position lists whose irregular memory lookups slow computation unless sparsity is extreme or follows a regular hardware-supported pattern (such as keeping 2 non-zeros in every 4 weights).
Common mistakes
- Assuming that zeroing out 80% of weights automatically translates into a speedup on a standard GPU.
- Assuming 80% unstructured sparsity always saves 80% of memory; sparse storage must also record the positions of the non-zero weights, which reduces the memory saving.
How long your answer should be
4–5 sentences (under 2 minutes).
Read this
Previous in ML systems and evaluation: An online A/B test configured for a 50/50 split logs 50,800 users in control and 49,200 in treatment out of 100,000 total. What does a goodness-of-fit test at (critical value ) show about sample ratio mismatch (SRM), and why must metric analysis stop if SRM fails?
Next in ML systems and evaluation: A three-class classifier produces confusion matrix rows (true classes A, B, C; predicted columns A, B, C) of , and . What are macro-F1 and micro-F1, why does micro-F1 equal overall accuracy here, and when is macro-F1 preferred?