6.4.15 · D1AI Safety & Alignment

Foundations — Responsible AI deployment practices

2,679 words12 min readBack to topic

The parent note (Responsible AI deployment practices) throws a lot of symbols at you very fast: , , , , , , , , . If any of those look like magic squiggles, this page is your ground floor. We build each one from nothing, anchor it to a picture, and only then let the parent use it.

We go in order — each idea leans on the one before it.


0. What is a "model" and a "prediction"?

Before any symbol, the object everything else talks about.

The picture: a box with an arrow going in (the input) and an arrow coming out (the prediction). Everything in this chapter is either (a) checking that arrow-out is safe, or (b) noticing when it stops being safe.


1. Probability — "how often does this happen?"

The picture: imagine a bag of 1000 marbles where exactly 1 is red. Reach in blindly — the chance of red is . That is exactly the "0.1% failure rate" the parent talks about.

Turning a percent into a : divide by 100. So , , .


2. Repeating a trial times, and the product

Now the key move: the parent asks "if a failure happens with probability , how many tries before we've probably seen at least one?"

The picture: the marble bag again. Red = failure with . Not-red = . A slice of a pie: a thin red sliver () and a huge grey rest ().

Figure — Responsible AI deployment practices

Why multiply? Look at the figure. Each try is a coin that lands "safe" with probability . Two safe tries in a row: . Three: . The little superscript is just shorthand for "multiply it by itself times." As grows, this product shrinks toward — meaning eventually you're almost sure to have caught the failure at least once. That shrinking curve is the whole reason staged rollouts work.


3. The logarithm — "how many times did we multiply?"

We have and we want to solve for . But is stuck up in the exponent. The tool that pulls an exponent down to earth is the logarithm.

The picture: think of as a ruler that measures "number of doublings/multiplications." Feeding a big number in gives a modest number out; that output is the hidden exponent.

Closing the loop: the derivation, one line at a time


4. Confidence and the risk

The picture: a 20-slot spinner with 1 red slot. Landing red () = we got unlucky and missed the bug. 19 grey slots = we caught it. Smaller = fewer red slots = need more samples .

Now the parent's formula reads in plain English:

"To be confident of catching a failure that happens with probability , watch at least this many samples." (See 5.2.4-A-B-testing for the same sample-size logic applied to experiments.)


5. Distributions — "the full shape of what's coming in"

Runtime monitoring compares training data to live data. To do that we need a single object describing "what inputs look like."

The picture: a histogram — a row of bars, one per outcome, heights summing to . is the histogram the model learned on; is the histogram of what's actually arriving in production. If those two shapes drift apart, the model is seeing a world it wasn't taught.

Figure — Responsible AI deployment practices

6. The symbol — "add up over all the boxes"

The picture: point at bar 1, compute something, write it down; point at bar 2, compute, write down; … then total everything. is a "for each bar, and add" instruction — nothing scarier.

Example: simply says "add up all bar heights and you get ," which is the defining rule of a distribution.


7. KL divergence — "how surprised is the model?"

Now we can read the parent's drift formula (remember: here means , per our page convention).

Reading it piece by piece, using symbols we now own:

  • — for each outcome, the ratio of how often training expected it vs. how often it actually shows up. Ratio ⇒ no surprise.
  • — the natural log turns "twice as common" and "half as common" into equal-sized opposite surprises, and makes ratio give exactly .
  • Multiply by — weight each surprise by how important that outcome was to training.
  • — add up the weighted surprises over every outcome.

8. Entropy — "how unsure is one prediction?"

Same log machinery, one prediction at a time (again, ).

Figure — Responsible AI deployment practices

The picture (see figure): two bar charts. A confident prediction is one tall spike — low entropy. An unsure prediction is flat bars of equal height — high entropy. Watch the average across many predictions climb, and you're watching the model lose its footing (the parent's "entropy 0.3 → 0.55" alarm).


How the foundations feed the topic

The figure below is the same map drawn on the board — read it if the code block won't render for you.

Figure — Responsible AI deployment practices

Probability p

Complement 1 minus p

Power 1 minus p to the n

Number of tries n

Logarithm ln

Sample size formula

Risk alpha and confidence

Staged rollout

Distribution P

Summation sigma

KL divergence

Entropy H

Runtime monitoring

Responsible deployment

Every arrow is a "you need this before that." The two rivers — the sample-size river (left) and the monitoring river (right) — join at responsible deployment. Related downstream topics: 6.4.1-Adversarial-examples (attacks that spike entropy), 6.4.8-Fairness-metrics (per-group monitoring), 6.4.12-Explainability-methods, and 6.4.14-AI-governanceframeworks.


Equipment checklist

Cover the right side and answer aloud. If any stumps you, reread its section.

What does mean and how do you get it from a percent?
A probability in ; divide the percent by 100 (so ).
What is ?
The probability the event does not happen (its complement).
Why is the chance of zero failures in tries?
Each try independently avoids failure with prob ; multiplying of them gives all-safe.
Which tool frees a variable stuck in an exponent, and why?
The logarithm, because slides the exponent down to a plain multiplier.
What domain must and satisfy for the sample-size formula to be valid?
and , so both logs are defined and negative.
Why does the inequality flip to in the sample-size formula?
Because is negative, and dividing an inequality by a negative flips its direction.
What do and represent?
= accepted chance of missing the bug; = confidence of catching it.
What is a distribution and what shape pictures it?
A probability for every outcome (summing to 1); a histogram.
What does instruct you to do?
For each outcome , compute the expression and add them all together.
On this page, what base are all the symbols?
Natural log (, base ) — same as throughout.
What does measure and when is it zero?
How different two distributions are; zero when they are identical.
What support condition does require, and what happens if it fails?
wherever ; otherwise it divides by zero and becomes infinite.
What does entropy measure, and what does a low value mean?
The uncertainty of one prediction; low = one confident spike.
Why the leading minus sign in ?
Because is negative for ; the minus makes uncertainty positive.