A local surrogate is an inherently interpretable model—such as a linear regression or shallow decision tree—trained to mimic the behavior of a complex black-box model for a single, specific prediction. Unlike a global surrogate, which attempts to explain the entire model logic, a local surrogate focuses on the immediate neighborhood of the instance being explained. It generates perturbed samples around the input, weights them by proximity, and fits a simple model to the black-box outputs, providing a faithful, human-readable approximation of the local decision boundary.
Glossary
Local Surrogate

What is Local Surrogate?
A local surrogate is an interpretable model trained to approximate a black-box model's predictions in the immediate vicinity of a specific input instance, explaining a single prediction rather than the whole model.
The most prominent implementation of this approach is the Local Interpretable Model-agnostic Explanations (LIME) framework. The core trade-off is between local fidelity—how accurately the surrogate matches the black-box in that narrow region—and interpretability. Because the explanation is valid only for a single prediction, local surrogates are ideal for debugging individual misclassifications or generating counterfactual reasoning, but they do not provide insight into the model's global structure or behavior across the entire feature space.
Core Characteristics of Local Surrogates
Local surrogates are interpretable models trained to approximate a black-box model's decision boundary in the immediate neighborhood of a specific prediction. Unlike global surrogates, they explain a single inference rather than the entire model.
Local Fidelity vs. Global Fidelity
The defining characteristic of a local surrogate is its focus on local fidelity—accurately mimicking the black-box model's behavior only in a small region around the instance of interest. This is achieved by generating a perturbed dataset weighted by proximity to the target instance. A model with high local fidelity may have poor global fidelity, as it is intentionally blind to the overall decision boundary. This trade-off is central to techniques like LIME, where an interpretable model like a sparse linear regressor is trained on these locally weighted samples.
Perturbation and Neighborhood Sampling
To build a local surrogate, the input space around the target instance must be sampled. This is done by generating perturbed instances—modified versions of the original input. For tabular data, this involves sampling from a normal distribution around feature values. For text, it means removing words. For images, it means turning superpixels on or off. The surrogate is then trained on these perturbations, with each sample weighted by its cosine or Euclidean distance to the original instance, ensuring the model focuses on the immediate locality.
Inherently Interpretable Student Models
The 'surrogate' itself must be a glass-box model whose logic is transparent to a human. Common choices include:
- Sparse Linear Models: Provide feature weights that directly indicate importance and direction.
- Shallow Decision Trees: Offer a visualizable flowchart of local logic with only a few splits.
- Rule Lists: Generate simple if-then conditions that govern the local prediction. The complexity of the surrogate is intentionally constrained to ensure human comprehensibility.
Instance-Specific Feature Attribution
The primary output of a local surrogate is a set of feature attribution scores for a single prediction. For a linear surrogate, the learned coefficients directly quantify the contribution of each feature to the black-box's output for that specific instance. This answers the question, 'Why did the model make this prediction for this specific customer?' rather than 'How does the model work overall?' This is critical for adverse action reasoning in credit denial or medical diagnosis scenarios.
Distinction from Global Surrogates
A global surrogate is a single interpretable model trained to approximate the entire black-box model across the full input space. A local surrogate is a distinct model trained for each individual prediction that requires an explanation. While a global decision tree surrogate might have thousands of nodes to capture overall logic, a local linear surrogate is intentionally simple, capturing only the local gradient of the decision boundary. Local surrogates are preferred when the global model behavior is too complex to summarize with a single simple model.
The Faithfulness-Interpretability Trade-off
Local surrogates navigate a critical tension: the simpler the surrogate model (e.g., a linear model with 5 features), the easier it is to interpret, but the lower its capacity to faithfully capture the local non-linearities of the black-box. The R² score (coefficient of determination) between the surrogate's predictions and the black-box's predictions on the perturbed neighborhood is used to measure local faithfulness. A low R² warns the user that the explanation may be an oversimplification of a highly complex local decision boundary.
Frequently Asked Questions
Clear, technical answers to the most common questions about using interpretable local surrogate models to explain individual predictions from black-box systems.
A local surrogate model is an inherently interpretable model, such as a linear regression or shallow decision tree, trained to approximate the predictions of a complex black-box model in the immediate vicinity of a single, specific input instance. Unlike a global surrogate, which attempts to explain the entire model behavior, a local surrogate focuses on a narrow region around the data point of interest. The process involves generating a new dataset by perturbing the original instance, obtaining predictions from the black-box model for these perturbed samples, weighting them by their proximity to the original instance, and then training a simple, transparent model on this local, weighted dataset. The resulting interpretable model serves as a faithful, localized explanation for that single prediction, revealing which features were most influential in the decision.
Local Surrogate vs. Global Surrogate vs. SHAP
A technical comparison of three distinct approaches for explaining black-box model predictions, differentiated by scope, computational cost, and the granularity of the explanation produced.
| Feature | Local Surrogate | Global Surrogate | SHAP |
|---|---|---|---|
Explanation Scope | Single prediction instance | Entire model behavior | Single prediction with global feature importance |
Underlying Model | Interpretable model (e.g., linear model, decision tree) | Interpretable model (e.g., decision tree, GAM) | Additive feature attribution model |
Theoretical Foundation | Local approximation | Model distillation | Shapley values from cooperative game theory |
Fidelity Guarantee | |||
Handles Feature Interactions | |||
Model-Agnostic | |||
Computational Cost | Low (per-instance) | Medium (one-time training) | High (exponential with features) |
Primary Use Case | Debugging a specific misclassification | Auditing high-level decision logic | Regulatory compliance requiring consistent feature importance |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core concepts for understanding how interpretable models approximate black-box predictions in the vicinity of a specific instance.
Perturbation Sampling
The process of generating synthetic data points by randomly altering the feature values of the original instance. For tabular data, this involves drawing from normal distributions centered on feature values. For text, it means removing words. For images, it means turning superpixels on or off. The surrogate is trained on these perturbed samples, not the original training data.
Proximity Weighting
A kernel function that assigns higher importance to perturbed samples closer to the original instance. Common choices include an exponential kernel on cosine or Euclidean distance. This ensures the surrogate model is faithful locally—it only needs to be accurate in the immediate neighborhood, not globally.
Interpretable Representation
The transformation of raw features into a human-understandable binary vector. For text classification, this is a bag-of-words indicating word presence. For images, it's a vector of contiguous superpixels. The local surrogate is trained on this binary representation, making its coefficients directly interpretable by a human operator.
Sparse Linear Surrogate
The most common student model class for local explanations. A LASSO regression or simple linear model is trained on the weighted perturbed samples. The L1 regularization enforces sparsity, selecting only the top K features. This yields a concise explanation like: 'Prediction was driven by feature A (+0.4) and feature B (-0.2).'
Fidelity vs. Interpretability Trade-off
The core tension in local surrogate design. Fidelity measures how well the surrogate matches the black-box predictions in the local neighborhood. Interpretability measures how simple the surrogate is. A complex surrogate may have high fidelity but be unreadable. LIME explicitly balances these by constraining model complexity (e.g., limiting the number of features).

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us