Under review — Applied Intelligence2026

TrustShift: Shift Type, Not Shift Magnitude, Determines Machine-Learning Failure Modes

Rajveer Singh Pall

One pre-registered audit across four dissimilar domains: the type of distribution shift — not its magnitude — determines which axis of trustworthiness fails at deployment.

The discovery in one figure

Failure taxonomy: each shift type maps to the trustworthiness axis it degrades, across four domains
Shift type — not magnitude — determines which trustworthiness axis fails. The same protocol across four domains yields one diagnostic taxonomy.

The paper in five minutes

A machine-learning model is trained on yesterday's data and then released into a world that keeps changing. Everyone knows performance can drop — but not all drops are alike. Sometimes the model still ranks people correctly but its probability estimates become dishonest; sometimes it fails one demographic group; sometimes it collapses entirely. This paper studies four completely different fields at once — medicine, social-media language, mortgage lending, and network attacks — under one identical audit, and finds that the kind of change in the world, not the amount of change, decides what breaks. Better still, the kind is detectable in advance, from unlabeled data, so the right repair can be chosen before anyone is harmed.

The research question

ML systems are audited domain by domain, and deployment failures are usually attributed to how large the distribution shift is. Whether the kind of shift predicts the kind of failure had not been tested across domains under one protocol.

How the audit works

A single pre-registered audit protocol applied to four real-world domains — clinical risk (NHANES→BRFSS), mental-health NLP (Kaggle→Reddit/Twitter), mortgage lending (42M HMDA applications), and network security (CIC-DDoS2019→CICIDS2017). Discrimination, calibration, and subgroup reliability are measured with DeLong and bootstrap confidence intervals (N = 2000) and Benjamini–Hochberg FDR control, then explained by three cheap, label-free shift probes: prevalence shift, domain-classifier AUC, and importance-reweighting residual.

  1. 01
    Deployment shiftone trained model per domain meets a changed population
  2. 02
    Three label-free probesprevalence shift · domain-classifier AUC · reweighting residual
  3. 03
    Shift-type diagnosislabel, covariate, or concept shift — before outcomes arrive
  4. 04
    Failure taxonomywhich axis breaks: discrimination, calibration, or subgroups
  5. 05
    Matched remediationrecalibrate · reweight · retrain — chosen by diagnosis

The evidence, domain by domain

Same protocol, four worlds. If magnitude determined damage, the biggest shifts would always hurt most. They don't — the kind of shift decides which axis breaks.

  • Clinical

    NHANES → BRFSS
    source
    0.788
    target
    0.757
    ΔAUC
    −0.031
    ECE
    0.168 → 0.276
    Subgroup gap Δ
    −0.066 [−0.113, −0.016], p = 0.011

    Discrimination barely moves; calibration and the age-subgroup gap take the hit.

  • Mental-health NLP

    Kaggle → Reddit · Twitter
    source
    0.985
    target
    0.650
    AUC
    0.983–0.987 → 0.596–0.703
    ΔAUC
    0.282–0.388
    Target ECE
    0.100–0.275

    Every axis degrades at once — the worst-case shift signature.

  • Lending

    HMDA temporal · geographic
    source
    0.805
    target
    0.821
    ΔAUC (temporal)
    −0.028 … −0.012 (improves)
    Domain-classifier AUC
    0.688–0.804 — shift clearly present
    Pre-recalibration ECE
    ≈ 0.24

    The counter-example: large detectable shift, intact discrimination — magnitude is not damage. Only calibration fails.

  • Network security

    CIC-DDoS2019 → CICIDS2017
    source
    1.000
    target
    0.635
    AUC
    1.000 → 0.635
    ECE
    0.001 → 0.451
    Unseen-family recall
    0.052 – 0.355

    New attack families the model never saw: discrimination collapses outright.

All values verbatim from results JSONs regenerated by run_all.py — see repository.

What a label-cheap fix can — and cannot — repair

Isotonic recalibration on a small calibration split. Toggle it: calibration error is repaired everywhere; discrimination almost never moves.

Domain → targetECEAUC
Clinical → BRFSS
0.276
0.757
NLP → Reddit
0.115
0.648
NLP → Twitter
0.254
0.592
Lending → 2022
0.246
0.805
Lending → 2023
0.240
0.821
Lending → 2024
0.241
0.819
Security → CICIDS2017
0.450
0.634

Read: calibration failure is cheap to fix without labels. Discrimination failure is not — except security's partial recovery (0.634 → 0.708), the exception that proves the taxonomy.

Figures from the paper

The audit, domain by domain: discrimination, calibration, and subgroup reliability measured under each deployment shift.
Fig. 1The audit, domain by domain: discrimination, calibration, and subgroup reliability measured under each deployment shift.
The headline result: deployment damage organised by shift type rather than shift magnitude across the shift points.
Fig. 2The headline result: deployment damage organised by shift type rather than shift magnitude across the shift points.
The remediation ladder: label-cheap recalibration repairs calibration everywhere; discrimination requires more.
Fig. 3The remediation ladder: label-cheap recalibration repairs calibration everywhere; discrimination requires more.

Figures generated by the paper's own pipeline — reproducible from the repository.

Cross-domain meta-analysis

Sixteen shift points across the four domains. Each regression relates the deployment trust-gap to a different explanation — against each domain's own baseline, never raw cross-domain magnitude.

  • M1Trust-gap vs calibration degradationslope 0.415 [0.169, 0.603]R² 0.414 · n 14
  • M2Trust-gap vs covariate-shift probeslope 0.536 [0.347, 0.843]R² 0.771 · n 11
  • M3Trust-gap vs accuracy lossslope 0.344 [0.271, 0.435]R² 0.818 · n 14

What this changes

It converts post-hoc deployment surprises into a pre-deployment diagnostic: an auditor can anticipate the failure axis before labels arrive, and it binds clinical, NLP, lending, and security evidence into one reproducible benchmark.

Reproduce it

git clone https://github.com/Rajveer-code/trustshift
cd trustshift
pip install -r requirements.txt
python run_all.py   # regenerates every table and figure

A fresh-clone reproduction of the master table was verified byte-identical, and the full pipeline re-run completed with exit 0. Prediction parquets and result JSONs are mirrored onHugging Face.

Themes

  • Trustworthy ML
  • Deployment Shift
  • Healthcare AI
  • NLP · LLMs
  • Fairness

Citation

Manuscript under review — citation will be posted on acceptance. Reach me at rajveerpall04@gmail.com.