Predictive attrition models: logistic regression and survival analysis for HR
How to build attrition prediction models that actually work — the logistic regression baseline, when to graduate to survival analysis (Kaplan-Meier and Cox)…
On this page▾
- Predictive attrition modelling answers: 'who is most likely to leave in the next N months, and why?' Two techniques dominate — logistic regression (binary: leave/stay in a fixed window) and survival analysis (time-to-event).
- Start with logistic regression. It's interpretable, easy to validate, and accurate enough for most decisions. Use AUC ≥ 0.75 as the minimum to be useful.
- Graduate to survival analysis (Kaplan-Meier curves, Cox proportional hazards) when you need to model *when*, not just *if* — and when censored data (employees who haven't left yet) matters, which is always.
- Features that consistently predict attrition: tenure (especially around 18–24 mo), manager identity, time since last promotion, time since last comp adjustment, recent engagement scores, peer attrition, internal application activity.
- Ethical guardrails are non-negotiable: never use protected characteristics, never share individual predictions with managers without action design, always pair prediction with intervention.
Predictive attrition is the most-attempted and most-failed people analytics project. Most fail not because the math is wrong but because the model is built without an intervention plan. This guide covers both the technical mechanics and the deployment patterns that make these models worth building.
Why predict attrition at all
A useful attrition model does one of three things: (1) lets HR target retention conversations to the right 10–20% of employees instead of doing them everywhere, (2) flags structural risks (a whole team about to walk because of manager X), or (3) feeds workforce planning with team-level attrition forecasts that are better than 'last year × 1.0'.
If none of these is the goal, don't build the model. A working prediction with no decision attached is surveillance, not analytics.
1. Logistic regression — the workhorse
Logistic regression predicts a binary outcome: will this employee leave within the next N months? (N is typically 6 or 12.) It's the right starting point for almost every team — interpretable, fast to train, and accurate enough.
- 1Define the outcomeVoluntary attrition (exclude involuntary) within the next N months. Pick N = 6 (operational) or 12 (planning). Don't model 'attrition ever' — it's noisy.
- 2Build the datasetOne row per employee-month. Outcome = did they leave in the next N months? Features = state at that month.
- 3Train/test splitTrain on data up to 18 months ago, test on the most recent 6–12 months. Never random-split — that leaks future info.
- 4Train the modelscikit-learn LogisticRegression with L2 regularisation. Standardise numeric features. One-hot or target-encode categoricals.
- 5EvaluateAUC (≥ 0.75 minimum), calibration curve (predicted vs actual probability), and lift at the top decile (the 10% most-at-risk — what % of actual leavers do you catch?).
- 6InterpretCoefficients tell you the direction. SHAP values give per-employee explanations. Both are required for any model that influences decisions.
AUC 0.78–0.85 on the holdout set is typical for a well-built model with 18+ months of data. Catching 35–45% of actual leavers in the top 10% of predicted risk is a useful operational threshold. Don't deploy below AUC 0.72 — you'll have so many false positives that managers stop trusting the model.
2. Survival analysis — when time matters
Logistic regression treats attrition as a yes/no event in a fixed window. Survival analysis treats it as time-to-event: how long until this person leaves? It originated in medical research (time-to-relapse) and is the right tool whenever (a) censored data matters — employees who haven't left yet are still useful data — and (b) the timing of exit matters, not just whether.
Kaplan-Meier curves
The simplest survival tool. Plots cumulative survival probability over tenure for a cohort. Use it to: visualise the 'second-year wall', compare survival between two manager populations, evaluate retention impact of a program (compare pre/post curves).
Cox proportional hazards
The regression model for survival data. Outputs hazard ratios — e.g. 'employees under Manager X have a 2.3x hazard of attrition vs the baseline'. The assumption (proportional hazards) is that the *ratio* between groups is constant over time. Check with Schoenfeld residuals. When violated, switch to time-varying coefficients or accelerated failure time models.
Use logistic regression for 'who is at risk this quarter'. Use Cox / Kaplan-Meier for 'how does our attrition shape change over tenure, and what programs change that shape?'. They answer different questions. Most teams need both eventually.
Features that actually predict
| Feature | Direction of effect | Why |
|---|---|---|
| Tenure (bucketed) | Bimodal — high in months 3–9, peak around 18–24 mo, then declining | Onboarding fit + the second-year wall (equity cliff, growth plateau) |
| Time since last promotion | Higher = more likely to leave | Career stagnation is one of the top exit drivers in every published study |
| Time since last comp adjustment | Higher = more likely to leave | Especially when peers received increases |
| Manager identity (as factor) | Some managers carry 2–4x baseline | Bad-manager teams attrit at multiples of baseline; this is usually the strongest single signal |
| Recent engagement score | Lower = more likely to leave (when available) | Engagement scores have ~3–6 month predictive horizon |
| Peer attrition in last 90 days | Contagion effect — every recent peer exit raises hazard ~10–20% | Social proof + workload spillover |
| Internal job application activity | Strong predictor — 30% higher hazard among internal applicants | But signals desire to grow; treat as opportunity to retain |
| Distance from career-ladder midpoint | Mid-level ICs attrit more than juniors or seniors | The 'mushy middle' phenomenon |
| Promotion velocity vs peer cohort | Slower than cohort = higher attrition | Comparative status matters more than absolute progress |
Validation: AUC, calibration, drift
- AUC (Area Under ROC Curve): single number, 0.5 = random, 1.0 = perfect. Useful for ranking risk; doesn't tell you about absolute probabilities.
- Calibration: plot predicted probability vs actual rate. A model can have great AUC and be miscalibrated (says 30% risk for a group that actually leaves 12%). Re-fit with Platt scaling or isotonic regression if needed.
- Lift at top decile: of the 10% with highest predicted risk, what % of actual leavers do you capture? Operational teams use this more than AUC.
- Drift monitoring: re-train at least quarterly. Models trained pre-2022 perform poorly post-RTO and post-AI-disruption. Recalibrate continuously.
Ethics and the 'do not deploy' list
Never include: age, gender, race, religion, disability, pregnancy status, marital status, national origin, or any proxy thereof (e.g. inferred age from graduation year). Doing so creates discriminatory risk-flagging in violation of US Title VII, EU GDPR (Art. 22 on automated decisions), UK Equality Act 2010, and almost every analogous regime.
- Don't share individual predictions with line managers without a structured intervention design. 'Riya is 73% likely to leave' creates self-fulfilling prophecies and broken trust.
- Aggregate predictions for team-level decisions (workforce planning, manager coaching) before individual predictions for retention conversations.
- Provide explanations (SHAP per-employee) to anyone whose career might be affected by the prediction.
- Always pair prediction with intervention. A model with no action attached is surveillance.
- Audit for disparate impact quarterly. If the model flags one demographic at 2x the rate of others, investigate and fix.
Deployment patterns
| Pattern | When | Risk |
|---|---|---|
| Aggregate team-risk score | Workforce planning, manager coaching | Low — useful, hard to abuse |
| Top-decile retention conversations | Targeted manager check-ins for the highest-risk 10% | Medium — works if pairs with intervention, fails if used punitively |
| Real-time manager dashboard with individual scores | Common request from leaders, rarely a good idea | High — encourages over-management, breaks trust if found |
| Quarterly research only, no operational deployment | Until you've validated AUC, calibration, drift | Lowest — the right starting point |
FAQ
Frequently asked questions
How much data do we need?
Minimum ~1,000 employees × 18 months for a usable logistic-regression model. Survival analysis can work with less if your cohorts are large enough. Below 500 employees, model at the team level using simpler heuristics — formal prediction models are over-engineered.
Should we use ML beyond logistic regression?
Random forests and gradient boosting (XGBoost) typically gain 3–5 AUC points over logistic regression. Worth it only if you have the operational maturity to maintain them and you've already validated the simpler model. Don't start with XGBoost.
How do we know if the model is working?
Three signals: (1) lift at top decile improves over time, (2) recommended interventions correlate with reduced attrition vs control, (3) managers find the explanations useful in 1:1s. Without all three, you have an art project.
Read next
All playbooksThe quantitative model behind every credible workforce plan — opening headcount, attrition rates, hiring lead times, ramp curves, and the formulas that…
Attrition is the most reported and least understood HR metric. This guide separates regretted from non-regretted, builds early-warning indicators, and turns…
Three years of monthly cohorts, plotted, with the actual exit reasons and the math behind the second-year wall.