Skip to content

Latest commit

 

History

97 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TREVIS logo

TREVIS (Tree REpresentations from Variational Inference in latent Space) is a generative approach to Decision Tree (DT) learning based on the exploration of the latent space of a Tree Transformer Variational Auto-Encoder (TTVAE), allowing for optimization w.r.t. complex objectives.

Usage

To run TREVIS, follow these steps:

  1. Download this repository on your local machine.

  2. Fit random train DTS. Edit the config/random_trees_config.json file with your preferred configuration and run:

     python3 scripts/random_trees.py 
  3. Tokenize random DTs. Edit the config/tokenize_config.json file with your preferred configuration and run:

     python3 scripts/tokenize.py 
  4. Train the TTVAE. Edit the config/train_ttvae_config.json file with your preferred configuration and run:

    python3 scripts/ttvae_train.py 
  5. Optimize via gradient ascent. Edit the config/gradient_config.json file with your preferred configuration and run:

     python3 scripts/gradient.py 

Alternatively, set all configuration files in config and run:

bash trevis.sh

to automatically run steps 2-5. Best found DTs are stored in experiments/best_dts.json

Experiments

Competitors

We compare against the following competitors. Please refer to the corresponding repositories for implementation details and requirements:

You can run the experiments for the competitors using the scripts in competitors folder. Also in this case, modify the config appropriately when in need of using models with respect to original or discretized features.

Data

The datasets considered in this work are widely used tabular benchmark datasets. For each dataset, we provide the processed version in data_splitted/ and the corresponding discretized version in data_splitted_discretized/.

The processed versions include preprocessing steps such as missing-value handling, feature transformations, one-hot encoding of categorical variables, conversion of binary string features to 0/1 values, and renaming of columns to clearer semantic labels. For further details on these processed dataset versions, please refer to:

https://huggingface.co/mstz/datasets

Dataset sources

If you use TREVIS for your research, please cite:

  @article{fidone2026learning,
  title={Learning Sparse Decision Trees via Transformer Variational Auto-Encoders},
  author={Fidone, Giacomo and Cascione, Alessio and Guidotti, Riccardo},
  journal={arXiv preprint arXiv:2609.01430},
  year={2026}
}

License

TREVIS is distributed under the GNU General Public License. Refer to LICENSE.txt for details.

About

TREVIS (Tree REpresentations from Variational Inference in latent Space) is a generative approach to Decision Tree learning based on the exploration of the latent space of a Tree Transformer Variational Auto-Encoder, allowing for optimization w.r.t. complex objectives.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages