Skip to content
nonconvexcard

Derive the optimal weight update

ProofAdvanced⏱ 1 hourQuantizationlagrangeobsclosed formkkt

Problem

Let H≻0H \succ 0 and fix coordinate qq of ww to quant⁡(wq)\operatorname{quant}(w_q).

  1. Derive the error-minimising δ\delta from the KKT conditions, stating where positive definiteness is used.
  2. Derive the incurred error Eq\mathcal E_q.
  3. Show that if HH is diagonal, the optimal update touches no other coordinate — so round-to-nearest is optimal exactly in that case.

Write a complete argument. Every inequality you use should be one you could state precisely.

Solution

Opening this before you have a real attempt on paper is the fastest way to feel like you understand something you cannot reproduce.

Related problems

All problems
SolvedProblemFieldTypeDifficultyTime
Complementary slackness and active constraintsAdvanced OptimizationProofIntermediate30 min
Derive the compute-optimal allocationLLMsProofIntermediate30 min
Kernel ridge regression in closed formClassical MLProofIntermediate30 min
Which weight to quantize nextQuantizationProofIntermediate30 min
Implement Hessian-aware rounding runQuantizationCodingAdvanced1 day