Model Compression interview question

Deep LearningModel Compressionmedium

A retailer wants to cut the mobile-app download size of a product-image classifier (dense top-1 76.1%) by pruning it and shipping the weights in a compressed sparse format, and accepts at most a 1-point accuracy drop. The chart compares one-shot magnitude pruning (prune once, then fine-tune) with iterative magnitude pruning (remove 20% of the remaining weights per round and retrain after each round) at different sparsity levels. Which conclusion is correct?

4050607080020406080Sparsity (% of weights pruned)Top-1 accuracy (%)max 1-point dropOne-shot + fine-tuneIterative (20% per round + retrain)
  1. AUp to about 60% sparsity the methods are nearly equal, so one-shot suffices there; at 80% iterative pruning stays within one point after 4 rounds, since four 20% rounds remove 80% of the weights.
  2. BNeither method stays within one point at 80% sparsity, so that compression level is out of reach with pruning alone, and the team should move straight to INT8 quantization instead.
  3. CUp to about 40% sparsity the methods are nearly equal, so one-shot suffices there; at 80% only iterative pruning stays within one point, at the cost of 7–8 prune-and-retrain rounds.
  4. DIterative pruning is clearly better at every sparsity level, including 20–40%, and its extra rounds cost almost nothing because each round fine-tunes for only a single step.
Show the answer and explanation

Correct answer: C, Up to about 40% sparsity the methods are nearly equal, so one-shot suffices there; at 80% only iterative pruning stays within one point, at the cost of 7–8 prune-and-retrain rounds.

Explanation Model Compression

Magnitude pruning removes the weights with the smallest absolute values. Done one-shot, a large fraction disappears at once and fine-tuning must repair a heavily damaged network. Done iteratively, each round removes a little (here 20% of what remains) and retraining lets the remaining weights compensate before the next cut. Lottery-ticket-style variants rewind the weights or the learning-rate schedule to an early point before each retraining, which often works better than plain fine-tuning.

Reading the chart against the 75.1% floor:

SparsityOne-shotIterative
40%75.8 ✓76.0 ✓
60%74.2 ✗75.9 ✓
80%67.5 ✗75.3 ✓
90%55.0 ✗72.8 ✗

The curves agree up to about 40%, where cheap one-shot pruning is enough. They diverge at high sparsity, and only iterative pruning meets the floor at 80%. The price is compute: with 20% per round, the remaining fraction is 0.8ⁿ, so 0.8⁷ ≈ 0.21 (79% sparse) and 0.8⁸ ≈ 0.17 (83%), i.e. about 7–8 full retraining rounds.

Why the distractors fail: at 60% one-shot is already down to 74.2%, below the floor, so the methods are not equal there; and because each round removes 20% of the remaining weights, four rounds reach only 1 − 0.8⁴ ≈ 59% sparsity, not 80%. Iterative pruning at 80% is 0.8 points below dense, inside the limit. At 20–40% the gap is at most 0.2 points, and every round needs real retraining, not one step.

Interview tip: remember that unstructured sparsity shrinks the compressed download, but only speeds up inference with sparse kernels or hardware-friendly patterns such as 2:4.

Practice it as a quiz

Answer this and the other free questions with instant grading, streaks and weak-topic tracking, or unlock all 4,000 questions.

More Deep Learning questions

  1. A retailer's Stable Diffusion 1.5 pipeline uses classifier-free guidance, ε̂ = ε_uncond + w·(ε_cond − ε_uncond), with w = 7.5. For one latent element at one…
  2. An LLM interpretability team trains a sparse autoencoder (SAE) on residual-stream activations of size 4,096, with a 65,536-unit ReLU code layer and an L1…
  3. As an ablation, you delete every self-attention sublayer from a trained BERT-style encoder but keep the token and position embeddings, the feed-forward (FFN)…
  4. A grocery chain trains a CNN to grade bananas on a conveyor belt as unripe, ripe or overripe from camera images. Which augmentation is most likely to hurt the…
  5. In a deep MLP with sigmoid activations, the error signal reaching the first layer's weights has passed through ten sigmoid derivatives. Ignoring the weight…