Model Risk, Lineage & PSI Drift
AI Governance, Fairness & Regulated Assurance β Day 6
Bind model, prompt, and dataset versions into an immutable lineage manifest, measure Population Stability Index (PSI) and accuracy drift, and trigger automated MRM revalidation.
A model validated at release time can silently degrade as macroeconomic conditions or customer behavior shift. Today you will enforce immutable version lineage (rejecting mutable tags like latest), compute Population Stability Index (PSI), and trigger automated revalidation when drift exceeds thresholds.
The official reference codebase for Day 6 is hosted in the repository. Clone the repository and navigate to day-6-model-risk-drift/test_day6.py to run the working solution.
git clone https://github.com/777abhi/ai-governance-qe-roadmap.git
cd ai-governance-qe-roadmap/day-6-model-risk-drift/test_day6.pyRun & Inspect Lineage & PSI Drift Tests
Run the Day 6 suite to verify lineage immutability and PSI drift triggers.
npm run test:day6def population_stability_index(expected_buckets, actual_buckets, epsilon: float = 1e-6):
sum_exp, sum_act = sum(expected_buckets), sum(actual_buckets)
psi = 0.0
for e_raw, a_raw in zip(expected_buckets, actual_buckets):
e = max(e_raw / sum_exp, epsilon)
a = max(a_raw / sum_act, epsilon)
psi += (a - e) * math.log(a / e)
return round(psi, 6)- Validated immutable model, prompt, and dataset version lineage with deterministic SHA-256 digests.
- Calculated Population Stability Index (PSI) to classify stable (<0.10), moderate (0.10β0.25), and critical (>=0.25) shifts.
- Built an automated MRM revalidation trigger engine combining PSI and accuracy-drop ceilings.
π§ Knowledge Check
In standard Model Risk Management (MRM), what does a Population Stability Index (PSI) of 0.25 or higher signify?