DEV Community

Cover image for SHAP Is Not Production-Ready — And We Need to Stop Pretending It Is
Emmimal P Alexander
Emmimal P Alexander

Posted on

SHAP Is Not Production-Ready — And We Need to Stop Pretending It Is

SHAP Is Not Production-Ready — And We Need to Stop Pretending It Is

This might be unpopular, but it needs to be said:

Most explainable AI setups are fundamentally broken in production.

Not because they’re inaccurate.

Because they’re too slow, inconsistent, and disconnected from the model itself.

The uncomfortable reality

In a real-time fraud system, I tested SHAP (KernelExplainer):

  • ~30 ms per prediction
  • Run it twice → different explanations
  • Requires background data + sampling

Now ask yourself:

Would you ship a system where:

  • explanations change every time
  • latency is unpredictable
  • and audit logs aren’t deterministic?

Because that’s exactly what we’re doing.

The core mistake

We’ve accepted this architecture:

Model → Prediction → Separate Explainer → Explanation

That separation is the problem.

You’re trying to explain a deterministic system with a stochastic process… and calling it reliable.

I tried something different

Instead of improving SHAP…

I removed it.

Built a model where:

  • symbolic rules run alongside the neural network
  • explanations are generated inside the forward pass

No post-processing. No sampling.

What happened

  • 0.9 ms per prediction + explanation
  • 33× faster than SHAP
  • Deterministic outputs
  • Same fraud recall as the baseline

The explanation is no longer something you compute later.

It’s something the model already knows.

The bigger point

We don’t have an explainability problem.

We have an architecture problem.

As long as explanations are:

  • bolted on
  • slow
  • and probabilistic

they will never work in systems that need:

  • real-time decisions
  • auditability
  • and consistency

Full experiment (code + benchmark)

I documented everything here:

👉 Explainable AI in Production: A Neuro-Symbolic Model for Real-Time Fraud Detection


If you're building real systems, this is the question:

Do you want explanations that look good…

or explanations you can actually deploy?

Top comments (0)