From-Calibrated-Confidence-to-Calibrated-Reliance README

The project's README from github.com/OliverDOU776/From-Calibrated-Confidence-to-Calibrated-Reliance. As one markdown file: README.md.

Calibrated reliance teaser: from model confidence to better human-AI team decisions

From Calibrated Confidence to Calibrated Reliance

Human-Aware Confidence Communication for AI-Assisted Decision Making

tests Python 3.10+ MIT License Accepted at ACM TSC Reproducibility package

Accepted for publication in ACM Transactions on Social Computing (TSC).

Most calibration work asks whether a model is correct 80% of the time when it reports 80% confidence. We ask a different question: after a person sees that confidence and makes the final decision, is the human-AI team correct 80% of the time?

This repository provides the accepted paper's CPU-only offline analysis, the implementation of Reliance Calibration Error (RCE), the g0-g3 confidence-display policies, deterministic data setup, compact reference outputs, and numerical regression checks.

Quick start: use the policies

Install the package from a local clone; using the policy and metric APIs does not require the HAIID dataset.

git clone https://github.com/OliverDOU776/From-Calibrated-Confidence-to-Calibrated-Reliance.git
cd From-Calibrated-Confidence-to-Calibrated-Reliance
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .

Apply the three fixed display policies and compute RCE on your own logged team outcomes:

import numpy as np

from calibrated_reliance import bounded_g1, g0, g1, g3, rce

confidence = np.array([0.35, 0.55, 0.80])
final_team_correct = np.array([0, 1, 1])

displayed = {
    "g0_direct": g0(confidence),
    "g1_global": g1(confidence),
    "g3_bounded": g3(confidence),
    "g1_max_shift_10pct": bounded_g1(confidence, delta=0.10),
}

for name, values in displayed.items():
    print(name, values, "RCE =", rce(values, final_team_correct))

Fit g2 on training interactions, then apply it to held-out or future interactions. The three aligned training arrays are model confidence, pre-advice self-confidence, and final team correctness:

from calibrated_reliance import apply_g2, fit_g2

g2_policy = fit_g2(
    confidence_train,
    self_confidence_train,
    final_team_correct_train,
)
display_g2 = apply_g2(g2_policy, confidence_test, self_confidence_test)

To compare a display under the paper's fitted human-reliance model, use prepared HAIID-format training and test frames:

from calibrated_reliance import evaluate_policy, fit_reliance_model, g3

reliance_model = fit_reliance_model(train)
display_g3 = g3(test["advice_prob"])
evaluation = evaluate_policy(reliance_model, test, display_g3)

print(evaluation.mse, evaluation.rce, evaluation.mean_reliance)

Here evaluation.rce is a model-predicted off-policy diagnostic. For observed team outcomes, use rce(displayed, final_team_correct) directly. The expected columns and estimands are documented in docs/METHOD.md.

Before deployment: g1, g2, and g3 encode estimates and safeguards from the paper; they are not universal calibration maps. Refit or validate a policy on your population, preserve a held-out evaluation set, and retain a direct-display fallback.

What you can do with this repository

Why calibrated confidence is not enough

A statistically calibrated model can still induce poorly calibrated human reliance. People combine AI advice with their own beliefs, confidence, and task context; the displayed number is therefore filtered through human judgment before it affects the final decision.

We formalize calibrated reliance as a team-level property. For a display policy g, the shown confidence is calibrated when

$$ \Pr(\text{final human-AI decision is correct} \mid D_g=d)=d. $$

RCE summarizes deviations from that ideal:

$$ \mathrm{RCE}(g)=\mathbb{E}\left[\left|\eta_g(D_g)-D_g\right|\right]. $$

The distinction matters empirically: in the primary HAIID condition, conventional model ECE is 0.018, while direct-display plug-in RCE is 0.114.

Reliance reliability diagram across HAIID tasks

The confidence-display policies

Exact g0, g1, and g3 display curves and the training and application flow for g2

Policy Definition Interpretation
g0 d = c Directly display the model confidence.
g1 d = clip(2.4c - 0.5, 0, 1) Global human-aware diagnostic mapping. It is intentionally treated as unconstrained, not automatically deployment-ready.
g2 Isotonic mapping fitted within pre-advice self-confidence terciles Captures user-state heterogeneity. It requires reliable elicitation, governance checks, and a safe fallback.
g3 d = clip(g1(c), 0.15, 0.85) Bounded global mapping that avoids 0/1 displays.

g2 is not presented as a fairness guarantee. If self-confidence is missing, noisy, correlated with protected attributes, or strategically reported, the system should fall back to g0 or a bounded population-level policy.

See docs/METHOD.md for equations, estimands, and implementation details.

Key findings

The accepted paper deliberately distinguishes a held-out display-alignment diagnostic from model-dependent off-policy simulations.

Policy Model-predicted MSE ↓ Plug-in observed-outcome RCE ↓ Model-predicted RCE ↓ Displays at 0 or 1
g0 direct 0.571 0.114 0.040 5.0%
g1 global 0.518 0.104 0.162 57.8%
g2 subgroup-aware 0.623 0.009 0.125 14.3%
g3 bounded global 0.530 0.047 0.070 0.0%

Metric note. Plug-in observed-outcome RCE keeps held-out team outcomes fixed and evaluates numerical display-outcome alignment. Model-predicted MSE and counterfactual RCE re-simulate outcomes under a fitted reliance model. They are off-policy estimates, not randomized causal effects.

Three patterns are especially important:

  1. g1 produces the lowest simulated MSE, but 57.8% of its displays lie at 0 or 1. It is best read as a diagnostic estimate of the correction required under the fitted model.
  2. g2 produces the strongest plug-in RCE alignment, but its model-predicted MSE and RCE are worse than direct display. It exposes heterogeneity; it does not justify immediate personalized deployment.
  3. g3 preserves much of the simulated MSE gain while eliminating 0/1 displays, making bounded policies the more defensible design direction.

The verified release replaces legacy task/subgroup plots from earlier analysis specifications with the canonical numeric task/user-state sensitivity table. It uses the same final cohort, split, and reliance model as the main policy comparison and can be regenerated without any plotting scripts.

Reproduce the accepted-paper analysis

1. Create the environment

git clone https://github.com/OliverDOU776/From-Calibrated-Confidence-to-Calibrated-Reliance.git
cd From-Calibrated-Confidence-to-Calibrated-Reliance

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .

Python 3.10+ is supported. The accepted-paper offline pipeline is CPU-only; it does not require a GPU, an API key, or a language-model checkpoint.

For the exact dependency versions used in the release verification run (Python 3.12.3):

python -m pip install -r requirements-lock.txt
python -m pip install -e . --no-deps

The lock file requires Python 3.11 or newer. On Python 3.10, use the compatible dependency resolution from python -m pip install -e .; that path is covered by the test matrix.

2. Download and verify HAIID

python scripts/download_data.py

The downloader is pinned to upstream commit 24881cc7586180a9c9742a7dd838aea97d008235 and fails if either SHA-256 checksum differs. Raw data remain Git-ignored. See data/README.md for provenance and licensing.

3. Run the core analysis

python scripts/reproduce.py --profile core
python scripts/verify_results.py --profile core

Generated files are written to results/generated/. Reference outputs are never overwritten.

4. Run the full diagnostic matrix

python scripts/reproduce.py --profile full
python scripts/verify_results.py --profile full

The full profile additionally fits the alternative reliance-model specifications and runs random, participant-disjoint, and item-disjoint split sensitivity analyses.

Equivalent shortcuts are available:

make data
make reproduce       # core
make verify
make reproduce-full  # full diagnostic matrix
make test            # data-free unit tests

What is reproduced

Scope Public command Status
HAIID preprocessing and accepted 70/30 task-stratified split scripts/reproduce.py Reproduced from pinned public data
g0-g3, model-predicted MSE/RCE, plug-in RCE scripts/reproduce.py Reproduced
Canonical task- and user-state sensitivity for g1 versus g0 scripts/reproduce.py Reproduced as a verified numeric table
Support, clipping, and display-shift diagnostics scripts/reproduce.py Reproduced
Binning, jackknife, user-state, subgroup, and bounded-policy checks --profile core Reproduced
Reliance-model and disjoint-split sensitivity --profile full Reproduced
Published GRACE comparison values data/external/grace_verbalized_results.csv Auditable context only; not a reproduction of the GRACE raw pipeline
20-participant prospective pilot — Not claimed: participant-level data are not in the research workspace

For the complete output-to-claim map and numerical tolerance policy, see docs/REPRODUCIBILITY.md.

Repository structure

.
├── src/calibrated_reliance/   # Reusable data, metric, policy, and reliance-model code
├── scripts/
│   ├── download_data.py       # Pinned, checksum-verified HAIID setup
│   ├── reproduce.py           # Accepted-paper offline analysis
│   └── verify_results.py      # Generated-vs-reference numerical checks
├── data/
│   ├── external/              # Small cited aggregate table for GRACE
│   └── raw/                   # Downloaded data; ignored by Git
├── results/
│   ├── reference/             # Compact accepted-paper reference outputs
│   └── generated/             # Local reproduction outputs; ignored by Git
├── docs/                      # Method and reproducibility documentation
├── tests/                     # Data-free unit tests
├── CITATION.cff
├── pyproject.toml
└── Makefile

Evidence boundaries and responsible use

This repository is designed to make the paper inspectable, including its uncomfortable results.

Raw versus displayed confidence distributions under g0 through g3

Citation

The DOI and final volume/issue metadata were not available when this repository was prepared. Until they are assigned, please cite the accepted paper as:

@article{wang2026calibratedreliance,
  title   = {From Calibrated Confidence to Calibrated Reliance:
             Human-Aware Confidence Communication for AI-Assisted Decision Making},
  author  = {Wang, Zijia and Hu, Kejia},
  journal = {ACM Transactions on Social Computing},
  year    = {2026},
  note    = {Accepted for publication}
}

GitHub can also read CITATION.cff directly.

Data and third-party acknowledgements

HAIID remains governed by its upstream MIT License and citation requirements. GRACE raw files are not redistributed. See data/README.md and THIRD_PARTY_NOTICES.md for exact versions, checksums, sources, and reuse boundaries.

License

The original code in this repository is released under the MIT License. Third-party datasets and aggregate results remain governed by their own licenses and citation requirements; the project license does not override those terms.

Report a reproducibility issue

Reproducibility reports are welcome through GitHub Issues. When reporting a discrepancy, include your Python version, dependency versions, command, and the relevant generated/reference filenames.

From-Calibrated-Confidence-to-Calibrated-Reliance (OliverDOU776/From-Calibrated-Confidence-to-Calibrated-Reliance)

Searching Database…

这是做什么用的?这是一篇已被 ACM TSC 接收的论文的配套代码:它实现了 Reliance Calibration Error(RCE)指标、g0-g3 置信度展示策略,并提供了一套可复现的、仅用 CPU 的分析,用来衡量人机团队对所展示置信度的校准程度。
这是一个可安装的库,还是只是论文的分析脚本?两者都是:它是一个可用 pip 安装的 Python 包,其策略和指标的 API 可以运行在你自己记录的团队结果数据上,同时还附带脚本,可以从锁定的公开数据重新生成论文中的分析表格。
我该怎么把它跑起来?克隆仓库并运行 pip install -e . 即可。支持 Python 3.10+,但锁定的 lockfile 要求 Python 3.11 或更新版本;发布版本是在 3.12.3 上验证过的。
我可以直接拿拟合好的 g2 策略部署到我自己的模型上吗?不行——这些策略体现的是这篇论文的估计结果,而不是通用的校准映射:请在你自己的用户群体上重新拟合并验证,保留直接展示的回退方案,并且千万不要把未经披露的重映射当作原始模型置信度直接上线。
仓库里包含研究参与者的数据吗?仓库不附带任何原始研究数据:HAIID 始终被 git 忽略,需要通过一个校验和锁定的下载器获取,而且 README 也要求在部署基于子群组的策略之前先做隐私审计。
MIT 许可证就是全部了吗?MIT 只覆盖原始代码,但 HAIID 数据集以及基于 GRACE 的聚合结果保留了各自的许可证和引用要求,本项目的许可证并不能覆盖它们。
什么是 Reliance Calibration Error(RCE)?它是论文提出的团队级校准指标:当最终人机决策正确的概率等于所展示的置信度 d 时,该置信度就算校准良好;RCE 则是相对这个理想值的绝对偏差的平均值。与模型的 ECE 不同,它衡量的是人依据置信度采取行动之后的那一个置信度数字。
g0-g3 展示策略分别做什么?它们对展示给用户的模型置信度进行重塑:g0 直接展示原始值;g1 应用一个全局线性校正;g2 在建言前自我置信度的三分位区间内拟合等渗映射,以捕捉用户状态差异;g3 把 g1 限制在 0.15-0.85 范围内,从而永远不会展示 0 或 1。
论文有什么发现?在模型层面,直接展示看起来校准得很好(ECE 0.018),但在团队层面校准得很差(plug-in RCE 0.114)。感知用户状态的 g2 取得了观察到的最佳对齐效果(RCE 0.009),而加了界限的 g3 保留了大部分仿真收益,并彻底消除了 0/1 的展示。
我能把它用在自己的人机协作日志上吗?可以,这正是预期的快速上手方式:用 rce(displayed, final_team_correct) 审计你记录的结果,用 g0、g1、g3 或 bounded_g1 搭建展示层原型而无需重新训练你的预测器,并在训练交互数据上拟合感知用户状态的 g2,对自我置信度数据稀疏的组则使用全局回退。
我该如何复现论文中的数字?先安装这个包,然后运行锁定的 HAIID 下载(经 SHA-256 校验,不匹配即失败),接着运行 scripts/reproduce.py——加上 --profile core 或 --profile full 可以得到扩展的敏感性分析矩阵。结果会输出到 results/generated/,并与仓库中保存的参考输出进行数值比对;docs/REPRODUCIBILITY.md 把每一项输出都对应到了论文中的一个结论。
Size
0.4 MB
Stars
304
Updated
CommitAug 12
Age
2mo
Commits · 90 Days