Exact and Cost-Effective Automated Transformation of Neural Network Controllers to Decision Tree Controllers

Kevin Chang, Nathan Dahlin, Rahul Jain, Pierluigi Nuzzo · DOI

Introduction

Neural networks (NNs) have become the gold standard for complex control tasks, yet their "black-box" nature remains a significant liability in safety-critical applications such as autonomous driving or medical robotics. To ensure these systems are reliable, engineers utilize formal verification—mathematical proofs that a controller will never violate safety constraints. However, verifying deep NNs is notoriously difficult due to the massive search space created by non-linear activation functions like ReLUs.

The NN2SDT Framework

This paper introduces NN2SDT, an algorithm designed to transform discrete-output ReLU neural networks into mathematically equivalent Soft Decision Trees (SDTs). Unlike traditional "knowledge distillation" methods that produce approximations, this transformation is lossless: the resulting SDT and the original NN will make the exact same decision for every possible input state.

Figure 1: A reference neural network and its mathematically equivalent soft decision tree representation.

The core innovation of NN2SDT lies in its geometry-based splitting approach. The algorithm identifies essential boundaries in the input space using three specific rules:

  1. ReLU Split: Partitions the space based on whether a specific neuron is active or inactive.
  2. Output Split: Partitions the space based on the argmax boundary (which output neuron has the highest value).
  3. Leaf Formation: Finalizes a node once the controller's action is guaranteed to be constant across a specific region.

Crucially, the authors prove that the size of the resulting tree scales polynomially with the maximum width of the NN's hidden layers, rather than exponentially. This allows the tree to remain compact enough for practical use in real-world architectures.

Verification via Recursive Reachability Analysis

The resulting SDT is fed into a Satisfiability Modulo Theory (SMT) solver to prove safety properties over a finite time horizon. The researchers employ Recursive Reachability Analysis (RRA) to facilitate this process. By flattening the policy into a tree of affine (linear) functions, the solver can prune "impossible" branches much faster than it could when navigating the nested non-linearities of a deep NN.

Figure 3: Comparison of one-shot verification versus the recursive reachability analysis used in the SDT verification pipeline.

Experimental Results

The researchers evaluated NN2SDT using standard benchmarks from the OpenAI Gym library: MountainCar-v0, CartPole-v1, and CarRacing-v2. The results demonstrate significant improvements in both efficiency and practicality:

  • Verification Speedup: The SDT representation allowed for formal verification that was 21x faster for the MountainCar environment and 2x faster for CartPole compared to verifying the original NN.
  • Scalability: The algorithm successfully transformed NNs for the CarRacing environment in under 900 seconds. Previous exact transformation methods typically failed once a network exceeded ten neurons.
  • Compactness: The SDT sizes were orders of magnitude smaller than theoretical worst-case scenarios, proving that focusing on decision boundaries keeps the models manageable.

Limitations and Future Work

While NN2SDT represents a major step forward, challenges remain. The framework is currently designed for discrete action spaces, and high-dimensional inputs (like raw pixel data) still require feature extraction to remain computationally feasible. Additionally, while width scaling is polynomial, the complexity relative to network depth remains a factor for extremely deep architectures. Future research will focus on extending these exact transformations to continuous action spaces and more complex reinforcement learning environments.

Summary updated

BibTeX
@article{chang2026exact,
  author = {Kevin Chang and Nathan Dahlin and Rahul Jain and Pierluigi Nuzzo},
  title = {{Exact and Cost-Effective Automated Transformation of Neural Network Controllers to Decision Tree Controllers}},
  journal = {IEEE Trans. Automatic Control},
  year = {2026},
  doi = {10.1109/tac.2026.3676368},
}
Figure