Xpdeep
← RESOURCES

ARTICLE · TECHNOLOGY / ENGINEERING

Post-hoc explanation vs structural model control: what actually changes?

Both approaches can make a model easier to inspect. They do not change the model in the same way.

OCTOBER 2026

9 MIN READ

POST-HOC

BLACK-BOX MODEL

→ PREDICTION

→ POST-HOC ANALYSIS

Analysis is produced around or after the predictive model.

STRUCTURAL MODEL CONTROL

READABLE MODEL

  • → PREDICTION
  • STRUCTURAL EXPLANATION
  • DOMAIN STATE

The model itself returns readable structure.

NATIVE ADDS

EDITABLE STRUCTURE

DESIGN LOOP

CONTROLLED EVOLUTION

Introduction

Deep learning’s power comes partly from the complexity that makes its internal decisions difficult to inspect.

Traditional explainability approaches usually start after the predictive model has already been trained. They ask:

“How can we explain what this black box just did?”

That is a legitimate and useful question.

Xpdeep starts from a different one:

“What changes if the learned structure itself can be read?”

The distinction matters because explanation can serve two very different purposes:

  1. documenting or inspecting a prediction after it happened;
  2. making the model understandable enough to design, operate and evolve differently.

This article explains where post-hoc explanation remains useful, where structural model control differs, and why the difference matters in consequential machine decisions.

01 POST-HOC

Post-hoc explanation starts with an already-trained model.

Methods such as SHAP, LIME, integrated gradients, Grad-CAM and saliency techniques analyse a predictive model after it has already been trained.

They can be valuable for:

  • inspection
  • debugging
  • model testing
  • documentation
  • communicating why a prediction may have occurred

But the predictive model itself remains the object being analysed.

The explanation is produced by a separate analytical procedure, gradient-based, perturbation-based or surrogate, depending on the method, around or after the model inference.

  1. DATA
  2. BLACK-BOX MODEL
  3. PREDICTION
  1. PREDICTION + MODEL ACCESS
  2. POST-HOC EXPLANATION

Different post-hoc methods have different capabilities. This article compares architectural roles, not every method individually.

02 STRUCTURAL MODEL CONTROL

Xpdeep changes what the learned model itself returns.

Xpdeep operates at model level.

Its objective is not only to explain a black box from the outside.

It reads learned structure from the model itself and uses that structure as part of the model lifecycle.

That distinction appears differently in Native and Retrofit mode.

Native: readability is built into the model.

In Native mode, prediction and structural explanation are learned jointly. Readability does not cost accuracy: on time-series data, accuracy is at least equivalent to standard deep learning and frequently superior.

The model is trained so that the learned structure itself can be read and edited.

This enables:

  • structural explanation
  • design-time diagnosis
  • input reduction
  • KPI alignment
  • targeted local editing
  • controlled model evolution
  1. TRAINING DATA + TARGET KPI
  2. XPDEEP-NATIVE MODEL
  3. PREDICTION + STRUCTURAL EXPLANATION

EDITABLE STRUCTURE

Retrofit: open an existing model structurally.

In Retrofit mode, the customer’s existing PyTorch predictive model remains frozen.

Its architecture, weights and predictions remain unchanged.

Structural analysis requires read access to the PyTorch model’s architecture and weights. Input/output-only analysis is not offered.

Xpdeep learns explanations from the model’s structure and integrates them into one artefact that produces prediction and structural explanation together.

Retrofit is structural.

It is not ante-hoc, because the predictive model was trained before and without the explanation objective.

It is also not conventional post-hoc explanation, because the explanation is learned from the model structure and becomes part of the inference artefact.

  1. EXISTING PYTORCH MODEL
  2. STRUCTURAL OPENING
  3. ONE ARTEFACT
  4. PREDICTION + STRUCTURAL EXPLANATION

Targeted structural editing and controlled evolution require Native mode.

03 DESIGN

The difference begins before the first production inference.

POST-HOC

The predictive model is already trained.

Explanation helps inspect the result.

The model itself is not made structurally editable by the explanation process.

XPDEEP NATIVE

The learned structure becomes part of model engineering. This enables engineers to:

  • inspect what the model actually learned
  • locate weak predictive regions
  • reduce unnecessary inputs
  • align the model to the true business KPI
  • increase or decrease complexity where needed
  • verify the effect of targeted local edits

EXAMPLE · ANONYMIZED VIRTUAL SENSOR PROGRAMME

Structural analysis identified a sensor that was marginal to overall accuracy but carried the model into a specific predictive region. The client’s engineering team retained it for safety reasons; a global importance ranking would have rated it low.

Input reduction is an engineering decision the customer’s team makes with the structure in view, not an automatic cut.

Post-hoc explanations can support diagnosis and debugging. They do not make the predictive structure itself editable.

04 INFERENCE

The difference also appears when the model runs.

There is no separate post-inference explanation procedure in the Xpdeep inference path.

Prediction and structural explanation are produced together in the same forward pass.

The model can also return an attributed domain state: a graded distance to the trained domain, with the responsible variables and temporal windows identified.

PRIMARY INFERENCE

Predict + Explain + Check domain

SAME FORWARD PASS

WHEN AN INTERVENTION IS USEFUL

Prescribe → Justify

SEPARATE INFERENCE

On temporal and tabular stages, prescription is a separate inference, run only when an intervention is useful.

It computes a minimal feasible input change under stated constraints and returns the structural justification of why that intervention changes the predicted outcome.

NATIVE

Prediction and structural explanation come from the same forward pass, with no extra compute or latency for the explanation. Budget for the explanation layer’s memory.

RETROFIT

The added layer introduces a small compute and memory overhead, measured on the target.

POST-HOC

Many methods re-evaluate the model repeatedly for each explained prediction. Cost varies by method.

05 DECISION OBJECT

A prediction with an explanation is still not the same object.

POST-HOC MODEL FLOW

  • PREDICTION
  • EXPLANATION

XPDEEP DECISION OBJECT

  • PREDICTION
  • STRUCTURAL EXPLANATION
  • ATTRIBUTED DOMAIN STATE
  • MINIMAL FEASIBLE INTERVENTION · where applicable
  • STRUCTURAL JUSTIFICATION

Adjacent monitoring or optimization tools can add other functions around a model. The Xpdeep distinction is that these primitives are integrated at model level.

The distinction is not simply “more explanation”.

Xpdeep changes the model output from a prediction into a richer decision object.

This is what allows the model to participate in a bounded operational decision rather than merely produce a score for a human to interpret.

What is distinctive is the integration: readable structure, inference-time explanation and domain state in one model, and, in Native mode, structure that engineers can edit.

06 TIME SERIES

A ranked variable is not the same as a localized signal decision.

On temporal data, many conventional explanation views focus on identifying which input variables matter.

Some post-hoc methods also provide temporal attribution and support diagnosis and engineering work. The Xpdeep difference is where the localization comes from: the model’s own structure, at inference time, together with its domain state.

Xpdeep can localize the model’s learned decision on the signal itself. It can identify which variable, which time window, which signal morphology and which learned dependency carried the model output.

VARIABLE 03

T−18 → T−06 · LOCALIZED WINDOW

VARIABLE

LOCALIZED WINDOW

MORPHOLOGY

STRUCTURAL DEPENDENCY

MODEL DEBUGGING

ARTEFACT LOCALIZATION

MEASUREMENT CORRECTION

FAULT ATTRIBUTION SUPPORT

The model localizes the learned driver. The engineer identifies the physical cause.

07 IMAGE / VIDEO

A heatmap and a structural explanation answer different questions.

Saliency and heatmap methods estimate how spatial regions of the input influenced a model’s output.

Xpdeep asks what learned structure produced the output and whether the image remains inside the model’s learned domain.

OBJECT

HEATMAP

ESTIMATED SPATIAL INPUT INFLUENCE

OBJECTIN DOMAIN

STRUCTURAL EXPLANATION

WHAT LEARNED STRUCTURE DROVE THE OUTPUT · + DOMAIN STATE

Image-level prescription: not available; under study.

08 LIFECYCLE

Structural readability changes more than explanation.

  1. DESIGN

    • Read
    • Diagnose
    • Edit
    • Verify
  2. PRODUCTION

    • Predict
    • Explain
    • Check domain
    • Prescribe where applicable
    • Justify
  3. CONTROLLED EVOLUTION

    • Operational evidence
    • Structural diagnosis
    • Targeted correction
    • Validation
    • Redeployment

These are the three loops Xpdeep closes at model level.

Explore the Three Loops on Technology →

09 BALANCE

Post-hoc explanation is often the right tool.

If the objective is primarily:

  • audit documentation
  • retrospective inspection
  • occasional local explanation
  • validation of a model that must remain unchanged

a post-hoc method may be entirely appropriate.

Xpdeep is relevant when the problem extends beyond explanation:

  • the model must be designed differently
  • explanation must travel with every inference
  • the model must expose whether it remains inside known conditions
  • a bounded intervention may need to be computed
  • the model may need targeted structural correction over time

10 CONSEQUENCE

The distinction matters when the model becomes part of the decision.

REAL-TIME OPERATION

Explanation must exist at inference time.

BOUNDED AUTHORITY

The model must know when its operating conditions no longer hold.

PRESCRIPTION

The model must identify a feasible change and justify it structurally.

MODEL EVOLUTION

Operational evidence must support targeted correction rather than automatic rebuilding.

In design, readable structure lets engineers diagnose and, in Native mode, edit the model rather than retrain by trial and error. In operation, it supplies the explanation and domain state a bounded decision needs, with execution still governed by the customer’s system rules. In controlled evolution, it supports targeted, validated correction between operating periods in Native mode.

The more consequential the decision, the more valuable it becomes to understand the model from the inside.

11 TECHNICAL BOUNDARIES

Where the distinctions stop.

STRUCTURAL, NOT AUTOMATICALLY CAUSAL
Structural explanation does not automatically establish physical causality.
MINIMAL FEASIBLE, NOT UNIQUE GLOBAL OPTIMUM
The intervention is produced under the stated constraints and optimization procedure.
DOMAIN AWARENESS IS NOT CONFIDENCE OR SAFETY
Domain validity is reported separately from predictive confidence, and it is not a system-safety guarantee.
RETROFIT IS NOT ANTE-HOC
Ante-hoc applies to Native mode.
THE SURROUNDING SYSTEM DECIDES
The customer’s system remains responsible for system-level control and safety.

12 SUMMARY

The practical question is simple.

Do you need to explain a black box after it predicts?

POST-HOC EXPLANATION

may be enough for the first.

Or do you need the learned model itself to become part of the engineering and decision process?

STRUCTURAL MODEL CONTROL

is designed for the second.

RELATED RESOURCES