Implicit Neural Decision Trees

Francesco Spinnato, Antonio Mastropietro, Riccardo Guidotti2025

Abstract

Representation learning is a central topic in machine learning, with significant efforts dedicated to encoding structured data such as sequences, trees, and graphs for various downstream tasks. A branch of these studies focuses on functional data analysis, which views data not as discrete arrays but as continuous functions. When these functions are parameterized using neural networks, they are called Implicit Neural Representations (INR). INRs have been successfully applied to represent diverse data types but, to the best of our knowledge, have not been used for encoding decision models. This work addresses the novel challenge of using INRs to represent decision trees. We introduce a tailored coordinate system and train INRs to reconstruct decision trees with a loss function to minimize node reconstruction errors. We benchmark implicit neural decision trees on several datasets, showing that they can effectively represent individual trees, and show potential extensions to tree forests through meta-learning.

Introduction

In the field of representation learning, significant progress has been made in encoding data—such as images, audio, or graphs—into vector spaces. However, the models themselves are rarely treated as data. Decision trees are highly interpretable and widely used, but their discrete, hierarchical nature makes them difficult to integrate into the continuous, gradient-based world of deep learning. This research introduces Implicit Neural Decision Trees (INDTs), treating a decision tree as a "functum"—a mapping from a coordinate space to node properties. This approach allows for a unified representation where models and data can be handled within the same neural architecture.

Methods

The INDT framework leverages Implicit Neural Representations (INRs) to parameterize decision trees. Instead of storing a tree as a static hierarchical structure, a small neural network is trained to map specific coordinates to the properties of the corresponding tree node.

Coordinate System and Architecture

To effectively encode the tree hierarchy, the authors introduced a binary coordinate system based on Breadth-First Search (BFS). Each node's position is converted into a binary vector that explicitly encodes its depth and path, providing a "roadmap" for the neural network. The core architecture uses a SIREN (Sinusoidal Representation Network) with three specialized output heads:

  • Feature Head: Predicts which feature is being split (Classification).
  • Threshold Head: Predicts the split value (Regression).
  • Class Head: Predicts the label for leaf nodes (Classification).
Overview of the INDT framework, illustrating the mapping from binary coordinates to tree node properties via neural heads.

Scaling to Forests

To represent Random Forests, the authors utilized α-MAML, a meta-learning algorithm. This allows a single meta-model to learn the general distribution of trees within a forest, enabling the network to represent any specific tree with only a few gradient updates.

Results

The researchers evaluated INDTs using six classic tabular classification datasets: Bank, Breast Cancer, Cars, Glass, Pima, and Wine. Standard Scikit-Learn Random Forests (10 trees, max depth 5) served as the ground truth for reconstruction.

Performance comparison between original models, single-tree INRs, and meta-learned forests across six datasets.

As shown in the results table, INDTs achieve high-fidelity reconstruction. For individual trees, the accuracy of the reconstructed models was nearly identical to the original Scikit-Learn models in many cases. While the meta-learning approach (α-MAML) introduced a slight trade-off in precision compared to training separate INRs for every tree, it successfully captured the essence of entire forests within a single parameterization.

Discussion and Future Work

This work shifts the perspective of decision trees from static objects to continuous signals. While successful, the current approach faces computational challenges in meta-learning, limiting experiments to relatively shallow trees. Future research directions include exploring hyperbolic coordinate systems, which are mathematically better suited for hierarchical branching structures, and generative induction, which aims to create new interpretable trees through gradient-based optimization in the learned latent space.

Summary updated

BibTeX
@misc{spinnato2025implicit,
  author = {Francesco Spinnato and Antonio Mastropietro and Riccardo Guidotti},
  title = {{Implicit Neural Decision Trees}},
  year = {2025},
  doi = {10.14428/esann/2025.es2025-85},
}
Figure