drdavidprivacy commited on
Commit
d9dddc1
·
verified ·
1 Parent(s): 110c59a

Upload 3 files

Browse files

v2.0 age-only mitigated champion

README.md CHANGED
@@ -3,20 +3,20 @@ license: mit
3
  library_name: sklearn
4
  pipeline_tag: tabular-classification
5
  tags:
6
- - tabular-classification
7
- - hr-analytics
8
- - fairness
9
- - logistic-regression
10
- - ai-governance
11
- - model-card
12
  datasets:
13
- - drdavidprivacy/retainiq-data
14
  ---
15
 
16
- # Model Card — RetainIQ
17
 
18
  *Employee-attrition risk model · Hireloom, Inc. · Structured per Mitchell et al. (2019),
19
- "Model Cards for Model Reporting." Worked example for **The AI Governance Lab** course.
20
  Educational use only — not for real employment decisions.*
21
 
22
  ## 1. Model Details
@@ -25,59 +25,57 @@ Educational use only — not for real employment decisions.*
25
  |---|---|
26
  | Model name | RetainIQ — Employee Attrition Risk Model |
27
  | Owner | Hireloom, Inc. (provider **and** deployer — self-oversight / dogfooding) |
28
- | Version / date | v1.0 · June 2026 |
29
- | Model type | Binary classification — logistic regression (`class_weight=balanced`, `C=0.1`) |
30
- | Pipeline | StandardScaler (numeric) + One-Hot (categorical) → 51 features; scikit-learn 1.7.2; fixed seed 42 |
31
- | Artifact | `RetainIQ_Champion_LogReg.pkl` (7 KB) + readable coefficients (`RetainIQ_Champion_LogReg_Inside.csv`) |
 
 
32
  | Contact | [Hireloom AI Governance lead — placeholder] |
33
 
34
  ## 2. Intended Use
35
- - **Primary use:** flag employees at elevated attrition risk so HR can prioritize retention outreach. **Decision-SUPPORT only**; intended as a monthly batch-scored, capacity-ranked list.
36
  - **Intended users:** Hireloom HR / People team and people-managers.
37
- - **Out of scope:** NOT for termination, discipline, compensation denial, or any adverse employment action; not an autonomous decision-maker; not validated outside Hireloom's workforce or on non-employment populations.
38
 
39
  ## 3. Factors
40
- - **Protected groups assessed for fairness:** Age (banded at the ADEA-protected 40 line), Gender, Marital Status.
41
- - **Operating context:** tabular HR data; the model outputs a probability, converted to a flag via a chosen decision threshold.
42
 
43
  ## 4. Metrics
44
- Reported metrics: ROC-AUC and PR-AUC (threshold-independent), plus recall, precision and F1 at a 0.50 threshold. Because leavers are only ~16% of staff, **PR-AUC and recall are prioritized over plain accuracy** (misleading on imbalanced data). The production operating threshold is a separate, capacity-driven choice (rank by risk, work the top-N), set and documented by HR — not the 0.50 used for reporting.
45
 
46
  ## 5. Evaluation Data
47
- Sealed test set: **294 employees** (20% stratified hold-out, seed 42), 47 real leavers (16.0%). Quarantined from Module 5 onward — never used in training or model selection. Opened once for the final grade.
48
 
49
  ## 6. Training Data
50
- **1,176 employees** (80% stratified split), 16.2% leavers. Protected attributes (Age, Gender, Marital Status) were deliberately retained through preprocessing so fairness could be measured; the bias-mitigation decision is handled separately (see §8). Source dataset documented in the linked **Dataset** repo (datasheet + data-remediation log).
51
 
52
  ## 7. Quantitative Analyses
53
- Overall performance on the sealed test (with the cross-validation estimate for comparison):
54
 
55
- | Metric | Sealed test (294 employees) | CV estimate |
56
  |---|---|---|
57
- | ROC-AUC | 0.812 | 0.831 |
58
- | PR-AUC | 0.588 | 0.630 |
59
- | Recall | 0.681 | 0.737 |
60
- | Precision | 0.381 | 0.374 |
61
- | F1 | 0.489 | 0.494 |
62
 
63
- The small CV→test dip (e.g., ROC-AUC 0.831→0.812) indicates the model generalizes to unseen employees and was not overfit through selection — the leakage discipline held.
64
 
65
- **Group (held-out) analysis — deployed (biased) champion:** an equal-opportunity gap persists on unseen data. The model catches ~44% of real 40+ leavers vs ~81% of under-40, and ~56% of Married vs higher for Single; Gender is fair. Age 40+ is ADEA-protected, so this is a **material finding**.
66
-
67
- **Bias-mitigated variant** (Fairlearn `CorrelationRemover` on Age/Gender/MaritalStatus): the age equalized-odds gap collapses from 0.369 to 0.052 (40+ recall 0.44→0.63) and demographic-parity from 0.209 to ~0.00, at a modest accuracy cost (ROC-AUC −0.04, PR-AUC −0.04). Marital-status flag-rate fairness improves; gender is unchanged. *Caveat:* per-group fairness on 294 rows is noisy (e.g., Divorced n=4) — trust direction on well-populated groups.
68
 
69
  ## 8. Ethical Considerations
70
- - **Fairness:** the deployed (biased) champion under-serves real leavers in the ADEA-protected 40+ group (and Married employees) — they are less likely to receive retention help. Mitigation reduces this at an accuracy cost.
71
- - **Deployment decision (R-16) — RESOLVED:** Hireloom deploys the **biased champion** as v1.0, **with the residual age/marital-status disparity documented here and an explicit monitoring + revisit commitment** (rather than mitigating now). This is a *deploy-with-disclosed-residual-risk* posture, not an oversight: the held-out evidence and the mitigation option above are recorded so stakeholders, auditors, and a future review can weigh the tradeoff. The mitigated variant remains available and should be reconsidered at the first monitoring review or before any real-data deployment.
72
- - **Self-oversight / dogfooding:** Hireloom is both the provider and the deployer of RetainIQ on its own workforce — a built-in oversight tension to manage.
73
- - **Misuse risk:** flags are decision-support, not verdicts; using them to justify adverse actions would be inappropriate and likely unlawful.
74
- - **Measurement limits:** small per-group samples make some fairness numbers noisy — requires ongoing monitoring rather than one-time sign-off.
75
 
76
  ## 9. Caveats & Recommendations
77
- - **Synthetic data stand-in:** revalidate on real Hireloom data before any deployment.
78
- - **Threshold:** set and document the production operating point by HR capacity; re-run the fairness audit AT that threshold and per protected group.
79
- - **Monitoring:** watch for data drift in production (the model goes stale as the workforce changes); define retrain/retire triggers. *(Given the R-16 deploy-with-residual-risk decision, the age/marital-status disparity is a named monitoring target.)*
80
- - **Legal/compliance:** this is **not legal advice**. Obtain review of protected-characteristic obligations (ADEA, Title VII, NYC Local Law 144, EEOC guidance, EU AI Act high-risk employment, GDPR special-category data) — ideally before deployment.
81
 
82
  ## Reference
83
- Mitchell, M., Wu, S., Zaldivar, A., Barnes, P., Vasserman, L., Hutchinson, B., Spitzer, E., Raji, I. D., & Gebru, T. (2019). *Model Cards for Model Reporting.* Proceedings of FAT* '19. arXiv:1810.03993.
 
3
  library_name: sklearn
4
  pipeline_tag: tabular-classification
5
  tags:
6
+ - tabular-classification
7
+ - hr-analytics
8
+ - fairness
9
+ - logistic-regression
10
+ - ai-governance
11
+ - model-card
12
  datasets:
13
+ - REPLACE-WITH-YOUR-ORG/retainiq-data
14
  ---
15
 
16
+ # Model Card — RetainIQ (v2.0, bias-mitigated)
17
 
18
  *Employee-attrition risk model · Hireloom, Inc. · Structured per Mitchell et al. (2019),
19
+ "Model Cards for Model Reporting." Worked example for **The AI Governance Lab**.
20
  Educational use only — not for real employment decisions.*
21
 
22
  ## 1. Model Details
 
25
  |---|---|
26
  | Model name | RetainIQ — Employee Attrition Risk Model |
27
  | Owner | Hireloom, Inc. (provider **and** deployer — self-oversight / dogfooding) |
28
+ | Version / date | **v2.0 · June 2026** (supersedes v1.0 biased champion; see §8) |
29
+ | Model type | Binary classification — logistic regression (`C=0.1`, `class_weight=balanced`) |
30
+ | Bias mitigation | Fairlearn **CorrelationRemover on Age only** (the ADEA-protected attribute) |
31
+ | Pipeline | One-Hot + CorrelationRemover(Age) + StandardScaler → LogReg; 50 features; scikit-learn 1.7.2; seed 42 |
32
+ | Artifact | `RetainIQ_Champion_AgeOnly.pkl` (8,969 B) + readable coefficients (`_Inside.csv`) |
33
+ | Integrity (SHA-256) | `32a1a21bf9b4984eb5466f955bbef9a729a5535ca81ea279fb48a23513d74057` |
34
  | Contact | [Hireloom AI Governance lead — placeholder] |
35
 
36
  ## 2. Intended Use
37
+ - **Primary use:** flag employees at elevated attrition risk so HR can prioritize retention outreach. **Decision-SUPPORT only**; monthly batch-scored, capacity-ranked list.
38
  - **Intended users:** Hireloom HR / People team and people-managers.
39
+ - **Out of scope:** NOT for termination, discipline, compensation denial, or any adverse action; not autonomous; not validated outside Hireloom's workforce.
40
 
41
  ## 3. Factors
42
+ Protected groups assessed: Age (ADEA-protected 40 line), Gender, Marital Status. Outputs a probability converted to a flag via a chosen threshold.
 
43
 
44
  ## 4. Metrics
45
+ ROC-AUC and PR-AUC (threshold-independent), plus recall, precision, F1 at 0.50. Because leavers are ~16%, PR-AUC and recall are prioritized over plain accuracy. The production operating threshold is a separate, capacity-driven choice set by HR.
46
 
47
  ## 5. Evaluation Data
48
+ Sealed test set: 294 employees (20% stratified hold-out, seed 42), 47 real leavers (16.0%). Quarantined from Module 5; opened once for the final grade.
49
 
50
  ## 6. Training Data
51
+ 1,176 employees (80% stratified split), 16.2% leavers. Protected attributes retained through preprocessing so fairness could be measured; the deployed pipeline then applies **age-only CorrelationRemover** (removes the Age signal; retains Gender/Marital Status).
52
 
53
  ## 7. Quantitative Analyses
54
+ Sealed-test performance of the deployed v2.0 (age-only) champion, with the biased v1.0 for comparison:
55
 
56
+ | Metric | Deployed v2.0 (age-only) | Biased v1.0 (rejected) |
57
  |---|---|---|
58
+ | ROC-AUC | 0.811 | 0.812 |
59
+ | PR-AUC | 0.534 | 0.588 |
60
+ | Recall | 0.702 | 0.681 |
61
+ | Precision | 0.407 | 0.381 |
62
+ | F1 | 0.516 | 0.489 |
63
 
64
+ **Held-out fairness (equalized-odds difference; lower = fairer):** Age 40+ **0.045** (was 0.369 — gap closed; 40+ recall 0.44→0.69); Marital Status 0.281 (improved); Gender 0.026 (held fair). *Caveat:* PR-AUC is marginally lower (0.534), so the gain is clearest at the chosen operating point; per-group counts are small (40+ n=16, Divorced n=4).
65
 
66
+ **Why age-only:** a three-way bake-off showed all-attribute CorrelationRemover *worsened* gender (EOD 0.033→0.137) and cost more accuracy, while age-only closed the ADEA gap with no gender regression and no accuracy cost.
 
 
67
 
68
  ## 8. Ethical Considerations
69
+ - **Deployment decision (R-16) — RESOLVED:** deploy the **age-only bias-mitigated champion (v2.0)**, prioritizing the ADEA-protected age group (largest gap + greatest legal exposure). The biased v1.0 and the all-3-attribute variant are documented as considered-and-rejected alternatives.
70
+ - **Residual / monitoring targets:** the marital-status spread persists, and gender balance must be watched to confirm the untargeted groups don't drift — both are named monitoring targets (Module 9).
71
+ - **Self-oversight / dogfooding:** Hireloom is both provider and deployer; independent fairness review recommended.
72
+ - **Misuse risk:** flags are decision-support, not verdicts; adverse use would be inappropriate and likely unlawful.
 
73
 
74
  ## 9. Caveats & Recommendations
75
+ - Synthetic data stand-in: revalidate on real Hireloom data before any deployment.
76
+ - Threshold: set/document the production operating point by HR capacity; re-run the fairness audit AT that threshold per protected group.
77
+ - Monitoring: watch drift, the gender EOD, and the marital spread; define retrain/retire triggers.
78
+ - Legal/compliance (not legal advice): obtain review of ADEA, Title VII, NYC Local Law 144, EEOC guidance, EU AI Act (high-risk employment) and GDPR special-category obligations before real deployment.
79
 
80
  ## Reference
81
+ Mitchell, M., et al. (2019). *Model Cards for Model Reporting.* FAT* '19. arXiv:1810.03993.
RetainIQ_Champion_AgeOnly.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:32a1a21bf9b4984eb5466f955bbef9a729a5535ca81ea279fb48a23513d74057
3
+ size 8969
RetainIQ_Champion_AgeOnly_Inside.csv ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ feature,coefficient,pushes_toward
2
+ JobRole_Laboratory Technician,0.4051,LEAVING
3
+ YearsSinceLastPromotion,0.3823,LEAVING
4
+ EnvironmentSatisfaction,-0.3822,staying
5
+ NumCompaniesWorked,0.3606,LEAVING
6
+ OverTime_Yes,0.3581,LEAVING
7
+ OverTime_No,-0.3581,staying
8
+ YearsWithCurrManager,-0.3437,staying
9
+ JobSatisfaction,-0.3369,staying
10
+ JobRole_Research Director,-0.3343,staying
11
+ JobLevel,0.3156,LEAVING
12
+ BusinessTravel_Non-Travel,-0.3132,staying
13
+ JobRole_Sales Representative,0.2934,LEAVING
14
+ DistanceFromHome,0.2897,LEAVING
15
+ TotalWorkingYears,-0.2826,staying
16
+ JobInvolvement,-0.2826,staying
17
+ RelationshipSatisfaction,-0.2558,staying
18
+ BusinessTravel_Travel_Frequently,0.2501,LEAVING
19
+ YearsInCurrentRole,-0.2421,staying
20
+ MaritalStatus_Single,0.2159,LEAVING
21
+ StockOptionLevel,-0.2024,staying
22
+ JobRole_Healthcare Representative,-0.2016,staying
23
+ WorkLifeBalance,-0.1953,staying
24
+ PercentSalaryHike,-0.1953,staying
25
+ DailyRate,-0.193,staying
26
+ MaritalStatus_Divorced,-0.183,staying
27
+ EducationField_Other,-0.1722,staying
28
+ JobRole_Manufacturing Director,-0.1533,staying
29
+ EducationField_Human Resources,0.1504,LEAVING
30
+ TrainingTimesLastYear,-0.1458,staying
31
+ EducationField_Technical Degree,0.1447,LEAVING
32
+ JobRole_Human Resources,0.1354,LEAVING
33
+ PerformanceRating,0.1285,LEAVING
34
+ YearsAtCompany,0.1124,LEAVING
35
+ JobRole_Manager,-0.1091,staying
36
+ Department_Human Resources,-0.1074,staying
37
+ Department_Sales,0.0922,LEAVING
38
+ JobRole_Research Scientist,-0.0898,staying
39
+ HourlyRate,-0.0618,staying
40
+ Gender_Male,0.0574,LEAVING
41
+ Gender_Female,-0.0574,staying
42
+ EducationField_Life Sciences,-0.0573,staying
43
+ MaritalStatus_Married,-0.0476,staying
44
+ Department_Research & Development,-0.0448,staying
45
+ Education,0.0435,LEAVING
46
+ MonthlyRate,0.0403,LEAVING
47
+ EducationField_Marketing,0.0337,LEAVING
48
+ MonthlyIncome,-0.0257,staying
49
+ EducationField_Medical,-0.0161,staying
50
+ JobRole_Sales Executive,-0.0108,staying
51
+ BusinessTravel_Travel_Rarely,-0.0054,staying