Inferensys

Glossary

Self-Explaining Neural Networks (SENN)

A class of neural networks with inherent interpretability, learning to produce predictions and explanations as locally relevant, stable feature coefficients.
Data engineer managing feature store on laptop, feature definitions visible, casual data engineering session.
INTERPRETABLE ARCHITECTURE

What is Self-Explaining Neural Networks (SENN)?

A class of neural networks designed with an inherent interpretability structure, where the model learns to produce both a prediction and an explanation in the form of locally relevant, stable feature coefficients.

A Self-Explaining Neural Network (SENN) is a deep learning architecture that intrinsically generates both a prediction and a human-interpretable explanation for that prediction without requiring post-hoc analysis. The model enforces an interpretability prior by learning a set of basis concepts and corresponding relevance scores (feature coefficients) that are locally stable and semantically meaningful, ensuring the explanation is faithful to the model's internal reasoning process.

SENNs achieve this by constraining the model's architecture such that the final prediction is a linear combination of interpretable concept activations, weighted by input-dependent coefficients. This design enforces robustness by requiring that similar inputs yield similar explanations, a property formalized through a gradient penalty on the relevance scores. Unlike black-box models explained by LIME or SHAP, SENNs provide explanations that are a direct artifact of the forward pass, making them suitable for high-stakes governance contexts where auditability and algorithmic transparency are non-negotiable.

ARCHITECTURAL PILLARS

Core Properties of SENN Architectures

Self-Explaining Neural Networks (SENN) are not merely post-hoc analysis tools; they are a distinct class of models engineered with an intrinsic interpretability structure. The following properties define their architectural departure from standard black-box networks.

01

Generalized Additive Structure

The core architectural constraint of a SENN is that the final prediction is a linear combination of basis concepts. The model learns functions h(x) that transform raw inputs into interpretable, high-level features. The output is f(x) = Σ θ(x)_i * h(x)_i, where θ(x) are the locally relevant relevance scores. This additive decomposition ensures that the contribution of each concept is isolated and can be inspected independently, making the decision process transparent by design.

02

Locally Linear Coefficient Generation

Unlike global linear models, a SENN generates input-dependent relevance scores θ(x) via a parameterized network. This means the explanation adapts to every single input. For a given instance, the network outputs a set of coefficients that weight the basis concepts. This allows the model to capture complex, non-linear decision boundaries while maintaining local linearity with respect to the concepts, providing a faithful, instance-specific explanation rather than a global approximation.

03

Robustness via Gradient Penalty

To ensure the explanations are stable and meaningful, SENNs are trained with a robustness loss that penalizes large variations in the relevance scores θ(x) for small, imperceptible changes to the input. This is achieved by minimizing the gradient of θ(x) with respect to x:

  • Stability: Explanations do not fluctuate wildly for nearly identical inputs.
  • Faithfulness: The penalty enforces that the explanation is a true function of the input's semantic content, not brittle noise.
04

Interpretable Basis Concept Learning

The model learns a dictionary of basis concepts h(x) that serve as the vocabulary of the explanation. These concepts can be:

  • Prototype-based: Similarity to learned prototypical examples.
  • Domain-specific: Encoded to align with known, human-understandable attributes (e.g., 'fur texture', 'ear shape'). The architecture forces the model to reason using these high-level concepts, making the internal representation inherently more interpretable than raw feature detectors in standard deep networks.
05

End-to-End Differentiability

The entire SENN architecture—including the concept encoder, relevance parameterizer, and final linear combination—is trained end-to-end using standard gradient-based optimization. There is no separate post-hoc explainer to train. The explanation is a direct, differentiable output of the model. This joint optimization ensures that the model's predictive accuracy and its explanatory fidelity are balanced during training, rather than having an explanation retrofitted onto a frozen, opaque model.

SELF-EXPLAINING NEURAL NETWORKS

Frequently Asked Questions

Clear, technical answers to the most common questions about Self-Explaining Neural Networks (SENN), an interpretable architecture that generates predictions alongside human-understandable explanations.

A Self-Explaining Neural Network (SENN) is a class of inherently interpretable neural network architectures that simultaneously produces a prediction and a local explanation for that prediction in the form of stable, human-understandable feature coefficients. Unlike post-hoc explanation methods applied to black-box models, a SENN is designed from the ground up with an interpretability structure. The architecture consists of three core components: a concept encoder that transforms raw input features into a set of high-level, semantically meaningful concepts; a parametrization network that learns to generate local relevance scores (coefficients) for each concept that are specific to the input instance; and an aggregation function that combines the concepts and their relevance scores to produce the final prediction. The key innovation is the enforcement of a robustness loss that ensures the explanation—the relevance scores—remains stable under small, non-meaningful perturbations of the input, making the model's reasoning faithful to its actual computation.

INHERENT VS. APPROXIMATED INTERPRETABILITY

SENN vs. Post-Hoc Explanation Methods

A feature-level comparison of Self-Explaining Neural Networks against common post-hoc explanation techniques for model transparency.

FeatureSENNSHAPLIMEGrad-CAM

Explanation Type

Inherent (ante-hoc)

Post-hoc (additive)

Post-hoc (surrogate)

Post-hoc (gradient)

Model Agnostic

Local Explanations

Global Explanations

Faithfulness to Model

Exact (architectural constraint)

Approximate (sampling)

Approximate (local surrogate)

Approximate (linearization)

Computational Cost at Inference

Low (single forward pass)

High (many perturbations)

Medium (local sampling)

Low (single backward pass)

Handles Feature Interactions

Stability of Explanations

High (learned representation)

Medium (stochastic sampling)

Low (random perturbations)

Medium (smoothgrad variants)

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.