Eliminating Redundant Feature Tests in Decision Tree and Random Forest Inference on SQL Predicates

In-database prediction queries that apply machine learning (ML) pipelines to perform data analysis are prevalent in many applications. Since data stored in databases is typically tabular, tree-based models are particularly well-suited and thus widely adopted for such tasks. When ML inference with a decision tree or random forest appears on a SQL predicate, existing works first perform ML inference and then determine whether the inference result satisfies the predicate. However, this leads to redundant feature tests on the tree node during the predicate evaluation. To determine whether one data record satisfies the predicate, it is possible to perform feature tests only on partial internal nodes of the tree. We identify that these redundant feature tests are caused by specific sibling and ancestor nodes. In particular, we propose the sibling-centric elimination with the merging-based subtree collapse method, and the ancestor-centric elimination with the sliding-based subtree recombination method. We implement a prototype system, called ReTree, based on DuckDB. Our experiments show that ReTree achieves a 2.56x speedup on average over DuckDB for prediction query execution and outperforms other solutions.

Authors

Institutions

Publication Details

Journal
Proceedings of the ACM on Management of Data
Published
2026-05-18
DOI
https://doi.org/10.1145/3802048
Primary Topic
Data Quality and Management
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Eliminating Redundant Feature Tests in Decision Tree and Random Forest Inference on SQL Predicates

Qingfeng Pan, Mingxi Liu, Huayou Su, Qingsong Ruan et al.
Proceedings of the ACM on Management of Data
Data Quality and Management
article

Eliminating Redundant Feature Tests in Decision Tree and Random Forest Inference on SQL Predicates

Qingfeng Pan, Mingxi Liu, Huayou Su, Qingsong Ruan, Chenyang Zhang, Zhengyuan Ding, Chen Xu, Zhao Zhang
article en

Abstract

In-database prediction queries that apply machine learning (ML) pipelines to perform data analysis are prevalent in many applications. Since data stored in databases is typically tabular, tree-based models are particularly well-suited and thus widely adopted for such tasks. When ML inference with a decision tree or random forest appears on a SQL predicate, existing works first perform ML inference and then determine whether the inference result satisfies the predicate. However, this leads to redundant feature tests on the tree node during the predicate evaluation. To determine whether one data record satisfies the predicate, it is possible to perform feature tests only on partial internal nodes of the tree. We identify that these redundant feature tests are caused by specific sibling and ancestor nodes. In particular, we propose the sibling-centric elimination with the merging-based subtree collapse method, and the ancestor-centric elimination with the sliding-based subtree recombination method. We implement a prototype system, called ReTree, based on DuckDB. Our experiments show that ReTree achieves a 2.56x speedup on average over DuckDB for prediction query execution and outperforms other solutions.

Proceedings of the ACM on Management of DataVol. 4(3)
National University of Defense Technology (CN), DE Technologies (United States) (US), East China Normal University (CN)
National Natural Science Foundation of China
Life in Land
Openalex Percentile: Top 4%
Data Quality and Management
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.