6.5.16 · D3Advanced & Emerging Architectures

Worked examples — Approximate computing techniques

2,935 words13 min readBack to topic

The scenario matrix

Every problem in this topic is one of these cells. The goal of this page is: one worked example per cell.

# Cell (case class) What makes it distinct Covered by
C1 Unbiased error, big aggregation errors mean-zero → relative error shrinks like Example 1
C2 Biased error, big aggregation errors all same sign → error grows like (the trap) Example 2
C3 Truncation of a positive product dropping LSBs → always under-estimate (one-sided sign) Example 3
C4 Rounding vs truncation same bits kept, but symmetric error → half the magnitude Example 4
C5 Precision-scaling energy ( law) quadratic multiplier cost, degenerate Example 5
C6 Voltage overscaling ( vs delay) power win vs timing-error onset; limiting Example 6
C7 Loop perforation, real image word problem: speedup vs PSNR bound Example 7
C8 Feedback / accumulation tiny per-step error, but amplified over iterations Example 8
C9 Exam twist: exponent vs mantissa approximating the WRONG field → catastrophe Example 9
C10 Zero / degenerate inputs , error , bits — do the limits behave? Example 10

Before we compute, we need one symbol nailed down, because it appears everywhere below.


Example 1 — C1: unbiased error over a big sum

Steps.

  1. Total error . Its variance is . Why this step? Independent zero-mean errors add in variance, not in magnitude — the classic rule from the parent note.
  2. Typical error size . Why? Standard deviation is ; that's the "typical" spread.
  3. Signal (the true sum) . Why? We need something to compare the error against — the sum itself.
  4. Relative error .
Recall Verify

If we quadruple to : error , signal , relative halved. Relative error falls like . ✅ Units: error and signal both in "reading units," ratio is dimensionless. ✅


Example 2 — C2: the biased trap

Steps.

  1. The bias accumulates linearly: . Why this step? Means add directly — there is no cancellation when they all share a sign.
  2. Compare to the zero-mean part, which (with ) is only . Why? To see which term dominates. The swamps the .
  3. Relative error 40× worse than Example 1, and it keeps growing with , not shrinking.
Recall Verify

Bias term (the random term with ). ✅ At : bias (grew with ), while random term only grew to — confirms bias , random . ✅


Example 3 — C3: truncating a positive product (one-sided sign)

Steps.

  1. Exact: . Why? Ground truth. , .
  2. In binary, (6 nonzero fractional bits). Keep 4 fractional bits: . Why? Truncation chops the tail — hardware simply omits those partial-product columns.
  3. Error . This is always : you removed positive weight, so the truncated result is never larger than the true one. Why this matters? Truncation is a biased approximation → it belongs to cell C2's danger family when summed many times.
  4. Relative error .
Recall Verify

Dropped bits are exactly. ✅ Error is positive. ✅


Example 4 — C4: rounding instead (symmetric error)

Steps.

  1. Tail being dropped is , which is more than half of one 4th-bit unit (; half is ). Why this step? Rounding looks at the tail: if half a unit, round up.
  2. Since , round up: . Why? Rounding pushes to the nearest representable value, not always down.
  3. Rounding error (now negative — the sign can go either way). Magnitude : 3× smaller than truncation.
Recall Verify

exactly. ✅ Sign is negative (rounded up past the true value). ✅


Example 5 — C5: precision-scaling energy, the law

Steps.

  1. Ratio . Why the ? An array multiplier tiles full-adder cells; each cell burns energy → total scales with area .
  2. So an INT8 multiply uses about less energy than the FP32 mantissa multiply. Why , not ? FP32 is 32 bits stored, but 1 sign + 8 exponent bits do not enter the mantissa multiplier — only the 24-bit significand is multiplied (see Precision and Number Formats (FP32, FP16, INT8)).
  3. Degenerate check. Set : ratio . That reproduces the parent note's "halving = 4×." Why? The law is scale-free — only the ratio of bit-widths matters.
Recall Verify

, and halving gives . Both checked below. ✅


Example 6 — C6: voltage overscaling, win vs the wall

Figure — Approximate computing techniques

Steps.

  1. Power ratio . Why and not ? Each switching node charges a capacitor to voltage , storing energy — the square is physics, not a choice.
  2. Savings . Why care? A 20% voltage drop buys a 36% power cut — the " jackpot."
  3. But the risk (the term): gate delay rises as . At V: delay factor . At : . At : slower. Some paths now miss the clock → timing errors. Why this matters? On the figure, the green power curve falls smoothly while the red delay curve shoots up near — that's the error cliff. VOS lives just left of the safe point but right of the cliff.
Recall Verify

Power save . Delay ratio . ✅


Example 7 — C7: loop perforation, real image (word problem)

Steps.

  1. Speedup: we skip half the rows → fewer iterations ⇒ ~2× faster. Why acceptable? Adjacent rows in natural images are highly correlated (redundancy → C1-style resilience).
  2. PSNR dB. Why this formula? It's the quality ruler from the top of the page — MAX over MSE.
  3. ✅ — perforation-by-2 just passes. Push to perforate-by-4 and MSE roughly quadruples, dropping PSNR by dB → fails. Why dB per ? ; quadrupling MSE subtracts dB.
Recall Verify

dB (to 2 dp). ✅ A MSE costs dB. ✅


Example 8 — C8: error accumulation in a feedback loop

Steps.

  1. Solve the recursion: with , (geometric series). Why this step? Feedback multiplies past errors by each round — the closed form exposes the growth.
  2. Plug in: . Since , . Why alarming? A per-step error became — amplified .
  3. Contrast with (no amplification): . Same per-step error, 28× smaller. Why? When the loop is unstable and errors compound; the /linear intuitions do NOT apply.
Recall Verify

, vs giving . Ratio . ✅


Example 9 — C9: exam twist — approximate the RIGHT field

Steps.

  1. Mantissa LSB flip. FP16 mantissa has 10 bits; the LSB is worth of the mantissa. New value . Relative error . Why small? The mantissa only sets fine detail — this is exactly the LSB we're allowed to approximate.
  2. Exponent flip (say by flipping a high exponent bit): value . That's too big — magnitude destroyed. Why catastrophic? The exponent controls scale; one wrong bit multiplies the whole number by a power of two.
  3. Rule. Approximate mantissa LSBs and pixel data; never exponents, pointers, loop bounds, or control flow. Protect those critical bits with Error-Correcting Codes. Why? A mantissa slip is a nuisance; an exponent slip is a (or worse) disaster — the two live on completely different scales, so the field you approximate matters more than how many bits you touch.
Recall Verify

Mantissa flip: , relative . ✅ Exponent flip : ratio . ✅


Example 10 — C10: zero & degenerate limits (sanity boundary)

Steps.

  1. (no aggregation). Relative error — the full single-op error, no rescue. With : . Why? Aggregation needs many terms; one term cancels nothing. The shrink only starts helping for .
  2. Error (exact op). Then → relative error for all . The exact machine is the limit of the approximate one — consistent, no discontinuity. Why check? An approximate model must reduce to the exact model when you dial the error to zero.
  3. bits (degenerate precision). Multiplier energy : zero bits ⇒ zero hardware ⇒ zero energy and zero information. The law limits cleanly to the trivial machine at . Why check? A good formula must not explode or contradict itself at its boundary.
Recall Verify

: . : relative . : . All finite/consistent. ✅


Recall One-line summary of the whole matrix

Unbiased+aggregated error shrinks (); biased error drifts (); truncation is biased, rounding is (nearly) unbiased and half the size; multiplier energy scales ; voltage saves but hits a delay wall near ; feedback with amplifies; never touch exponents/control.

Active-recall

Which technique makes error grow like instead of ?
A biased scheme like pure truncation (always rounds down); its mean error accumulates linearly.
Why is INT8 multiply ~9× cheaper than an FP32 mantissa multiply?
Array multiplier energy ; the FP32 significand is 24 bits, so .
What quality does PSNR dB correspond to?
Error small enough that the human eye essentially cannot detect it.
Why is a feedback loop with gain dangerous for approximation?
Per-step errors are multiplied by each round and compound exponentially, so small errors blow up.