Extracting Tree-Structured Representations of Trained Networks

Mark W. Craven, Jude W. ShavlikNeurIPS 1995

Overview

TREPAN is a novel algorithm designed to pull back the curtain on "black box" neural networks by converting them into human-readable decision trees. By treating a trained network as an "oracle" capable of answering an infinite number of queries, TREPAN extracts symbolic rules that are more accurate than standard decision trees while maintaining high fidelity to the original network's underlying logic.

The Interpretability Problem

Historically, neural networks have been celebrated for their high predictive accuracy but criticized for their lack of interpretability. Unlike symbolic learning systems like decision trees, which provide a clear, traceable path of logic for every classification, a neural network’s "knowledge" is distributed across a complex web of weighted connections.

This opaque, "black box" nature is a significant barrier in fields such as medicine or scientific discovery, where understanding why a decision was made is often as critical as the decision itself. Previous attempts to extract rules from networks were frequently limited to specific architectures or struggled to scale to high-dimensional data. The authors sought a general, scalable method to translate any trained network into a structured, comprehensible representation without sacrificing predictive power.

The TREPAN Methodology

The authors introduce TREPAN, an algorithm that frames the extraction of a decision tree as an inductive learning task. Crucially, the "target function" is not the original data labels, but rather the learned behavior of the trained neural network.

Key innovations of the TREPAN approach include:

  • The Oracle: TREPAN treats the neural network as an "oracle." When the algorithm requires more data to determine how to split a node in the tree, it does not rely solely on the limited training set. Instead, it generates synthetic examples and queries the network to label them.
  • Best-First Expansion: Unlike standard decision trees that grow depth-first, TREPAN expands the node offering the greatest potential to increase "fidelity" (the degree to which the tree's predictions match the network's).
  • $m$-of-$n$ Splits: Moving beyond simple binary splits (e.g., feature < x), TREPAN utilizes more expressive $m$-of-$n$ logic (e.g., "at least 2 of these 3 conditions must be true"). This structure better mimics the threshold logic inherent in neural network hidden units.
  • Distribution Modeling: To ensure synthetic queries are realistic, TREPAN models the marginal distributions of the input features using frequency counts for discrete data and Kernel Density Estimation (KDE) for continuous data.

Datasets

The algorithm was rigorously evaluated on four real-world domains:

  1. Congressional Voting: 15 features, 435 examples.
  2. Cleveland Heart-Disease: 13 features, 303 examples.
  3. Promoter Sequences (DNA): 57 features, 468 examples.
  4. Protein-Coding Regions (DNA): A larger dataset with 64 features and 20,000 examples.

Key Insights

  • Solving the Data Scarcity Problem: In traditional decision tree induction, deeper nodes have progressively fewer training examples to justify splits, often leading to poor decisions at the leaves. Because TREPAN can query the network for new labels on demand, it maintains statistical confidence even at the bottom of the tree.
  • Fidelity vs. Accuracy: The paper draws a vital distinction between accuracy (matching the ground truth) and fidelity (matching the network's predictions). TREPAN’s primary objective is fidelity—capturing the "soul" of the network. Interestingly, this often results in higher accuracy than if the tree were trained directly on the raw data alone.
  • Architecture Agnostic: Because TREPAN interacts only with the network’s inputs and outputs, it is agnostic to the underlying architecture. It can be applied to simple multi-layer perceptrons, complex deep networks, or even other opaque models like nearest-neighbor classifiers.

Key Results

TREPAN demonstrated strong performance across both accuracy and tree succinctness when compared to traditional methods like C4.5.

Accuracy and Fidelity Results
  • Superior Accuracy: In all four domains, TREPAN trees were more accurate than trees produced by standard algorithms like C4.5. For example, on the Heart Disease set, TREPAN achieved 81.8% accuracy compared to C4.5’s 71.0%.
  • High Fidelity: The extracted trees matched the neural networks' predictions with remarkable consistency, achieving fidelity scores ranging from 85.7% to 95.9%.
Tree Complexity Results
  • Succinctness: Despite utilizing more complex $m$-of-$n$ splits, TREPAN trees generally required fewer internal nodes than their C4.5 counterparts, making them significantly easier for humans to parse. In the complex protein-coding domain, TREPAN used only 10 internal nodes compared to C4.5’s 155.

Limitations and Future Work

  • Syntactic Complexity: While $m$-of-$n$ splits are highly expressive, the authors note that if $n$ becomes too large, the human comprehensibility of the split begins to degrade.
  • Feature Modeling: The quality of the synthetic queries relies heavily on how well TREPAN models the input distributions. If features exhibit complex dependencies or correlations that marginal distribution modeling misses, the oracle might be queried with unrealistic data points.
  • Scaling: Although the paper demonstrates scalability to 20,000 examples, applying TREPAN in modern "Big Data" contexts would necessitate even more robust sampling and query-management strategies.

Summary updated

BibTeX
@inproceedings{craven1995extracting,
  author = {Mark W. Craven and Jude W. Shavlik},
  title = {{Extracting Tree-Structured Representations of Trained Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {1995},
}
Figure