Inferensys

Glossary

Neural Additive Models (NAM)

An interpretable deep learning architecture that learns a linear combination of neural networks, each attending to a single input feature, allowing the shape function of each feature to be visualized independently.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
INTERPRETABLE DEEP LEARNING

What is Neural Additive Models (NAM)?

A glass-box deep learning architecture that learns a linear combination of single-feature neural networks, enabling precise visualization of each feature's learned shape function.

A Neural Additive Model (NAM) is an interpretable deep learning architecture that expresses a prediction as a linear combination of independent neural networks, where each sub-network attends to a single input feature. This constraint enforces an additive functional form, allowing the model to learn complex, non-linear relationships while maintaining the transparency of a Generalized Additive Model (GAM).

Unlike black-box deep networks, NAMs enable direct visualization of each feature's learned shape function, revealing exactly how a change in a specific input value influences the final prediction. This architecture bridges the gap between the high performance of deep learning and the strict interpretability required for high-stakes regulatory compliance, making it suitable for auditable decision systems.

ARCHITECTURAL PRINCIPLES

Key Features of Neural Additive Models

Neural Additive Models (NAMs) combine the expressiveness of deep learning with the inherent interpretability of Generalized Additive Models (GAMs). Instead of a single black-box network, a NAM learns a separate neural network for each input feature, making the model's logic fully transparent and auditable.

01

Linear Combination of Neural Networks

The core architecture of a NAM is expressed as:

y = β₀ + f₁(x₁) + f₂(x₂) + ... + fₚ(xₚ)

Each fᵢ is a distinct, independently trained neural network attending to a single input feature xᵢ. The final prediction is the unweighted sum of these individual network outputs. This structural constraint enforces additivity, eliminating complex feature interactions by design and ensuring that the contribution of each feature is mathematically isolated and independently auditable.

1:1
Feature-to-Network Ratio
02

Visualizable Shape Functions

Because each feature is processed by its own dedicated network, the learned relationship can be plotted as a shape function. This is a 2D graph where the x-axis is the input feature value and the y-axis is the model's output contribution for that feature.

  • Direct Visualization: Unlike SHAP or LIME which approximate explanations, NAM shape functions are the exact, ground-truth logic of the model.
  • Auditability: A domain expert can visually inspect the graph to verify that the model has learned a medically, financially, or physically plausible relationship.
  • Example: For a credit model, the shape function for 'age' might show a smooth, monotonically increasing risk score up to a point, which a regulator can instantly validate.
Exact
Explanation Fidelity
03

Feature-Level Modularity

NAMs enforce a strict modular architecture where each feature network is a self-contained unit. This provides several engineering advantages:

  • Independent Training: Feature networks can be trained in parallel, distributing the computational load.
  • Selective Retraining: If a data distribution shift is detected for a single feature, only that specific network needs to be retrained, leaving the rest of the model untouched.
  • Feature Surgery: A problematic or biased shape function can be surgically removed or replaced without degrading the performance of other features, enabling precise model editing for compliance.
Per-Feature
Update Granularity
04

Accuracy-Interpretability Trade-off

The structural additivity constraint is the source of both NAM's interpretability and its primary limitation. By design, a NAM cannot learn feature interactions.

  • Expressiveness Gap: A standard deep neural network (DNN) can model complex, non-linear interactions between features (e.g., the combined effect of 'age' and 'income'). A pure NAM cannot.
  • NAMs with Interactions (NA²M): To bridge this gap, the architecture can be extended to include two-way interaction terms, learning separate networks for pairs of features: fᵢⱼ(xᵢ, xⱼ). This improves accuracy while retaining partial interpretability, as the pairwise shape functions can still be visualized as heatmaps.
Additive
Structural Constraint
05

ExU Activation for Jagged Functions

Standard activation functions like ReLU produce smooth, piecewise-linear functions. To learn highly jagged, non-smooth shape functions common in real-world data, NAMs often employ Exp-centered Units (ExU) in the first hidden layer.

An ExU is defined as: ExU(x) = exp(w) * (x - b)

  • High Curvature: The exponential weight term allows the network to create sharp, high-frequency variations in the shape function without requiring an excessively deep architecture.
  • Practical Use: This is critical for modeling phenomena like mortality risk, which has a sharp spike in infancy, a drop in early adulthood, and an exponential increase in old age—a shape a standard ReLU network struggles to fit precisely.
06

Global and Local Explainability

NAMs provide both global and local explanations without additional computation:

  • Global Explanation: The entire set of shape functions constitutes a complete, global explanation of the model's logic. This serves as a Global Surrogate Model that is the actual model itself.
  • Local Explanation: For a single prediction, the explanation is a simple bar chart showing the additive contribution of each feature: f₁(x₁_instance), f₂(x₂_instance), .... This is mathematically identical to the model's own internal computation, providing 100% faithful local feature attribution.
  • Comparison: This contrasts with post-hoc methods like LIME, which generate a local approximation that may not perfectly reflect the underlying model's true reasoning.
100%
Explanation Fidelity
NEURAL ADDITIVE MODELS

Frequently Asked Questions

Clear, technical answers to the most common questions about the architecture, training, and interpretability of Neural Additive Models.

A Neural Additive Model (NAM) is an interpretable deep learning architecture that learns a linear combination of independent neural networks, where each network attends to a single input feature. The core mechanism is the Generalized Additive Model (GAM) structure, expressed as y = β + f₁(x₁) + f₂(x₂) + ... + fₚ(xₚ), where each shape function fᵢ is a multi-layer perceptron trained jointly. Unlike black-box deep networks that mix features in hidden layers, NAMs enforce a strict additive constraint, ensuring the contribution of each feature to the final prediction is isolated. After training, each feature's learned neural network is visualized as a graph, showing exactly how changes in that feature's value influence the model's output, providing complete transparency into the decision logic.

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.