Inferensys

Glossary

Self-Explaining Neural Networks (SENN)

Models architected with an intrinsic explainability component that generates interpretations as part of the forward pass, ensuring faithfulness.
ML engineer running AI model benchmarks, performance charts on multiple screens, late night home office setup.
INTRINSICALLY INTERPRETABLE ARCHITECTURES

What is Self-Explaining Neural Networks (SENN)?

A neural network architecture designed with an intrinsic explainability component that generates human-interpretable explanations as part of its standard forward pass, rather than relying on post-hoc analysis.

A Self-Explaining Neural Network (SENN) is a model architecture that jointly learns to predict and to explain its predictions during a single forward pass. Unlike standard black-box models that require separate post-hoc tools like LIME or SHAP, a SENN is regularized to ensure its internal reasoning is both locally faithful and globally consistent. The architecture enforces three key principles: explanations must be explicitly parametrized, the model's decision must be a function of these explanations, and the explanations must be consistent across similar inputs.

The core mechanism decomposes a prediction into a linear combination of interpretable basis concepts weighted by relevance scores. A concept encoder transforms raw input into high-level, human-understandable features, while a parametrizer generates input-dependent coefficients. Robustness loss ensures that small input perturbations do not drastically alter the explanation, enforcing stability. This design bridges the gap between high-performance deep learning and the auditability required by regulated industries.

INTRINSIC INTERPRETABILITY

Key Features of SENN Architectures

Self-Explaining Neural Networks embed interpretability directly into the model's forward pass, producing both a prediction and a human-understandable rationale simultaneously.

01

Generalized Additive Structure

SENNs enforce a globally interpretable functional form where the final prediction is a linear combination of concept activations. Unlike post-hoc methods, this structure is a hard architectural constraint, not an approximation.

  • Prediction formula: f(x) = Σ θ(x)ᵢ · cᵢ(x)
  • θ(x) generates relevance scores for each concept
  • cᵢ(x) represents the activation of human-specified concepts
  • Linearity ensures the contribution of each concept is trivially separable
02

Concept Encoder Module

A dedicated sub-network maps raw input features to a concept bottleneck — a latent space where each dimension corresponds to a predefined, human-understandable concept. This forces the model to reason in terms of interpretable primitives.

  • Concepts can be supervised (annotated) or unsupervised (discovered)
  • The bottleneck prevents the model from using opaque feature interactions
  • Example: For loan approval, concepts might include 'credit history length' and 'debt-to-income ratio'
03

Relevance Parameterizer

The θ(x) network dynamically computes the importance weight of each concept for a specific input. This is the mechanism that makes explanations input-dependent — the same concept can be highly relevant for one prediction and irrelevant for another.

  • Outputs a sparse weight vector over the concept space
  • Enables local interpretability within a globally transparent model
  • Regularized to encourage sparsity, producing concise explanations
04

Robustness Loss Regularization

SENNs are trained with a specialized robustness penalty that enforces explanation stability. The loss function penalizes large changes in concept relevance scores when the input is perturbed by small, semantically meaningless noise.

  • L_θ constraint: ||θ(x) - θ(x + δ)|| must be small for small δ
  • Prevents adversarial explanation manipulation
  • Produces rationales that are consistent under minor input variations
  • Critical for building user trust in the generated explanations
05

Faithfulness by Construction

Unlike post-hoc rationalization, SENN explanations are faithful by design. The concept weights θ(x) are the exact coefficients used in the forward computation — there is no secondary explainer model that can introduce misrepresentation.

  • Eliminates the explanation-prediction gap found in LIME or SHAP
  • The rationale is a direct readout of the model's internal computation
  • Auditable: regulators can verify that the explanation matches the arithmetic
  • Contrast with plausible rationales that sound convincing but may be fabricated
06

End-to-End Differentiability

The entire SENN architecture — concept encoder, relevance parameterizer, and linear aggregator — is a single differentiable computation graph. This enables joint optimization of both prediction accuracy and explanation quality through standard gradient descent.

  • No alternating optimization or surrogate model training required
  • Backpropagation flows through the concept bottleneck
  • Allows fine-tuning on domain-specific interpretability requirements
  • Compatible with modern deep learning frameworks without custom infrastructure
SELF-EXPLAINING NEURAL NETWORKS

Frequently Asked Questions

Clear, technical answers to the most common questions about architecting models that generate their own interpretations during the forward pass.

A Self-Explaining Neural Network (SENN) is a model architecture that intrinsically generates human-interpretable explanations alongside its predictions as part of the standard forward pass, rather than requiring a separate post-hoc analysis. The core mechanism decomposes the prediction into a linear combination of concept activations weighted by relevance scores. Specifically, the architecture learns a set of basis concepts from the data, computes how relevant each concept is for a given input, and then combines them linearly to produce the final output. This forces the model's reasoning to be transparent by design: the final prediction is explicitly the sum of relevance(concept) * concept_value. The training objective includes a regularization term that penalizes the model if the explanations are not robust, ensuring the generated interpretations faithfully reflect the internal computation rather than fabricating a plausible but misleading story.

INTRINSIC VS. EXTERNAL INTERPRETABILITY

SENN vs. Post-Hoc Explanation Methods

A feature-level comparison of Self-Explaining Neural Networks against dominant post-hoc explanation techniques, highlighting architectural and operational trade-offs.

FeatureSENNSHAPLIME

Explanation Generation Timing

During forward pass (intrinsic)

Post-prediction (post-hoc)

Post-prediction (post-hoc)

Faithfulness to Model Logic

Computational Overhead at Inference

Low (single pass)

High (sampling-based)

Medium (local sampling)

Explanation Stability

High (deterministic)

Medium (stochastic)

Low (highly stochastic)

Model Architecture Agnostic

Requires Ground Truth Explanations for Training

Captures Global Feature Interactions

Yes (via concept encodings)

Yes (game-theoretic)

No (local linear only)

Typical Explanation Format

Concept-based scores

Shapley values

Local surrogate weights

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.