KisanCredit · ML credit-scoring system
Credit scoring for thin-file borrowers.
A LightGBM default-risk model trained on 307,511 real loan applicants from the Home Credit dataset, served through a production stack with a lender operations console, SHAP explanations, and Gemini-generated natural-language reasoning in English and Hindi.
Validation
- ROC-AUC (LightGBM, 5-fold CV)
- 0.6803 ± 0.0047
- Applicants
- 307,511
- Features (application-time only)
- 39
- Logistic-regression baseline
- 0.6578
- TabNet baseline (PyTorch)
- 0.6524
- Default rate (class balance)
- 8.07%
The Kaggle leaderboard for Home Credit tops out near 0.805 — that number uses the full multi-table dataset (bureau records, prior applications, payment histories). This model is trained on application-only features so it works for borrowers who have no credit-bureau record. The ~8 AUC-point gap is the price of that choice.
What's in the system
Borrower flow
Email-OTP sign-in, a multi-step application form, and a lifecycle state machine (submitted → under_review → decided) that runs as a FastAPI background task. Each transition is written as an immutable audit event the frontend polls until the decision lands.
Explanations
SHAP TreeExplainer surfaces the top contributors behind every decision. Gemini Flash narrates them in English or Hindi. When the answer isn't yes, a greedy counter-factual search proposes the smallest realistic change that would move the decision toward approve.
Lender operations console
A separate /admin surface for operators: live metrics with model performance and human-override activity tracked separately, a paginated application queue with full drill-down, audit-trailed manual overrides, and per-feature PSI drift monitoring against the training baseline.
Decision thresholds, not cutoffs
On an 8%-default population a fixed cutoff like "approve above 0.6" approves everyone. The approve / manual_review / reject bands are derived from percentiles of the model's own score distribution on the training set and stored inside the model artifact — making the policy explicit and auditable.
Honest about what this isn't
- No Indian dataset. Individual-level Indian credit data isn't publicly available. Home Credit is a real emerging-market thin-file proxy, but a production Indian deployment would need CIBIL access or a partner-NBFC data agreement.
- Modest accuracy, by design. AUC 0.68 is well below the ~0.80 reachable with bureau features. That gap is the price of not using a bureau score for the thin-file population. It's a real, if imperfect, ranking of risk — not a finished underwriting model.
- Free-tier hosting. Render sleeps the API after 15 minutes idle and takes roughly 50 seconds to wake. The frontend shows a warming-up state to cover it.