Skip to main content

Free tool · Educational demo

Adverse-Action Notice Generator

In the United States, a lender that denies credit must give specific reasons. A generic "the model decided" is not good enough. This demo turns SHAP feature attributions into specific, plain-language reasons, the shape U.S. Regulation B expects, for four sample applicants.

Nothing leaves your browser. All data is embedded in this page.

Sample file A

Credit denied

Model-estimated approval probability: 20%

Model artifact flagged. Age 23 appears among the reasons against approval: a pattern the training data taught the model. In real lending, age must not drive credit decisions. The flag is part of the demo: explanations should surface problematic model behavior, not hide it.

Sample adverse-action notice

Illustrative only. Not a real notice and not legal advice.

Re: Application for credit (Sample file A)

We have considered your application for credit. We are unable to approve it at this time.

The specific reasons for this decision, listed in order of their influence, are:

  1. Requested loan term of 45 months. This factor weighed most heavily against approval.
  2. Revolving credit utilization of 84.8%, a high share of available credit in use.
  3. 7 payments 30 or more days past due in the last 24 months.
  4. Age 23 years old.

Factors that weighed in your favor:

  • Housing: no rent cost.

Generated from SHAP attributions of a demo model. Illustrative sample. Not a real notice.

What moved the decision

SHAP values per feature, sorted by influence. Red pushed against approval; green pushed toward it.

Requested loan term45 months
Revolving credit utilization84.8%
Late payments (30+ days)7
Age23 years old
Housingno rent cost
Debt-to-income ratio35.3%
Time at residence4 years
Employment length24 months
Annual income$67,547
Existing credits1
Dependents supported1
Full feature values for Sample file A
Revolving credit utilization
84.8%
Late payments (30+ days)
7
Debt-to-income ratio
35.3%
Annual income
$67,547
Employment length
24 months
Requested loan term
45 months
Housing
no rent cost
Time at residence
4 years
Age
23 years old
Existing credits
1
Dependents supported
1

How this demo was built

Model

A logistic regression (C=1.0, standardized features) trained on the public UCI Statlog German Credit dataset: 1,000 rows, an 800/200 stratified split, test accuracy 0.72. German Credit stores ordered categorical codes, which were mapped to human-meaningful notice features; utilization, late payments, debt-to-income, and income are deterministic seeded proxies derived from the real codes. Treat magnitudes as illustrative.

Explanations

SHAP values were computed offline with shap.LinearExplainer (base value 1.0727 log-odds; additivity verified per applicant). The notices list the top negative drivers first: up to four specific reasons, the shape U.S. Regulation B expects, followed by factors that weighed in the applicant's favor. The offline computation, including the exact script, is public on GitHub.

Built with

Offline: scikit-learn, SHAP, and the UCI Statlog German Credit dataset. This page uses static rendering with embedded data. No backend, no visitor data. Supporting code:movahedi-ca/adverse-action-shap-demo.

Common questions

What is an adverse-action notice?

When a lender denies credit in the United States, it must tell the applicant why, with specific reasons: not a generic 'the model decided.' In the United States, Regulation B (which implements the Equal Credit Opportunity Act) requires up to four specific reasons. This demo borrows that shape: numbered, specific, plain-language reasons derived from SHAP feature attributions.

What model produced these decisions?

A small logistic regression trained on the public UCI Statlog German Credit dataset (1,000 rows), with features mapped to human-meaningful notice fields. SHAP values were computed offline with shap.LinearExplainer. Test accuracy is 0.72. Everything is illustrative: the model is small, the data is decades old, and some features are simplified proxies.

Does anything I do on this page leave my browser?

No. All applicant data is embedded in the page and every interaction (switching applicants, copying the notice) runs locally. There is no backend, and no demo data is stored or transmitted.

Can I use these notices for real lending decisions?

No. This is an educational demo, not legal advice and not a compliance review. Real adverse-action notices carry legal requirements this demo does not attempt to satisfy. Have real notices reviewed by qualified counsel.