Inferensys

Glossary

Post-hoc Explainability

The application of interpretation methods to a trained, complex model to explain its predictions after the model has been built, as opposed to building an inherently interpretable model from the start.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
DEFINITION

What is Post-hoc Explainability?

Post-hoc explainability refers to the application of interpretation methods to a trained, complex model to explain its predictions after the model has been built, as opposed to building an inherently interpretable model from the start.

Post-hoc explainability is a suite of techniques applied to a black-box model after training to retroactively interpret its decision-making logic. Unlike intrinsic interpretability, which relies on simple, transparent structures like linear regression, post-hoc methods dissect complex architectures such as deep neural networks or gradient-boosted trees without altering the original model's weights or performance. The primary goal is to generate human-understandable justifications for specific predictions, bridging the gap between high accuracy and auditability.

In financial fraud detection, post-hoc methods like SHAP and LIME are critical for generating adverse action reason codes required by regulators. These techniques quantify the contribution of individual transactional features—such as unusual login locations or atypical transfer velocities—to a high-risk anomaly score. This allows compliance officers to validate that a model's blocking decision was based on legitimate risk patterns rather than spurious correlations or prohibited biases, ensuring the opaque model remains accountable.

Post-hoc Explainability

Core Characteristics

The defining attributes of post-hoc explainability techniques that make them essential for auditing and validating complex fraud detection models.

01

Model-Agnostic Applicability

Post-hoc methods are designed to be model-agnostic, meaning they can explain the predictions of any machine learning model—from gradient-boosted trees to deep neural networks—without requiring access to the model's internal architecture. This is critical in fraud detection, where ensembles and proprietary models are common.

  • Treats the model as a black box, analyzing only inputs and outputs
  • Enables a unified explanation framework across heterogeneous model inventories
  • Contrasts with intrinsic interpretability, which requires a specific model structure like linear regression or a single decision tree
02

Local vs. Global Explanation Scope

Post-hoc explainability operates at two distinct scopes. Local explanations justify a single prediction—such as why a specific transaction was flagged as fraudulent—using methods like LIME or SHAP. Global explanations reveal the model's overall behavior across all predictions, often visualized through Partial Dependence Plots or surrogate models.

  • Local: Generates reason codes for adverse actions, satisfying regulatory requirements like the FCRA
  • Global: Identifies systematic biases or over-reliance on specific features
  • Both scopes are necessary for a complete algorithmic audit trail
03

Feature Attribution Mechanisms

The core mechanism of most post-hoc techniques is feature attribution, which quantifies each input variable's contribution to a specific prediction. Methods differ in their mathematical rigor:

  • SHAP uses Shapley values from cooperative game theory to guarantee a fair, additive distribution of importance
  • Integrated Gradients computes path integrals of gradients for deep networks, satisfying the completeness axiom
  • LIME creates a local, interpretable surrogate model via perturbation sampling
  • These attributions directly translate into customer-facing adverse action reason codes
04

Counterfactual Reasoning

Beyond feature importance, post-hoc explainability includes counterfactual explanations that identify the minimal set of changes required to flip a model's decision. For a denied transaction, a counterfactual might state: 'If the transaction amount were below $5,000 and the merchant category were not electronics, the transaction would have been approved.'

  • Provides actionable guidance for remediation
  • Aligns with human reasoning about causality and 'what-if' scenarios
  • Complements adverse action reason codes with prescriptive, not just descriptive, information
05

Concept-Based Explanations

Advanced post-hoc methods like TCAV (Testing with Concept Activation Vectors) move beyond low-level feature attribution to explain predictions in terms of high-level, human-understandable concepts. In fraud detection, this means explaining a decision not by raw pixel values or transaction amounts, but by concepts like 'unusual merchant category' or 'velocity anomaly.'

  • Uses concept activation vectors to measure sensitivity to predefined ideas
  • Bridges the gap between technical model internals and business logic
  • Related to Concept Bottleneck Models, which enforce concept-based reasoning during training
06

Visualization and Saliency

For models processing structured or unstructured data, post-hoc explainability produces saliency maps and other visualizations that highlight influential inputs. In fraud detection, this can mean highlighting specific cells in a transaction record or nodes in a financial graph.

  • Grad-CAM produces coarse localization maps for convolutional networks
  • Layer-wise Relevance Propagation (LRP) decomposes output scores backward through the network with conservation rules
  • Individual Conditional Expectation (ICE) Plots disaggregate average effects to reveal heterogeneous relationships across instances
POST-HOC EXPLAINABILITY

Frequently Asked Questions

Clear answers to common questions about interpreting complex fraud detection models after training, ensuring auditability and regulatory compliance.

Post-hoc explainability refers to the application of interpretation methods to a trained, complex model (such as a gradient-boosted tree ensemble or deep neural network) to explain its predictions after the model has been built. This contrasts with intrinsic interpretability, where the model itself is structurally simple and transparent by design (e.g., a single decision tree or logistic regression). Post-hoc methods treat the model as a black box, probing its input-output relationships to generate explanations without requiring access to or modification of the model's internal weights. In financial fraud detection, this distinction is critical: high-performing black-box models like XGBoost or deep autoencoders often outperform intrinsically interpretable models on complex anomaly patterns, but regulators demand explanations for blocked transactions. Post-hoc techniques bridge this gap by providing feature attributions, counterfactuals, or surrogate models that make the opaque model's reasoning auditable.

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.