Inferensys

Glossary

Reason Codes

Reason codes are concise, human-readable statements, typically the top few features driving a specific decision, that provide the primary reasons for a model's adverse action.
Data engineer managing feature store on laptop, feature definitions visible, casual data engineering session.
ADVERSE ACTION EXPLANATIONS

What are Reason Codes?

Reason codes are concise, human-readable statements identifying the principal factors that drove a specific algorithmic decision, enabling regulatory compliance and user understanding.

Reason codes are the top-ranked feature contributions from a local explanation, translated into plain-language justifications for a model's adverse action, such as a denied loan or a flagged transaction. They bridge the gap between opaque machine learning outputs and the legal requirement for adverse action notices under regulations like the Fair Credit Reporting Act (FCRA).

In a fraud detection context, a reason code might state 'Transaction amount significantly exceeds user's 30-day average' rather than exposing raw SHAP values. This process requires mapping complex feature attributions to a predefined, compliant dictionary of explanations, ensuring that automated decisions are both auditable and actionable for investigators and end-users.

EXPLAINABILITY STANDARDS

Key Characteristics of Effective Reason Codes

Effective reason codes are the critical bridge between complex model outputs and human understanding, translating opaque mathematical scores into actionable, auditable narratives for regulators, investigators, and customers.

01

Actionable and Specific

A reason code must point to a specific, modifiable behavior or data element, not a vague category. Instead of 'High Risk Profile,' an effective code states 'Transaction Amount Exceeds 90-Day Average by 4x.' This allows a fraud analyst to immediately verify the anomaly or a customer to understand the precise trigger. Key attributes:

  • References a concrete feature value
  • Avoids jargon like 'Model Score 7B'
  • Enables a direct investigative next step
02

Contrastive by Design

Codes explain a decision relative to a baseline. For a denied transaction, the code should clarify why this instance was flagged while a normal one would pass. This is achieved by comparing the instance against a reference distribution (e.g., the user's own history or a peer group). For example, 'Unusual Merchant Category for this Time of Day' contrasts the current action against established behavioral patterns, providing the 'why this, why now' logic essential for adverse action notices.

03

Locally Faithful

A reason code must be a true, local explanation of the specific prediction, not a general description of the model's global behavior. A globally important feature might be irrelevant for a single case. Techniques like SHAP or LIME compute the marginal contribution of each feature to that single prediction, ensuring the top reason codes are the actual drivers of the decision. This fidelity is non-negotiable for regulatory compliance and debugging model errors.

04

Consistent and Non-Contradictory

The set of reason codes for a single decision must form a coherent narrative. They cannot contradict each other (e.g., one code citing 'High Transaction Velocity' while another cites 'Dormant Account Activity'). The generation logic must enforce monotonic consistency where possible, ensuring that if feature A is the primary driver, the secondary codes provide supplementary, non-conflicting context. This builds trust with investigators who rely on a clear, unified story.

05

Regulatory Alignment

In financial services, reason codes are not just technical outputs; they are legal disclosures. Regulations like the Fair Credit Reporting Act (FCRA) in the U.S. mandate that 'adverse action reason codes' disclose the principal factors that negatively affected a decision. Effective codes are mapped to a standardized, regulatorily-approved dictionary, ensuring the language is compliant, non-discriminatory, and auditable. This transforms a model output into a defensible business record.

06

Ranked by Importance

Providing a flat list of factors is insufficient. Effective reason codes are strictly ordered by their contribution magnitude. The top code should represent the single most influential factor in the decision. This ranking, typically derived from the absolute values of Shapley values or integrated gradients, allows a reviewer to triage the alert efficiently. A standard practice is to display the top 3-5 codes, as they usually capture over 90% of the total attribution, preventing information overload.

REASON CODES

Frequently Asked Questions

Clear, concise answers to the most common questions about reason codes in explainable fraud detection and model governance.

Reason codes are concise, human-readable statements that identify the top features driving a specific model decision, such as a denied loan application or a flagged fraudulent transaction. They translate complex model outputs into actionable explanations by ranking feature contributions. For example, a credit denial might return reason codes like 'Debt-to-Income Ratio too high' or 'Number of recent credit inquiries.' In fraud detection, reason codes bridge the gap between opaque anomaly scores and investigator understanding, enabling rapid triage. They are typically derived from SHAP values, LIME explanations, or model-specific attribution methods, and are often mandated by regulations like the Fair Credit Reporting Act (FCRA) for adverse action notifications.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.