All models

Neural-Backed Decision Tree (NBDT)

An image classifier whose final linear layer is replaced by a decision tree built from the network's own weights.

Image classification · 354 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (5 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
11.2M
Operations
354
Framework
PyTorch
Recurrent
No
Published
ICLR 2021
Cited by
79 (as of 24 October 2026)
Authors
Alvin Wan, Lisa Dunlap, Daniel Ho and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m18848
Graph hash
7b64907adb4e535f758876508311382bf17e2a3977848efffbec9ba9360e173c
Skeleton hash
a3ae9bf985610e5d2201d5e30bffacd1878c3566c422f4f88f3004a1038c3d33
Architecture hash
3e313ba9719123f5e020775a827b900aa0dc6e92bf53aea7b65e4494534151e5
Diagram SHA-256
683076e742fc77112f5815bb95dea659ea61b815e7a81c0a78053f6ef84c093d
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

A Neural-Backed Decision Tree (NBDT) is an image classifier that keeps a neural network's layers but replaces the final linear layer with a decision tree. The abstract says previous work combining decision trees with deep learning sacrificed either interpretability or accuracy, and NBDTs aim to improve both together.

The tree is built from the network's own weights. Row vectors of the fully-connected layer weights, one per class, are grouped by hierarchical agglomerative clustering. Each leaf node's weight is one of those row vectors, and each inner node's weight is the average of its leaf nodes' weights. At inference each node gives probabilities for its children, and the prediction is the leaf whose path to the root has the highest probability. The paper calls this soft inference and says it can tolerate mistakes in highly uncertain decisions.

Training adds a tree supervision loss, a cross entropy over the class distribution of path probabilities. The paper reports results for ResNet, WideResNet and EfficientNet models on CIFAR10, CIFAR100, TinyImageNet and ImageNet. It reports that NBDTs match or outperform modern neural networks on CIFAR and ImageNet and generalize better to unseen classes by up to 16%. The code release includes pretrained models for ResNet18 and WideResNet28x10 on CIFAR10, CIFAR100 and TinyImagenet200.

Key idea. The paper replaces a neural network's final linear layer with a differentiable sequence of decisions and a surrogate loss, aiming to improve accuracy and interpretability together.

  • NBDT
  • Neural-Backed Decision Tree
  • Neural-Backed Decision Trees
  • neural decision tree
  • interpretable image classification
  • explainable classifier
  • induced hierarchy
  • soft decision tree
  • hierarchical classification

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{wan2021nbdtneuralbackeddecisiontrees,
      title={NBDT: Neural-Backed Decision Trees}, 
      author={Alvin Wan and Lisa Dunlap and Daniel Ho and Jihan Yin and Scott Lee and Henry Jin and Suzanne Petryk and Sarah Adel Bargal and Joseph E. Gonzalez},
      year={2021},
      eprint={2004.00221},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2004.00221}, 
}