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.
Glossary
Self-Explaining Neural Networks (SENN)

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.
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.
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.
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
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'
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
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
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
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
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.
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.
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.
| Feature | SENN | SHAP | LIME |
|---|---|---|---|
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 |
Related Terms
Core concepts that define the architecture and evaluation of Self-Explaining Neural Networks, bridging the gap between intrinsic interpretability and faithful rationale generation.
Faithful Rationales
A generated explanation that accurately reflects the true internal reasoning process of the model, not just a plausible-sounding story. In the context of SENN, faithfulness is architectural: the explanation is a direct function of the model's own latent concepts, not a post-hoc approximation. This contrasts sharply with models where an external explainer guesses at the logic.
Concept-Based Explanations
Justifications structured around high-level, human-understandable concepts rather than low-level input features like individual pixels. SENNs learn to map raw inputs to a sparse set of interpretable basis concepts during training. For example, a medical imaging SENN might explain a diagnosis using concepts like 'tissue density' and 'margin irregularity' instead of highlighting arbitrary pixel clusters.
Explanation Faithfulness
The degree to which a generated rationale mirrors the true computational logic used by the model. SENNs are designed to maximize faithfulness by making the explanation a constrained, differentiable component of the forward pass. Key properties include:
- Fidelity: The explanation must causally influence the prediction.
- Stability: Similar inputs must yield similar explanations.
- Completeness: The explanation must account for the entire output.
Post-Hoc Rationalization
The technique of generating an explanation after the model has made its decision, often using a secondary explainer model like LIME or SHAP. This is the antithesis of the SENN approach. Post-hoc methods are susceptible to confirmation bias, where the explainer constructs a convincing but unfaithful story. SENNs eliminate this gap by making the explanation a first-class output of the primary model.
Simulatability
The ability of a human observer to use a model's explanation to correctly anticipate the model's output on a new, unseen input. This is a strict, empirical test of interpretability. A highly simulatable SENN allows an auditor to internalize the model's logic by reading the generated concept weights and reasoning trace, then accurately predict how it will classify a held-out sample.
Mechanistic Interpretability
The field of reverse-engineering the internal computations and learned algorithms within a neural network's weights. While mechanistic interpretability dissects a black box after training, SENN represents a transparency-by-design approach. It constrains the architecture so that the mechanism is legible by construction, mapping latent representations directly to a human-specified concept basis.

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