TreeWalker: Partial Evaluation for Grouped Tree-Ensemble Inference
Durmus U Karatay, Richard Newman
NeurIPS 2026
Abstract. Many prediction tasks evaluate a trained tree ensemble on groups of rows that share feature values: discrete-time survival models expand each patient into time steps, click-through-rate models score every item in a search session, and scenario analyses vary a few inputs while holding the rest fixed. Standard inference treats each row independently and ignores this input-side correlation.
We present TreeWalker, which instantiates partial evaluation for grouped tree-ensemble inference: constant features are static, varying features dynamic. TreeWalker walks each tree once per group, partitions a row bitmask at varying splits, and skips empty subtrees via an unsplit shortcut. It reads standard LightGBM and XGBoost models; training is unchanged.
We prove a structural work decomposition: per-tree work splits into the constant-projected subtree size , leaf writes, and a predicate-mask provisioning cost . For the trace evaluator, per-row work approaches as , giving asymptotic speedup .
On Intel, TreeWalker is faster than a row-independent traversal at the reference model size (, ; for SUPPORT/FLCHAIN and empirical groups for Expedia) and -- faster at on the survival datasets; on Arm, -- and --. On a scenario-analysis benchmark it is faster in all configurations on both machines. For f64 models, outputs match treelite GTIL up to tree-ordering roundoff; for f32 models, TreeWalker's f64 leaf accumulation is closer than native f32 to an exactly rounded reference on every audited row.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:47 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
This paper proposes TreeWalker, an exact inference algorithm for tree ensembles applied to groups of rows that share many feature values. the method traverses each tree once per group and partitions the active rows only at varying-feature splits.
The main strengths are the simplicity and clarity of the core idea. Reviewers liked the careful separation of algorithmic gains from implementation effects, and the thorough numerical-precision analysis. empirical results are convincing.
Weakness is limited scope. TreeWalker is most applicable when grouped inputs arise naturally and grouping can be obtained cheaply. The cost of constructing groups for unstructured batches is not evaluated. The experiments are also limited to CPU execution, three datasets, and small groups. Broader workloads and an analysis of larger or chunked groups would strengthen the paper. Some presentation, notation, and related-work issues should also be addressed.
Read meta-review
Meta-review
This paper proposes TreeWalker, an exact inference algorithm for tree ensembles applied to groups of rows that share many feature values. the method traverses each tree once per group and partitions the active rows only at varying-feature splits.
The main strengths are the simplicity and clarity of the core idea. Reviewers liked the careful separation of algorithmic gains from implementation effects, and the thorough numerical-precision analysis. empirical results are convincing.
Weakness is limited scope. TreeWalker is most applicable when grouped inputs arise naturally and grouping can be obtained cheaply. The cost of constructing groups for unstructured batches is not evaluated. The experiments are also limited to CPU execution, three datasets, and small groups. Broader workloads and an analysis of larger or chunked groups would strengthen the paper. Some presentation, notation, and related-work issues should also be addressed.
- Rating
- 4/6
- Confidence
- 2/5
- Quality
- 2/4
- Clarity
- 3/4
- Significance
- 2/4
- Originality
- 2/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The authors propose an algorithm that speeds up the fitting of gradient boosted tree-based models for datasets with groups (ie time series and multilevel data). The algorithm does not rely on approximations and yields the same outputs as LightGBM and XGBoost while showing computation time improvements.
Strengths and weaknesses
Strengths:
- The computation time reduction results on the chosen datasets are appealing
Weaknesses:
- The proofs are poorly written
- The framing is a bit weird and there is a lack of related work to multilevel, nested data and time series to position the applications better
- The paper is not very well written, with many repetitions and verbose language which makes the reading unnatural.
- undefined notation l. 64, and I believe it is instead of in that paragraph
- I find the applications (grouped datasets with many observations per groups, and many constant features) maybe a bit narrow or specific
Questions
- Could this work with random forests too?
- Why is the speed up reduced as increases
- Are there situations where treewalker is slower than lightgbm
Limitations
yes
Final justification
/
Formatting concerns
/
3 comments
Thank you for your answer. On Q1: Since you mention your method works on random forests, I'd be curious to see the time-reduction on this. Of course I am not expecting this from you now but it might be a good direction for your paper. I raise my score to 4
We thank the reviewer for the response and for raising the score. We agree that measured random-forest timings are a natural next step: the work decomposition depends on the same quantities (, versus ), and RF trees are typically deeper than boosted trees, so the mechanism carries over while the constants may differ. We will name this direction explicitly in the future-work discussion, and the revision will state the current implementation boundary (binary-logistic GBDTs) in the limitations.
- Rating
- 4/6
- Confidence
- 1/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The paper propose TreeWalker, a tree-ensemble inference algorithm for the setting where prediction queries arrive in groups of rows that share most feature values (e.g., a patient expanded into G discrete time steps for survival analysis, or a search session with G candidate items). The idea is to instantiate online partial evaluation over grouped inputs: features constant within a group are treated as static, features that vary become dynamic. The algorithm walks each tree once per group instead of once per row, maintaining a bitmask of "still-active" rows that is partitioned at varying-feature splits and pruned via an "unsplit shortcut" when one side becomes empty. With that, The authors contributes to (i) the algorithm, (ii) a structural work-decomposition theorem with two corollaries giving an asymptotic per-row work ratio of (d_v + 1)/(d + 1) and a forest-level provisioning bound, and (iii) an empirical study on SUPPORT, FLCHAIN, and Expedia. Reported evaluation shows speedups are ~3× at the reference config and 6.8–7.8× at G=128 on the survival datasets.
Strengths and weaknesses
Strengths: The writing quality is good ans straightforward.
The evaluation shows some significance, with ~3x algorithmic speedup at the reference configuration.
Careful numerical precision audit. Bit-exactness against treelite GTIL for f64, and the f32 comparison against a Kahan-compensated reference, are unusually thorough. I appreciate for the correctly framing of the f32 result as a roundoff property rather than a model-quality claim.
Weaknesses:
Empirical coverage is somewhat narrow relative to the generality of the framing: the two survival datasets are structurally similar (both discrete-time expansions with covariate-time interactions as the varying features), and the scenario-analysis use case named in the introduction is not benchmarked. Broader coverage would help readers gauge how well the reported speedups generalize.
The G ≤ 128 limit is a real practical constraint that comes from the u128 bitmask choice. The authors acknowledge this but I would have liked to see a discussion of how a chunked or hierarchical bitmask would interact with the analysis — does the work decomposition still hold cleanly when groups are split into 128-row chunks?
Questions
See weaknesses
Limitations
yes
Formatting concerns
N/A
3 comments
Rebuttal
We thank the reviewer for the precise summary and for engaging with the numerical-precision audit; the reading of the f32 result as a roundoff property is exactly the framing we intended.
Scenario analysis and empirical coverage (W1). The reviewer is right on both counts: the introduction names scenario analysis without benchmarking it, and SUPPORT and FLCHAIN share the discrete-time expansion structure. We have run the missing benchmark. Scenario analysis is the general form of our survival workloads: discrete-time expansion is the special case where the varied feature is the time index (plus its interactions), while general scenario analysis varies an arbitrary small feature subset. On the UCI Default of Credit Card Clients dataset (30,000 rows, 23 features; LightGBM , ) we sweep the number of perturbed features and the group width : TreeWalker is never slower than the same-layout full walk in any of the 32 cells on either machine (GCE Axion Arm and Xeon 8581C, SMT off, core-pinned), with speedup of 3.8 to at and 1.85 to at on Arm, 2.0 to and 1.07 to on Intel; at SUPPORT's varying-dimension count this sweep matches our Section 5 SUPPORT speedups within about 5% on the same machines. The measured work ratio tracks the prediction as grows, including at the unfavorable end (, : on Arm, on Intel, still never slower). At , with counters identical on both architectures:
| measured work ratio | predicted | speedup (Arm) | speedup (Intel) | |
|---|---|---|---|---|
| 1 | 0.195 | 0.188 | ||
| 2 | 0.276 | 0.268 | ||
| 4 | 0.395 | 0.386 | ||
| 8 | 0.611 | 0.601 |
Since perturbations are multiplicative, a selected zero-valued feature stays constant across variants; counts selected features, mean realized varying dimensionality at is 6.8 of 8, and is measured on the realized groups. We will add this workload to Section 5 and report the full sweep in the appendix.
Chunked groups (W2). The decomposition composes over chunks. Split into chunks ; applying the theorem per chunk bounds total work by . The constant-projected subtree is identical across chunks (it depends only on the constant features), so the structural term is paid times instead of once and the per-row ratio plateaus at the chunk width rather than continuing to fall; leaf writes remain in total. One caveat we will state explicitly: the cost model charges one unit per -bit mask operation, which holds for fixed 32/64/128-bit words. An arbitrary-width or hierarchical mask would make each operation , which is why we chunk rather than widen the mask. Measured, with 128-row chunks at under fixed total work (same row count and same chunk multiset in every cell), no chunked cell was slower than the plateau in either run:
| logical | Arm s/row ( vs 128) | Intel s/row ( vs 128) |
|---|---|---|
| 128 | 0.987 | 0.977 |
| 256 | 0.980 (-0.7%) | 0.962 (-1.5%) |
| 512 | 0.960 (-2.8%) | 0.942 (-3.5%) |
| 1024 | 0.932 (-5.6%) | 0.917 (-6.1%) |
That sweep checks that realized chunked serving stays at the plateau; the -fold structural repayment is quantified by the per-chunk decomposition above, not by the sweep. Since the ratio saturates well before on our datasets (Table 2), chunking forfeits little. We will add the per-chunk analysis and the measured sweep to the appendix.
Thanks for the rebuttal! Those points sound good to me.
We thank the reviewer for confirming and for the engagement throughout; the scenario-analysis benchmark and the chunked-group treatment will be in the revision as described.
- Rating
- 4/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper proposes TreeWalker, an inference method for tree ensembles when predictions are made over groups of rows that share many feature values. The key idea is to treat shared features as static inputs and row-varying features as dynamic inputs. Instead of traversing every tree independently for every row, TreeWalker walks each tree once per group, follows constant-feature splits once, and only partitions the active row set when the tree encounters a varying-feature split. The method is evaluated on survival and ranking-style grouped prediction tasks and shows substantial speedups.
Strengths and weaknesses
Strength:
- The paper identifies a real inefficiency in standard tree-ensemble inference. Many practical workloads create structured groups of similar rows, but they usually treat all rows independently.
- The core algorithm is simple and intuitive. It is essentially partial evaluation applied to tree inference.
- The evaluation is fair by comparing it against LightGBM, XGBoost, tl2cgen, lleaves, and QuickScorer. The authors separate algorithmic speedup from implementation/layout speedup using a same-layout full-walk baseline.
Weaknesses:
- The applicability is narrower than the headline speedups may suggest. The method works best when groups are already naturally available, such as survival time expansion or session-level ranking. For arbitrary tabular batches, one would first need to group rows by shared constant features, which may require hashing/sorting and could erase the benefit. Also, the paper does not fully account for grouping cost. In the evaluated workloads, the grouping structure appears to be given by the task. That is reasonable, but the paper should be clearer that TreeWalker is not a drop-in improvement for unstructured inference batches unless grouping can be obtained cheaply.
- The evaluation is limited to CPU, a maximum group width of 128, and three datasets. More workloads, e.g., GPU inference, larger groups, would make the practical case stronger.
Questions
- How expensive is it to form groups when the input data is not already grouped by the application? Any discussion here?
- Can TreeWalker handle partially overlapping constants, where different subsets of rows share different features?
- How would the method scale beyond 128 rows per group?
Limitations
see my comments in weakness and questions
Formatting concerns
The format should be further improved, e.g., Figure 3 is too large and take too much space, Figure 1 can be more compact.
1 comment
Rebuttal
We thank the reviewer for the careful reading, and for recognizing the same-layout full-walk baseline as the control that separates algorithmic gains from implementation effects.
Scope and grouping cost (W1, Q1). We agree the paper should state the operational contract explicitly, and we will add it to the introduction: "TreeWalker targets workloads whose request semantics supply grouped rows; it does not construct groups from unstructured batches, and it offers no advantage when rows share no feature values." In the target workloads the group is created by the task itself: discrete-time expansion materializes G rows from one entity, ranking sessions arrive grouped, and scenario analysis generates the variants. Grouping cost is therefore zero by construction in the motivating regime. For batches without group structure, width-1 groups share nothing and we claim no speedup; TreeWalker is not a drop-in replacement for unstructured batch inference, and we will say so.
Partially overlapping constants (Q2). Constancy is defined per group. A feature constant on only a subset of rows is treated as varying: its splits partition the row mask, correctness is unaffected, and the unsplit shortcut still prunes one-sided outcomes. What is lost is the sharing within that subset. Exploiting subset-level structure would require hierarchical subgrouping, which we consider future work.
Beyond (Q3, W2). The 128-bit word bounds a single mask, not the method. A group of width splits into chunks and the work decomposition applies per chunk: the constant-projected walk is paid times instead of once, leaf writes remain in total, and the per-row work ratio plateaus at the chunk width rather than continuing to fall. Because the ratio saturates well before on our datasets (Table 2), the amortization forfeited by chunking is small. A fixed-work chunked sweep at (same total rows and the same multiset of 128-row chunks in every cell) confirms realized chunked serving stays at the plateau, with no chunked cell slower in either run:
| logical | Arm s/row ( vs 128) | Intel s/row ( vs 128) |
|---|---|---|
| 128 | 0.987 | 0.977 |
| 256 | 0.980 (-0.7%) | 0.962 (-1.5%) |
| 512 | 0.960 (-2.8%) | 0.942 (-3.5%) |
| 1024 | 0.932 (-5.6%) | 0.917 (-6.1%) |
The sweep holds engine work fixed by construction, so it checks the plateau; the -fold repayment of above is quantified by the decomposition, not by this sweep. We deliberately avoid arbitrary-width masks: a -word mask makes each mask operation , which the unit-cost model would then have to charge.
Breadth (W2). We ran a scenario-analysis benchmark on the UCI Default of Credit Card Clients dataset (30,000 rows, 23 features; LightGBM , ), sweeping the number of perturbed features and : algorithmic speedup over the same-layout full walk ranges from (, ) to (, ) on Arm and from to on Intel, never below in any of the 32 cells, and the measured work ratio tracks the prediction (0.195 to 0.611 measured vs 0.188 to 0.601 predicted for to at ; is measured on realized groups, since multiplicative shocks leave zero-valued features constant). We will report this benchmark in Section 5 and the appendix. GPU execution is outside this paper's scope: our target regime is latency-critical CPU serving, the regime all five baselines target as well.
Formatting. We will shrink Figure 3 and compact Figure 1 as suggested.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Rebuttal
We thank the reviewer for the detailed comments and concrete questions; the notation catches in particular improve the paper.
Setting. We would first like to clarify the setting, since the summary describes a speedup to model fitting: TreeWalker accelerates inference for already-trained ensembles. Training is unchanged; we consume standard LightGBM/XGBoost models via treelite, and outputs match the trained model exactly for f64 models and to documented roundoff for f32. We will sharpen the abstract's opening so this is unambiguous.
Proofs (W1). We will add a short roadmap to the analysis (work-decomposition theorem, then the trace corollary, then the provisioning corollary) and sharpen one statement in revision: the 1/L precompute limit is a structural leaf-write floor, and the corollary text will state that the provisioning share is small at measured G (within 12% at G=128) rather than vanishing asymptotically. If specific steps are unclear we would welcome pointers and will address them directly.
Framing and related work (W2). We will add a related-work paragraph positioning grouped inference relative to multilevel/nested-data and time-series modeling. Those literatures concern model specification for grouped data; TreeWalker is orthogonal: it accelerates exact inference for any tree ensemble evaluated on grouped rows, whatever model produced them. Multilevel and panel settings are sources of grouped workloads rather than competing methods, and we agree the paper should say so.
Prose (W3). We will do a consolidation pass; the algorithmic-versus-layout framing and the group definitions are currently restated across sections.
Notation (W4). Both points will be fixed. We will define ht at first use ("where ht is the t-th tree"), and reword the complexity claim as worst-case O(TL), with average cost tracking T⋅d for average root-to-leaf depth d≤L. (d is defined in the Notation paragraph; we agree the big-O phrasing obscured the average-case intent.)
Applicability (W5). We ran a scenario-analysis benchmark (UCI Default of Credit Card Clients, 30,000 rows, 23 features; LightGBM T=500, L=8; k∈{1,2,4,8} perturbed features, G∈{4,16,64,128}): TreeWalker is never slower than the same-layout full walk in any of the 32 cells on either architecture, speedup reaches 21.7× (k=1, G=64, Arm) and holds 1.85× on Arm and 1.07× on Intel at the unfavorable corner (k=8, G=4), and the measured work ratio tracks the (dv+1)/(d+1) prediction (0.195 to 0.611 vs predicted 0.188 to 0.601 for k=1 to 8 at G=128, with dv measured on realized groups). Discrete-time survival expansion is the special case where the varied feature is time, so the new benchmark covers the general pattern. The regime is common where such models are deployed: every production discrete-time survival model pays the G-fold expansion on every prediction. We will report this benchmark in Section 5 and the appendix.
Q1, random forests. The algorithm applies: traversal and mask partitioning are independent of the training procedure, and a random forest differs only in output aggregation (average instead of sum, no link function). Our implementation currently targets binary-logistic GBDTs and rejects other postprocessors; extending aggregation to RF is mechanical.
Q2, why speedup falls with depth. At fixed G the constant-projected subtree grows faster than path depth. Going L=4 to 8 (T=500, G=16), more of each tree survives constant projection, so the shared fraction of work falls and algorithmic speedup declines:
Q3, slower than LightGBM? Against LightGBM's native predictor we did not measure such a case: TreeWalker is faster in all 272 grid cells per architecture (minimum 2.03× on Intel, 2.21× on Arm). The boundary cases are elsewhere, and we will add them to the limitations. Against our own same-layout full walk, TreeWalker is slower in 64 of 544 cells, all at G∈{1,2} where there is no sharing to exploit (worst 1.50×, FLCHAIN, T=2000, L=2, G=1). XGBoost's native predictor is faster in 38 of 272 Intel cells, concentrated at large deep models (worst 6.3×, Expedia, T=2000, L=16); the same-layout comparison attributes this gap to engine implementation rather than the algorithm, since TreeWalker beats its own full walk at those cells.