7 routes42 sections324 units

Unit 4.4 · about 4 h

314 / 324

Uncertainty, robustness and honest claims

A single mean hides where a model fails and how fragile the number is. Slices plus uncertainty plus sensitivity turn a leaderboard entry into a claim you can defend.

  • implement
  • measure

You can now

  • Build slices, paired comparisons and bootstrap intervals for a small evaluation, and read overlapping intervals correctly.
  • Measure prompt, order and sampling sensitivity under fixed compute budgets and report the range, not just the best run.
  • Separate capability results from safety results with distinct gates and stop conditions.

Covers

  • Slices, paired comparisons and bootstrap uncertainty
  • Prompt sensitivity, robustness and sampling-compute budgets
  • Capability versus safety evaluation boundaries

Study, in this order

4 steps

  1. Modern LLM Notebook 25-evaluation: aggregation and composite scores
    Modern LLM Notebook - evaluation and FLOP accounting

    Section 5 comparison table with analysis points (same-scale compare, business-relevant metrics, trends over single numbers, labeled source and config) and Section 5.2 (arithmetic, normalized, weighted, geometric and rank-sum methods with geometric penalizing weak spots)

  2. Modern LLM Notebook 25-evaluation: robustness and pitfalls
    Modern LLM Notebook - evaluation and FLOP accounting

    Section 8.2 (CR@K, prompt, order and sampling robustness) and Sections 10.1 to 10.3 (prompt sensitivity 5 to 15 percent with OLMES prompts, few-shot counts, HumanEval 164 variance, seed, temperature, mean plus minus std, per-subject slices, length bias, best-score reporting)

  3. lm-eval-harness: bootstrap uncertainty in `metrics.py`
    Language Model Evaluation Harness

    bootstrap_stderr with resampling and iters, stderr_for_metric with the bootstrappable list (median, matthews, f1, perplexity, bleu, chrf, ter, nanmean) and closed-form mean and acc_all, plus pooled_sample_stderr for groups

  4. CS336 Lecture 12: safety benchmarks and realism
    Stanford CS336 - resource accounting, inference and evaluation

    Function safety_benchmarks() with HarmBench 510 behaviors, AIR-Bench 314 categories and 5694 prompts, GCG transfer, contextual safety and dual-use CyBench; plus realism() with GDPVal, MedHELM 121 tasks from 29 clinicians, and Clio

Focus on

  • Slice first, then aggregate. Report per-slice means before any composite, and say which slice drives the headline.
  • Compare paired deltas on the same prompts, not two independent means. Pairing cancels prompt difficulty, which two independent intervals would both include.
  • Bootstrap resamples with replacement and reports the std of the stat. Use the closed-form SE for plain means and bootstrap for medians, F1, perplexity and similar.
  • Fix the sampling and prompt budget before comparing. Temperature, seed, few-shot and prompt version are part of the result.

Reproduce closed-book

From the Exercise 3 scores, compute arithmetic means (A 74.0, B 73.8) and geometric means (A 73.7, B 73.7), then state which model is more balanced and why the headline mean misleads.

Traps

  • Reading overlapping intervals as proof of no difference without a paired test. Pair the prompts first, then test the \(\delta\).
  • Reporting the best prompt or seed. Prompt swings of 5 to 15 percent dwarf small model gaps.
  • Claiming safety from a capability average. A model at 90 math and 10 safety averages 50 and is still unsafe, so gate safety separately.

Practice

The section mini-project covers this: 20-example two-slice evaluator with raw outputs, paired deltas and bootstrap intervals, plus one deliberate prompt or sampling failure.

Self-test

  1. Exercise 3 scores Model A at 82, 71, 65, 78 and Model B at 78, 75, 70, 72. What do the two means say?

  2. When should you use bootstrap_stderr instead of a closed-form SE?

  3. Why compare paired deltas rather than two independent means?

  4. How should capability and safety results be gated?

Completion criterion

Stop when

Your two-slice report shows per-slice means, a paired \(\delta\) with an interval, and a sensitivity range for one prompt or sampling change.

Mark passed, then open 4.5 Only mark this when you can do it without notes.

Leads to

Comes after

Resources for this unit

  • Stanford CS336 - resource accounting, inference and evaluation
    Stanford Universityprimarycourse
    Use Spring 2026 Lectures 2, 10 and 12 for FLOPs, memory, arithmetic intensity, inference and evaluation. Reproduce the small calculations locally. Assignment 3 IsoFLOPs analysis is optional; do not require its hosted training API or costly experiments.
  • Modern LLM Notebook - evaluation and FLOP accounting
    Walking Labsrequiredimplementation
    Use English notebook 25-evaluation and Appendix B FLOP and memory accounting. Build a 20-example evaluator with two slices, raw outputs and bootstrap intervals, and deliberately create one parser, prompt or judge failure.
  • Language Model Evaluation Harness
    EleutherAIoptionalreference
    After the small evaluator passes, inspect task versioning, request construction and result schemas to understand production evaluation plumbing. Do not use the harness as a substitute for owning the task and metric contract.

Also in this section

  • LLMs from Scratch companion - GPT FLOP analysis
    Sebastian Raschkarequiredimplementation
    Use ch04/02_performance-analysis/flops-analysis.ipynb as a concrete calculator, then rebuild the formulas from the model configuration and reconcile parameters and at least one memory or operation estimate with runtime state.
  • LLM Foundations Checkpoint - evaluation and arithmetic slice
    Roadmap-Finalsupportassessment
    Use the contamination, evaluator-bias, parameter, FLOP, activation, state and KV requirements as the assessment contract. Keep raw outputs and distinguish a verified task result from a broad model capability claim.
  • Stanford CS336 Assignment 3 - IsoFLOPs scaling
    Stanford Universityoptionalpractice
    Use Section 2.1 and Problem chinchilla_isoflops with data/isoflops_curves.json for the bounded curve-fitting exercise only. Do not use the hosted training API or costly experiments.

Quick find

Search Michi

Type to search every route, section, unit, topic and resource.

Enter opens the first result Esc closes

Reference

Keyboard shortcuts

n
Continue to the first unit not passed
j / k
Next / previous unit
1 2 3
Toggle learned, practised, passed
/
Open search
?
Show this help
Esc
Close open panels