Trust, Reliance, and Automation Bias › Worked Example: Simulated Human-AI Trials with Divergent Cues
Language AI HandbookAll chapters The first simulation generates binary cases and the correctness of each suggestion. It changes a seeded cue and the follow rule, then measures the resulting choices. A comparison within the fixture can isolate a change in its code. Field logs can reflect changes in tasks, reviewers, and AI quality at the same time.
The trial generator uses the same random seed for selected comparisons so those policies can see identical labels, suggestions, and cue noise. The pressure comparison measures the joint effect of moving two policy parameters.
PythonIn [9]Expand
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
def make_trials(
n_trials,
ai_accuracy=0.72,
cue_strength=0.6,
cue_availability=0.5,
time_pressure=False,
seed=0,
n_tasks=2,
):
"""
Simulate n_trials of a binary human-AI decision task.
Params
------
ai_accuracy : probability the AI suggestion is correct (a = y).
cue_strength : how strongly the cue tracks AI correctness in latent space.
cue_availability : probability the cue is *shown* to the human.
time_pressure : if True, lowers checking budget (closer to default reliance).
seed : RNG seed.
"""
rng = np.random.default_rng(seed)
# Store a trial group, with the same AI accuracy parameter for all groups.
task = rng.integers(0, n_tasks, size=n_trials)
# Sample correctness independently of group in this illustrative selector.
ai_correct = rng.random(n_trials) < ai_accuracy
truth = rng.integers(0, 2, size=n_trials)
ai_a = np.where(ai_correct, truth, 1 - truth)
# Cue (e.g., confidence, explanation plausibility): latent truthfulness.
# We model the cue as a signal of correctness with strength proportional to cue_strength.
# Larger cue_strength -> the cue more reliably separates correct from incorrect suggestions.
cue_noise = rng.normal(0, 1 - 0.5 * cue_strength, size=n_trials)
cue = cue_strength * (ai_correct.astype(float) - 0.5) + cue_noise
# Availability: sometimes the cue is absent (e.g., no explanation shown).
visible = rng.random(n_trials) < cue_availability
# The synthetic rule can inspect a cue only when the display makes it available.
if time_pressure:
check_budget = (
0.25 # probability of inspecting when the cue is available
)
else:
check_budget = 0.85
inspected = visible & (rng.random(n_trials) < check_budget)
# Follow-AI rule: human follows AI when inspected and cue exceeds a threshold,
# OR when not inspected and the time-pressure heuristic defaults to follow.
threshold = 0.15
default_follow_when_uninspected = 0.9 if time_pressure else 0.55
follow = np.where(
inspected,
cue > threshold,
rng.random(n_trials) < default_follow_when_uninspected,
)
follow = follow.astype(bool)
# Final human decision d: follow the AI suggestion, else override it (assume override is always opposite of a).
# This is a simplification; real override decisions can also be correct/incorrect independently.
# For binary label tasks where the truth is the opposite sign, an override (d != a) can be correct if a was wrong.
d = np.where(follow, ai_a, 1 - ai_a)
# Ground-truth y matches ai_a when ai_correct is True; when ai_a is wrong, y is the opposite.
y = np.where(ai_correct, ai_a, 1 - ai_a)
df = pd.DataFrame(
{
"task": task,
"ai_a": ai_a,
"ai_correct": ai_correct,
"cue": cue,
"cue_visible": visible,
"inspected": inspected,
"follow": follow,
"human_d": d,
"y": y,
"team_correct": d == y,
}
)
return dfThe core assumptions in this generator are worth making explicit. The AI's suggestion equals the ground truth exactly when ai_correct is True; otherwise the suggestion is the opposite label. The human's follow decision depends on whether they inspected the case and on the cue. Time pressure lowers the fraction inspected and raises the default follow rate when the human does not inspect. Real decisions are noisier than this, but the structure captures the mechanisms we want to examine.
Inverting a suggestion guarantees the correct answer on a wrong-advice trial only because this task is binary and has one correct label. An alternative on a task with more than two choices can be wrong too. The accuracy numbers belong to this constructed selector. They do not bound the accuracy a real reviewer could achieve with different evidence or a different selection policy.
Let's generate a baseline set of trials and inspect the disagreement cells.
PythonIn [10]Expand
base = make_trials(
4000,
ai_accuracy=0.72,
cue_strength=0.6,
cue_availability=0.6,
time_pressure=False,
seed=1,
)
def reliance_table(df):
"""Confusion table of human follow vs AI correctness with task-level denominators."""
ct = pd.crosstab(
df["ai_correct"],
df["follow"],
rownames=["AI correct"],
colnames=["human follows"],
)
ct = ct.reindex(index=[True, False], columns=[True, False], fill_value=0)
totals = ct.sum().sum()
return ct.assign(pct_of_trials=(ct.sum(axis=1) / totals))
rt = reliance_table(base)| human follows | True | False | pct_of_trials |
|---|---|---|---|
| AI correct | |||
| True | 1582 | 1275 | 0.71425 |
| False | 465 | 678 | 0.28575 |
The table cross-tabulates matching and overriding by advice correctness. Its four interior cells are counts. The last column expresses each row total as a share of all trials. In this binary selector the accuracy gain over the AI equals the share of correct overrides minus the share of false overrides. A positive gap therefore needs enough corrected AI errors to offset the correct answers changed in error.
Before computing the summary rates, it helps to see the four cells directly. The heatmap below shows how the baseline trials distribute across the reliance confusion table, with color intensity marking the share of all simulated trials.
PythonIn [12]Expand
import numpy as np
# Confusion matrix over the base trials: rows = AI correctness, columns = follow.
# Cell values are fractions of all trials (task-level denominator).
conf = np.zeros((2, 2))
conf[0, 0] = ((base["ai_correct"]) & (base["follow"])).sum()
conf[0, 1] = ((base["ai_correct"]) & (~base["follow"])).sum()
conf[1, 0] = ((~base["ai_correct"]) & (base["follow"])).sum()
conf[1, 1] = ((~base["ai_correct"]) & (~base["follow"])).sum()
conf_frac = conf / conf.sum()
row_labels = ["AI correct", "AI incorrect"]
col_labels = ["Follows", "Overrides"]
cell_labels = [
["correct agreement", "false override"],
["false acceptance", "correct override"],
]VisualizationOut [13]Expand

The heatmap makes the asymmetry explicit: the false-acceptance cell and the false-override cell are separate quantities, and neither is recoverable from the agreement rate alone.
PythonIn [14]Expand
def behavioral_rates(df):
"""Behavioral metrics with task-level denominators."""
n = len(df)
ai_correct = df["ai_correct"]
follow = df["follow"]
return pd.Series(
{
"ai_accuracy": ai_correct.mean(),
"team_accuracy": df["team_correct"].mean(),
"follow_rate": follow.mean(),
"follow_given_correct": follow[ai_correct].mean(),
"follow_given_incorrect": follow[~ai_correct].mean(),
"false_acceptance": (follow & ~ai_correct).sum() / n,
"false_override": (~follow & ai_correct).sum() / n,
"discrimination": follow[ai_correct].mean()
- follow[~ai_correct].mean(),
}
)
base_rates = behavioral_rates(base)| base | |
|---|---|
| ai_accuracy | 0.714250 |
| team_accuracy | 0.565000 |
| follow_rate | 0.511750 |
| follow_given_correct | 0.553728 |
| follow_given_incorrect | 0.406824 |
| false_acceptance | 0.116250 |
| false_override | 0.318750 |
| discrimination | 0.146904 |
The discrimination value here is positive when the simulated rule follows correct suggestions more frequently than incorrect ones. The team-minus-AI accuracy difference answers a separate question. In the baseline the loss from false overrides (correct advice that was overridden) exceeds the gain from correct overrides, so team accuracy is below AI-alone accuracy.
The baseline loses 1,275 correct AI recommendations through false overrides and corrects 678 wrong ones. Across 4,000 trials that is a net loss of 597 correct answers. Dividing by 4,000 gives 14.925 percentage points below AI-alone accuracy in this fixture.
The chart shows two class-conditional follow rates and two all-trial error shares. The denominators differ between those pairs.
PythonIn [16]Expand
import numpy as np
baseline_metric_names = [
"follow_given_correct",
"follow_given_incorrect",
"false_acceptance",
"false_override",
]
baseline_metric_values = np.array(
[base_rates[name] for name in baseline_metric_names]
)
baseline_display_labels = [
"Follow | correct",
"Follow | incorrect",
"False acceptance",
"False override",
]VisualizationOut [17]Expand

The simulated pressure condition changes both inspection probability and the default follow rate. Use the same seed so the comparisons share the cases and all latent draws. Any difference under this simulation is attributable to the two policy changes together.
PythonIn [18]Expand
pressure = make_trials(
4000,
ai_accuracy=0.72,
cue_strength=0.6,
cue_availability=0.6,
time_pressure=True,
seed=1,
)
pressure_rates = behavioral_rates(pressure)
comparison = pd.DataFrame(
{
"no time pressure": base_rates,
"time pressure": pressure_rates,
}
)| no time pressure | time pressure | |
|---|---|---|
| ai_accuracy | 0.714250 | 0.714250 |
| team_accuracy | 0.565000 | 0.658250 |
| follow_rate | 0.511750 | 0.833500 |
| follow_given_correct | 0.553728 | 0.844242 |
| follow_given_incorrect | 0.406824 | 0.806649 |
| false_acceptance | 0.116250 | 0.230500 |
| false_override | 0.318750 | 0.111250 |
| discrimination | 0.146904 | 0.037593 |
The pressure setting raises the follow rate and the false-acceptance share while reducing separation between follows on correct and incorrect advice. Team accuracy rises in this comparison because false overrides fall by more than false acceptances rise. Both settings can still trail the AI-alone reference.
The comparison is easiest to absorb as a grouped chart across the rates that distinguish the two conditions. The next figure plots the low-pressure and high-pressure rates together.
PythonIn [20]Expand
import numpy as np
compare_metric_names = [
"follow_rate",
"false_acceptance",
"false_override",
"discrimination",
]
compare_labels = {
"follow_rate": "Follow rate",
"false_acceptance": "False acceptance",
"false_override": "False override",
"discrimination": "Discrimination",
}
compare_values = {
"no time pressure": np.array([base_rates[n] for n in compare_metric_names]),
"time pressure": np.array(
[pressure_rates[n] for n in compare_metric_names]
),
}
bar_positions = np.arange(len(compare_metric_names))
bar_width = 0.38
tick_positions = bar_positions
tick_labels = [compare_labels[n] for n in compare_metric_names]VisualizationOut [21]Expand

At this operating point following more often raises measured accuracy, but it also admits a larger share of wrong advice. The effects matter separately when the failure types have different costs. No comparative human-alone accuracy was measured by this selector.
Compare the team with AI alone on the same synthetic cases. For a claim about complementarity against the human alone as well, we would need independently recorded human answers. Our rule uses the suggestion even to construct the override, so it cannot supply that baseline.
PythonIn [22]Expand
rows = []
for cue in [0.0, 0.3, 0.6, 0.9]:
for tp in [False, True]:
for seed in range(8):
df = make_trials(
n_trials=4000,
ai_accuracy=0.72,
cue_strength=cue,
cue_availability=0.7,
time_pressure=tp,
seed=seed,
)
rates = behavioral_rates(df)
rows.append(
{
"cue_strength": cue,
"time_pressure": tp,
"ai_accuracy": rates["ai_accuracy"],
"team_accuracy": rates["team_accuracy"],
"follow_rate": rates["follow_rate"],
"false_acceptance": rates["false_acceptance"],
"false_override": rates["false_override"],
"discrimination": rates["discrimination"],
}
)
sweep = pd.DataFrame(rows)
sweep_agg = (
sweep.groupby(["cue_strength", "time_pressure"])
.mean(numeric_only=True)
.reset_index()
)| cue_strength | time_pressure | ai_accuracy | team_accuracy | follow_rate | false_acceptance | false_override | discrimination | |
|---|---|---|---|---|---|---|---|---|
| 0 | 0.0 | False | 0.720437 | 0.494906 | 0.483469 | 0.134063 | 0.371031 | 0.005386 |
| 1 | 0.0 | True | 0.720437 | 0.642156 | 0.820969 | 0.229188 | 0.128656 | 0.001588 |
| 2 | 0.3 | False | 0.720437 | 0.533438 | 0.496875 | 0.121500 | 0.345062 | 0.086389 |
| 3 | 0.3 | True | 0.720437 | 0.652531 | 0.824031 | 0.225531 | 0.121938 | 0.023994 |
| 4 | 0.6 | False | 0.720437 | 0.585562 | 0.516437 | 0.105219 | 0.309219 | 0.194409 |
| 5 | 0.6 | True | 0.720437 | 0.667594 | 0.829281 | 0.220625 | 0.111781 | 0.055655 |
| 6 | 0.9 | False | 0.720437 | 0.659500 | 0.548500 | 0.084281 | 0.256219 | 0.342760 |
| 7 | 0.9 | True | 0.720437 | 0.689094 | 0.839094 | 0.214781 | 0.096125 | 0.098253 |
The sweep compares four cue strengths in two pressure settings and averages the simulated rates over the seeds.
- Discrimination increases with cue strength in this sweep. On inspected trials, the rule uses a score whose means for correct and incorrect advice move farther apart.
- In this grid, the pressure setting reduces separation at positive cue strengths. Its lower inspection probability makes the rule act on the cue less often.
- Read the accuracy gap separately. The high-default setting can sit closer to the AI-alone baseline even though it inspects less. The effect depends on the correct- and incorrect-advice base rates and both conditional follow probabilities.
Increasing cue strength has no effect on the uninspected branch in this policy. That branch uses a fixed default adoption probability that can differ by simulated condition. This does not establish how a person responds to a presentation cue they did not inspect.
Each setting combines an inspected branch that uses the cue with an uninspected branch that uses a fixed default-follow probability. A larger default-follow probability moves decisions on the latter branch toward AI-alone decisions. The relative size of that branch also matters.
The next figure compares team accuracy at each cue strength with the shared AI-alone baseline. A line near the baseline can still represent a different mix of correct and incorrect decisions.
VisualizationOut [24]Expand

The lines report the accuracy realized by the two simulated rules. Their distances to AI-alone accuracy report the difference on this task, not a guarantee of the effect of human oversight in another workflow.
The comparison against the AI is meaningful for the same cases and reference labels. Equal accuracy can hide different errors, so inspect decisions changed from correct to incorrect and vice versa as well.
An anti-diagnostic cue gives higher scores to wrong suggestions on average. The next block is an intentionally extreme example. A later comparison adds an explicit authority bonus to the follow rule and treats that as a distinct mechanism.
PythonIn [25]Expand
def make_misleading_cue(n_trials, ai_accuracy=0.72, cue_strength=-0.6, seed=3):
"""Cue is anti-correlated with correctness: plausible-sounding explanations
for wrong answers more than for right ones."""
rng = np.random.default_rng(seed)
ai_correct = rng.random(n_trials) < ai_accuracy
cue = cue_strength * (ai_correct.astype(float) - 0.5) + rng.normal(
0, 1, n_trials
)
follow = cue > 0.15
truth = rng.integers(0, 2, size=n_trials)
ai_a = np.where(ai_correct, truth, 1 - truth)
d = np.where(follow, ai_a, 1 - ai_a)
y = np.where(ai_correct, ai_a, 1 - ai_a)
return pd.DataFrame(
{
"ai_a": ai_a,
"ai_correct": ai_correct,
"cue": cue,
"follow": follow,
"human_d": d,
"y": y,
"team_correct": d == y,
}
)
misleading = make_misleading_cue(4000)
misleading_rates = behavioral_rates(misleading)| misleading cue | |
|---|---|
| ai_accuracy | 0.716250 |
| team_accuracy | 0.355750 |
| follow_rate | 0.393500 |
| follow_given_correct | 0.324956 |
| follow_given_incorrect | 0.566520 |
| false_acceptance | 0.160750 |
| false_override | 0.483500 |
| discrimination | -0.241563 |
For this simulated rule, a negative separation means it follows wrong suggestions more often than correct suggestions conditional on the advice categories. The resulting accuracy can fall below the AI baseline. That is a pattern to investigate, rather than a property to expect from all explanations.
The next plot places three synthetic policies on the same pair of axes. They use separate sampled cases and different rule parameters. Their relative positions describe the runs and should not be interpreted as isolating authority.
PythonIn [27]Expand
import numpy as np
def make_perceived_authority_cue(
n_trials, ai_accuracy=0.72, cue_authority_bonus=0.25, seed=4
):
"""Cue is weakly informative, but its mere presence raises follow rate
(perceived-authority effect), independent of correctness."""
rng = np.random.default_rng(seed)
ai_correct = rng.random(n_trials) < ai_accuracy
cue = 0.1 * (ai_correct.astype(float) - 0.5) + rng.normal(0, 1, n_trials)
shown = rng.random(n_trials) < 0.7
base_follow = cue > 0.2
# The underlying score is available in both cases. "shown" denotes the extra badge.
authority_follow = base_follow | (
(rng.random(n_trials) < cue_authority_bonus) & shown
)
follow = authority_follow
truth = rng.integers(0, 2, size=n_trials)
ai_a = np.where(ai_correct, truth, 1 - truth)
d = np.where(follow, ai_a, 1 - ai_a)
y = np.where(ai_correct, ai_a, 1 - ai_a)
return pd.DataFrame(
{
"ai_correct": ai_correct,
"cue": cue,
"shown": shown,
"follow": follow,
"human_d": d,
"y": y,
"team_correct": d == y,
}
)
authority = make_perceived_authority_cue(4000)
authority_rates = behavioral_rates(authority)
no_bonus = make_perceived_authority_cue(4000, cue_authority_bonus=0)
assert (authority.follow | ~no_bonus.follow).all()
cue_regime_names = ["Diagnostic cue", "Misleading cue", "Authority cue"]
cue_regime_team = np.array(
[
float(base_rates["team_accuracy"]),
float(misleading_rates["team_accuracy"]),
float(authority_rates["team_accuracy"]),
]
)
cue_regime_false_accept = np.array(
[
float(base_rates["false_acceptance"]),
float(misleading_rates["false_acceptance"]),
float(authority_rates["false_acceptance"]),
]
)
ai_reference_accuracy = float(base_rates["ai_accuracy"])VisualizationOut [28]Expand

In this synthetic case, wrong advice tends to have a higher cue score, and the selector favors high scores. About 32.5% of correct suggestions and 56.7% of incorrect ones are matched, a difference of about −24.2 percentage points. The selector's 35.6% accuracy trails the AI-alone 71.6% in that run. This is a property of the constructed cue and selector.
To isolate the model’s badge bonus, compare the same sample with and without it. On a shown trial whose score would otherwise lead to override, the bonus creates an extra chance of adoption. If the score already favors adoption the bonus changes nothing. Turning that bonus off for the same seed checks this mechanism.
PythonIn [29]Expand
authority = make_perceived_authority_cue(4000)
authority_rates = behavioral_rates(authority)
no_bonus = make_perceived_authority_cue(4000, cue_authority_bonus=0)
assert (authority.follow | ~no_bonus.follow).all()| authority cue | |
|---|---|
| ai_accuracy | 0.710750 |
| team_accuracy | 0.531500 |
| follow_rate | 0.549250 |
| follow_given_correct | 0.556806 |
| follow_given_incorrect | 0.530683 |
| false_acceptance | 0.153500 |
| false_override | 0.315000 |
| discrimination | 0.026123 |
Holding the seed fixed and changing the authority bonus gives a paired comparison. The OR rule adds adoption opportunities and cannot remove them. Some added adoptions change a previous correct override to a wrong answer. Other added adoptions turn false overrides into correct decisions. Either effect can dominate the total.
The authority bonus is applied as an OR with the original decision. On the same random draws, it increases the observed follow rate in a group only if it converts at least one override to adoption in that group. The before-and-after accuracy gap weights the two changes by the proportions of correct and incorrect advice.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!